summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-06-09 15:52:02 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-06-10 14:11:09 +0200
commit4cef4f1c1be713e932052968ac853ec37750ae61 (patch)
tree11776db8836c87f356eaba2c372128463f5e3dce /cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
parentfb981a0954119ed0dfa4a402fdef78e7257ffc96 (diff)
Make configure -no-pkg-config actually work
Turning off pkg-config with the configure flag -no-pkg-config did not work. There are different defaults for FEATURE_pkg_config on different platforms (e.g. Linux: ON, Windows: OFF). The existing code that calculated the initial FEATURE_pkg_config value assumed that the default is OFF and never turned the feature off. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-104123 Change-Id: I33b9687c55c60d4ec9224324951a8838741ee976 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuildInternals/QtBuildInternalsConfig.cmake')
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 5c30cc76dc..6ade39fc8d 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -128,9 +128,14 @@ function(qt_build_internals_disable_pkg_config_if_needed)
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)
+ if ((NOT DEFINED "FEATURE_pkg_config") AND (DEFINED "INPUT_pkg_config")
+ AND (NOT "${INPUT_pkg_config}" STREQUAL "undefined")
+ AND (NOT "${INPUT_pkg_config}" STREQUAL ""))
+ if(INPUT_pkg_config)
+ set(FEATURE_pkg_config ON)
+ else()
+ set(FEATURE_pkg_config OFF)
+ endif()
endif()
# If user explicitly specified a value for the feature, honor it, even if it might break