Skip to content

Commit

Permalink
In android ndk doesn't exist librt and libpthread
Browse files Browse the repository at this point in the history
Signed-off-by: Arenoros <[email protected]>
  • Loading branch information
Arenoros authored and ralight committed Nov 2, 2020
1 parent add355a commit 9c3a214
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9c3a214

Please sign in to comment.