diff --git a/CMakeLists.txt b/CMakeLists.txt index 9831417f..9de6f562 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,11 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES endif() if(APPLE) + set(CMAKE_THREAD_LIBS_INIT "-lpthread") + set(CMAKE_HAVE_THREADS_LIBRARY 1) + set(CMAKE_USE_WIN32_THREADS_INIT 0) + set(CMAKE_USE_PTHREADS_INIT 1) + set(THREADS_PREFER_PTHREAD_FLAG ON) set(CMAKE_LIBRARY_ARCHITECTURE "i386-apple-darwin") elseif(NOT IS_ARM_BUILD) set(CMAKE_LIBRARY_ARCHITECTURE "i386-linux-gnu")