Bugfix #27768
[blender.git] / source / blender / windowmanager / CMakeLists.txt
index e93b9906dacb9efbe0bf7aba893418f110db29f0..f9c1d800c02c4e0a77e2e57224881e33f01087fd 100644 (file)
@@ -13,7 +13,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
 #
 # ***** END GPL LICENSE BLOCK *****
 
-FILE(GLOB SRC intern/*.c)
-
-SET(INC .
-       ../editors/include
-       ../../../intern/guardedalloc ../../../intern/memutil
-       ../blenlib ../makesdna ../makesrna ../blenkernel
-       ../include ../imbuf ../render/extern/include
-       ../../../intern/bsp/extern
-       ../../../intern/decimation/extern ../blenloader
-       ../../kernel/gen_system ../readstreamglue
-       ../../../intern/elbeem/extern
-       ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include
-       ../python
+set(INC
+       .
        ../nodes
        ../gpu
        ../blenfont
+       ../blenlib
+       ../makesdna
+       ../makesrna
+       ../blenkernel
+       ../imbuf
+       ../blenloader
+       ../editors/include
+       ../render/extern/include
+       ../../../intern/guardedalloc
+       ../../../intern/memutil
+       ../../../intern/elbeem/extern
+       ../../../intern/ghost
+       ../../../intern/opennl/extern
+       ../../../source/gameengine/BlenderRoutines
+)
+
+set(INC_SYS
+       ${ZLIB_INCLUDE_DIRS}
        ${OPENGL_INCLUDE_DIR}
+       ${GLEW_INCLUDE_PATH}
+)
+
+set(SRC
+       intern/wm.c
+       intern/wm_cursors.c
+       intern/wm_dragdrop.c
+       intern/wm_draw.c
+       intern/wm_event_system.c
+       intern/wm_files.c
+       intern/wm_gesture.c
+       intern/wm_init_exit.c
+       intern/wm_jobs.c
+       intern/wm_keymap.c
+       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(WITH_INTERNATIONAL)
+if(WITH_INTERNATIONAL)
+       add_definitions(-DINTERNATIONAL)
+endif()
 
-IF(WITH_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_OPENEXR)
+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)
-       SET(INC ${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)
-       SET(INC ${INC} ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_FFMPEG)
+if(WITH_PYTHON)
+       list(APPEND INC ../python)
+       add_definitions(-DWITH_PYTHON)
 
-IF(WITH_PYTHON)
-       SET(INC ${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)
-       SET(INC ${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()
 
-# TODO buildinfo
-IF(BF_BUILDINFO)
-       ADD_DEFINITIONS(-DNAN_BUILDINFO)
-ENDIF(BF_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}")