From 3c148323c08cff1487211c18beda90ae2c6ef508 Mon Sep 17 00:00:00 2001 From: Martin Vejdarski Date: Mon, 12 Jul 2021 20:27:22 +0300 Subject: CMake: Exclude dSYM INSTALL commands for already excluded tools in debug Debug tools are excluded from the ALL target for debug_and_release builds. However, when using the -separate-debug-info option, the same exclusion wasn't being applied for their dSYM INSTALL commands, resulting in a CMake install error. Pass any additional install args like EXCLUDE_FROM_ALL COMPONENT "ExcludedExecutables" to the installation rules of qt_enable_separate_debug_info and install dSYMs for executables per-config in a multi-config build. All the non-main config executable install rules are optional because the non-main config executables are excluded from ALL. Amends 5b136abd21803988f96b9b66c992822efbef97ec Pick-to: 6.2 Fixes: QTBUG-93999 Change-Id: I95c3ce28215c3ee535551e4b7a5fa9731f8f1c28 Reviewed-by: Alexandru Croitor Reviewed-by: Joerg Bornemann --- cmake/QtExecutableHelpers.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmake/QtExecutableHelpers.cmake') diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake index e7dff8522b..5e1f1ca28f 100644 --- a/cmake/QtExecutableHelpers.cmake +++ b/cmake/QtExecutableHelpers.cmake @@ -167,7 +167,14 @@ function(qt_internal_add_executable name) ${install_targets_default_args}) endforeach() - qt_enable_separate_debug_info(${name} "${arg_INSTALL_DIRECTORY}") + if(NOT exclude_from_all AND arg_QT_APP AND QT_FEATURE_debug_and_release) + set(separate_debug_info_executable_arg "QT_EXECUTABLE") + else() + unset(separate_debug_info_executable_arg) + endif() + qt_enable_separate_debug_info(${name} "${arg_INSTALL_DIRECTORY}" + ${separate_debug_info_executable_arg} + ADDITIONAL_INSTALL_ARGS ${additional_install_args}) qt_internal_install_pdb_files(${name} "${arg_INSTALL_DIRECTORY}") endif() -- cgit v1.2.3