summaryrefslogtreecommitdiffstats
path: root/cmake/QtConfigDependencies.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "CMake: Add facility to mark package dependencies as optional""Joerg Bornemann2020-09-141-4/+12
| | | | | | | | | This reverts commit b0c51f86f40b6b6d18fe2bb75cc851d36395240d. The build failure caused by 58c1c6ee5c986d502b56eb1cc57f1d9444d42031 has been fixed. Change-Id: Ic7458d54c7a874588e8b1bfeca61df1842763656 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "Revert "CMake: Reduce the number of find_dependency calls""Joerg Bornemann2020-09-141-6/+5
| | | | | | | | | This reverts commit 6e1a570dc8560489d10120cbd019a665f33f49c2. The build failure caused by 58c1c6ee5c986d502b56eb1cc57f1d9444d42031 has been fixed. Change-Id: I67acaa2d1dd5fc88c205b054252be2e6e26898c7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "Revert "CMake: Fix usage of find_dependency()""Joerg Bornemann2020-09-141-14/+16
| | | | | | | | ...and fix the build errors the original change caused. This reverts commit 127fb8bb5587db52216d0ac934f3111170a7cbe3. Change-Id: I4006b32734a51c5d101dd73c957f81d2a0f84ba1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "CMake: Fix usage of find_dependency()"Lars Knoll2020-09-131-14/+14
| | | | | | | | | | This reverts commit 58c1c6ee5c986d502b56eb1cc57f1d9444d42031. This lead to configuration errors on some machines, blocking development. Change-Id: I744f6cc95fbaa273519ab8fc8fb492b87f5729b8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "CMake: Reduce the number of find_dependency calls"Lars Knoll2020-09-131-5/+6
| | | | | | | | | | This reverts commit a3cb002511d7e2cc73234611795c1947620aedd5. This lead to configuration errors on some machines, blocking development. Change-Id: Ibb785c96c7d85692a6e22a73e086119eb571df71 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "CMake: Add facility to mark package dependencies as optional"Lars Knoll2020-09-131-12/+4
| | | | | | | | | | This reverts commit 3685483c4b79b4075bab6d341174a395359d1b4a. This lead to configuration errors on some machines, blocking development. Change-Id: I309cdd55a8ef64899afcbeca54458d1c6d686951 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Add facility to mark package dependencies as optionalJoerg Bornemann2020-09-121-4/+12
| | | | | | | | | | | | | | | | Every public dependency of a Qt module results in a find_package call in the consuming project. But not all public dependencies are mandatory. For example, vulkan is only needed if the user project actually uses Qt classes that pull in vulkan headers. This patch adds the option MARK_OPTIONAL to qt_find_package. Dependencies that are marked as optional will not produce an error on find failure. Task-number: QTBUG-86421 Change-Id: Ia767e7f36991e236582c7509cbd37ea3487bb695 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Reduce the number of find_dependency callsJoerg Bornemann2020-09-121-6/+5
| | | | | | | | | | ...in code. The actual number of calls at runtime does not change. The reason for this stunt is that we want to replace find_dependency with find_package at runtime for optional dependencies, and this will reduce the diff size of the next commit. Change-Id: I304fdf09c69fea7b6d4adabf515712eb097f8c86 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix usage of find_dependency()Joerg Bornemann2020-09-121-14/+14
| | | | | | | | | | | | The find_dependency() macro calls return() on failure, meaning any code after it will be ignored, thus checking any XXX_FOUND variables after find_dependency() is pointless. Fix the places where we use find_dependency() and set the "failed" state before the call and the "success" state afterwards. Change-Id: Ia5239c704f02a9bec972210374ffed7808b14055 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Properly handle CONFIG += thread aka Threads::ThreadsAlexandru Croitor2020-08-061-0/+35
mkspecs/features/qt.prf adds a dependency on the system threading library if the Qt Core thread feature is enabled. Because qt.prf is loaded by any public or internal Qt project, it's essentially a public dependency for any Qt consumer. To mimic that in CMake, we check if the thread feature is enabled, and and set the Threads::Threads library as a dependency of Qt6::Platform, which is a public target used by all Qt modules and plugins and Qt consumers. We also need to create a Qt6Dependencies.cmake file so we find_package(Threads) every time find_package(Qt6) is called. For the .prl files to be usable, we have to filter out some CMake implementation specific directory separator tokens 'CMAKE_DIRECTORY_ID_SEP' aka '::@', which are added because we call target_link_libraries() with a target created in a different scope (I think). As a result of this change, we shouldn't have to hardcode Threads::Threads in other projects, because it's now a global public dependency. Task-number: QTBUG-85801 Task-number: QTBUG-85877 Change-Id: Ib5d662c43b28e63f7da49d3bd77d0ad751220b31 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>