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