summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Write QT.XXX.depends entries into module pri filesJoerg Bornemann2020-05-251-7/+66
| | | | | | | | | | | | | | | | | Qt module targets now export the "_qt_config_module_name" property, which contains the module's name in qmake land. This can be different from the lower case target name (e.g. Test vs testlib). This exported property is used when retrieving the dependencies of a module outside of qtbase. The property's name is a bit odd and lower case, because we want to be able to set it on INTERFACE_LIBRARY targets, for instance header modules. This CMake pecularity is described in https://gitlab.kitware.com/cmake/cmake/issues/19261 Fixes: QTBUG-84287 Change-Id: I4a75af3ebeabebc56a0f77d464e45ab7fd81eafa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "CMake: Don't create *Depends header for header-only modules"Joerg Bornemann2020-05-202-9/+3
| | | | | | | | | | | | This reverts commit e875f458055d6a7b54d2d853590ccc2495ab145b. Reason for revert: syncqt creates a master header that includes the *Depends header. Therefore we must always create the *Depends header. Ignore for now that *Depends headers are empty and pointless for module headers. Change-Id: I1dcc836788b3d46c4f1b504d2d64e9eb67b66206 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Hot fix for Ninja Multi-Config with MSVC and OpenSSLJoerg Bornemann2020-05-201-1/+6
| | | | | | | | | | | For now, we have to turn off the 3rdparty lib generation code for qt_lib_XXX.pri files, because it's broken for NMC if the 3rdparty libraries have different binaries per config. The actual fix is more involved. Task-number: QTBUG-84348 Change-Id: I863e69085b68c0dbbb3f6c415111bc255799e155 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Move qt_lib_XXX.pri generation to module finalizerJoerg Bornemann2020-05-201-18/+21
| | | | | | | | | | | | Introduce a qt_finalize_module function that is called as a CMakeLists.txt finalizer and call qt_generate_module_pri from there. This is done in preparation for writing the QT.XXX.depends entries to the module pri files, because we must do this after all dependencies have been added. Change-Id: Ia61db73383541651389fd647523ef535792874d4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Use provided OUTPUT_DIRECTORY for manual tests and benchmarksAlexandru Croitor2020-05-191-2/+10
| | | | | | | | If an OUTPUT_DIRECTORY option is provided, it should be used instead of discarding it. Change-Id: Ie53b56616f16589f7c05ff9378d7ba2e2ba34726 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Append to QT_CONFIG in the qt_lib_XXX.pri filesJoerg Bornemann2020-05-191-0/+1
| | | | | | | | The module pri files are supposed to add their public features to the global QT_CONFIG variable. Change-Id: I9a1719f897747a1d89011b1f1231c05a23539def Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix reading of INTERFACE_* properties in pri file generationJoerg Bornemann2020-05-191-1/+1
| | | | | Change-Id: I3d1b1910239ada44d393f8c2c8803f33f7b64189 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix calling finalizers with empty argumentsJoerg Bornemann2020-05-191-1/+1
| | | | | Change-Id: I7a826a4cd5e38882932476ef31cdb949cc1949c8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix empty plugin_types value in module pri filesJoerg Bornemann2020-05-191-1/+5
| | | | | | | Avoid writing module_plugin_types-NOTFOUND into the module .pri files. Change-Id: I2fed7b0d1c21e2233eebcaca419f522a07d22af4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Generate qt_plugin_XXX.pri filesJoerg Bornemann2020-05-191-3/+54
| | | | | | Task-number: QTBUG-75666 Change-Id: I4ea0679fa0c62a486d03568525ad60697709fe68 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Generate information about 3rdparty libs in module .pri filesJoerg Bornemann2020-05-193-3/+198
| | | | | | | | | | | | | For modules that are not yet ported to CMake and that use QMAKE_USE += libfoo we need to provide the information about libfoo in the qt_lib_XXX.pri files. Also, we now generate qt_ext_XXX.pri files for bundled 3rdparty libs. Task-number: QTBUG-75666 Change-Id: I9e4b057a197554ecb37c294c0bf09e2a2b3aa053 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Use custom install script to support Ninja Multi-Config buildsAlexandru Croitor2020-05-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Calling cmake --install . only installs a single configuration. To install both debug and release artifacts, the install invocation needs to be done for each configuration. To keep the Coin instruction code simpler, delegate the looping over configurations to a custom CMake script, and use it in the Coin instructions. Replace all cmake --install calls in the instructions with calls to either call_host_install.yaml or call_target_install.yaml. The path to the script depends on whether we are building qtbase or another module. In the former case the script should be called from the build dir, otherwise from the install dir. The other distinction is whether the host or target env prefix needs to be added. Task-number: QTBUG-80900 Change-Id: Ied4bf739e2b1a2307f22fc79c1cfad746c8cbc44 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Install non-main-config tools and executables to a subdirAlexandru Croitor2020-05-191-25/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Ninja Multi-Config, we don't want to install a "Release" moc.exe, and then override it with a "Debug" moc.exe. Because it doesn't seem possible to exclude installation of targets per configuration, put the non-main configuration tools into configuration specific subfolders like "bin/Debug", so no overriding happens upon installation. Introduce a new function qt_get_install_target_default_args() which returns install destination arguments for consumption in qt_install() calls. The function adds the config-specific suffix to the destination for the appropriate configs. Each call to qt_install *adds* new rules for installation, which means that export registration needs to happen only on the first call. Make sure qt_add_tool doesn't ask qt_add_executable to install yet again, to create duplicate rules. Apply the same install arguments logic to qt_add_executable calls. Task-number: QTBUG-80900 Task-number: QTBUG-80901 Change-Id: I3e732d27dba5bf5f8059d2878ef1e425237d383a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Default to building all configurations with Ninja Multi-ConfigAlexandru Croitor2020-05-192-1/+11
| | | | | | | | | | Thus we will build both Release and Debug configurations in Coin when cmake --build . is executed, mimicking qmake's make which builds both configurations in debug_and_release. Task-number: QTBUG-80900 Change-Id: If48aca249eb84e690d3f9d51a733b3a25df1f7ca Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Allow using single config generators after building with NMCAlexandru Croitor2020-05-191-9/+46
| | | | | | | | | | | | | | | | | | | | | | | | Where NMC is the CMake Ninja Multi-Config generator. The first use case is to allow building standalone tests with one configuration even if Qt was build with multiple configurations. Another use case is for regular Qt consumers that might use the generated qt-cmake shell script which does not have the generator specified (as opposed to qt-cmake-private). Another detail is to use the first configuration from the initial Qt configurations list (CMAKE_CONFIGURATION_TYPES) when building standalone tests with a single config generator, so that it doesn't default to Debug, but rather to the provided first configuration. This matches qmake behavior, where on Windows with a debug_and_release configuration, tests are still built against release. Task-number: QTBUG-80900 Change-Id: I0da91c1f91095332cfe9e38d17f440aad6a09d15 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't create *Depends header for header-only modulesJoerg Bornemann2020-05-162-3/+9
| | | | | | | | | Set the target property INTERFACE_MODULE_IS_HEADER_ONLY for header-only modules, and only create *Depends header files if this property is falsy. Change-Id: Ic6b100787d18b3ff1f7b9d0f2b5c744018b1f295 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add MODULE_INCLUDE_NAME one-value-keyword to qt_add_moduleJoerg Bornemann2020-05-152-10/+17
| | | | | | | | | | | | This value is the equivalent of qt_module.prf's MODULE_INCNAME and can be used to specify a name for the module's include subdirectory. The default is Qt<ModuleName>. The include name is stored in the module's target property MODULE_INCLUDE_NAME. Change-Id: Ie6c8f6882ee2c3db78884ae5781593c803be3c05 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Enable default usage of utf8 sources for Qt consumersAlexandru Croitor2020-05-153-1/+20
| | | | | | | | | | And enable the same default when building Qt itself (it's implicit). Allow opting out on a target-by-target basis, by using the public qt_disable_utf8_sources() API call. Change-Id: Ifc19a744d57b96b1c74a6926a0c6628c2a820464 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Set QT_TARGET_XXX properties for Qt executables and pluginsJoerg Bornemann2020-05-121-10/+44
| | | | | | | | | | | | | Before, we were setting those properties only for Qt modules. Now, Qt executables and plugins have a full VERSIONINFORMATION resource on Windows. Also, extend the CMake API with the possibility to pass target information to modules, plugins and tools. This will be used in a subsequent commit. Change-Id: I2bb8d3637569e0eaec76f56331bc23282285d872 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make build system of installed Qt more relocatableAlexandru Croitor2020-05-078-99/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aka handle CMAKE_INSTALL_PREFIX in a more relocatable way. The following story inspired this change. If a user wants to build a Qt repo into a different install prefix than the usual Qt one, this will fail configuration because we look for various things like syncqt, qdoc, etc relative to CMAKE_INSTALL_PREFIX, which will now point to a different location where none of the above tools are located. The intent for such a use case is to support building Qt packages with Conan, which sets a random install prefix when configuring a repo. The idea is to derive the qt prefix dynamically from the QtBuildInternals package location. Essentially it's a reverse relative path from the QtBuildInternalsConfig.cmake file to the install prefix that was specified when initially configuring qtbase. Once the dynamic prefix is computed (so we know where the possibly relocated Qt is), we can find tools like syncqt and qdoc. This is an initial attempt to support a use case like that. More design work will probably needed in case if tools / libs need to be found in a location different than the Qt install prefix (so support for multiple install prefixes / search paths). An example of such a case would be when building qtdeclarative and qtquickcontrols2 as Conan packages in one go. Most likely the qmltyperegistrar tool will be located in the random install prefix set by Conan, so building qtquickcontrols2 might fail due to not finding the tool in the original Qt install prefix. As to the implementation details, the change does the following: - Dynamically computes and sets the QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX variable when find_package()'ing QtBuildInternals. It's an absolute path pointing to where the relocated Qt is. - When building qtbase this variable is not yet available (due to QtBuildInternalsExtra not existing), in that case we set the variable to the absolute path of CMAKE_INSTALL_PREFIX (but only for the initial qtbase configuration). - Remove QT_BUILD_INTERNALS_ORIGINAL_INSTALL_PREFIX which was used for standalone tests purposes. It's not needed now that we compute the location of the Qt prefix dynamically. - The Unixy qt-cmake and qt-cmake-private shell scripts now use a relative path to find the toolchain file we created. - The toolchain file also dynamically computes the location of the Qt packages, and adds them to CMAKE_PREFIX_PATH. - A lot of existing CMAKE_INSTALL_PREFIX uses are replaced with QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX. This includes finding tool locations, mkspecs dir, path environment setup for tools, etc. - Some places still use CMAKE_PREFIX_PATH in the following cases - When determining paths while configuring qtbase (valid cases) - When I wasn't sure what the behavior should be, so I left them as-is (an example is documentation generation, do we want to install it into the random Conan prefix, or into the main prefix? Currently it installs in the random prefix). Note that relocating a Qt installation does not work for non-prefix / non-installed builds, due to hardcoded paths to include directories and libraries in generated FooTargets.cmake files. Task-number: QTBUG-83999 Change-Id: I87d6558729db93121b1715771034b03ce3295923 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Replace hardcoded include dirs for the global qtbase targetsAlexandru Croitor2020-05-071-8/+8
| | | | | | Change-Id: I22a120a0cb8ca690d224b1301b85e704364fbce0 Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix typo in readmePaul Wicking2020-05-041-1/+1
| | | | | Change-Id: I6066eb5309ff7e6e4e6fd1b8dff65957be6d5a55 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Write QT.XXX.plugin_types to qt_lib_XXX.pri filesJoerg Bornemann2020-05-011-0/+8
| | | | | | | | | This is needed for building Qt plugins with qmake against other CMake-built modules. Change-Id: Ibd6ad0b08645c798be74285b24f71add947bea88 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add some missing MinGW definesAlexandru Croitor2020-05-011-1/+1
| | | | | | | Task-number: QTBUG-83929 Change-Id: Iaa12f1f8652cb132bead91160a2898657de52edb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* CMake: Limit warnings_are_errors flags to C++ and Objective-C++Alexandru Croitor2020-05-011-2/+9
| | | | | | | | Otherwise when applied to bundled 3rd party library C files, the MinGW build fails when compiling src/3rdparty/md4c/md4c.c. Change-Id: Ia522b10aa69aa15f239d20c65e31c84edbccee6d Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* CMake: Fix failing standalone tests on WindowsAlexandru Croitor2020-05-012-4/+29
| | | | | | | | | | | | | | | Due to the install prefix being changed for standalone tests, the correct $qt_prefix/bin folder was not added to the PATH environment variable when running tests. Make sure to always include the the original qt install prefix, even if a different install prefix is specified when configuring standalone tests. Amends 39090ea15c41eded8a233ec2633c0c657280297c Change-Id: I22aab732bb2bb679074a811d28d8209e1d535df3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use NAME_MISMATCHED in find_package_handle_standard_args of ECMAlexandru Croitor2020-05-011-0/+5
| | | | | | | | | Gets rid of mismatch warnings when looking for various ECM packages like XCB. Change-Id: I0bf4db993195993df7789c032454b7883e8efd35 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Fix 32 bit Qt builds like our MinGW config in CoinAlexandru Croitor2020-05-011-0/+49
| | | | | | | | | | | | | | Enable sse2 and fpmath for modules when appropriate, the logic is a port of the code in mkspecs/features/qt_module.prf. Fix qdrawhelper.cpp to always be compiled when using GCC with a special case. pro2cmake.py failed to handle the source subtraction correctly. Fixes: QTBUG-83791 Task-number: QTBUG-75578 Change-Id: Ibe32a250b266d580ad21f6c55f09fd03a14ceb82 Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Set QT_PLUGIN_CLASS_NAME also on public pluginsMÃ¥rten Nordheim2020-04-301-2/+6
| | | | | | | ... and update handling of CLASS_NAME in qt_internal_add_plugin Change-Id: Iec8e5f9f80df02c9ba21648535872988839f4b64 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix the setup for html_docs and qch_docsVenugopal Shivashankar2020-04-301-2/+2
| | | | | | | | | | | Traditionally, these make targets generated HTMLs and QCH only. This change fixes the dependency for these targets to ensure that behavior. Fixes: QTBUG-83877 Change-Id: Ic7c8afe5853d33fc4cc4cfd996f87e5f65df31ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Revert "CMake: qt_find_package() enable debug behavior by default"Alexandru Croitor2020-04-301-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | It broke configuration of qtwayland standalone tests, due to qtwayland doing 3 separate qt_find_package(Wayland) calls with the same package but different arguments in 3 different directory scopes. The top scope didn't have PROVIDED_TARGETS argument. The rest of the scopes did have the arguments with either Server or Client, but because of the debug behavior above being enabled by default the dependencies weren't registered in the Qt6WaylandClientDependencies.cmake file (and the server equivalent). The registration didn't happen due to the skipping logic, when a package is found and the targets already exist. This led to standalone tests failing to configure because they tried linking against non-existent Wayland::Client and Wayland::Server targets. This reverts commit dd7e40b1086020f6a054957f4972720cd6849280. Change-Id: I60e358a4891b84ecec0e127d9de8ab9747a6ab24 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* CMake: Fix usage of correct install prefix for standalone testsAlexandru Croitor2020-04-301-2/+15
| | | | | | | | | | | Previously configuration of standalone tests might have failed due to CMake trying to create files in the /usr/local default prefix. Make sure to use a fake prefix in the binary dir instead, unless another prefix is explicitly specified. Change-Id: Icfcb32285aa5596abf1a918396b26673880a8d27 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Namespace all our IMPORTED targetsJoerg Bornemann2020-04-293-13/+11
| | | | | | | | | | | CMake IMPORTED targets should be namespaced so that CMake knows that the name refers to a target and not a file. Use the existing WrapXXX naming scheme where applicable. Fixes: QTBUG-83773 Change-Id: I5b0b722c811200c56c260c69e76940a625228769 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix CMP0100 warning for bundled harfbuzzJoerg Bornemann2020-04-291-2/+4
| | | | | | | | Add a SKIP_AUTOMOC argument to qt_add_3rdparty_library and use it in BundledHarfbuzz. Change-Id: Ie4aa61639a5ab64f286ac539989572a9ae6bc3d5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Honor INSTALL_MKSPECSDIR when generating qmodule.priJoerg Bornemann2020-04-271-2/+2
| | | | | Change-Id: I3e0cdee30590d6979658ef81978513dd20455516 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix wrong arm64 architectureLeander Beernaert2020-04-271-1/+1
| | | | | | | | | | Due to the wrong string comparison, we were writing out the wrong architecture for the arm64 builds to the deployment settings json file. This leads to androiddeployqt tool not being able to locate the stdlibc++. Change-Id: I3d13b14c27f043445bf46aaca0e9f862f6ca84e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow sqldriver plugins to be built as standaloneLeander Beernaert2020-04-241-0/+8
| | | | | | | | | | | | | This patch allows all the sqldrivers to be built as a standalone project. It is not possible to build each plugin separately due to the configuration features definition being located in the sqldriver's folder CMakeLists.txt. In other words, the project needs to be generated from the src/plugins/sqldrivers/CMakeLists.txt file. Fixes: QTBUG-82962 Change-Id: If41c7e3827589391830a894a9c998d2e56239562 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: qt_find_package() enable debug behavior by defaultLeander Beernaert2020-04-241-2/+7
| | | | | | | | | | | | | Without this behavior enabled by default it is currently not possible to build QtVirtualKeyboard as a static build. We run into the error where cmake is trying to promote the targets to be global due the XCB library already being found by one of the modules in QtBase. In case we wish to disable this fix, any module can simply specify QT_FIND_PACKAGE_DISABLE_DEBUG_BEHAVIOR=ON during configuration time. Change-Id: Id7f2ad12ddea941dda754361660c7606439cd5a4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'static_runtime' featureJoerg Bornemann2020-04-231-0/+24
| | | | | | | | | | This feature is Windows-only and must be turned on manually. For MSVC it sets the MSVC_RUNTIME_LIBRARY target property. For MinGW it adds the -static linker flag. Change-Id: I9da3b88d545b34bc34a3a80301b2dd1b5986fa88 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add qt6_add_plugin public APILeander Beernaert2020-04-222-3/+4
| | | | | | | | | | | | | | | This patch adds a publicly callable qt6_add_plugin() API to create plugins. This API is meant to cover cases such as the plugandpaint example. This patch also renames qt_add_plugin to qt_internal_add_plugin in order to avoid clashes with the public API. To avoid breaking the existing projects, a compatibility wrapper function is enabled by default unless QT_DISABLE_QT_ADD_PLUGIN_COMPATIBILITY is specified. Fixes: QTBUG-82961 Change-Id: If5b564a8406c90434f1bdad0b8df76d3e6626b5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix handling of negated feature config valuesJoerg Bornemann2020-04-212-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | Consider a negated feature config value like the following: qt_feature_config("foo" QMAKE_PUBLIC_QT_CONFIG NEGATE) If this feature was disabled, it would turn up in both, enabled_features and disabled_features of module .pri files. Also, QT_CONFIG would contain foo. Expected however is that QT_CONFIG contains no-foo, and only disabled_features contains foo. Fix this by prepending a "no_" prefix to the value, similar to the "no-" prefix in the qmake build. The qt_correct_config function was adjusted to recognize "no_foo" and translate it to the qmakeish "no-foo" config value. Config values that start with "no_" but do not correspond to a feature are left untouched. You can still have values like "no_valley_too_deep" or "no_mountain_too_high". Change-Id: I23d8b18c84e04ea6dfa25cc6ccd8f7e86211b144 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Move Resources API into Qt6CoreMacrosLeander Beernaert2020-04-202-197/+0
| | | | | | | | Move QT6_ADD_RESOURCE to Qt6CoreMacros in order to avoid the extra config file step. Change-Id: Ib445ca35c648cf344ee8795de8bdddc0f0758972 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Relocate quick compiler resource pass to QtDeclarativeLeander Beernaert2020-04-201-136/+14
| | | | | | | | | | | | Since there's no way to register callbacks or to store functions to be called later in CMake, the only way to isolate the quick compiler behavior for qt_add_resources() is to wrap it in a conditional check. As soon as someone loads Qt6QmlMacros, the variable will set and the functionality will be available. Change-Id: I5fbdf2966e7dfdc734512a5b2b973e0ace9da5df Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make use of CMAKE_CURRENT_FUNCTION_LIST_DIRJoerg Bornemann2020-04-171-2/+4
| | | | | | | | Once we can require CMake 3.17 everywhere, we can remove the variable set up from QtSeparateDebugInfo.cmake. Change-Id: I91572583654054f5fa47ac1e41be23050a5a8c0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix location of module .pri files for non-prefix buildsJoerg Bornemann2020-04-171-1/+1
| | | | | | | | | In a non-prefix build, the module .pri files must end up in the mkspecs/modules subdirectory of qtbase's build directory. Change-Id: I241f4e274d31de7c1e3c2fa8e5e26fb8747f11c5 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Write QT_BUILD_PARTS to qmodule.priJoerg Bornemann2020-04-172-14/+23
| | | | | Change-Id: I4bddba38b51df3c70780d94f64a31b3040cb0bc8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Write PKG_CONFIG_EXECUTABLE to qmodule.priJoerg Bornemann2020-04-171-5/+11
| | | | | Change-Id: Ide61cc93d44c659740b72d085fb8b15684bc64fa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Generate qmake pri information for building with qmakeAlexandru Croitor2020-04-172-11/+161
| | | | | | | | | Implemented some necessary functionality to generate correct .pri information, so that qmake can build modules. Task-number: QTBUG-75666 Change-Id: I63281adfef3d01385928b1d8c4be0b32ac97c4d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Generate qmake .prl filesJoerg Bornemann2020-04-174-1/+299
| | | | | | | | This commit also adds a qt_finalize_module function that is called for every Qt module after all link dependencies have been added. Change-Id: I489d188d05e368208a8a62828bb12fb395df54bc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make sure not to use the Qt prefix for standalone testsAlexandru Croitor2020-04-172-0/+19
| | | | | | | | | We don't want people accidentally installing tests into the Qt prefix. Change-Id: Ic99492559875f753897a83af162253cac846a8a5 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>