- include pthreads for win32 globally (as with opengl).
authorCampbell Barton <ideasman42@gmail.com>
Sun, 21 Nov 2010 09:10:50 +0000 (09:10 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 21 Nov 2010 09:10:50 +0000 (09:10 +0000)
- MSVC CFLAGS were being set by only checking WIN32, (breaking non-msvc win32 builds)

21 files changed:
CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/blenlib/CMakeLists.txt
source/blender/blenpluginapi/CMakeLists.txt
source/blender/editors/armature/CMakeLists.txt
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/object/CMakeLists.txt
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/render/CMakeLists.txt
source/blender/editors/screen/CMakeLists.txt
source/blender/editors/sculpt_paint/CMakeLists.txt
source/blender/editors/space_file/CMakeLists.txt
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_node/CMakeLists.txt
source/blender/editors/space_view3d/CMakeLists.txt
source/blender/gpu/CMakeLists.txt
source/blender/imbuf/CMakeLists.txt
source/blender/makesrna/intern/CMakeLists.txt
source/blender/nodes/CMakeLists.txt
source/blender/render/CMakeLists.txt
source/blender/windowmanager/CMakeLists.txt

index 0b34a72..0dc0a0b 100644 (file)
@@ -667,6 +667,9 @@ IF(WIN32)
 
        ENDIF(MSVC)
 
+       # used in many places so include globally, like OpenGL
+       INCLUDE_DIRECTORIES(${PTHREADS_INC})
+
 ENDIF(WIN32)
 
 
index eb56472..d88b25d 100644 (file)
@@ -213,9 +213,8 @@ IF(WITH_LZMA)
        ADD_DEFINITIONS(-DWITH_LZMA)
 ENDIF(WITH_LZMA)
 
-IF(WIN32)
+IF(MSVC)
     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
+ENDIF(MSVC)
 
 BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")
index 3578544..0474533 100644 (file)
@@ -86,10 +86,6 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
        LIST(APPEND INC "${BINRELOC_INC}")
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_OPENMP)
        ADD_DEFINITIONS(-DPARALLEL=1)
 ENDIF(WITH_OPENMP)
index 41ec586..737fb3c 100644 (file)
@@ -37,10 +37,6 @@ SET(SRC
        intern/pluginapi.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_QUICKTIME)
        LIST(APPEND INC ${QUICKTIME_INC})
        ADD_DEFINITIONS(-DWITH_QUICKTIME)
index 62b7665..b79c77d 100644 (file)
@@ -44,8 +44,4 @@ SET(SRC
        reeb.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_armature "${SRC}" "${INC}")
index 1e26f27..41685b7 100644 (file)
@@ -45,8 +45,4 @@ SET(SRC
        meshtools.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_mesh "${SRC}" "${INC}")
index 224d728..01b49a9 100644 (file)
@@ -51,10 +51,6 @@ SET(SRC
        object_vgroup.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_PYTHON)
        ADD_DEFINITIONS(-DWITH_PYTHON)
 ENDIF(WITH_PYTHON)
index 481f6d8..82c48be 100644 (file)
@@ -39,10 +39,6 @@ SET(SRC
        physics_pointcache.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(NOT WITH_MOD_FLUID)
        ADD_DEFINITIONS(-DDISABLE_ELBEEM)
 ENDIF(NOT WITH_MOD_FLUID)
index 57ee27c..c4e997c 100644 (file)
@@ -52,8 +52,4 @@ IF(WITH_OPENMP)
        ADD_DEFINITIONS(-DPARALLEL=1)
 ENDIF(WITH_OPENMP)
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_render "${SRC}" "${INC}")
index 4ea056a..ff143ba 100644 (file)
@@ -40,8 +40,4 @@ SET(SRC
        screendump.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_screen "${SRC}" "${INC}")
index 364677f..6db61ce 100644 (file)
@@ -43,8 +43,4 @@ SET(SRC
        sculpt_undo.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_sculpt_paint "${SRC}" "${INC}")
index a4b402c..bc89b7e 100644 (file)
@@ -67,8 +67,4 @@ IF(WITH_IMAGE_HDR)
        ADD_DEFINITIONS(-DWITH_HDR)
 ENDIF(WITH_IMAGE_HDR)
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_space_file "${SRC}" "${INC}")
index ca3b1f5..d7415fb 100644 (file)
@@ -61,8 +61,4 @@ IF(WITH_LCMS)
        ADD_DEFINITIONS(-DWITH_LCMS)
 ENDIF(WITH_LCMS)
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_space_image "${SRC}" "${INC}")
index 887d79f..aa98bfc 100644 (file)
@@ -45,8 +45,4 @@ SET(SRC
        space_node.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 BLENDERLIB(bf_editor_space_node "${SRC}" "${INC}")
index e9ed833..0820b69 100644 (file)
@@ -58,10 +58,6 @@ IF(WITH_GAMEENGINE)
        ADD_DEFINITIONS(-DWITH_GAMEENGINE)
 ENDIF(WITH_GAMEENGINE)
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 ADD_DEFINITIONS(-DGLEW_STATIC)
 
 BLENDERLIB(bf_editor_space_view3d "${SRC}" "${INC}")
index a2bfddd..4045e83 100644 (file)
@@ -46,10 +46,6 @@ SET(SRC
        intern/gpu_shader_vertex.glsl.c
 )
 
-IF(WIN32)
-       INCLUDE_DIRECTORIES(${PTHREADS_INC})
-ENDIF(WIN32)
-
 ADD_DEFINITIONS(-DGLEW_STATIC)
 
 BLENDERLIB(bf_gpu "${SRC}" "${INC}")
index f89ef03..36dcfef 100644 (file)
@@ -66,10 +66,6 @@ SET(SRC
        intern/writeimage.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_IMAGE_OPENEXR)
        ADD_DEFINITIONS(-DWITH_OPENEXR)
 ENDIF(WITH_IMAGE_OPENEXR)
index 8ca2f8a..4880572 100644 (file)
@@ -69,10 +69,6 @@ IF(WITH_PYTHON)
        ADD_DEFINITIONS(-DWITH_PYTHON)
 ENDIF(WITH_PYTHON)
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_GAMEENGINE)
        ADD_DEFINITIONS(-DWITH_GAMEENGINE)
 ENDIF(WITH_GAMEENGINE)
index 5a6470d..38e670f 100644 (file)
@@ -140,10 +140,6 @@ SET(SRC
        intern/node_util.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_PYTHON)
        SET(INC ${INC} ../python ${PYTHON_INC})
        ADD_DEFINITIONS(-DWITH_PYTHON)
index 1224e51..7a2b924 100644 (file)
@@ -77,10 +77,6 @@ SET(SRC
        intern/source/zbuf.c
 )
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_IMAGE_OPENEXR)
        ADD_DEFINITIONS(-DWITH_OPENEXR)
 ENDIF(WITH_IMAGE_OPENEXR)
index 6c93334..e47d85c 100644 (file)
@@ -93,10 +93,6 @@ IF(WITH_GAMEENGINE)
        ADD_DEFINITIONS(-DWITH_GAMEENGINE)
 ENDIF(WITH_GAMEENGINE)
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
-
 IF(WITH_COCOA)
        LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/wm_apple.c")
 ENDIF(WITH_COCOA)