vcpkg/ports/sdl2/dont-ignore-default-libs.patch

23 lines
1021 B
Diff
Raw Normal View History

2016-12-29 08:00:43 +08:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54a23f0..91c5736 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1549,7 +1549,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")
@@ -1564,7 +1564,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")