summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Fix resource object file paths in prl files for prefix buildsAlexandru Croitor2020-11-302-8/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the prl files always assumed that resource object files are installed into $qt_prefix/lib when doing a prefix build. That was true for qt_internal_add_resource calls, but not for qt6_add_qml_module and qt6_target_qml_files. Change qt_internal_record_rcc_object_files to take a new required INSTALL_LOCATION argument. The argument takes a path relative to CMAKE_INSTALL_PREFIX. Modify __qt_propagate_generated_resource to save the relative path of the generated resource source file, which will be used in the computation of the final resource object file location. This is needed because the Qml resource functions place the source files in a different directory layout, e.g. .rcc vs .qmlcache Modify qt_generate_prl_file to prepend $$[QT_INSTALL_PREFIX]/ instead of $$[QT_INSTALL_LIBS]/ for the resource install paths. A follow up patch is done in qtdeclarative to pass the new INSTALL_LOCATION argument from the Qml CMake functions. Amends f9dcade5e795a631b9a2d93c855aa8198d58e24e Pick-to: 6.0 dev Task-number: QTBUG-87702 Task-number: QTBUG-88425 Change-Id: Id17bb517b4cb5d00911bfd10a728ba4e0d44871b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix Android non-top-level build against qtbaseJoerg Bornemann2020-11-231-1/+6
| | | | | | | | | | | | | | | | Commit 9e0fb9c4fbe7a11c09a70d7ea1be97405c6bf0f8 introduced build failures in non-top-level builds when building Qt modules against qtbase. This was observed on in the CI for CentOS. Partly revert above commit by taking the old code path for non-top-level builds. Pick-to: dev 6.0 Fixes: QTBUG-88718 Change-Id: I8926e1e4628ec5bdcea99e10497c1f65c10d072d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Name QT_NO_MAKE_*/BUILD_* variables consistentlyJoerg Bornemann2020-11-208-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency, apply the following renamings: QT_NO_MAKE_EXAMPLES -> QT_BUILD_EXAMPLES_BY_DEFAULT QT_NO_MAKE_TESTS -> QT_BUILD_TESTS_BY_DEFAULT QT_NO_MAKE_TOOLS -> QT_BUILD_TOOLS_BY_DEFAULT BUILD_EXAMPLES -> QT_BUILD_EXAMPLES BUILD_TESTING -> QT_BUILD_TESTS This should help to better convey the difference between "BUILD" and "NO_MAKE". To configure tests, but not to build them by default, pass the following to CMake: -DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF Analoguous for examples: -DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF Tools can be excluded from the default build with: -DBUILD_TOOLS_BY_DEFAULT=OFF The variable BUILD_TESTING is still available and initialized with the value of QT_BUILD_TESTS. Change-Id: Ie5f29dfbdca8bfa8d687981dfe8c19c0397ca080 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit fb21a5ce1a5831fab2af5e4d301600d6a6211e5d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Toplevel builds: Add utility toplevel targets for each moduleVolker Hilsheimer2020-11-201-0/+47
| | | | | | | | | | | | Add a target for each level-1 subdirectory in a module. Ninja already generates phony targets such as "qtbase/src/all", but those are not available in e.g. IDE integrations of CMake. With this addition, targets like qtbase, qtbase_src, and qtbase_tests are available in IDEs. Change-Id: If1c3369e9413b3ce127e68c443d4d22949708d5e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 08f46bb40075778e89ba9aed3cef53d990852022) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Generate less pri files and mark header modules as no_linkCristian Adam2020-11-202-5/+9
| | | | | | | | | | | | Plugins will no longer get .pri files generated in non-static builds. Header modules are now marked in the .pri files as CONFIG += no_link. Fixes: QTBUG-88221 Change-Id: I06e31fa970ad021261c43ca3acd88055cc4c9555 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 98e6234bd4a910ab1b3873bafc9da33aab499e2e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix Android top-level prefix buildJoerg Bornemann2020-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | During a top-level prefix build, while configuring qtsvg, Qt6BuildInternalsConfig tries to include QtBuildInternalsAndroid.cmake but such files are not copied by qt_copy_or_install() at configure time. We need to use the "module" form of include() to take CMAKE_MODULE_PATH into account. Then QtBuildInternalsAndroid.cmake can be loaded from the source tree. The include's current form was introduced in commit 3cb9ee3a5b36e2c10dbaf1564852472e7e02a1ae without further explanation. Assuming an accidental change. Task-number: QTBUG-88460 Change-Id: If06ac715fae3c2bebbeffca44b7e07265ffb0f71 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9e0fb9c4fbe7a11c09a70d7ea1be97405c6bf0f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Change way of 'INPUT_' values handlingAlexey Edelev2020-11-201-9/+13
| | | | | | | | | | | | | Move 'INPUT_' variable detection logic out of 'qt_feature_set_cache_value' function. Use 'INPUT_' variable to enable/disable related 'FEATURE_' in case if 'FEATURE_' is not defined. Fixes: QTBUG-88501 Change-Id: I1162ac0fb562036898a37b52c3f80229ec8a0970 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 85f0792d2b10994e9e5fa70de50aa0ac39e98e20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't install pri and debug info for bundled harfbuzz and pcre2Li Xinwei2020-11-201-11/+11
| | | | | | | | | | | | For shared build, Qt6BundledHarfbuzz.lib and Qt6BundledPcre2.lib are not installed. But their pri files(qt_ext_harfbuzz.pri, qt_ext_pcre2.pri) and debug info files(Qt6BundledHarfbuzz.pdb, Qt6BundledPcre2.pdb) are still installed. These files should not be installed too. Change-Id: I3e54bec01d94ee3897b485a982d01b24edc602aa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 3ef32ce901490bb40a87bf6de19748045a605c05) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Rename the qt resource properties to be internalAlexandru Croitor2020-11-192-4/+4
| | | | | | | | | Use lowercase underscored property names. This ensures they will continue to work even for INTERFACE libraries if it ever comes to that. Change-Id: I5281070f25c1eb9f591c79af8b7fa6169c7c0fb7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Extract resource object file recording into new functionAlexandru Croitor2020-11-191-21/+25
| | | | | | | | | | This function will be used by qtdeclarative CMake functions to record resource object file information for Qml-specific generated resources (like the ones containing qmldir and qml files). Task-number: QTBUG-87702 Change-Id: I17c295821775d005dea82d9fbdf83d7ee613f615 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix resource objects story in static prl filesAlexandru Croitor2020-11-192-26/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMake build of Qt intends to improve the developer experience in regards to static Qt builds and Qt resource files. Specifically with a CMake build of Qt, Qt developers don't have to manually call Q_INIT_RESOURCE anymore. For details see the following commits e343affd6345ef8db041789a96016c3a84830dc9 e817ac3d68295fc0670ccede4df08bf1c7e627d2 4ab54320817ebbb465af343514d21139a654aed3 The last commit's implementation is incomplete though. To ensure successful linking, each target's prl file should contain not only the resource object files that are assigned to the target, but also all resource object files of the target's dependencies. To achieve that, qt_collect_libs will now recursively collect all resource object files assigned to the QT_RCC_OBJECTS property of each dependency. Note this implementation is still incomplete. We do not export rcc object file information in the CMake Targets files. That means that when configuring qtdeclarative in a non-top-level build, the generated Qml prl file will not contain references to Core's mimetypes resource object file, etc. So with the current change, only the object files that are part of the current CMake configuration build are tracked. Exporting the resource object files locations proves in a format usable for prl files proves to be difficult (due to CMake not supporting exporting genexes in random properties) and will have to be addressed in a separate change. Amends 4ab54320817ebbb465af343514d21139a654aed3 Task-number: QTBUG-88425 Change-Id: I546655bdfdf7aa86a8df9aadfc054fa415130a33 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Refactor parts of qt_internal_walk_libsAlexandru Croitor2020-11-192-13/+64
| | | | | | | | | | | | | | | | | | | | | | | | Refactor the function in preparation of processing rcc object files. Introduce 2 new functions to get and set values in the memoization dictionary used by qt_internal_walk_libs. Modify qt_internal_add_target_aliases to assign the alias names it creates as properties on the target. Extract these aliases when available to assign memoized values not only for the initial library name, but also for its aliases. When recursively calling qt_internal_walk_libs, make sure to provide a unique out_var name based on the outer target name, and not just lib_libs. Otherwise the out_var values would be polluted from previous recursion runs. Make sure to check for -NOTFOUND in if() checks so that we reuse memoized values that are the empty string. Change-Id: I8fd8e2b0ae14d0ba8f502bc5a764d6e01095001a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix missing dependencies in *Depends headersJoerg Bornemann2020-11-192-3/+14
| | | | | | | | | | | | | | | In qt_internal_create_module_depends_file we're checking the target property INTERFACE_MODULE_HAS_HEADERS. However, this property is not exported, and in per-repo builds we do not have access to this. As we cannot export INTERFACE_* properties, we export another one, called _qt_module_has_headers. This amends commit 598e873c84e6544aa67495b9b9fb1ff22f98a293. Fixes: QTBUG-88503 Change-Id: I04b3e24add6e95b577a049c80683b7361ff72f59 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make paths in qt-cmake-standalone-test relativeAlexey Edelev2020-11-171-14/+21
| | | | | | | | Make paths in qt-cmake-standalone-test relative to script's PWD. Fixes: QTBUG-88380 Change-Id: I6ab507c31ebed391f4e85bc6fe3f7f747dd97d54 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Enable exceptions by defaultMårten Nordheim2020-11-161-3/+7
| | | | | | | | Without breaking currently generated CMakeLists Fixes: QTBUG-88549 Change-Id: Ibda643e1374d9024bf693c12de8ec0ac46e09b7b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure not to pass clang compilers for AndroidAlexandru Croitor2020-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | That breaks configuration with CMake version 3.18.x (but not 3.19 for some reason). Specifically configure ends up passing -DCMAKE_CXX_COMPILER=clang++ which overrides the compiler set by the CMake Android toolchain file, and at the very end of CMake's configuration it complains about You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_CXX_COMPILER= clang++ Which suddenly starts another configuration with the modified compilers, ends up detecting host compilers and libraries and basically everything breaks apart. Fix QtProcessConfigureArgs.cmake not to pass the compiler options if the mkspec contains 'android'. Who knows, we might need this for other platforms too at some point. Task-number: QTBUG-88460 Change-Id: Idd57870a7cb1009a4e7802e5b3d5ac735f2dacf6 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Install missing debug info for some executable filesLi Xinwei2020-11-161-0/+3
| | | | | | | | | | | | | | | | | Although many executable files were generated by qt_internal_add_tool(). Some executable files like designer and androiddeployqt were generated by qt_internal_add_app(). Some executable files like windeployqt were generated by qt_internal_add_executable(). For these executable files, their PDB files won't be installed on MSVC platform, and their separate debug info won't be generated and installed on other platforms. To fix this, qt_enable_separate_debug_info() and qt_internal_install_pdb_files() should also be called in qt_internal_add_executable(). Fixes: QTBUG-88268 Change-Id: Id6a3b5842dba325166e3d696701c82ad942bca74 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* update KDE-ECM CMake modules to include fuzzer sanitizerAndreas Buhr2020-11-141-1/+10
| | | | | | | | | | | Updates one 3rdparty CMake file from https://github.com/KDE/extra-cmake-modules to include support for fuzzing. Task-number: QTBUG-88429 Change-Id: I19e7ed3c5602c34ba4b86e6b0df2ea3047c7c9e6 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Install pdb files to proper directories in multi-config buildLi Xinwei2020-11-141-2/+16
| | | | | | | | | | | | | | In multi-config build, for different configs, the pdb files of EXEs should have different installation directories. For example, when CMAKE_CONFIGURATION_TYPES=RelWithDebInfo;Debug, <build_dir>/bin/moc.pdb will be installed to <install_dir>/bin/moc.pdb. <build_dir>/bin/Debug/moc.pdb should be installed to <install_dir>/bin/Debug/moc.pdb, not <install_dir>/bin/moc.pdb. Fixes: QTBUG-88268 Change-Id: Idc7c92ca8d44bb81d990656af2b309306a4f5c6b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: fix running Android testsAssam Boudjelthia2020-11-122-8/+9
| | | | | | | | | | | | Android *.so files need to CXX visibility to default after qt_set_common_target_properties() which was setting it to hidden. Also, pass the correct androidtestrunner arguments for cmake check target Fixes: QTBUG-88228 Change-Id: Ia29cdc9e65153c9669f3ec06f74a46f8fcd8c507 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Remove indirection via Startup target for EntryPointTor Arne Vestbø2020-11-124-21/+3
| | | | | | | | | | | | | The EntryPoint interface target now contains all the logic for what flags and optional static libraries to add when the entrypoint is enabled. The target property QT_NO_ENTRYPOINT can be used to disable the entrypoint. Change-Id: I9b14ff729366cd6307789c969ebd4b2ca19de77d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix Core -> Core dependency in static buildJoerg Bornemann2020-11-121-1/+1
| | | | | | | | | | | | | | | Fix the overly strict regex in qt_internal_create_module_depends_file to allow for - and _ in module names. We had the above mentioned dependency cycle, because the module name Core_qobject was translated to just Core, creating a Core -> Core dependency. Amends da7609e7d0592b76ccb7cfb6c3136267172dc6bf. Fixes: QTBUG-88437 Change-Id: I866f7ce31e9a1b92fe4c0a6450295c2f3c761558 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Add special processing of opengl configure optionAlexey Edelev2020-11-121-0/+5
| | | | | | | | | | Since feature evaluation expects explicit 'no' value for INPUT_opengl to disable either desktop or es2 opengl support, add special processing for -no-opengl option into QtProcessConfigureArgs.cmake Task-number: QTBUG-88142 Change-Id: Ib49123ee3e9f98035f6ec85a182382559f4db478 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure arguments handlingAlexey Edelev2020-11-121-1/+1
| | | | | | | | | | All configure arguments should be processed as strings and not be ignored if they satisfy CMake's FALSE criteria (see https://cmake.org/cmake/help/latest/command/if.html) Fixes: QTBUG-88424 Change-Id: I932038ad3c5999bed58957dec51fbf892bd650d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Do not set PKG_CONFIG_* environment variablesJoerg Bornemann2020-11-121-10/+0
| | | | | | | | | | | | | This reverts commit 9968a211f92c2b4d5bd1fe004f16ec1c5f968dcd. The PKG_CONFIG_* environment variables should be added by the user environment, preferably by the toolchain file. Apparently, the change was added for Android before we turned off pkg-config for Android. It is not needed anymore. Change-Id: Ieeed09ae53a606c85d4937f463286b5b0f76bde9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* MSVC: enable identical COMDAT folding for release buildsYuhang Zhao2020-11-121-1/+1
| | | | | | | | | | | | | | | According to Microsoft's docs, /OPT:ICF is enabled by the linker by default unless /OPT:NOICF or /DEBUG is specified. If we are in RelWithDebInfo mode, /DEBUG is passed to the linker to generate debug symbols, however, it caused the identical COMDAT folding be disabled. We now pass /OPT:ICF to the linker explicitly to prevent this. [1] https://docs.microsoft.com/en-us/cpp/build/reference/opt-optimizations?view=msvc-160 Change-Id: I02099edb81034ace7bb19f1164d57829e3979a5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Handle exported namespace when computing depsTor Arne Vestbø2020-11-111-2/+2
| | | | | | | We need to handle the possibility of versioned dep (Qt6::Foo). Change-Id: I66797dbc59f00500892958e9c99c4555cddcb980 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Handle genexes when computing dependsTor Arne Vestbø2020-11-111-1/+1
| | | | | | | If not, the resulting dep would end up as 'Foo>', but we need 'Foo'. Change-Id: I246b66eb0ac6b076eea200c4d1ad84bba8ed179c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Build Qt (and client apps using it) with /permissive-Giuseppe D'Angelo2020-11-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *Not* using /permissive- exposes Qt and client apps to interesting bugs and/or build failures, (e.g. QTBUG-87225, or 19b5520abfb5f66d4b83c7a18cc72d68673d098a). We demand strict conformance by any other compiler, it's time to demand it from MSVC too. The Windows headers themselves are clean starting from the Windows Fall Creators SDK (10.0.16299.0), and moreover Qt 6 will drop WinRT; therefore, the comment in the mkspecs does not apply any more. Since /permissive- implies /Zc:referenceBinding, drop that option. The other implied options are set on MSVC < 2017, but I leave them in to avoid tinkering with the fragile lists of C/C++ flags. Rename the CMake internal helper function to better describe what it does. Fixes: QTBUG-85633 Fixes: QTBUG-85637 Fixes: QTBUG-85635 Fixes: QTBUG-88244 Change-Id: Ie03fddb61aa066fdc14b7231c22e7108b4a02fbb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Map configure -hostdatadir to INSTALL_MKSPECSDIRJoerg Bornemann2020-11-102-0/+7
| | | | | | | | | | In the qmake-based build, the hostdatadir is the directory where "Data used by qmake" is located. In the CMake build the equivalent is INSTALL_MKSPECSDIR. Create the mapping accordingly. Fixes: QTBUG-88211 Change-Id: I9e3d1af24bc7f41333ef2269fced5ab3fcfa848d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow using DESTDIR when installing documentationChristophe Giboudeaux2020-11-101-7/+20
| | | | | | | | | | | | | | Previously, QtDocsHelpers.cmake was invoking CMake to copy files or directories instead of using installation targets. This resulted in DESTDIR being ignored. Now we create installation targets and ask CMake to install them. Change-Id: Idbc79d47a37f9ca865d28543bdbbdde3ba448fa3 Fixes: QTBUG-87382 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move iOS entrypoint logic to entrypoint libraryTor Arne Vestbø2020-11-101-3/+3
| | | | | Change-Id: Ie0fc8368953a59d06a31847ed417bc3c35f29b90 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Implement configure -list-featuresJoerg Bornemann2020-11-102-2/+47
| | | | | | | | | Extend qt_configure_get_padded_string to make the feature list look like qmake's. Fixes: QTBUG-88144 Change-Id: I714f2b2f3537b506365a03b5b6bc3413e9cab167 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Warn when building Qt with a generator other than NinjaAlexandru Croitor2020-11-101-0/+10
| | | | | | | | | | | | For now, we only support building Qt with the Ninja generator (and Ninja Multi-Config). Issue a warning when a different generator is used. Allow opting out of the warning by passing -DQT_SILENCE_CMAKE_GENERATOR_WARNING=ON. Change-Id: I5faa5b0ca5fd42efc090ad2ccf4f896bd77e50ca Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Make Release the main config of a -debug-and-release buildJoerg Bornemann2020-11-101-1/+1
| | | | | | | | In configure we need to set the Release configuration first to make it the main configuration. Change-Id: I5fe744b0dcea009c4d672bf519b38c80c87475dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix installation errors in multi-config buildJoerg Bornemann2020-11-104-6/+27
| | | | | | | | | | | In multi-config builds (which equals the debug-and-release feature) we exclude tools of the non-main configurations from the default build. But we still create installation rules for them. Mark those as optional to avoid "cmake --install" yielding errors if those tools weren't built. Fixes: QTBUG-85411 Change-Id: Ic2d3897d1a1c28a715d9a024ec8606fff00e0315 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make zstd config-based lookup quietAlexey Edelev2020-11-091-2/+4
| | | | | | | | | | | | | Make zstd config based lookup quiet and check for version variable as required for ZSTD target. Add IMPORTED_LOCATION by default for pkg-config based search. Expect that select_library_configurations will set correct value for ZSTD_LIBRARY. Fixes: QTBUG-88091 Change-Id: Ia5079154ce4fc4eefbc0931317219b5ca0f3f82f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add handling of PLUGIN_EXTENDS for generic pluginsAlexey Edelev2020-11-091-3/+2
| | | | | | | | | | Modify pro2cmake converter to add extra argument to qt_internal_add_plugin. DEFINE_IF FALSE is added to generic plugins those had "PLUGIN_EXTENDS = - " specified in .pro files. Fixes: QTBUG-87861 Change-Id: I9269df19a32a088f5261f50e7ffff6d29c3d605f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Don't add module pri library entry for header modulesTor Arne Vestbø2020-11-091-1/+7
| | | | | | | | The QT.foo.module entry is used for linkage, so we shouldn't add it for header only modules. Change-Id: Ibb6e7ab08083ccab11d7e060f35c54153e3751c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Allow module to specify initial dependsTor Arne Vestbø2020-11-091-1/+4
| | | | | Change-Id: I85f39f16f2103dcb42ff467bbc79a0baf6c020e1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix qt-configure-module location in configure's outputJoerg Bornemann2020-11-091-1/+6
| | | | | | | | | For non-cross-builds, qt-configure-module is located in CMAKE_INSTALL_PREFIX/bin, not below the staging prefix. Fixes: QTBUG-88262 Change-Id: Ib6cdd88ece391d5b8ce850b991564e5bed1e475d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Avoid usage of FEATURE_debug_and_release in QtSetup.cmakeJoerg Bornemann2020-11-091-1/+1
| | | | | | | | | | | If the user turns on debug_and_release with the configure script, FEATURE_debug_and_release will not be set, and the debug postfix won't be set correctly. Directly use FEATURE_debug_and_release's condition instead. Change-Id: Ica4af3caa25f2e6712eca4659818aac2c8b95256 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure -developer-buildJoerg Bornemann2020-11-091-0/+6
| | | | | | | | | | | | | | | Configure now translates -developer-build to INPUT_developer_build without setting FEATURE_developer_build. The install prefix determination code in QtSetup.cmake happens much earlier than the feature evaluation. As the developer_build feature is merely a switch that's supposed to be flipped by the user, we can just translate the INPUT_developer_build value to FEATURE_developer_build in QtSetup.cmake. Fixes: QTBUG-88318 Change-Id: I57918232359e2e367e41b779d3f4737731dd76e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Add function to get a target property, with empty string as fallbackTor Arne Vestbø2020-11-081-0/+9
| | | | | Change-Id: Ic39fefb91e9ca0f36c815c969ff1072767a9ab16 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Locate zstd using CONFIGAlexey Edelev2020-11-081-21/+51
| | | | | | | | | | | Trying to locate zstd package configuration prior to use pkg-config. Define explicit IMPORTED_LOCATION_DEBUG and IMPORTED_LOCATION_RELEASE in case of pkg-config usage. Fixes: QTBUG-88091 Change-Id: I3cb86a66fad4e7b78b3d2fcff061508fc25e25a7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add PCRE2 library selection depend on debug version availabilityAlexey Edelev2020-11-081-1/+7
| | | | | | | | | Use select_library_configurations to select applicable libraries set for PCRE2. Fixes: QTBUG-88092 Change-Id: I11e669a0142d53a3c344c86bd1d8eb797df4ba97 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow using a custom target for qt_internal_add_docsAlexandru Croitor2020-11-071-1/+1
| | | | | | | | | | | Some repos (like qtimageformats) might not have Qt modules, but they still need a target to pass to qt_internal_add_docs(). Allow passing custom targets to qt_internal_add_docs() without trying to generate bogus include paths. Change-Id: I12191e5b16c082e62e40c96d0eb4d6c0256e7ea4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Private module pri files should have internal_moduleAlexandru Croitor2020-11-071-0/+4
| | | | | | Change-Id: I35b4111e4044ae6283eb8175173453db9001c71b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Disconnect docs installation targets from generation targetsJoerg Bornemann2020-11-062-7/+0
| | | | | | | | | | | | | | | | | "ninja install_docs" should not run the "docs" target, because with the usual workflow ninja docs ninja install_docs the documentation would be built twice. That of course means that "ninja install_docs" will fail if "ninja docs" wasn't run before. Analogous for html_docs, qch_docs, the repository-level and module-level documentation targets. Change-Id: I8ad83602dd393b5afc79a19ab3d395987c889d0d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix top-level documentation install targetsJoerg Bornemann2020-11-062-0/+6
| | | | | | | | | | | | | | | | | | | | | The following targets did not do any actual installation: install_docs, install_html_docs, install_qch_docs, plus their repository-level counterparts. Add the following dependencies: install_html_docs --> install_html_docs_<repo> --> install_html_docs_<module> Analogous for qch. The install_docs target already triggers install_html_docs and install_qch_docs. Analogous for install_docs_<repo>. Fixes: QTBUG-86738 Change-Id: I3468e000e050e2787a859e61d40161f5459cb351 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>