mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-11 05:03:14 +00:00
Add sem_timedwait polyfill for macOS.
This commit is contained in:
parent
aa795f5c59
commit
43d60a8ac9
2 changed files with 36 additions and 7 deletions
|
@ -85,12 +85,16 @@ if (APPLE)
|
|||
find_package(date 3.0.1 CONFIG)
|
||||
endif()
|
||||
|
||||
# Note: Windows always has these functions through winpthreads
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(pthread_mutex_timedlock "pthread.h" HAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||
# Windows always has the function through winpthreads
|
||||
if(HAVE_PTHREAD_MUTEX_TIMEDLOCK OR WIN32)
|
||||
add_compile_options(-DHAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||
endif()
|
||||
check_symbol_exists(sem_timedwait "semaphore.h" HAVE_SEM_TIMEDWAIT)
|
||||
if(HAVE_SEM_TIMEDWAIT OR WIN32)
|
||||
add_compile_options(-DHAVE_SEM_TIMEDWAIT)
|
||||
endif()
|
||||
|
||||
add_subdirectory(externals)
|
||||
include_directories(src)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue