aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodicodi <rob.ceglinski@gmail.com>2016-12-29 01:00:43 +0100
committercodicodi <rob.ceglinski@gmail.com>2016-12-29 01:00:43 +0100
commitda63f3353190339c67cdbe25d99b6bd6be99ba7d (patch)
tree660f4aa7ca440390140867ef7c7b600bf7c2b518
parent57252f982a262155ded64f365c7a630d8bcb5f4f (diff)
downloadvcpkg-da63f3353190339c67cdbe25d99b6bd6be99ba7d.tar.gz
vcpkg-da63f3353190339c67cdbe25d99b6bd6be99ba7d.zip
[sdl2] link to CRT libraries
-rw-r--r--ports/sdl2/CONTROL2
-rw-r--r--ports/sdl2/dont-ignore-default-libs.patch22
-rw-r--r--ports/sdl2/portfile.cmake6
3 files changed, 29 insertions, 1 deletions
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL
index 3e6b8a5ec..c0d747691 100644
--- a/ports/sdl2/CONTROL
+++ b/ports/sdl2/CONTROL
@@ -1,3 +1,3 @@
Source: sdl2
-Version: 2.0.5-1
+Version: 2.0.5-2
Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
diff --git a/ports/sdl2/dont-ignore-default-libs.patch b/ports/sdl2/dont-ignore-default-libs.patch
new file mode 100644
index 000000000..c9f4c6079
--- /dev/null
+++ b/ports/sdl2/dont-ignore-default-libs.patch
@@ -0,0 +1,22 @@
+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")
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index ba99334eb..185e39665 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -7,6 +7,12 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch
+)
+
if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj