Skip to content

Commit

Permalink
Fix 10.13 sdk threads not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHX committed Nov 8, 2019
1 parent 7724fea commit 820596d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 820596d

Please sign in to comment.