cmake: Remove libcmt from SDL bin in debug mode.

For the SDL binary vbam when built with MSVC add /nodefaultlib:libcmt to
debug link flags, because in debug mode libcmtd is linked and libcmt
should not be.

This is the same as was done for the wx executable in cf9a88df.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2019-12-22 17:46:21 +00:00
parent 54072f9711
commit 99cdbb8860
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 5 additions and 0 deletions

View File

@ -1007,6 +1007,11 @@ if(ENABLE_SDL)
set(WIN32_LIBRARIES wsock32 ws2_32 winmm version imm32)
endif()
if(MSVC)
# the debug lib libcmtd is linked in debug mode, so don't link the normal version
set_target_properties(vbam PROPERTIES LINK_FLAGS_DEBUG "/nodefaultlib:libcmt")
endif()
if(ENABLE_LIRC)
set(LIRC_CLIENT_LIBRARY lirc_client)
endif()