diff --git a/CMakeLists.txt b/CMakeLists.txt index 389af1a5c..74edc23ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -494,12 +494,12 @@ endif() set(CMAKE_THREAD_PREFER_PTHREAD TRUE) -if(NOT IOS AND NOT ANDROID) +if(NOT IOS) find_package(Threads REQUIRED) endif() if(NOT WIN32) - check_library_exists(pthread pthread_mutex_timedlock "" HAVE_PTHREAD_MUTEX_TIMEDLOCK) + check_symbol_exists(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK) endif() if(WITH_VALGRIND_MEMCHECK) diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 00c8b30cb..846eb027c 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -70,7 +70,7 @@ if(FREERDP_BUILD) else() set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - if(NOT IOS AND NOT ANDROID) + if(NOT IOS) find_package(Threads REQUIRED) endif() @@ -99,7 +99,7 @@ else() endif() if(NOT WIN32) - check_library_exists(pthread pthread_mutex_timedlock "" HAVE_PTHREAD_MUTEX_TIMEDLOCK) + check_symbol_exists(pthread pthread_mutex_timedlock "" HAVE_PTHREAD_MUTEX_TIMEDLOCK) endif() set(OPENSSL_FEATURE_TYPE "OPTIONAL")