Bugfix #27768
[blender.git] / source / blender / windowmanager / CMakeLists.txt
index c39897af68aa029f9033784db750941f41793fe5..f9c1d800c02c4e0a77e2e57224881e33f01087fd 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ../nodes
        ../gpu
@@ -37,19 +37,22 @@ SET(INC
        ../blenloader
        ../editors/include
        ../render/extern/include
-       ../../kernel/gen_system
        ../../../intern/guardedalloc
        ../../../intern/memutil
        ../../../intern/elbeem/extern
        ../../../intern/ghost
        ../../../intern/opennl/extern
-       ../../../extern/glew/include
+       ../../../source/gameengine/BlenderRoutines
+)
+
+set(INC_SYS
+       ${ZLIB_INCLUDE_DIRS}
        ${OPENGL_INCLUDE_DIR}
+       ${GLEW_INCLUDE_PATH}
 )
 
-SET(SRC
+set(SRC
        intern/wm.c
-       intern/wm_apple.c
        intern/wm_cursors.c
        intern/wm_dragdrop.c
        intern/wm_draw.c
@@ -62,44 +65,63 @@ SET(SRC
        intern/wm_operators.c
        intern/wm_subwindow.c
        intern/wm_window.c
+
+       WM_api.h
+       WM_types.h
+       wm.h
+       wm_cursors.h
+       wm_draw.h
+       wm_event_system.h
+       wm_event_types.h
+       wm_files.h
+       wm_subwindow.h
+       wm_window.h
 )
 
-ADD_DEFINITIONS(-DGLEW_STATIC)
+add_definitions(-DGLEW_STATIC)
+
+if(WITH_INTERNATIONAL)
+       add_definitions(-DINTERNATIONAL)
+endif()
 
-IF(WITH_INTERNATIONAL)
-       ADD_DEFINITIONS(-DINTERNATIONAL)
-ENDIF(WITH_INTERNATIONAL)
+if(WITH_OPENCOLLADA)
+       add_definitions(-DWITH_COLLADA)
+endif()
 
-IF(WITH_OPENCOLLADA)
-       ADD_DEFINITIONS(-DWITH_COLLADA)
-ENDIF(WITH_OPENCOLLADA)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ../quicktime)
+       list(APPEND INC_SYS ${QUICKTIME_INCLUDE_DIRS})
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_QUICKTIME)
-       LIST(APPEND INC ../quicktime ${QUICKTIME_INC})
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_QUICKTIME)
+if(WITH_CODEC_FFMPEG)
+       list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
+       add_definitions(-DWITH_FFMPEG)
+endif()
 
-IF(WITH_FFMPEG)
-       LIST(APPEND INC ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_FFMPEG)
+if(WITH_PYTHON)
+       list(APPEND INC ../python)
+       add_definitions(-DWITH_PYTHON)
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ../python ${PYTHON_INC})
-ELSE(WITH_PYTHON)
-       ADD_DEFINITIONS(-DDISABLE_PYTHON)
-ENDIF(WITH_PYTHON)
+       if(WITH_PYTHON_SECURITY)
+               add_definitions(-DWITH_PYTHON_SECURITY)
+       endif()
+endif()
 
-IF(WIN32)
-       LIST(APPEND INC ${PTHREADS_INC})
-ENDIF(WIN32)
+if(WITH_GAMEENGINE)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-IF(WITH_COCOA)
-       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/wm_apple.c")
-ENDIF(WITH_COCOA)
+if(APPLE)
+       if(NOT WITH_COCOA)
+               list(APPEND SRC
+                       intern/wm_apple.c
+               )
+       endif()
+endif()
 
-IF(WITH_BUILDINFO)
-       ADD_DEFINITIONS(-DNAN_BUILDINFO)
-ENDIF(WITH_BUILDINFO)
+if(WITH_BUILDINFO)
+       add_definitions(-DNAN_BUILDINFO)
+endif()
 
-BLENDERLIB_NOLIST(bf_windowmanager "${SRC}" "${INC}")
+blender_add_lib_nolist(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}")