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>
This commit is contained in:
parent
80c1406371
commit
396e6daea4
@ -16,6 +16,15 @@ function(qt_find_package_promote_targets_to_global_scope target)
|
|||||||
"qt_find_package_targets_dict" "promote_global")
|
"qt_find_package_targets_dict" "promote_global")
|
||||||
endfunction()
|
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)
|
macro(qt_find_package)
|
||||||
# Get the target names we expect to be provided by the package.
|
# Get the target names we expect to be provided by the package.
|
||||||
set(find_package_options CONFIG NO_MODULE MODULE REQUIRED)
|
set(find_package_options CONFIG NO_MODULE MODULE REQUIRED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user