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 7426e36a759d3bb1
parent 7425 e918739b115e
child 7427 c47b59bac287
CMake project should enable pthreads for Mac OS X by default.
CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Fri Jul 12 23:38:44 2013 -0400
     1.2 +++ b/CMakeLists.txt	Sat Jul 13 00:07:34 2013 -0400
     1.3 @@ -104,6 +104,12 @@
     1.4    set(UNIX_SYS OFF)
     1.5  endif(UNIX AND NOT APPLE)
     1.6  
     1.7 +if(UNIX OR APPLE)
     1.8 +  set(UNIX_OR_MAC_SYS ON)
     1.9 +else()
    1.10 +  set(UNIX_OR_MAC_SYS OFF)
    1.11 +endif(UNIX OR APPLE)
    1.12 +
    1.13  # Default option knobs
    1.14  if(APPLE OR ARCH_64)
    1.15    set(OPT_DEF_SSEMATH ON)
    1.16 @@ -190,7 +196,7 @@
    1.17  set_option(VIDEO_DUMMY         "Use dummy video driver" ON)
    1.18  set_option(VIDEO_OPENGL        "Include OpenGL support" ON)
    1.19  set_option(VIDEO_OPENGLES      "Include OpenGL ES support" ON)
    1.20 -set_option(PTHREADS            "Use POSIX threads for multi-threading" ${UNIX_SYS})
    1.21 +set_option(PTHREADS            "Use POSIX threads for multi-threading" ${UNIX_OR_MAC_SYS})
    1.22  dep_option(PTHREADS_SEM        "Use pthread semaphores" ON "PTHREADS" OFF)
    1.23  set_option(SDL_DLOPEN          "Use dlopen for shared object loading" ON)
    1.24  set_option(OSS                 "Support the OSS audio API" ${UNIX_SYS})