Merged changes in the trunk up to revision 49986.
[blender.git] / source / blender / windowmanager / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 set(INC
27         .
28         ../blenfont
29         ../blenkernel
30         ../blenlib
31         ../blenloader
32         ../editors/include
33         ../editors/io
34         ../gpu
35         ../freestyle
36         ../imbuf
37         ../makesdna
38         ../makesrna
39         ../nodes
40         ../compositor
41         ../render/extern/include
42         ../../gameengine/BlenderRoutines
43         ../../../intern/elbeem/extern
44         ../../../intern/ghost
45         ../../../intern/guardedalloc
46         ../../../intern/memutil
47         ../../../intern/opennl/extern
48 )
49
50 set(INC_SYS
51         ${ZLIB_INCLUDE_DIRS}
52         ${OPENGL_INCLUDE_DIR}
53         ${GLEW_INCLUDE_PATH}
54 )
55
56 set(SRC
57         intern/wm.c
58         intern/wm_playanim.c
59         intern/wm_cursors.c
60         intern/wm_dragdrop.c
61         intern/wm_draw.c
62         intern/wm_event_system.c
63         intern/wm_files.c
64         intern/wm_gesture.c
65         intern/wm_init_exit.c
66         intern/wm_jobs.c
67         intern/wm_keymap.c
68         intern/wm_operators.c
69         intern/wm_subwindow.c
70         intern/wm_window.c
71
72         WM_api.h
73         WM_keymap.h
74         WM_types.h
75         wm.h
76         wm_cursors.h
77         wm_draw.h
78         wm_event_system.h
79         wm_event_types.h
80         wm_files.h
81         wm_subwindow.h
82         wm_window.h
83 )
84
85 add_definitions(-DGLEW_STATIC)
86
87 if(WITH_INTERNATIONAL)
88         add_definitions(-DWITH_INTERNATIONAL)
89 endif()
90
91 if(WITH_OPENCOLLADA)
92         add_definitions(-DWITH_COLLADA)
93 endif()
94
95 if(WITH_CODEC_QUICKTIME)
96         list(APPEND INC
97                 ../quicktime
98         )
99         list(APPEND INC_SYS
100                 ${QUICKTIME_INCLUDE_DIRS}
101         )
102         add_definitions(-DWITH_QUICKTIME)
103 endif()
104
105 if(WITH_CODEC_FFMPEG)
106         list(APPEND INC_SYS
107                 ${FFMPEG_INCLUDE_DIRS}
108         )
109         add_definitions(-DWITH_FFMPEG)
110 endif()
111
112 if(WITH_HEADLESS)
113         add_definitions(-DWITH_HEADLESS)
114 endif()
115
116 if(WITH_PYTHON)
117         list(APPEND INC
118                 ../python
119         )
120         add_definitions(-DWITH_PYTHON)
121
122         if(WITH_PYTHON_SECURITY)
123                 add_definitions(-DWITH_PYTHON_SECURITY)
124         endif()
125 endif()
126
127 if(WITH_GAMEENGINE)
128         add_definitions(-DWITH_GAMEENGINE)
129 endif()
130
131 if(APPLE)
132         if(NOT WITH_COCOA)
133                 list(APPEND SRC
134                         intern/wm_apple.c
135                 )
136         endif()
137 endif()
138
139 if(WITH_BUILDINFO)
140         add_definitions(-DWITH_BUILDINFO)
141 endif()
142
143 if(WIN322)
144         list(APPEND INC
145                 ../../../intern/utfconv
146         )
147 endif()
148
149 if(WITH_COMPOSITOR)
150         add_definitions(-DWITH_COMPOSITOR)
151 endif()
152
153 blender_add_lib_nolist(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}")