cmake build: Create DebugInfo component with separate debug info

When building with RelWithDebInfo. The CMake code is adapted from
corresponding (internal) functions from Qt 6.
Also let the scripts create an additional *-debug.7z with the debug
info.

Task-number: QTCREATORBUG-24916
Change-Id: Ibc3c8c0013718b9c5e868136e5ce01e1e99f84c4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2020-11-12 11:27:34 +01:00
parent 8f4532daae
commit eb4d230e38
6 changed files with 214 additions and 5 deletions
+7
View File
@@ -6,6 +6,7 @@ set(QT_CREATOR_API_DEFINED TRUE)
set(IDE_QT_VERSION_MIN "5.14.0")
include(${CMAKE_CURRENT_LIST_DIR}/QtCreatorAPIInternal.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/QtcSeparateDebugInfo.cmake)
set(IDE_APP_PATH "${_IDE_APP_PATH}") # The target path of the IDE application (relative to CMAKE_INSTALL_PREFIX).
set(IDE_APP_TARGET "${_IDE_APP_TARGET}") # The IDE application name.
@@ -241,6 +242,8 @@ function(add_qtc_library name)
OPTIONAL
)
qtc_enable_separate_debug_info(${name} "${IDE_LIBRARY_PATH}")
if (library_type STREQUAL "SHARED")
set(target_prefix ${CMAKE_SHARED_LIBRARY_PREFIX})
if (WIN32)
@@ -483,6 +486,8 @@ function(add_qtc_plugin target_name)
OPTIONAL
)
qtc_enable_separate_debug_info(${target_name} "${plugin_dir}")
if (_arg_EXPORT)
# export of external plugins
install(EXPORT ${export}
@@ -714,6 +719,8 @@ function(add_qtc_executable name)
)
endif()
qtc_enable_separate_debug_info(${name} "${_DESTINATION}")
update_cached_list(__QTC_INSTALLED_EXECUTABLES
"${_DESTINATION}/${name}${CMAKE_EXECUTABLE_SUFFIX}")