mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 20:09:01 +08:00
23 lines
1021 B
Diff
23 lines
1021 B
Diff
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")
|