summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-01-11 13:35:10 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-13 13:49:16 +0000
commitb2f0931359f89e2a83cea5f8f99345e912ba8842 (patch)
tree94cefb8a70cc1226a3b609df27c7e0fd1a9689a3 /cmake
parent2d52076b286a73292a3f62e671b9ec8e102d2761 (diff)
downloadqtbase-b2f0931359f89e2a83cea5f8f99345e912ba8842.tar.gz
Add the 'QT_INTERNAL_AVOID_OVERRIDING_SYNCQT_CONFIG' flag
The flag avoids overriding of the default CMake build config when building syncqt. Add extra checks to the make sure that configure-time tools use the correct build type. Fixes: QTBUG-109792 Change-Id: I572fed60c58e59297fa559aea6eb86af94b979b7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 4e4cd7416af3f84e6a7c7dee03a2e50864e9cacc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtToolHelpers.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/QtToolHelpers.cmake b/cmake/QtToolHelpers.cmake
index 117ad7483a..14398e2a40 100644
--- a/cmake/QtToolHelpers.cmake
+++ b/cmake/QtToolHelpers.cmake
@@ -616,7 +616,7 @@ endfunction()
# Specifies the module this tool belongs to. The Qt6${TOOLS_TARGET}Tools module
# will then expose targets for this tool. Ignored if NO_INSTALL is set.
function(qt_internal_add_configure_time_tool target_name)
- set(one_value_args INSTALL_DIRECTORY TOOLS_TARGET)
+ set(one_value_args INSTALL_DIRECTORY TOOLS_TARGET CONFIG)
set(multi_value_args)
set(option_args NO_INSTALL)
cmake_parse_arguments(PARSE_ARGV 1 arg
@@ -639,9 +639,18 @@ function(qt_internal_add_configure_time_tool target_name)
set(extra_args "INSTALL_DIRECTORY" "${install_dir}")
endif()
+ if(arg_CONFIG)
+ set(tool_config "${arg_CONFIG}")
+ elseif(QT_MULTI_CONFIG_FIRST_CONFIG)
+ set(tool_config "${arg_QT_MULTI_CONFIG_FIRST_CONFIG}")
+ else()
+ set(tool_config "${CMAKE_BUILD_TYPE}")
+ endif()
+
string(REPLACE "\\\;" "\\\\\\\;" unparsed_arguments "${arg_UNPARSED_ARGUMENTS}")
qt_internal_add_configure_time_executable(${target_name}
OUTPUT_NAME ${name}
+ CONFIG ${tool_config}
${extra_args}
${unparsed_arguments}
)