cmake: Include .pdb in zips of debug builds.

Include the visualboyadvance-m.pdb file alongside the .exe for Visual
Studio debug builds.

Visual Studio generates this file with the debug symbols for debug
builds. The file is not generated for release builds. It is also
generated for RelWithDebInfo builds.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-03-09 04:28:52 +00:00
parent 2fe84053e1
commit 2ba0d316cd
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 7 additions and 1 deletions

View File

@ -1048,10 +1048,16 @@ if(UPSTREAM_RELEASE AND WIN32)
set(exezip visualboyadvance-m-Win-${BITS}bit.zip)
unset(pdb_file)
if(MSVC AND CMAKE_BUILD_TYPE MATCHES Debug)
set(pdb_file visualboyadvance-m.pdb)
endif()
add_custom_command(
TARGET visualboyadvance-m
POST_BUILD
COMMAND ${ZIP_PROGRAM} -9 ${exezip} visualboyadvance-m.exe
COMMAND ${ZIP_PROGRAM} -9 ${exezip} visualboyadvance-m.exe ${pdb_file}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)