diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-09-29 22:07:33 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-10-06 10:07:02 +0200 |
commit | e6fd92816dcbddcd9c28676815cf134b31291ea9 (patch) | |
tree | 415a1d6759b451c3ce58b5bebb8e0e4185f84f96 /cmake/QtModuleHelpers.cmake | |
parent | 00807f1fe5a20f5c23fbac104212c4a983837db9 (diff) |
CMake: Install PDB debug info for MSVC builds
Supports installing linker generated debug info for shared libraries
and executables, as well as compiler generated debug info for static
libraries.
Works with Ninja Multi-Config as well, with the caveat that the files
are installed optionally, aka the install rule will not error out if
a pdb file is not present. This is necessary, because it's not
possible to create per-config install rules properly.
Fixes: QTBUG-87006
Change-Id: I95e91a6557eb0ee0f882103be54cd38795c349f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtModuleHelpers.cmake')
-rw-r--r-- | cmake/QtModuleHelpers.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index c9ef2397a9..dfafa7eec9 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -589,6 +589,12 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})") qt_finalize_framework_headers_copy(${target}) endif() + set(pdb_install_dir "${INSTALL_BINDIR}") + if(NOT is_shared_lib) + set(pdb_install_dir "${INSTALL_LIBDIR}") + endif() + qt_internal_install_pdb_files(${target} "${pdb_install_dir}") + qt_describe_module(${target}) qt_add_list_file_finalizer(qt_finalize_module ${target} ${arg_INTERNAL_MODULE} ${header_module}) endfunction() |