mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
Build: Fix threads detection on libc with built-in support
As noted in the FindThreads documentation[0], CMAKE_THREAD_LIBS_INIT may be empty if no special flags are needed to use thread support. Instead, use Threads_FOUND to determine if threads are supported. [0] https://cmake.org/cmake/help/latest/module/FindThreads.html
This commit is contained in:
parent
7a40a843d4
commit
8856099092
|
@ -238,7 +238,7 @@ endif()
|
||||||
# But for non-OSX systems, I will use the CMake Threads package.
|
# But for non-OSX systems, I will use the CMake Threads package.
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
find_package(Threads QUIET)
|
find_package(Threads QUIET)
|
||||||
if(NOT CMAKE_THREAD_LIBS_INIT AND NOT WIN32)
|
if(NOT Threads_FOUND AND NOT WIN32)
|
||||||
set(SDL2_THREADS_NOT_FOUND "Could NOT find Threads (Threads is required by SDL2).")
|
set(SDL2_THREADS_NOT_FOUND "Could NOT find Threads (Threads is required by SDL2).")
|
||||||
if(SDL2_FIND_REQUIRED)
|
if(SDL2_FIND_REQUIRED)
|
||||||
message(FATAL_ERROR ${SDL2_THREADS_NOT_FOUND})
|
message(FATAL_ERROR ${SDL2_THREADS_NOT_FOUND})
|
||||||
|
|
Loading…
Reference in a new issue