mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
cmake: Fix Android build.
Android/Bionic C library needs no special flags to have threading support. Found when trying to build with vcpkg.
This commit is contained in:
parent
285fc7cc6d
commit
8f47d8de28
@ -556,6 +556,11 @@ endif()
|
|||||||
if (NOT EVENT__DISABLE_THREAD_SUPPORT)
|
if (NOT EVENT__DISABLE_THREAD_SUPPORT)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
list(APPEND SRC_CORE evthread_win32.c)
|
list(APPEND SRC_CORE evthread_win32.c)
|
||||||
|
elseif(ANDROID)
|
||||||
|
# pthreads is built in to bionic
|
||||||
|
set(EVENT__HAVE_PTHREADS 1)
|
||||||
|
CHECK_TYPE_SIZE(pthread_t EVENT__SIZEOF_PTHREAD_T)
|
||||||
|
list(APPEND SYMBOLS_TO_CHECK pthread_mutexattr_setprotocol)
|
||||||
else()
|
else()
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
if (NOT CMAKE_USE_PTHREADS_INIT)
|
if (NOT CMAKE_USE_PTHREADS_INIT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user