diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-05-17 14:22:57 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-05-20 13:15:16 +0000 |
commit | e4b8c488bd8b350f1a19874c4859ae2699afc747 (patch) | |
tree | 2c232002f97aae4f010e49c1dab09f8a9d9b4be5 /src/corelib/configure.cmake | |
parent | 42c8c38564c11a86a553139f21322ad232ab5957 (diff) | |
download | qtbase-e4b8c488bd8b350f1a19874c4859ae2699afc747.tar.gz |
Improve configure2cmake to find_package only in certain conditions
It doesn't make much sense to look for X11 related packages on
macOS and Windows by default. Usually they would not be there, and
as a result the configuration step would show a long list of scary
not found packages, and also eat precious configure time.
Change the conversion script to allow putting conditions around
generated find_package calls.
These conditions can be manually set in the conversion script
library mapping, using the emit_if argument,
which we do for the X11 and Wayland related packages.
They are also computed by checking which features use a given library,
and if the feature is protected by a simple emitIf condition like
config.linux, the relevant library find_package call will be protected
by the same condition.
If a developer still wishes to look for all packages, they can define
the CACHE variable QT_FIND_ALL_PACKAGES_ALWAYS to ON.
The relevant configure.cmake files are regenerated in this patch.
Change-Id: I6f918a94f50257ec41d6216305dae9774933389a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/corelib/configure.cmake')
-rw-r--r-- | src/corelib/configure.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index a5b40b56a0..4f943967a0 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -18,7 +18,9 @@ qt_find_package(WrapRt PROVIDED_TARGETS WrapRt) qt_find_package(LTTngUST PROVIDED_TARGETS LTTng::UST) qt_find_package(PCRE2 PROVIDED_TARGETS PCRE2) set_package_properties(PCRE2 PROPERTIES TYPE REQUIRED) -qt_find_package(PPS PROVIDED_TARGETS PPS::PPS) +if((QNX) OR QT_FIND_ALL_PACKAGES_ALWAYS) + qt_find_package(PPS PROVIDED_TARGETS PPS::PPS) +endif() qt_find_package(Slog2 PROVIDED_TARGETS Slog2::Slog2) |