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