Skip to content

Commit

Permalink
Add generator expression for multi-config build
Browse files Browse the repository at this point in the history
  • Loading branch information
alef committed Feb 17, 2024
1 parent f01fbe5 commit d457a6c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,20 @@ if (TILES)
${MESSAGES_CPP}
${RESOURCE_RC})
if(MSYS2)
set(_keep $<$<CONFIG:RelWithDebInfo,Debug>:objcopy
--only-keep-debug
$<TARGET_FILE:cataclysm-tiles>
$<TARGET_FILE:cataclysm-tiles>.debug
>)
set(_strip $<$<CONFIG:RelWithDebInfo,Debug>:objcopy
--strip-unneeded
--add-gnu-debuglink=$<TARGET_FILE:cataclysm-tiles>.debug
$<TARGET_FILE:cataclysm-tiles>
>)
add_custom_command(TARGET cataclysm-tiles POST_BUILD
COMMAND objcopy --only-keep-debug $<TARGET_FILE:cataclysm-tiles> $<TARGET_FILE:cataclysm-tiles>.debug
COMMAND objcopy --strip-unneeded --add-gnu-debuglink=$<TARGET_FILE:cataclysm-tiles>.debug $<TARGET_FILE:cataclysm-tiles>
COMMAND "${_keep}"
COMMAND "${_strip}"
COMMAND_EXPAND_LISTS
)
else()
# Use only our RT_MANIFEST from resource.rc
Expand Down

0 comments on commit d457a6c

Please sign in to comment.