vcpkg/ports/sdl2/0004-sdl2-macos-thread-detection-fix.patch
pastdue b3e8d4dc69
[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
2021-04-07 12:31:03 -07:00

13 lines
472 B
Diff

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("