From 9fc13a11886e154383b157f1309204c7eb9ba69f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 6 Apr 2020 11:37:43 +0200 Subject: CMake: Write PKG_CONFIG_EXECUTABLE to qmodule.pri Change-Id: Ide61cc93d44c659740b72d085fb8b15684bc64fa Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 16 +++++++++++----- 1 file 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() -- cgit v1.2.3