Skip to content
Permalink
Browse files

cmake: don't use /NODEFAULTLIB if we are using the C runtime (thanks,…

… Rob!).

Fixes Bugzilla #3640.
  • Loading branch information
icculus committed Jun 6, 2017
1 parent 6d661ca commit dc8a22cd9c45d2d2da3a3dcc47fac8f63feb39a5
Showing with 2 additions and 2 deletions.
  1. +2 −2 CMakeLists.txt
@@ -1584,7 +1584,7 @@ if(SDL_SHARED)
SOVERSION ${LT_REVISION}
OUTPUT_NAME "SDL2")
endif()
if(MSVC)
if(MSVC AND NOT LIBC)
# Don't try to link with the default set of libraries.
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
@@ -1599,7 +1599,7 @@ if(SDL_STATIC)
add_library(SDL2-static STATIC ${SOURCE_FILES})
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC})
if(MSVC)
if(MSVC AND NOT LIBC)
set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")

0 comments on commit dc8a22c

Please sign in to comment.