diff options
| author | Kai Pastor <dg0yt@darc.de> | 2021-10-06 20:12:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-06 11:12:42 -0700 |
| commit | 88413539fc619adf98d7f147199bbd23c96e3798 (patch) | |
| tree | 97d2cb5ca5cf9b3cf92f77b8e95831f18060fa50 | |
| parent | d6245fc7d991979c84370b33ef408ffe4a3442da (diff) | |
| download | vcpkg-88413539fc619adf98d7f147199bbd23c96e3798.tar.gz vcpkg-88413539fc619adf98d7f147199bbd23c96e3798.zip | |
[sdl2] Fix calling `find_packages` from different directories (#20542)
* Fix multiple calls to `find_package`
* Update versions
| -rw-r--r-- | ports/sdl2/0004-sdl2-alias-on-static-build.patch | 9 | ||||
| -rw-r--r-- | ports/sdl2/vcpkg.json | 1 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/s-/sdl2.json | 5 |
4 files changed, 13 insertions, 4 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": { diff --git a/versions/baseline.json b/versions/baseline.json index ba8c37dbe..ebb805f2b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6034,7 +6034,7 @@ }, "sdl2": { "baseline": "2.0.16", - "port-version": 0 + "port-version": 1 }, "sdl2-gfx": { "baseline": "1.0.4", diff --git a/versions/s-/sdl2.json b/versions/s-/sdl2.json index 59df83a08..41c18aecc 100644 --- a/versions/s-/sdl2.json +++ b/versions/s-/sdl2.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "f39203f93b1c068fca2dd7b7501891d8aca3b65d", + "version": "2.0.16", + "port-version": 1 + }, + { "git-tree": "66a51e068567b3b76ebb844ba7b4336abc7c35ce", "version": "2.0.16", "port-version": 0 |
