qt5base-lts/mkspecs/features/win32/separate_debug_info.prf
Joerg Bornemann 38ca34ac93 qmake: Fix installation of separate debug info for plugins
This amends commit fc2e40e88d.

For Qt plugins, we do not add 'dlltarget' to INSTALLS but only 'target'.
In this case we must add the .dll.debug file to 'target' like we did
before fc2e40e88d.

Fixes: QTBUG-105374
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: If495548dfca55d02e1c5884e03e281e27ee07ccd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-08-09 12:57:12 +02:00

23 lines
1.0 KiB
Plaintext

have_target:!static:!isEmpty(QMAKE_OBJCOPY) {
load(resolve_target)
QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.debug
shell_target = $$shell_quote($$relative_path($$QMAKE_RESOLVED_TARGET, $$OUT_PWD))
shell_target_debug_info = $$shell_quote($$relative_path($$QMAKE_TARGET_DEBUG_INFO, $$OUT_PWD))
copy_debug_info = $$QMAKE_OBJCOPY --only-keep-debug $$shell_target $$shell_target_debug_info
link_debug_info = $$QMAKE_OBJCOPY --add-gnu-debuglink=$$shell_target_debug_info $$shell_target
strip_debug_info = $$QMAKE_OBJCOPY --strip-debug $$shell_target
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info $$QMAKE_POST_LINK
silent:QMAKE_POST_LINK = @echo creating $@.debug && $$QMAKE_POST_LINK
contains(TEMPLATE, lib$):!plugin {
dlltarget.targets += $$QMAKE_TARGET_DEBUG_INFO
} else {
target.targets += $$QMAKE_TARGET_DEBUG_INFO
}
QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO
}