mirror of https://github.com/encounter/SDL.git
cmake: don't use /NODEFAULTLIB if we are using the C runtime (thanks, Rob!).
Fixes Bugzilla #3640.
This commit is contained in:
parent
6d661cab7b
commit
dc8a22cd9c
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue