From ebb361ee3f02d677460fc2b55a47c6cd4bbbc489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Thu, 27 Jul 2023 16:45:07 +0200 Subject: qt_enable_separate_debug_info: Enable custom location of dSYM directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- cmake/QtSeparateDebugInfo.cmake | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'cmake/QtSeparateDebugInfo.cmake') 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 "$.${debug_info_suffix}") set(BUNDLE_ID ${fw_name}) else() - set(debug_info_bundle_dir "$.${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 "$") + else() + set(debug_info_bundle_dir "$") + 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( -- cgit v1.2.3