CMake: Fix configs passed to qt_get_install_target_default_args
Because the configs passed to the ALL_CMAKE_CONFIGS option were quoted cmake_parse_arguments(PARSE_ARGV) would escape the semicolon in the set value, effectively doing set(arg_ALL_CMAKE_CONFIGS "Release\;Debug") Then the list(GET arg_ALL_CMAKE_CONFIGS 0 first_config) call would essentially do set(first_config "Release;Debug") and the if(all_configs_count GREATER 1 AND NOT arg_CMAKE_CONFIG STREQUAL first_config) condition would never trigger because a single config string can never equal a double config string. Remove the quotes to ensure correct behavior. This won't really trigger any behavior change, because we exclude installation of Debug executables in -debug-and-release builds, but it will make --trace-expand logs less confusing. Amends f240d94f140ba1614828804efafd2fc5e6d00099 Pick-to: 6.7 Change-Id: I53179511c7698c90b33cb3ff2762cef680a99815 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
d5493d616f
commit
a1445670f5
@ -177,7 +177,7 @@ function(qt_internal_add_executable name)
|
||||
qt_get_install_target_default_args(
|
||||
OUT_VAR install_targets_default_args
|
||||
CMAKE_CONFIG "${cmake_config}"
|
||||
ALL_CMAKE_CONFIGS "${cmake_configs}"
|
||||
ALL_CMAKE_CONFIGS ${cmake_configs}
|
||||
RUNTIME "${arg_INSTALL_DIRECTORY}"
|
||||
LIBRARY "${arg_INSTALL_DIRECTORY}"
|
||||
BUNDLE "${arg_INSTALL_DIRECTORY}")
|
||||
|
@ -204,7 +204,7 @@ function(qt_internal_add_tool target_name)
|
||||
OUT_VAR install_targets_default_args
|
||||
RUNTIME "${install_dir}"
|
||||
CMAKE_CONFIG "${cmake_config}"
|
||||
ALL_CMAKE_CONFIGS "${cmake_configs}")
|
||||
ALL_CMAKE_CONFIGS ${cmake_configs})
|
||||
|
||||
# Make installation optional for targets that are not built by default in this config
|
||||
if(QT_FEATURE_debug_and_release
|
||||
|
Loading…
x
Reference in New Issue
Block a user