diff options
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/sdl2/0004-sdl2-alias-on-static-build.patch | 9 | ||||
| -rw-r--r-- | ports/sdl2/vcpkg.json | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ports/sdl2/0004-sdl2-alias-on-static-build.patch b/ports/sdl2/0004-sdl2-alias-on-static-build.patch index 4fffb1802..6bb4eb061 100644 --- a/ports/sdl2/0004-sdl2-alias-on-static-build.patch +++ b/ports/sdl2/0004-sdl2-alias-on-static-build.patch @@ -1,13 +1,16 @@ --- a/SDL2Config.cmake
+++ b/SDL2Config.cmake
-@@ -2,5 +2,14 @@
+@@ -1,5 +1,17 @@
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
+# on static-only builds create an alias
+if(NOT TARGET SDL2::SDL2 AND TARGET SDL2::SDL2-static)
-+ if(CMAKE_VERSION VERSION_LESS "3.18")
-+ # Aliasing local targets is not supported on CMake < 3.18, so make it global.
++ if(CMAKE_VERSION VERSION_LESS "3.11")
++ message(FATAL_ERROR "At least CMake 3.11 is required for this configuration.")
++ elseif(CMAKE_VERSION VERSION_LESS "3.18")
++ # Aliasing local targets is not supported on CMake < 3.18, so make all targets global.
+ set_target_properties(SDL2::SDL2-static PROPERTIES IMPORTED_GLOBAL TRUE)
++ set_target_properties(SDL2::SDL2main PROPERTIES IMPORTED_GLOBAL TRUE)
+ endif()
+ add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
+endif()
diff --git a/ports/sdl2/vcpkg.json b/ports/sdl2/vcpkg.json index 56e6aa57e..6c0ce100a 100644 --- a/ports/sdl2/vcpkg.json +++ b/ports/sdl2/vcpkg.json @@ -1,6 +1,7 @@ { "name": "sdl2", "version": "2.0.16", + "port-version": 1, "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.", "homepage": "https://www.libsdl.org/download-2.0.php", "features": { |
