vcpkg/ports/sdl2/0004-sdl2-macos-thread-detection-fix.patch

13 lines
472 B
Diff
Raw Normal View History

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