1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index e49fac2..25e3302 100644
5 @@ -34,6 +34,14 @@ option(ENABLE_GLIBC_WORKAROUND "Workaround GLIBC symbol exports" OFF)
7 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
10 + set(CMAKE_THREAD_LIBS_INIT "-lpthread")
11 + set(CMAKE_HAVE_THREADS_LIBRARY 1)
12 + set(CMAKE_USE_WIN32_THREADS_INIT 0)
13 + set(CMAKE_USE_PTHREADS_INIT 1)
14 + set(THREADS_PREFER_PTHREAD_FLAG ON)
19 set(MASON_BOOST_VERSION "1.65.1")
20 @@ -405,7 +413,8 @@ endif()
22 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10")
23 execute_process(COMMAND xcrun --sdk macosx --show-sdk-path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
24 + execute_process(COMMAND uname -m OUTPUT_VARIABLE JAMBA_OSX_NATIVE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
25 - set(CMAKE_OSX_ARCHITECTURES "x86_64")
26 + set(CMAKE_OSX_ARCHITECTURES "${JAMBA_OSX_NATIVE_ARCHITECTURE}")
27 + message(STATUS "Set Architecture to ${JAMBA_OSX_NATIVE_ARCHITECTURE} on OS X")
28 - message(STATUS "Set Architecture to x64 on OS X")
29 exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)
30 string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})