aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMistGebaut <49169052+MistGebaut@users.noreply.github.com>2019-04-02 19:48:36 +0200
committerPhil Christensen <philc@microsoft.com>2019-04-02 10:48:36 -0700
commit228289f4506a6a47d7eeb9401f9746d3ecce523f (patch)
treeade6ce9c250122a4ddedfdf626f1d749e963fc84
parent8ab7c3fc03ad9b270803f21ecaf5c1f9f007dbc4 (diff)
downloadvcpkg-228289f4506a6a47d7eeb9401f9746d3ecce523f.tar.gz
vcpkg-228289f4506a6a47d7eeb9401f9746d3ecce523f.zip
sdl1: static build (#5903)
* sdl1: static build * Update CONTROL file
-rw-r--r--ports/sdl1/CONTROL2
-rw-r--r--ports/sdl1/portfile.cmake10
-rw-r--r--ports/sdl1/static-build.patch74
3 files changed, 83 insertions, 3 deletions
diff --git a/ports/sdl1/CONTROL b/ports/sdl1/CONTROL
index 483813f51..9d9e856f6 100644
--- a/ports/sdl1/CONTROL
+++ b/ports/sdl1/CONTROL
@@ -1,3 +1,3 @@
Source: sdl1
-Version: 1.2.15-3
+Version: 1.2.15-4
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/sdl1/portfile.cmake b/ports/sdl1/portfile.cmake
index de2d855e6..c3e580fbb 100644
--- a/ports/sdl1/portfile.cmake
+++ b/ports/sdl1/portfile.cmake
@@ -1,7 +1,5 @@
include(vcpkg_common_functions)
-vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO SDL-Mirror/SDL
@@ -17,6 +15,14 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDLmain.vcxproj DESTINATION ${SOURCE_PATH}/V
configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/static-build.patch
+ )
+endif()
+
# This text file gets copied as a library, and included as one in the package
file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB)
diff --git a/ports/sdl1/static-build.patch b/ports/sdl1/static-build.patch
new file mode 100644
index 000000000..89bc39ddc
--- /dev/null
+++ b/ports/sdl1/static-build.patch
@@ -0,0 +1,74 @@
+--- a/VisualC/SDL/SDL.vcxproj Sun Mar 31 11:28:40 2019
++++ b/VisualC/SDL/SDL.vcxproj Sun Mar 31 19:00:00 2019
+@@ -26,3 +26,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -31,3 +31,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -36,3 +36,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -41,3 +41,3 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v141</PlatformToolset>
+@@ -100,3 +100,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+@@ -137,3 +137,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+@@ -176,3 +176,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+@@ -213,3 +213,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+--- a/VisualC/SDLmain/SDLmain.vcxproj Sun Mar 31 11:28:40 2019
++++ b/VisualC/SDLmain/SDLmain.vcxproj Sun Mar 31 19:00:00 2019
+@@ -123,3 +123,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -140,3 +140,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -154,3 +154,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -171,3 +171,3 @@
+ <StringPooling>true</StringPooling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+@@ -184,3 +184,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader />
+@@ -200,3 +200,3 @@
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader />