diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-03-27 12:47:42 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-03-28 15:45:24 +0200 |
commit | 396e6daea42bf83b68a6850ff2f82cae74c13fc3 (patch) | |
tree | c4909cb8f3070632f112f29e24feb59a65094dfb /cmake/QtFindPackageHelpers.cmake | |
parent | 80c1406371d10cd8536de988195f00ddbc1c25a2 (diff) |
CMake: add some docs for qt_find_package
For -developer-buildS qt_find_package caches which packages were found
on the first configuration, to make the build system pick up a newly
added qt_find_package call one needs to follow one of the methods
that are now mentioned in the docs.
Hugely based on commit message from commit
6847a19e3edc76cce6ca0f0c25e520db591cedb9.
Change-Id: I4a13d3c97a6172f504a57298c4b3edee30d21250
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtFindPackageHelpers.cmake')
-rw-r--r-- | cmake/QtFindPackageHelpers.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/QtFindPackageHelpers.cmake b/cmake/QtFindPackageHelpers.cmake index 407e41b833..60550d7a66 100644 --- a/cmake/QtFindPackageHelpers.cmake +++ b/cmake/QtFindPackageHelpers.cmake @@ -16,6 +16,15 @@ function(qt_find_package_promote_targets_to_global_scope target) "qt_find_package_targets_dict" "promote_global") endfunction() +# As an optimization when using -developer-build, qt_find_package records which +# packages were found during the initial configuration. Then on subsequent +# reconfigurations it skips looking for packages that were not found on the +# initial run. +# For the build system to pick up a newly added qt_find_package call, you need to: +# - Start with a clean build dir +# - Or remove the <builddir>/CMakeCache.txt file and configure from scratch +# - Or remove the QT_INTERNAL_PREVIOUSLY_FOUND_PACKAGES cache variable (by +# editing CMakeCache.txt) and reconfigure. macro(qt_find_package) # Get the target names we expect to be provided by the package. set(find_package_options CONFIG NO_MODULE MODULE REQUIRED) |