summaryrefslogtreecommitdiffstats
path: root/cmake/QtSeparateDebugInfo.cmake
diff options
context:
space:
mode:
authorMichael Brüning <michael.bruning@qt.io>2023-07-27 16:45:07 +0200
committerMichael Brüning <michael.bruning@qt.io>2023-07-31 17:11:01 +0200
commitebb361ee3f02d677460fc2b55a47c6cd4bbbc489 (patch)
treed50a58466c643eed40faa48593fee98198596a67 /cmake/QtSeparateDebugInfo.cmake
parentee43dacbeacde557a35d4e1ef079e9b5d51893b9 (diff)
qt_enable_separate_debug_info: Enable custom location of dSYM directory
It is part of a solution to produce notarizable binaries for application using Qt WebEngine. Pick-to: 6.6 6.5 Task-number: QTBUG-99555 Change-Id: Ice0bbcfb12829906328f55158b0c37f03878f17c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'cmake/QtSeparateDebugInfo.cmake')
-rw-r--r--cmake/QtSeparateDebugInfo.cmake18
1 files changed, 15 insertions, 3 deletions
diff --git a/cmake/QtSeparateDebugInfo.cmake b/cmake/QtSeparateDebugInfo.cmake
index ff225ad5de..5b263585d3 100644
--- a/cmake/QtSeparateDebugInfo.cmake
+++ b/cmake/QtSeparateDebugInfo.cmake
@@ -201,7 +201,11 @@ endfunction()
# Enable separate debug information for the given target
function(qt_enable_separate_debug_info target installDestination)
set(flags QT_EXECUTABLE)
- set(options)
+ if(APPLE)
+ set(options DSYM_OUTPUT_DIR)
+ else()
+ set(options)
+ endif()
set(multiopts ADDITIONAL_INSTALL_ARGS)
cmake_parse_arguments(arg "${flags}" "${options}" "${multiopts}" ${ARGN})
@@ -248,12 +252,20 @@ function(qt_enable_separate_debug_info target installDestination)
get_target_property(is_framework ${target} FRAMEWORK)
if(is_framework)
qt_internal_get_framework_info(fw ${target})
- set(debug_info_bundle_dir "$<TARGET_BUNDLE_DIR:${target}>.${debug_info_suffix}")
set(BUNDLE_ID ${fw_name})
else()
- set(debug_info_bundle_dir "$<TARGET_FILE:${target}>.${debug_info_suffix}")
set(BUNDLE_ID ${target})
endif()
+
+ if (NOT "x${arg_DSYM_OUTPUT_DIR}" STREQUAL "x")
+ set(debug_info_bundle_dir "${arg_DSYM_OUTPUT_DIR}/${target}")
+ elseif(is_framework)
+ set(debug_info_bundle_dir "$<TARGET_BUNDLE_DIR:${target}>")
+ else()
+ set(debug_info_bundle_dir "$<TARGET_FILE:${target}>")
+ endif()
+ set(debug_info_bundle_dir "${debug_info_bundle_dir}.${debug_info_suffix}")
+
set(debug_info_contents_dir "${debug_info_bundle_dir}/Contents")
set(debug_info_target_dir "${debug_info_contents_dir}/Resources/DWARF")
configure_file(