diff options
author | Craig Scott <craig.scott@qt.io> | 2021-01-14 15:12:06 +1100 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-01-18 15:42:48 +1100 |
commit | f283f0621607ab8d19b5ca53b31158b41456a6df (patch) | |
tree | 9eac8301188a4789bdfd45d09a056c00f047d3d2 /cmake | |
parent | b101f84f86e541fa30c0d6d2a4e549cf51118706 (diff) |
Make -pkg-config configure option actually work
The QtBuildInternals config package file gets processed before feature
evaluation occurs. That means INPUT_pkg_config may be defined, but the
corresponding FEATURE_pkg_config variable won't have been set/updated
yet. Do this check locally because the availability of a number of
features is conditional on whether pkg-config is available.
Change-Id: I6030eb380ee0c630ffbe5db5eed397a46227c7f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index 477f5d21e9..1663e76295 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -75,6 +75,12 @@ function(qt_build_internals_disable_pkg_config_if_needed) set(pkg_config_enabled OFF) endif() + # Features won't have been evaluated yet if this is the first run, have to evaluate this here + if(NOT "${FEATURE_pkg_config}" AND "${INPUT_pkg_config}" + AND NOT "${INPUT_pkg_config}" STREQUAL "undefined") + set(FEATURE_pkg_config ON) + endif() + # If user explicitly specified a value for the feature, honor it, even if it might break # the build. if(DEFINED FEATURE_pkg_config) |