In android ndk doesn't exist librt and libpthread

Signed-off-by: Arenoros <arenoros@gmail.com>
This commit is contained in:
Arenoros 2020-10-17 23:53:06 +03:00 committed by Roger Light
parent add355a78b
commit 9c3a214a01
2 changed files with 4 additions and 1 deletions

View File

@ -72,6 +72,9 @@ if (WITH_THREADING)
set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib)
endif (CMAKE_CL_64)
set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include)
elseif (ANDROID)
set (PTHREAD_LIBRARIES "")
set (PTHREAD_INCLUDE_DIR "")
else (WIN32)
find_library(LIBPTHREAD pthread)
if (LIBPTHREAD)

View File

@ -60,7 +60,7 @@ set(C_SRC
set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES})
if (UNIX AND NOT APPLE)
if (UNIX AND NOT APPLE AND NOT ANDROID)
find_library(LIBRT rt)
if (LIBRT)
set (LIBRARIES ${LIBRARIES} rt)