summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuild.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r--cmake/QtBuild.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 8de0abf25f..defbe066d3 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -1,4 +1,5 @@
include(CMakePackageConfigHelpers)
+include(QtSeparateDebugInfo)
# Install locations:
set(INSTALL_BINDIR "bin" CACHE STRING "Executables [PREFIX/bin]")
@@ -1611,6 +1612,10 @@ function(qt_add_module target)
endif()
endif()
+ if(QT_FEATURE_separate_debug_info AND is_shared_lib AND (UNIX OR MINGW))
+ qt_enable_separate_debug_info(${target} ${INSTALL_LIBDIR})
+ endif()
+
if (ANDROID)
qt_android_apply_arch_suffix("${target}")
endif()
@@ -3339,6 +3344,10 @@ function(qt_add_tool name)
EXPORT "${INSTALL_CMAKE_NAMESPACE}${arg_TOOLS_TARGET}ToolsTargets"
DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
endif()
+
+ if(QT_FEATURE_separate_debug_info AND (UNIX OR MINGW))
+ qt_enable_separate_debug_info(${name} ${INSTALL_BINDIR})
+ endif()
endfunction()
function(qt_create_tracepoints name tracePointsFile)