1 # SPDX-FileCopyrightText: 2006 Blender Authors
3 # SPDX-License-Identifier: GPL-2.0-or-later
8 ../../imbuf/intern/oiio
10 ../../../../intern/mantaflow/extern
11 ../../../../intern/opencolorio
13 ${CMAKE_BINARY_DIR}/source/blender/makesrna
17 ${PYTHON_INCLUDE_DIRS}
24 bpy_app_build_options.cc
34 bpy_app_translations.cc
41 bpy_interface_atexit.cc
59 bpy_rna_id_collection.cc
72 bpy_app_build_options.hh
82 bpy_app_translations.hh
102 bpy_rna_id_collection.hh
105 bpy_rna_types_capi.hh
108 bpy_utils_previews.hh
111 ../BPY_extern_clog.hh
112 ../BPY_extern_python.hh
117 PRIVATE bf::blenkernel
119 PRIVATE bf::blenloader
120 PRIVATE bf::blentranslation
121 PRIVATE bf::depsgraph
128 PRIVATE bf::intern::clog
129 PRIVATE bf::intern::guardedalloc
135 PRIVATE bf::windowmanager
138 # Only to check if `buildinfo` is available.
140 add_definitions(-DBUILD_DATE)
143 if(WITH_INSTALL_PORTABLE)
144 add_definitions(-DWITH_INSTALL_PORTABLE)
147 if(WITH_PYTHON_MODULE)
148 add_definitions(-DWITH_PYTHON_MODULE)
152 # Find the SSL certificate for the portable Blender installation.
153 # Without this, the absolute path on the builder is used, causing HTTPS access to fail.
154 # For example `urllib.request.urlopen("https://projects.blender.org")` fails
155 # (or any other HTTPS site). see: #102300 for details.
156 # NOTE: that this isn't necessary on WIN32.
157 if(WITH_PYTHON AND WITH_PYTHON_INSTALL AND (APPLE OR WITH_INSTALL_PORTABLE) AND (NOT WIN32))
158 # - `PYTHON_SSL_CERT_FILE` absolute path to the PEM file.
159 find_python_module_file("certifi/cacert.pem" PYTHON_SSL_CERT_FILE _python_ssl_cert_file_relative)
160 mark_as_advanced(PYTHON_SSL_CERT_FILE)
161 if(PYTHON_SSL_CERT_FILE)
162 add_definitions(-DPYTHON_SSL_CERT_FILE="${_python_ssl_cert_file_relative}")
165 "Unable to find \"certifi/cacert.pem\" within \"${PYTHON_LIBPATH}\", "
166 "this build will not be able to use bundled certificates with the \"ssl\" module!"
169 unset(_python_ssl_cert_file_relative)
172 if(WITH_PYTHON_SAFETY)
173 add_definitions(-DWITH_PYTHON_SAFETY)
177 # It's possible to build with AUDASPACE (for file IO) but without the `aud` Python API,
178 # when building without NUMPY so define both `WITH_AUDASPACE` & `DWITH_AUDASPACE_PY`.
179 add_definitions(-DWITH_AUDASPACE)
180 if(WITH_PYTHON_NUMPY)
181 add_definitions(-DWITH_AUDASPACE_PY)
186 add_definitions(-DWITH_BULLET)
189 if(WITH_CODEC_FFMPEG)
191 ${FFMPEG_INCLUDE_DIRS}
196 add_definitions(-DWITH_FFMPEG)
199 if(WITH_CODEC_SNDFILE)
200 add_definitions(-DWITH_SNDFILE)
205 ../../../../intern/cycles/blender
210 add_definitions(-DWITH_CYCLES)
214 add_definitions(-DWITH_CYCLES_OSL)
217 if(WITH_CYCLES_EMBREE)
218 add_definitions(-DWITH_CYCLES_EMBREE)
223 ../../freestyle/intern/python
225 add_definitions(-DWITH_FREESTYLE)
228 if(WITH_IMAGE_CINEON)
229 add_definitions(-DWITH_CINEON)
232 if(WITH_IMAGE_OPENEXR)
233 add_definitions(-DWITH_OPENEXR)
236 if(WITH_IMAGE_OPENJPEG)
237 add_definitions(-DWITH_OPENJPEG)
241 add_definitions(-DWITH_WEBP)
245 add_definitions(-DWITH_INPUT_NDOF)
248 if(WITH_INTERNATIONAL)
249 add_definitions(-DWITH_INTERNATIONAL)
253 add_definitions(-DWITH_OPENAL)
257 add_definitions(-DWITH_OPENSUBDIV)
267 add_definitions(-DWITH_SDL)
271 add_definitions(-DWITH_JACK)
275 add_definitions(-DWITH_COREAUDIO)
279 add_definitions(-DWITH_LIBMV)
283 add_definitions(-DWITH_PULSEAUDIO)
287 add_definitions(-DWITH_WASAPI)
290 if(WITH_MOD_OCEANSIM)
291 add_definitions(-DWITH_OCEANSIM)
295 add_definitions(-DWITH_MOD_REMESH)
299 add_definitions(-DWITH_FLUID)
303 add_definitions(-DWITH_COLLADA)
306 if(WITH_IO_WAVEFRONT_OBJ)
307 add_definitions(-DWITH_IO_WAVEFRONT_OBJ)
311 add_definitions(-DWITH_IO_PLY)
315 add_definitions(-DWITH_IO_STL)
318 if(WITH_IO_GREASE_PENCIL)
319 add_definitions(-DWITH_IO_GREASE_PENCIL)
323 add_definitions(-DWITH_ALEMBIC)
327 add_definitions(-DWITH_OCIO)
331 add_definitions(-DWITH_OPENVDB)
333 ../../../../intern/openvdb
338 add_definitions(-DWITH_ALEMBIC)
345 add_definitions(-DWITH_USD)
352 add_definitions(-DWITH_OPENSUBDIV)
354 ../../../../intern/opensubdiv
359 add_definitions(-DWITH_XR_OPENXR)
363 add_definitions(-DWITH_POTRACE)
367 add_definitions(-DWITH_PUGIXML)
371 add_definitions(-DWITH_HARU)
378 add_definitions(-DWITH_HYDRA)
381 blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
384 add_dependencies(bf_python bf_rna)