In android ndk doesn't exist librt and libpthread
Signed-off-by: Arenoros <arenoros@gmail.com>
This commit is contained in:
parent
add355a78b
commit
9c3a214a01
@ -72,6 +72,9 @@ if (WITH_THREADING)
|
|||||||
set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib)
|
set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib)
|
||||||
endif (CMAKE_CL_64)
|
endif (CMAKE_CL_64)
|
||||||
set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include)
|
set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include)
|
||||||
|
elseif (ANDROID)
|
||||||
|
set (PTHREAD_LIBRARIES "")
|
||||||
|
set (PTHREAD_INCLUDE_DIR "")
|
||||||
else (WIN32)
|
else (WIN32)
|
||||||
find_library(LIBPTHREAD pthread)
|
find_library(LIBPTHREAD pthread)
|
||||||
if (LIBPTHREAD)
|
if (LIBPTHREAD)
|
||||||
|
@ -60,7 +60,7 @@ set(C_SRC
|
|||||||
|
|
||||||
set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES})
|
set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES})
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
find_library(LIBRT rt)
|
find_library(LIBRT rt)
|
||||||
if (LIBRT)
|
if (LIBRT)
|
||||||
set (LIBRARIES ${LIBRARIES} rt)
|
set (LIBRARIES ${LIBRARIES} rt)
|
||||||
|
Loading…
Reference in New Issue
Block a user