[sdl2] Fix pthread detection on macOS (#17106)

* [sdl2] Fix pthread detection on macOS

* Add missing "FEATURES" to vcpkg_check_features

* [sdl2] Bump port-version

* Run x-add-version sdl2
This commit is contained in:
pastdue 2021-04-07 15:31:03 -04:00 committed by GitHub
parent c9ab7da4d4
commit b3e8d4dc69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -847,7 +847,7 @@ macro(CheckPTHREAD)
# Run some tests
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${PTHREAD_CFLAGS} ${PTHREAD_LDFLAGS}")
- if(CMAKE_CROSSCOMPILING)
+ if(CMAKE_CROSSCOMPILING OR DARWIN)
set(HAVE_PTHREADS 1)
else()
check_c_source_runs("

View File

@ -12,6 +12,7 @@ vcpkg_extract_source_archive_ex(
0001-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch
0002-sdl2-skip-ibus-on-linux.patch
0003-sdl2-fix-uwp-build.patch
0004-sdl2-macos-thread-detection-fix.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
@ -19,6 +20,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
vulkan VIDEO_VULKAN
)

View File

@ -1,7 +1,7 @@
{
"name": "sdl2",
"version-string": "2.0.14",
"port-version": 3,
"port-version": 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.",
"homepage": "https://www.libsdl.org/download-2.0.php",
"features": {

View File

@ -5426,7 +5426,7 @@
},
"sdl2": {
"baseline": "2.0.14",
"port-version": 3
"port-version": 4
},
"sdl2-gfx": {
"baseline": "1.0.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "44061d4f51d8cba5625da7b41ef712976d9416e8",
"version-string": "2.0.14",
"port-version": 4
},
{
"git-tree": "07b3a3a427d35ed4ba0a154d7ff3e34be2f0ddfb",
"version-string": "2.0.14",