summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-04-06 11:37:43 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-04-17 20:42:35 +0200
commit9fc13a11886e154383b157f1309204c7eb9ba69f (patch)
tree630f0398568ac6b90c90dc1fe6aef0f00759e56d /cmake
parent59756b7183e9c35f862f957d709b9c8eab673f23 (diff)
CMake: Write PKG_CONFIG_EXECUTABLE to qmodule.pri
Change-Id: Ide61cc93d44c659740b72d085fb8b15684bc64fa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake16
1 files changed, 11 insertions, 5 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index bb3a747734..8094219af0 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -778,13 +778,19 @@ function(qt_generate_global_module_pri_file)
qt_correct_config(corrected_private_config "${private_config}")
list(JOIN corrected_private_config " " private_config_joined)
- file(GENERATE
- OUTPUT "${qmodule_pri_target_path}"
- CONTENT
- "QT.global_private.enabled_features = ${corrected_enabled_features}
+ set(content "QT.global_private.enabled_features = ${corrected_enabled_features}
QT.global_private.disabled_features = ${corrected_disabled_features}
CONFIG += ${private_config_joined}
-"
+")
+ if(PKG_CONFIG_FOUND)
+ string(APPEND content "PKG_CONFIG_EXECUTABLE = ${PKG_CONFIG_EXECUTABLE}\n")
+ endif()
+
+ # TODO: Write QT_COORD_TYPE once we support setting it.
+
+ file(GENERATE
+ OUTPUT "${qmodule_pri_target_path}"
+ CONTENT "${content}"
)
qt_install(FILES "${qmodule_pri_target_path}" DESTINATION mkspecs)
endfunction()