From eb0caf0c726bdaf746615e34f4201088910623b7 Mon Sep 17 00:00:00 2001 From: Clocks <38189170+Doomsdayrs@users.noreply.github.com> Date: Fri, 28 Jun 2024 01:10:11 -0400 Subject: [PATCH] Add Android Support Android supports pthreads through libc. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16f79cc..210a354 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,12 @@ if((NOT HAVE_C11_THREADS) OR (DEFINED USE_TINYCTHREAD)) endif() if(NOT WIN32) - list(APPEND april_link_libraries "pthread") + if (UNIX) + find_library(LIBPTHREAD pthread) + if (LIBPTHREAD) + list(APPEND april_link_libraries "pthread") + endif() + endif() list(APPEND april_link_libraries "m") endif()