Skip to content

Commit

Permalink
cmake: don't use /NODEFAULTLIB if we are using the C runtime (thanks,…
Browse files Browse the repository at this point in the history
… Rob!).

Fixes Bugzilla #3640.
  • Loading branch information
icculus committed Jun 6, 2017
1 parent 6d661ca commit dc8a22c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit dc8a22c

Please sign in to comment.