diff options
| author | codicodi <rob.ceglinski@gmail.com> | 2017-07-21 13:01:00 +0200 |
|---|---|---|
| committer | codicodi <rob.ceglinski@gmail.com> | 2017-07-21 13:01:00 +0200 |
| commit | dc4998bf702b14f51f36ab40d85d3b090d5bfa9c (patch) | |
| tree | 2c736c694c2aeacf839ae58226b2b90cedac55bd /ports/sdl2 | |
| parent | a42da34a07187063da297b422a95dbb2d7bd064a (diff) | |
| download | vcpkg-dc4998bf702b14f51f36ab40d85d3b090d5bfa9c.tar.gz vcpkg-dc4998bf702b14f51f36ab40d85d3b090d5bfa9c.zip | |
[sdl2] Prevent exports in static build
Diffstat (limited to 'ports/sdl2')
| -rw-r--r-- | ports/sdl2/CONTROL | 2 | ||||
| -rw-r--r-- | ports/sdl2/export-symbols-only-in-shared-build.patch | 16 | ||||
| -rw-r--r-- | ports/sdl2/portfile.cmake | 1 |
3 files changed, 18 insertions, 1 deletions
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index c0d747691..f22820579 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.5-2 +Version: 2.0.5-3 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/export-symbols-only-in-shared-build.patch b/ports/sdl2/export-symbols-only-in-shared-build.patch new file mode 100644 index 000000000..b442954d5 --- /dev/null +++ b/ports/sdl2/export-symbols-only-in-shared-build.patch @@ -0,0 +1,16 @@ +diff --git a/include/begin_code.h b/include/begin_code.h +index 04e78c6..16464f5 100644 +--- a/include/begin_code.h ++++ b/include/begin_code.h +@@ -58,8 +58,10 @@ + # else + # define DECLSPEC __declspec(dllimport) + # endif +-# else ++# elif defined(SDL2_EXPORTS) + # define DECLSPEC __declspec(dllexport) ++# else ++# define DECLSPEC + # endif + # else + # if defined(__GNUC__) && __GNUC__ >= 4 diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 185e39665..33123c1ba 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch + ${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch ) if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") |
