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