CMake: indent & missing header
[blender.git] / source / blender / python / intern / 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 Beaurainm, Campbell Barton
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 set(INC 
27         ..
28         ../../blenfont
29         ../../blenkernel
30         ../../blenlib
31         ../../blenloader
32         ../../editors/include
33         ../../gpu
34         ../../makesdna
35         ../../makesrna
36         ../../windowmanager
37         ../../../../intern/cycles/blender
38         ../../../../intern/opencolorio
39         ../../../../intern/guardedalloc
40 )
41
42 set(INC_SYS
43         ${PYTHON_INCLUDE_DIRS}
44 )
45
46 set(SRC
47         gpu.c
48         bpy.c
49         bpy_app.c
50         bpy_app_build_options.c
51         bpy_app_ffmpeg.c
52         bpy_app_handlers.c
53         bpy_app_ocio.c
54         bpy_app_oiio.c
55         bpy_app_sdl.c
56         bpy_app_translations.c
57         bpy_driver.c
58         bpy_interface.c
59         bpy_interface_atexit.c
60         bpy_intern_string.c
61         bpy_library.c
62         bpy_operator.c
63         bpy_operator_wrap.c
64         bpy_path.c
65         bpy_props.c
66         bpy_rna.c
67         bpy_rna_anim.c
68         bpy_rna_array.c
69         bpy_rna_callback.c
70         bpy_traceback.c
71         bpy_util.c
72         bpy_utils_units.c
73         stubs.c
74
75         gpu.h
76         bpy.h
77         bpy_app.h
78         bpy_app_build_options.h
79         bpy_app_ffmpeg.h
80         bpy_app_handlers.h
81         bpy_app_ocio.h
82         bpy_app_oiio.h
83         bpy_app_sdl.h
84         bpy_app_translations.h
85         bpy_driver.h
86         bpy_intern_string.h
87         bpy_library.h
88         bpy_operator.h
89         bpy_operator_wrap.h
90         bpy_path.h
91         bpy_props.h
92         bpy_rna.h
93         bpy_rna_anim.h
94         bpy_rna_callback.h
95         bpy_traceback.h
96         bpy_util.h
97         bpy_utils_units.h
98         ../BPY_extern.h
99 )
100
101 # only to check if buildinfo is available
102 if(WITH_BUILDINFO)
103         add_definitions(-DBUILD_DATE)
104 endif()
105
106 if(WITH_PYTHON_MODULE)
107         add_definitions(-DWITH_PYTHON_MODULE)
108 endif()
109
110 if(WITH_PYTHON_SAFETY)
111         add_definitions(-DWITH_PYTHON_SAFETY)
112 endif()
113
114
115
116 if(WITH_AUDASPACE)
117         add_definitions(-DWITH_AUDASPACE)
118 endif()
119
120 if(WITH_BULLET)
121         add_definitions(-DWITH_BULLET)
122 endif()
123
124 if(WITH_CODEC_AVI)
125         add_definitions(-DWITH_AVI)
126 endif()
127
128 if(WITH_CODEC_FFMPEG)
129         list(APPEND INC_SYS
130                 ${FFMPEG_INCLUDE_DIRS}
131         )
132         add_definitions(-DWITH_FFMPEG)
133 endif()
134
135 if(WITH_CODEC_QUICKTIME)
136         add_definitions(-DWITH_QUICKTIME)
137 endif()
138
139 if(WITH_CODEC_SNDFILE)
140         add_definitions(-DWITH_SNDFILE)
141 endif()
142
143 if(WITH_COMPOSITOR)
144         add_definitions(-DWITH_COMPOSITOR)
145 endif()
146
147 if(WITH_CYCLES)
148         add_definitions(-DWITH_CYCLES)
149 endif()
150
151 if(WITH_CYCLES_OSL)
152         add_definitions(-DWITH_CYCLES_OSL)
153 endif()
154
155 if(WITH_FREESTYLE)
156         list(APPEND INC
157                 ../../freestyle/intern/python
158         )
159         add_definitions(-DWITH_FREESTYLE)
160 endif()
161
162 if(WITH_GAMEENGINE)
163         add_definitions(-DWITH_GAMEENGINE)
164 endif()
165
166 if(WITH_IMAGE_CINEON)
167         add_definitions(-DWITH_CINEON)
168 endif()
169
170 if(WITH_IMAGE_DDS)
171         add_definitions(-DWITH_DDS)
172 endif()
173
174 if(WITH_IMAGE_FRAMESERVER)
175         add_definitions(-DWITH_FRAMESERVER)
176 endif()
177
178 if(WITH_IMAGE_HDR)
179         add_definitions(-DWITH_HDR)
180 endif()
181
182 if(WITH_IMAGE_OPENEXR)
183         add_definitions(-DWITH_OPENEXR)
184 endif()
185
186 if(WITH_OPENIMAGEIO)
187         add_definitions(-DWITH_OPENIMAGEIO)
188 endif()
189
190 if(WITH_IMAGE_OPENJPEG)
191         add_definitions(-DWITH_OPENJPEG)
192 endif()
193
194 if(WITH_IMAGE_REDCODE)
195         add_definitions(-DWITH_REDCODE)
196 endif()
197
198 if(WITH_IMAGE_TIFF)
199         add_definitions(-DWITH_TIFF)
200 endif()
201
202 if(WITH_INPUT_NDOF)
203         add_definitions(-DWITH_INPUT_NDOF)
204 endif()
205
206 if(WITH_INTERNATIONAL)
207         add_definitions(-DWITH_INTERNATIONAL)
208 endif()
209
210 if(WITH_OPENAL)
211         add_definitions(-DWITH_OPENAL)
212 endif()
213
214 if(WITH_SDL)
215         list(APPEND INC_SYS
216                 ${SDL_INCLUDE_DIR}
217         )
218         add_definitions(-DWITH_SDL)
219 endif()
220
221 if(WITH_SDL_DYNLOAD)
222         list(APPEND INC
223                 ../../../../extern/sdlew/include
224         )
225     add_definitions(-DWITH_SDL_DYNLOAD)
226 endif()
227
228 if(WITH_JACK)
229         add_definitions(-DWITH_JACK)
230 endif()
231
232 if(WITH_LIBMV)
233         add_definitions(-DWITH_LIBMV)
234 endif()
235
236 if(WITH_MOD_BOOLEAN)
237         add_definitions(-DWITH_MOD_BOOLEAN)
238 endif()
239
240 if(WITH_MOD_FLUID)
241         add_definitions(-DWITH_MOD_FLUID)
242 endif()
243
244 if(WITH_MOD_OCEANSIM)
245         add_definitions(-DWITH_OCEANSIM)
246 endif()
247
248 if(WITH_MOD_REMESH)
249         add_definitions(-DWITH_MOD_REMESH)
250 endif()
251
252 if(WITH_MOD_SMOKE)
253         add_definitions(-DWITH_SMOKE)
254 endif()
255
256 if(WITH_OPENCOLLADA)
257         add_definitions(-DWITH_COLLADA)
258 endif()
259
260 if(WITH_OPENCOLORIO)
261         add_definitions(-DWITH_OCIO)
262 endif()
263
264 if(WITH_OPENIMAGEIO)
265         add_definitions(-DWITH_OPENIMAGEIO)
266         list(APPEND INC
267                 ../../imbuf/intern/oiio
268         )
269 endif()
270
271 if(WITH_PLAYER)
272         add_definitions(-DWITH_PLAYER)
273 endif()
274
275 add_definitions(${GL_DEFINITIONS})
276
277 blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}")