CMakeLists.txt
changeset 11070 61401688628e
parent 11028 25cd7fe50180
child 11071 a4c90708251c
     1.1 --- a/CMakeLists.txt	Tue Jun 06 13:12:43 2017 -0400
     1.2 +++ b/CMakeLists.txt	Tue Jun 06 13:39:29 2017 -0400
     1.3 @@ -1584,7 +1584,7 @@
     1.4        SOVERSION ${LT_REVISION}
     1.5        OUTPUT_NAME "SDL2")
     1.6    endif()
     1.7 -  if(MSVC)
     1.8 +  if(MSVC AND NOT LIBC)
     1.9      # Don't try to link with the default set of libraries.
    1.10      set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
    1.11      set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
    1.12 @@ -1599,7 +1599,7 @@
    1.13    add_library(SDL2-static STATIC ${SOURCE_FILES})
    1.14    set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
    1.15    set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC})
    1.16 -  if(MSVC)
    1.17 +  if(MSVC AND NOT LIBC)
    1.18      set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
    1.19      set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
    1.20      set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")