CMake project should enable pthreads for Mac OS X by default.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 13 Jul 2013 00:07:34 -0400
changeset 7426 e36a759d3bb1
parent 7425 e918739b115e
child 7427 c47b59bac287
CMake project should enable pthreads for Mac OS X by default.
CMakeLists.txt
--- a/CMakeLists.txt	Fri Jul 12 23:38:44 2013 -0400
+++ b/CMakeLists.txt	Sat Jul 13 00:07:34 2013 -0400
@@ -104,6 +104,12 @@
   set(UNIX_SYS OFF)
 endif(UNIX AND NOT APPLE)
 
+if(UNIX OR APPLE)
+  set(UNIX_OR_MAC_SYS ON)
+else()
+  set(UNIX_OR_MAC_SYS OFF)
+endif(UNIX OR APPLE)
+
 # Default option knobs
 if(APPLE OR ARCH_64)
   set(OPT_DEF_SSEMATH ON)
@@ -190,7 +196,7 @@
 set_option(VIDEO_DUMMY         "Use dummy video driver" ON)
 set_option(VIDEO_OPENGL        "Include OpenGL support" ON)
 set_option(VIDEO_OPENGLES      "Include OpenGL ES support" ON)
-set_option(PTHREADS            "Use POSIX threads for multi-threading" ${UNIX_SYS})
+set_option(PTHREADS            "Use POSIX threads for multi-threading" ${UNIX_OR_MAC_SYS})
 dep_option(PTHREADS_SEM        "Use pthread semaphores" ON "PTHREADS" OFF)
 set_option(SDL_DLOPEN          "Use dlopen for shared object loading" ON)
 set_option(OSS                 "Support the OSS audio API" ${UNIX_SYS})