From cd2ab75b737f17c00bca6caa6c54af76d6dcfa6f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 21 Nov 2010 09:10:50 +0000 Subject: [PATCH] - include pthreads for win32 globally (as with opengl). - MSVC CFLAGS were being set by only checking WIN32, (breaking non-msvc win32 builds) --- CMakeLists.txt | 3 +++ source/blender/blenkernel/CMakeLists.txt | 5 ++--- source/blender/blenlib/CMakeLists.txt | 4 ---- source/blender/blenpluginapi/CMakeLists.txt | 4 ---- source/blender/editors/armature/CMakeLists.txt | 4 ---- source/blender/editors/mesh/CMakeLists.txt | 4 ---- source/blender/editors/object/CMakeLists.txt | 4 ---- source/blender/editors/physics/CMakeLists.txt | 4 ---- source/blender/editors/render/CMakeLists.txt | 4 ---- source/blender/editors/screen/CMakeLists.txt | 4 ---- source/blender/editors/sculpt_paint/CMakeLists.txt | 4 ---- source/blender/editors/space_file/CMakeLists.txt | 4 ---- source/blender/editors/space_image/CMakeLists.txt | 4 ---- source/blender/editors/space_node/CMakeLists.txt | 4 ---- source/blender/editors/space_view3d/CMakeLists.txt | 4 ---- source/blender/gpu/CMakeLists.txt | 4 ---- source/blender/imbuf/CMakeLists.txt | 4 ---- source/blender/makesrna/intern/CMakeLists.txt | 4 ---- source/blender/nodes/CMakeLists.txt | 4 ---- source/blender/render/CMakeLists.txt | 4 ---- source/blender/windowmanager/CMakeLists.txt | 4 ---- 21 files changed, 5 insertions(+), 79 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b34a723caf..0dc0a0b6e57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -667,6 +667,9 @@ IF(WIN32) ENDIF(MSVC) + # used in many places so include globally, like OpenGL + INCLUDE_DIRECTORIES(${PTHREADS_INC}) + ENDIF(WIN32) diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index eb564720915..d88b25d4335 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -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}") diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 35785447a86..04745336497 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -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) diff --git a/source/blender/blenpluginapi/CMakeLists.txt b/source/blender/blenpluginapi/CMakeLists.txt index 41ec5864382..737fb3caf4b 100644 --- a/source/blender/blenpluginapi/CMakeLists.txt +++ b/source/blender/blenpluginapi/CMakeLists.txt @@ -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) diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt index 62b76655010..b79c77d6e97 100644 --- a/source/blender/editors/armature/CMakeLists.txt +++ b/source/blender/editors/armature/CMakeLists.txt @@ -44,8 +44,4 @@ SET(SRC reeb.c ) -IF(WIN32) - LIST(APPEND INC ${PTHREADS_INC}) -ENDIF(WIN32) - BLENDERLIB(bf_editor_armature "${SRC}" "${INC}") diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index 1e26f273b41..41685b7e8bb 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -45,8 +45,4 @@ SET(SRC meshtools.c ) -IF(WIN32) - LIST(APPEND INC ${PTHREADS_INC}) -ENDIF(WIN32) - BLENDERLIB(bf_editor_mesh "${SRC}" "${INC}") diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index 224d72895ba..01b49a9e80b 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -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) diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index 481f6d8df44..82c48becb0b 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -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) diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt index 57ee27c3b6b..c4e997ce3ee 100644 --- a/source/blender/editors/render/CMakeLists.txt +++ b/source/blender/editors/render/CMakeLists.txt @@ -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}") diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt index 4ea056ac400..ff143bab469 100644 --- a/source/blender/editors/screen/CMakeLists.txt +++ b/source/blender/editors/screen/CMakeLists.txt @@ -40,8 +40,4 @@ SET(SRC screendump.c ) -IF(WIN32) - LIST(APPEND INC ${PTHREADS_INC}) -ENDIF(WIN32) - BLENDERLIB(bf_editor_screen "${SRC}" "${INC}") diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt index 364677f9a8d..6db61cee168 100644 --- a/source/blender/editors/sculpt_paint/CMakeLists.txt +++ b/source/blender/editors/sculpt_paint/CMakeLists.txt @@ -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}") diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt index a4b402cce43..bc89b7e1850 100644 --- a/source/blender/editors/space_file/CMakeLists.txt +++ b/source/blender/editors/space_file/CMakeLists.txt @@ -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}") diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt index ca3b1f58305..d7415fb7067 100644 --- a/source/blender/editors/space_image/CMakeLists.txt +++ b/source/blender/editors/space_image/CMakeLists.txt @@ -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}") diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt index 887d79f8fb3..aa98bfc9c0b 100644 --- a/source/blender/editors/space_node/CMakeLists.txt +++ b/source/blender/editors/space_node/CMakeLists.txt @@ -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}") diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt index e9ed8335061..0820b69ee46 100644 --- a/source/blender/editors/space_view3d/CMakeLists.txt +++ b/source/blender/editors/space_view3d/CMakeLists.txt @@ -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}") diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index a2bfddd96fb..4045e83dafa 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -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}") diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index f89ef033d78..36dcfefdc1c 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -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) diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 8ca2f8a18a9..4880572d1e5 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -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) diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 5a6470d994e..38e670f256d 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -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) diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt index 1224e51ff3f..7a2b92404ae 100644 --- a/source/blender/render/CMakeLists.txt +++ b/source/blender/render/CMakeLists.txt @@ -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) diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index 6c93334fd0a..e47d85cd462 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -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)