Compare commits
275 Commits
temp-ui-cp
...
blender-v3
Author | SHA1 | Date | |
---|---|---|---|
948f8298b9 | |||
533e8ac3f3 | |||
c2b517950a | |||
9b86f9c32e | |||
b5144f7ec0 | |||
140f6a7a75 | |||
312f954a22 | |||
a9e4c62b41 | |||
4bb3baddbd | |||
5ff9180890 | |||
9301513a43 | |||
72a8bab04e | |||
8dd3498b2b | |||
dd0cd1df1d | |||
c86cda24a3 | |||
88dcc0b176 | |||
a274713f6c | |||
0e8080419d | |||
cb9cd06f06 | |||
04da7c1153 | |||
![]() |
23f6baf45b | ||
02498e8f13 | |||
28cb5a3a04 | |||
f4b095c872 | |||
b9d242797b | |||
6494fbbdc5 | |||
0c79ec15f4 | |||
743389a99c | |||
2f16323ff0 | |||
5429ce1e0a | |||
d9ff1fb519 | |||
867bee6125 | |||
6cb3145d6c | |||
3f3067c70c | |||
581d1f396b | |||
1e16e55f7d | |||
4fec780a9f | |||
608916b0e1 | |||
a3c0ff9b74 | |||
bc9a6c858e | |||
![]() |
92213e052b | ||
555eb1e46c | |||
0364607a69 | |||
06bfceeda7 | |||
786286111d | |||
a1015d2d23 | |||
aa2571b8e7 | |||
90f06aa48f | |||
3a0eb79ed0 | |||
fc61f24f63 | |||
4eab596c3d | |||
46293e3f97 | |||
225f9c9528 | |||
86a41f8c34 | |||
2cec5d8139 | |||
8c7cca66f0 | |||
e636c4e4c4 | |||
09febafb97 | |||
8d94aeb604 | |||
faca2c614b | |||
d290b8b2b9 | |||
c3a5a0becf | |||
47868c8a4f | |||
4ffbc6175e | |||
d6d0643265 | |||
405dd143cf | |||
095b363899 | |||
6191b726aa | |||
6aacbdd716 | |||
442ce8610d | |||
158752cee6 | |||
9137a4f03c | |||
8529458cc7 | |||
3029bd2b0c | |||
427b0a0ab2 | |||
eca95d35ba | |||
849c76a10b | |||
6fbb4d7051 | |||
ae5b912f78 | |||
d2050c7c36 | |||
746af98b00 | |||
17fd81fb9b | |||
77e66d630a | |||
b3e0eadbdc | |||
a86f32d219 | |||
2bbabbc739 | |||
7a4b3d2287 | |||
5940e9b792 | |||
f3a10a1543 | |||
e981a187e5 | |||
15b36dc4e6 | |||
a274718e7d | |||
fff29e1bd6 | |||
![]() |
9d3d9019ab | ||
f32939af53 | |||
cdfb21c7e2 | |||
4107e04c45 | |||
4d25c6b86e | |||
934af61134 | |||
bd3a7b41e2 | |||
bf24652e38 | |||
86abbf7176 | |||
![]() |
f9f834068e | ||
3e247f0f76 | |||
![]() |
021c8c7cd0 | ||
8dfe5b236e | |||
24c416c302 | |||
dd7a10e5a5 | |||
2eabe0a320 | |||
![]() |
3e41332798 | ||
![]() |
e968b4197b | ||
4d58a1c657 | |||
6008c67859 | |||
4a7ace4a78 | |||
5a03d212a9 | |||
f0cd1fed18 | |||
![]() |
e257e2e075 | ||
981245fc6f | |||
c024d6f47d | |||
92680674d0 | |||
4f22e6178e | |||
d0e9a8c46a | |||
331de028ef | |||
![]() |
29bc410c8a | ||
be34354500 | |||
198fd56a5e | |||
ee8d32b1d9 | |||
036c60a27d | |||
7a21a49ac5 | |||
19a13a8b8b | |||
1fd35126c4 | |||
af7dd99588 | |||
6810deb521 | |||
9676cb6d8d | |||
b43cfae49c | |||
7ce6750234 | |||
d2b74943ce | |||
c5ec667b69 | |||
a49a960a58 | |||
90055a1f2c | |||
0c3a52d571 | |||
f07f55582a | |||
be38344de0 | |||
d5acb2b2fe | |||
832157cb02 | |||
2124bfb211 | |||
b7b9e670ce | |||
15b2b53b87 | |||
5bbef85bc8 | |||
![]() |
19202736d5 | ||
e86b5230ca | |||
953eda6bfd | |||
49b7a7efca | |||
05d09dcb81 | |||
c76c8ee3a0 | |||
f6294c437f | |||
da0d699d92 | |||
2fb0640740 | |||
20679ca25c | |||
5b27e6f24b | |||
ad6f5117ad | |||
8daad7dab5 | |||
2bdc9908a9 | |||
2db9bfb6d8 | |||
9f5a2d8788 | |||
2b2fc6d759 | |||
2a7b8e78e1 | |||
514f4e8b47 | |||
94ec66c2f2 | |||
5916e73b28 | |||
30774f01cd | |||
5ff62df238 | |||
1492f566c8 | |||
e5af9a12d7 | |||
9f8ece70ee | |||
bb95609fce | |||
0386737097 | |||
f9c6e0c814 | |||
7881a797a0 | |||
07ba515b21 | |||
3d7f298e9a | |||
7e942b2a1e | |||
e1e9c83889 | |||
![]() |
bfc9d7cadf | ||
fcc291bbf9 | |||
567e3f6508 | |||
0b45d3e386 | |||
6004e9d62b | |||
c98268d3f5 | |||
86f8898ccd | |||
85fb4708f4 | |||
2a78941d2c | |||
8725bb5108 | |||
e2beed6ae2 | |||
7e5db850dc | |||
cb2fb570f1 | |||
a18b8ba1be | |||
5d820393af | |||
295eb04ba3 | |||
72a34ab1b9 | |||
197f3d75d1 | |||
8f8eac78cf | |||
b292cfe5a9 | |||
28e09980a2 | |||
5a1ef2dc78 | |||
2653775c66 | |||
8d97ecde02 | |||
fb499916bb | |||
1bdb5542ff | |||
3f30c1c042 | |||
86538e31f5 | |||
25cc656003 | |||
cc8df686ad | |||
5041666321 | |||
93bbaad2f8 | |||
662ba67210 | |||
![]() |
6c3364052b | ||
24814a03b7 | |||
ede6c26222 | |||
b4e8d03e5c | |||
1c8374978d | |||
a6c27ea49d | |||
b266eedb24 | |||
803d9f9748 | |||
740b501d8b | |||
0ecc1d788c | |||
4b0243dae4 | |||
5faaaf0982 | |||
aa7449e691 | |||
753dea79a3 | |||
6012deddfe | |||
cc1105f01b | |||
58e78c1ffe | |||
81ec5ec366 | |||
07b547ef96 | |||
345cdf71e9 | |||
dba599c806 | |||
243e28b73b | |||
![]() |
a920f32ccd | ||
609422c0a1 | |||
03fbfb3092 | |||
5fddc4a3b1 | |||
cab2ca7a24 | |||
fe15766f46 | |||
3a880b820b | |||
![]() |
9b591a104b | ||
55177b40f3 | |||
c1f2cd4871 | |||
41527ea89c | |||
b50c1ca8fe | |||
![]() |
52f7d4bbab | ||
2a43bb5ed7 | |||
440c29f65b | |||
42937493d8 | |||
6143b3ab38 | |||
ec2938c71a | |||
bf6a9d705f | |||
22c73b36af | |||
0a3b6b134c | |||
568265964e | |||
faccd88038 | |||
761da576b0 | |||
6133434478 | |||
bcdb90b961 | |||
c25181be4d | |||
![]() |
8004214356 | ||
5e372fca7c | |||
![]() |
c0640ddff9 | ||
50069fb2a1 | |||
765f987fee | |||
b5ff47667d | |||
40194f7219 | |||
cb9b6cefb3 | |||
19ae71c113 | |||
a6c0d0a0e3 |
@@ -162,7 +162,6 @@ PenaltyBreakString: 1000000
|
||||
ForEachMacros:
|
||||
- BEGIN_ANIMFILTER_SUBCHANNELS
|
||||
- BKE_pbvh_vertex_iter_begin
|
||||
- BKE_pbvh_face_iter_begin
|
||||
- BLI_FOREACH_SPARSE_RANGE
|
||||
- BLI_SMALLSTACK_ITER_BEGIN
|
||||
- BMO_ITER
|
||||
@@ -267,12 +266,11 @@ ForEachMacros:
|
||||
- MAP_SLOT_PROBING_BEGIN
|
||||
- VECTOR_SET_SLOT_PROBING_BEGIN
|
||||
- WL_ARRAY_FOR_EACH
|
||||
- FOREACH_SPECTRUM_CHANNEL
|
||||
|
||||
StatementMacros:
|
||||
- PyObject_HEAD
|
||||
- PyObject_VAR_HEAD
|
||||
- ccl_gpu_kernel_postfix
|
||||
|
||||
MacroBlockBegin: "^OSL_CLOSURE_STRUCT_BEGIN$"
|
||||
MacroBlockEnd: "^OSL_CLOSURE_STRUCT_END$"
|
||||
MacroBlockBegin: "^BSDF_CLOSURE_CLASS_BEGIN$"
|
||||
MacroBlockEnd: "^BSDF_CLOSURE_CLASS_END$"
|
||||
|
914
CMakeLists.txt
914
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
28
GNUmakefile
28
GNUmakefile
@@ -162,7 +162,6 @@ CPU:=$(shell uname -m)
|
||||
# Source and Build DIR's
|
||||
BLENDER_DIR:=$(shell pwd -P)
|
||||
BUILD_TYPE:=Release
|
||||
BLENDER_IS_PYTHON_MODULE:=
|
||||
|
||||
# CMake arguments, assigned to local variable to make it mutable.
|
||||
CMAKE_CONFIG_ARGS := $(BUILD_CMAKE_ARGS)
|
||||
@@ -230,18 +229,9 @@ endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Additional targets for the build configuration
|
||||
# additional targets for the build configuration
|
||||
|
||||
# NOTE: These targets can be combined and are applied in reverse order listed here.
|
||||
# So it's important that `bpy` comes before `release` (for example)
|
||||
# `make bpy release` first loads `release` configuration, then `bpy`.
|
||||
# This is important as `bpy` will turn off some settings enabled by release.
|
||||
|
||||
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
BLENDER_IS_PYTHON_MODULE:=1
|
||||
endif
|
||||
# support 'make debug'
|
||||
ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_debug
|
||||
BUILD_TYPE:=Debug
|
||||
@@ -266,6 +256,10 @@ ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_headless
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
endif
|
||||
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
endif
|
||||
|
||||
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
@@ -303,10 +297,8 @@ endif
|
||||
# use the default build path can still use utility helpers.
|
||||
ifeq ($(OS), Darwin)
|
||||
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
|
||||
BLENDER_BIN_DIR?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
|
||||
else
|
||||
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
|
||||
BLENDER_BIN_DIR?="$(BUILD_DIR)/bin"
|
||||
endif
|
||||
|
||||
|
||||
@@ -363,12 +355,8 @@ all: .FORCE
|
||||
@echo Building Blender ...
|
||||
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
|
||||
@echo
|
||||
@echo Edit build configuration with: \"$(BUILD_DIR)/CMakeCache.txt\" run make again to rebuild.
|
||||
@if test -z "$(BLENDER_IS_PYTHON_MODULE)"; then \
|
||||
echo Blender successfully built, run from: $(BLENDER_BIN); \
|
||||
else \
|
||||
echo Blender successfully built as a Python module, \"bpy\" can be imported from: $(BLENDER_BIN_DIR); \
|
||||
fi
|
||||
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
|
||||
@echo Blender successfully built, run from: $(BLENDER_BIN)
|
||||
@echo
|
||||
|
||||
debug: all
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
##################################################################################################
|
||||
####################################################################################################
|
||||
#
|
||||
# This is a build system used by platform maintainers to build library dependencies on
|
||||
# Windows, macOS and Linux.
|
||||
@@ -22,7 +22,7 @@
|
||||
# Install compiler cmake autoconf automake libtool yasm tcl
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
##################################################################################################
|
||||
####################################################################################################
|
||||
|
||||
project("BlenderDependencies")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
@@ -30,8 +30,7 @@ cmake_minimum_required(VERSION 3.5)
|
||||
include(ExternalProject)
|
||||
include(cmake/check_software.cmake)
|
||||
include(cmake/options.cmake)
|
||||
# `versions.cmake` needs to be included after `options.cmake`
|
||||
# due to the `BLENDER_PLATFORM_ARM` variable being needed.
|
||||
# versions.cmake needs to be included after options.cmake due to the BLENDER_PLATFORM_ARM variable being needed.
|
||||
include(cmake/versions.cmake)
|
||||
include(cmake/boost_build_options.cmake)
|
||||
include(cmake/download.cmake)
|
||||
@@ -54,8 +53,8 @@ include(cmake/imath.cmake)
|
||||
include(cmake/openexr.cmake)
|
||||
include(cmake/brotli.cmake)
|
||||
include(cmake/freetype.cmake)
|
||||
include(cmake/epoxy.cmake)
|
||||
include(cmake/freeglut.cmake)
|
||||
include(cmake/glew.cmake)
|
||||
include(cmake/alembic.cmake)
|
||||
include(cmake/opensubdiv.cmake)
|
||||
include(cmake/sdl.cmake)
|
||||
@@ -89,13 +88,12 @@ include(cmake/package_python.cmake)
|
||||
include(cmake/usd.cmake)
|
||||
include(cmake/potrace.cmake)
|
||||
include(cmake/haru.cmake)
|
||||
# Boost needs to be included after `python.cmake` due to the PYTHON_BINARY variable being needed.
|
||||
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
|
||||
include(cmake/boost.cmake)
|
||||
include(cmake/pugixml.cmake)
|
||||
include(cmake/ispc.cmake)
|
||||
include(cmake/openimagedenoise.cmake)
|
||||
include(cmake/embree.cmake)
|
||||
include(cmake/openpgl.cmake)
|
||||
include(cmake/fmt.cmake)
|
||||
include(cmake/robinmap.cmake)
|
||||
include(cmake/xml2.cmake)
|
||||
@@ -172,9 +170,6 @@ if(UNIX AND NOT APPLE)
|
||||
include(cmake/libglu.cmake)
|
||||
include(cmake/mesa.cmake)
|
||||
include(cmake/wayland_protocols.cmake)
|
||||
# Can be removed when the build-bot upgrades to v1.20.x or newer.
|
||||
include(cmake/wayland.cmake)
|
||||
include(cmake/wayland_libdecor.cmake)
|
||||
endif()
|
||||
|
||||
include(cmake/harvest.cmake)
|
||||
|
@@ -12,13 +12,21 @@ if(UNIX)
|
||||
automake
|
||||
bison
|
||||
${_libtoolize_name}
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
tclsh
|
||||
yasm
|
||||
)
|
||||
|
||||
if(NOT APPLE)
|
||||
set(_required_software
|
||||
${_required_software}
|
||||
|
||||
# Needed for Mesa.
|
||||
meson
|
||||
ninja
|
||||
)
|
||||
endif()
|
||||
|
||||
foreach(_software ${_required_software})
|
||||
find_program(_software_find NAMES ${_software})
|
||||
if(NOT _software_find)
|
||||
@@ -46,10 +54,10 @@ if(UNIX)
|
||||
" ${_software_missing}\n"
|
||||
"\n"
|
||||
"On Debian and Ubuntu:\n"
|
||||
" apt install autoconf automake bison libtool yasm tcl ninja-build meson python3-mako\n"
|
||||
" apt install autoconf automake libtool yasm tcl ninja-build meson python3-mako\n"
|
||||
"\n"
|
||||
"On macOS (with homebrew):\n"
|
||||
" brew install autoconf automake bison flex libtool meson ninja pkg-config yasm\n"
|
||||
" brew install autoconf automake bison flex libtool pkg-config yasm\n"
|
||||
"\n"
|
||||
"Other platforms:\n"
|
||||
" Install equivalent packages.\n")
|
||||
|
@@ -1,5 +1,10 @@
|
||||
vendor,product,version,cve_number,remarks,comment
|
||||
@FMT_ID@,OSV-2021-991,Ignored,CVE marked as invalid but OSV not updated
|
||||
@FREETYPE_ID@,CVE-2022-27404,Ignored,does not affect blender usage of freetype
|
||||
@FREETYPE_ID@,CVE-2022-27405,Ignored,does not affect blender usage of freetype
|
||||
@FREETYPE_ID@,CVE-2022-27406,Ignored,does not affect blender usage of freetype
|
||||
@OPENJPEG_ID@,CVE-2016-9675,Ignored,issue in convert command line tool not used by blender
|
||||
@OPENJPEG_ID@,OSV-2022-416,Mitigated,using newer git revision with fix included
|
||||
@PYTHON_ID@,CVE-2009-2940,Ignored,issue in pygresql not used by blender
|
||||
@PYTHON_ID@,CVE-2020-29396,Ignored,issue in odoo not used by blender
|
||||
@PYTHON_ID@,CVE-2021-32052,Ignored,issue in django not used by blender
|
||||
@@ -23,7 +28,13 @@ vendor,product,version,cve_number,remarks,comment
|
||||
@TIFF_ID@,CVE-2022-3599,Ignored,issue in tiff command line tool not used by blender
|
||||
@TIFF_ID@,CVE-2022-3626,Ignored,issue in tiff command line tool not used by blender
|
||||
@TIFF_ID@,CVE-2022-3627,Ignored,issue in tiff command line tool not used by blender
|
||||
@TIFF_ID@,CVE-2022-48281,Ignored,issue in tiff command line tool not used by blender
|
||||
@XML2_ID@,CVE-2016-3709,Ignored,not affecting blender and not considered a security issue upstream
|
||||
@XML2_ID@,OSV-2021-777,Ignored,already fixed in version used so OSV invalid
|
||||
@XML2_ID@,CVE-2022-40303,Ignored,fixed and cve_check version comparison is wrong
|
||||
@XML2_ID@,CVE-2022-40304,Ignored,fixed and cve_check version comparison is wrong
|
||||
@GMP_ID@,CVE-2021-43618,Mitigated,patched using upstream commit 561a9c25298e
|
||||
@SQLITE_ID@,CVE-2022-35737,Ignored,only affects SQLITE_ENABLE_STAT4 compile option not used by blender or python
|
||||
@SQLITE_ID@,CVE-2022-46908,Ignored,only affects CLI tools not used by blender or python
|
||||
@BROTLI_ID@,CVE-2020-8927,Ignored,fixed and cve_check version comparison is wrong
|
||||
@SBOMCONTENTS@
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
## Update and uncomment this in the release branch
|
||||
# set(BLENDER_VERSION 3.1)
|
||||
set(BLENDER_VERSION 3.3)
|
||||
|
||||
function(download_source dep)
|
||||
set(TARGET_FILE ${${dep}_FILE})
|
||||
@@ -80,7 +80,7 @@ download_source(BLOSC)
|
||||
download_source(PTHREADS)
|
||||
download_source(OPENEXR)
|
||||
download_source(FREETYPE)
|
||||
download_source(EPOXY)
|
||||
download_source(GLEW)
|
||||
download_source(FREEGLUT)
|
||||
download_source(ALEMBIC)
|
||||
download_source(OPENSUBDIV)
|
||||
@@ -131,21 +131,17 @@ download_source(MESA)
|
||||
download_source(NASM)
|
||||
download_source(XR_OPENXR_SDK)
|
||||
download_source(WL_PROTOCOLS)
|
||||
download_source(WAYLAND)
|
||||
download_source(WAYLAND_LIBDECOR)
|
||||
download_source(ISPC)
|
||||
download_source(GMP)
|
||||
download_source(POTRACE)
|
||||
download_source(HARU)
|
||||
download_source(ZSTD)
|
||||
download_source(SSE2NEON)
|
||||
download_source(FLEX)
|
||||
download_source(BROTLI)
|
||||
download_source(FMT)
|
||||
download_source(ROBINMAP)
|
||||
download_source(IMATH)
|
||||
download_source(PYSTRING)
|
||||
download_source(OPENPGL)
|
||||
download_source(LEVEL_ZERO)
|
||||
download_source(DPCPP)
|
||||
download_source(VCINTRINSICS)
|
||||
|
@@ -68,7 +68,7 @@ set(DPCPP_EXTRA_ARGS
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND DPCPP_EXTRA_ARGS -DPython3_FIND_REGISTRY=NEVER)
|
||||
list(APPEND DPCPP_EXTRA_ARGS -DPython3_FIND_REGISTRY=NEVER)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_dpcpp
|
||||
@@ -80,11 +80,8 @@ ExternalProject_Add(external_dpcpp
|
||||
SOURCE_SUBDIR llvm
|
||||
LIST_SEPARATOR ^^
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/dpcpp ${DEFAULT_CMAKE_FLAGS} ${DPCPP_EXTRA_ARGS}
|
||||
# CONFIGURE_COMMAND
|
||||
# ${PYTHON_BINARY}
|
||||
# ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS}
|
||||
# BUILD_COMMAND
|
||||
# echo "." # ${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/compile.py
|
||||
#CONFIGURE_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS}
|
||||
#BUILD_COMMAND echo "." #${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/compile.py
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . -- deploy-sycl-toolchain
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/dpcpp/src/external_dpcpp < ${PATCH_DIR}/dpcpp.diff
|
||||
INSTALL_DIR ${LIBDIR}/dpcpp
|
||||
|
@@ -1,25 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
if(WIN32)
|
||||
set(EPOXY_LIB_TYPE shared)
|
||||
else()
|
||||
set(EPOXY_LIB_TYPE static)
|
||||
endif()
|
||||
ExternalProject_Add(external_epoxy
|
||||
URL file://${PACKAGE_DIR}/${EPOXY_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${EPOXY_HASH_TYPE}=${EPOXY_HASH}
|
||||
PREFIX ${BUILD_DIR}/epoxy
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/epoxy/src/external_epoxy/ < ${PATCH_DIR}/epoxy.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && meson setup --prefix ${LIBDIR}/epoxy --default-library ${EPOXY_LIB_TYPE} --libdir lib ${BUILD_DIR}/epoxy/src/external_epoxy-build ${BUILD_DIR}/epoxy/src/external_epoxy -Dtests=false
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_epoxy after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/epoxy/include ${HARVEST_TARGET}/epoxy/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/bin/epoxy-0.dll ${HARVEST_TARGET}/epoxy/bin/epoxy-0.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/lib/epoxy.lib ${HARVEST_TARGET}/epoxy/lib/epoxy.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
16
build_files/build_environment/cmake/glew.cmake
Normal file
16
build_files/build_environment/cmake/glew.cmake
Normal file
@@ -0,0 +1,16 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(GLEW_EXTRA_ARGS
|
||||
-DBUILD_UTILS=Off
|
||||
-DBUILD_SHARED_LIBS=Off
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_glew
|
||||
URL file://${PACKAGE_DIR}/${GLEW_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${GLEW_HASH_TYPE}=${GLEW_HASH}
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
|
||||
PREFIX ${BUILD_DIR}/glew
|
||||
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/glew
|
||||
)
|
@@ -22,6 +22,14 @@ elseif(UNIX AND NOT APPLE)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Boolean crashes with Arm assembly, see T103423.
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--disable-assembly
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_gmp
|
||||
URL file://${PACKAGE_DIR}/${GMP_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
|
@@ -22,6 +22,9 @@ if(WIN32)
|
||||
# freeglut-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
# glew-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
DEPENDS
|
||||
)
|
||||
endif()
|
||||
@@ -72,8 +75,8 @@ else()
|
||||
harvest(flac/lib sndfile/lib "libFLAC.a")
|
||||
harvest(freetype/include freetype/include "*.h")
|
||||
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
|
||||
harvest(epoxy/include epoxy/include "*.h")
|
||||
harvest(epoxy/lib epoxy/lib "*.a")
|
||||
harvest(glew/include glew/include "*.h")
|
||||
harvest(glew/lib glew/lib "*.a")
|
||||
harvest(gmp/include gmp/include "*.h")
|
||||
harvest(gmp/lib gmp/lib "*.a")
|
||||
harvest(jemalloc/include jemalloc/include "*.h")
|
||||
@@ -117,9 +120,6 @@ else()
|
||||
harvest(xml2/lib xml2/lib "*.a")
|
||||
|
||||
harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml")
|
||||
harvest(wayland/bin wayland/bin "wayland-scanner")
|
||||
harvest(wayland/include wayland/include "*.h")
|
||||
harvest(wayland_libdecor/include wayland_libdecor/include "*.h")
|
||||
else()
|
||||
harvest(blosc/lib openvdb/lib "*.a")
|
||||
harvest(xml2/lib opencollada/lib "*.a")
|
||||
@@ -140,9 +140,6 @@ else()
|
||||
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
||||
harvest(embree/include embree/include "*.h")
|
||||
harvest(embree/lib embree/lib "*.a")
|
||||
harvest(openpgl/include openpgl/include "*.h")
|
||||
harvest(openpgl/lib openpgl/lib "*.a")
|
||||
harvest(openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION} openpgl/lib/cmake/openpgl "*.cmake")
|
||||
harvest(openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} openjpeg/include "*.h")
|
||||
harvest(openjpeg/lib openjpeg/lib "*.a")
|
||||
harvest(opensubdiv/include opensubdiv/include "*.h")
|
||||
|
@@ -1,47 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
set(OPENPGL_EXTRA_ARGS
|
||||
-DOPENPGL_BUILD_STATIC=ON
|
||||
-DOPENPGL_TBB_ROOT=${LIBDIR}/tbb
|
||||
-DTBB_ROOT=${LIBDIR}/tbb
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
)
|
||||
|
||||
if(TBB_STATIC_LIBRARY)
|
||||
set(OPENPGL_EXTRA_ARGS
|
||||
${OPENPGL_EXTRA_ARGS}
|
||||
-DOPENPGL_TBB_COMPONENT=tbb_static
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_openpgl
|
||||
URL file://${PACKAGE_DIR}/${OPENPGL_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENPGL_HASH_TYPE}=${OPENPGL_HASH}
|
||||
PREFIX ${BUILD_DIR}/openpgl
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openpgl ${DEFAULT_CMAKE_FLAGS} ${OPENPGL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openpgl
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openpgl
|
||||
external_tbb
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openpgl after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openpgl ${HARVEST_TARGET}/openpgl
|
||||
DEPENDEES install
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add_Step(external_openpgl after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openpgl/lib/openpgl_d.lib ${HARVEST_TARGET}/openpgl/lib/openpgl_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION}/openpgl_Exports-debug.cmake ${HARVEST_TARGET}/openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION}/openpgl_Exports-debug.cmake
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -3,7 +3,6 @@
|
||||
if(WIN32)
|
||||
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
|
||||
endif()
|
||||
option(FORCE_CHECK_HASH "Force a check of all hashses during CMake the configure phase" OFF)
|
||||
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
|
||||
cmake_host_system_information(RESULT NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
||||
set(MAKE_THREADS ${NUM_CORES} CACHE STRING "Number of threads to run make with")
|
||||
@@ -21,8 +20,8 @@ else()
|
||||
endif()
|
||||
|
||||
set(DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads" CACHE STRING "Path for downloaded files")
|
||||
|
||||
set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages" CACHE PATH "default path for downloaded packages")
|
||||
# This path must be hard-coded like this, so that the GNUmakefile knows where it is and can pass it to make_source_archive.py:
|
||||
set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages")
|
||||
option(PACKAGE_USE_UPSTREAM_SOURCES "Use sources upstream to download the package sources, when OFF the blender mirror will be used" ON)
|
||||
|
||||
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
|
||||
|
@@ -83,7 +83,6 @@ if(WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslnoise.lib ${HARVEST_TARGET}/osl/lib/oslnoise_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -15,7 +15,21 @@ ExternalProject_Add(external_python_site_packages
|
||||
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ""
|
||||
PREFIX ${BUILD_DIR}/site_packages
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} autopep8==${AUTOPEP8_VERSION} pycodestyle==${PYCODESTYLE_VERSION} toml==${TOML_VERSION} --no-binary :all:
|
||||
# setuptools is downgraded to 63.2.0 (same as python 3.10.8) since numpy 1.23.x seemingly has
|
||||
# issues building on windows with the newer versions that ships with python 3.10.9+
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA}
|
||||
setuptools==63.2.0
|
||||
cython==${CYTHON_VERSION}
|
||||
idna==${IDNA_VERSION}
|
||||
charset-normalizer==${CHARSET_NORMALIZER_VERSION}
|
||||
urllib3==${URLLIB3_VERSION}
|
||||
certifi==${CERTIFI_VERSION}
|
||||
requests==${REQUESTS_VERSION}
|
||||
zstandard==${ZSTANDARD_VERSION}
|
||||
autopep8==${AUTOPEP8_VERSION}
|
||||
pycodestyle==${PYCODESTYLE_VERSION}
|
||||
toml==${TOML_VERSION}
|
||||
--no-binary :all:
|
||||
)
|
||||
|
||||
if(USE_PIP_NUMPY)
|
||||
|
@@ -1,10 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
##################################################################################################
|
||||
####################################################################################################################
|
||||
# Mingw64 Builds
|
||||
##################################################################################################
|
||||
####################################################################################################################
|
||||
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3
|
||||
##################################################################################################
|
||||
####################################################################################################################
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
|
@@ -1,9 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_sse2neon
|
||||
URL file://${PACKAGE_DIR}/${SSE2NEON_FILE}
|
||||
GIT_REPOSITORY ${SSE2NEON_GIT}
|
||||
GIT_TAG ${SSE2NEON_GIT_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SSE2NEON_HASH_TYPE}=${SSE2NEON_HASH}
|
||||
PREFIX ${BUILD_DIR}/sse2neon
|
||||
CONFIGURE_COMMAND echo sse2neon - Nothing to configure
|
||||
BUILD_COMMAND echo sse2neon - nothing to build
|
||||
|
@@ -58,9 +58,8 @@ set(USD_EXTRA_ARGS
|
||||
-DPXR_BUILD_USD_TOOLS=OFF
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-DBUILD_SHARED_LIBS=Off
|
||||
# USD is hellbound on making a shared library,
|
||||
# unless you point this variable to a valid CMAKE file doesn't have to make sense,
|
||||
# but as long as it points somewhere valid it will skip the shared library.
|
||||
# USD is hellbound on making a shared lib, unless you point this variable to a valid cmake file
|
||||
# doesn't have to make sense, but as long as it points somewhere valid it will skip the shared lib.
|
||||
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
|
||||
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
|
||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
||||
@@ -87,8 +86,7 @@ add_dependencies(
|
||||
external_opensubdiv
|
||||
)
|
||||
|
||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e.
|
||||
# "libusd_m.a" became "libusd_usd_m.a".
|
||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
|
||||
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
|
||||
if(NOT WIN32)
|
||||
if (USD_VERSION VERSION_LESS 21.11)
|
||||
|
@@ -95,11 +95,11 @@ set(FREETYPE_HASH_TYPE MD5)
|
||||
set(FREETYPE_FILE freetype-${FREETYPE_VERSION}.tar.gz)
|
||||
SET(FREETYPE_CPE "cpe:2.3:a:freetype:freetype:${FREETYPE_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(EPOXY_VERSION 1.5.10)
|
||||
set(EPOXY_URI https://github.com/anholt/libepoxy/archive/refs/tags/${EPOXY_VERSION}.tar.gz)
|
||||
set(EPOXY_HASH f0730aad115c952e77591fcc805b1dc1)
|
||||
set(EPOXY_HASH_TYPE MD5)
|
||||
set(EPOXY_FILE libepoxy-${EPOXY_VERSION}.tar.gz)
|
||||
set(GLEW_VERSION 1.13.0)
|
||||
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
|
||||
set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066)
|
||||
set(GLEW_HASH_TYPE MD5)
|
||||
set(GLEW_FILE glew-${GLEW_VERSION}.tgz)
|
||||
|
||||
set(FREEGLUT_VERSION 3.0.0)
|
||||
set(FREEGLUT_URI http://prdownloads.sourceforge.net/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
|
||||
@@ -182,24 +182,24 @@ set(ROBINMAP_HASH c08ec4b1bf1c85eb0d6432244a6a89862229da1cb834f3f90fba8dc35d8c8e
|
||||
set(ROBINMAP_HASH_TYPE SHA256)
|
||||
set(ROBINMAP_FILE robinmap-${ROBINMAP_VERSION}.tar.gz)
|
||||
|
||||
set(TIFF_VERSION 4.4.0)
|
||||
set(TIFF_VERSION 4.5.0)
|
||||
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_HASH 376f17f189e9d02280dfe709b2b2bbea)
|
||||
set(TIFF_HASH db9e220a1971acc64487f1d51a20dcaa)
|
||||
set(TIFF_HASH_TYPE MD5)
|
||||
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(OSL_VERSION 1.12.6.2)
|
||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/refs/tags/v${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 6fef11548adfdd3e5b25c49d2dae96ee)
|
||||
set(OSL_VERSION 1.11.17.0)
|
||||
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 63265472ce14548839ace2e21e401544)
|
||||
set(OSL_HASH_TYPE MD5)
|
||||
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
|
||||
|
||||
set(PYTHON_VERSION 3.10.8)
|
||||
set(PYTHON_VERSION 3.10.9)
|
||||
set(PYTHON_SHORT_VERSION 3.10)
|
||||
set(PYTHON_SHORT_VERSION_NO_DOTS 310)
|
||||
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_HASH e92356b012ed4d0e09675131d39b1bde)
|
||||
set(PYTHON_HASH dc8c0f274b28ee9e95923d20cfc364c9)
|
||||
set(PYTHON_HASH_TYPE MD5)
|
||||
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_CPE "cpe:2.3:a:python:python:${PYTHON_VERSION}:-:*:*:*:*:*:*")
|
||||
@@ -225,9 +225,8 @@ set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*")
|
||||
set(CERTIFI_VERSION 2021.10.8)
|
||||
set(REQUESTS_VERSION 2.27.1)
|
||||
set(CYTHON_VERSION 0.29.26)
|
||||
# The version of the zstd library used to build the Python package should match ZSTD_VERSION
|
||||
# defined below. At this time of writing, 0.17.0 was already released,
|
||||
# but built against zstd 1.5.1, while we use 1.5.0.
|
||||
# The version of the zstd library used to build the Python package should match ZSTD_VERSION defined below.
|
||||
# At this time of writing, 0.17.0 was already released, but built against zstd 1.5.1, while we use 1.5.0.
|
||||
set(ZSTANDARD_VERSION 0.16.0)
|
||||
set(AUTOPEP8_VERSION 1.6.0)
|
||||
set(PYCODESTYLE_VERSION 2.8.0)
|
||||
@@ -267,9 +266,9 @@ set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc
|
||||
set(THEORA_HASH_TYPE SHA256)
|
||||
set(THEORA_FILE libtheora-${THEORA_VERSION}.tar.bz2)
|
||||
|
||||
set(FLAC_VERSION 1.3.4)
|
||||
set(FLAC_VERSION 1.4.2)
|
||||
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
|
||||
set(FLAC_HASH 8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737 )
|
||||
set(FLAC_HASH e322d58a1f48d23d9dd38f432672865f6f79e73a6f9cc5a5f57fcaa83eb5a8e4 )
|
||||
set(FLAC_HASH_TYPE SHA256)
|
||||
set(FLAC_FILE flac-${FLAC_VERSION}.tar.xz)
|
||||
set(FLAC_CPE "cpe:2.3:a:flac_project:flac:${FLAC_VERSION}:*:*:*:*:*:*:*")
|
||||
@@ -301,10 +300,11 @@ set(XVIDCORE_FILE xvidcore-${XVIDCORE_VERSION}.tar.gz)
|
||||
|
||||
set(OPENJPEG_VERSION 2.5.0)
|
||||
set(OPENJPEG_SHORT_VERSION 2.5)
|
||||
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
|
||||
set(OPENJPEG_HASH 0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a)
|
||||
set(OPENJPEG_GIT_HASH 2d606701e8b7aa83f657d113c3367508e99bd12b)
|
||||
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/${OPENJPEG_GIT_HASH}.tar.gz)
|
||||
set(OPENJPEG_HASH f90941955eb66a81762df5e989f13ade48d753d3182e7f9a82d2bfce3fb5cef2)
|
||||
set(OPENJPEG_HASH_TYPE SHA256)
|
||||
set(OPENJPEG_FILE openjpeg-v${OPENJPEG_VERSION}.tar.gz)
|
||||
set(OPENJPEG_FILE openjpeg-v${OPENJPEG_GIT_HASH}.tar.gz)
|
||||
set(OPENJPEG_CPE "cpe:2.3:a:uclouvain:openjpeg:${OPENJPEG_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(FFMPEG_VERSION 5.1.2)
|
||||
@@ -501,18 +501,6 @@ set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/
|
||||
set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a)
|
||||
set(WL_PROTOCOLS_HASH_TYPE MD5)
|
||||
|
||||
set(WAYLAND_VERSION 1.21.0)
|
||||
set(WAYLAND_FILE wayland-${WAYLAND_VERSION}.tar.xz)
|
||||
set(WAYLAND_URI https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.21.0/downloads/wayland-${WAYLAND_VERSION}.tar.xz)
|
||||
set(WAYLAND_HASH f2653a2293bcd882d756c6a83d278903)
|
||||
set(WAYLAND_HASH_TYPE MD5)
|
||||
|
||||
set(WAYLAND_LIBDECOR_VERSION 0.1.0)
|
||||
set(WAYLAND_LIBDECOR_FILE libdecor-${WAYLAND_LIBDECOR_VERSION}.tar.xz)
|
||||
set(WAYLAND_LIBDECOR_URI https://gitlab.gnome.org/jadahl/libdecor/uploads/81adf91d27620e20bcc5f6b9b312d768/libdecor-${WAYLAND_LIBDECOR_VERSION}.tar.xz )
|
||||
set(WAYLAND_LIBDECOR_HASH 47b59eba76faa3787f0878bf8700e912)
|
||||
set(WAYLAND_LIBDECOR_HASH_TYPE MD5)
|
||||
|
||||
set(ISPC_VERSION v1.17.0)
|
||||
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
|
||||
set(ISPC_HASH 4f476a3109332a77fe839a9014c60ca9)
|
||||
@@ -546,11 +534,8 @@ set(ZSTD_HASH_TYPE SHA256)
|
||||
set(ZSTD_FILE zstd-${ZSTD_VERSION}.tar.gz)
|
||||
set(ZSTD_CPE "cpe:2.3:a:facebook:zstandard:${ZSTD_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(SSE2NEON_VERSION fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)
|
||||
set(SSE2NEON_URI https://github.com/DLTcollab/sse2neon/archive/${SSE2NEON_VERSION}.tar.gz)
|
||||
set(SSE2NEON_HASH 0780253525d299c31775ef95853698d03db9c7739942af8570000f4a25a5d605)
|
||||
set(SSE2NEON_HASH_TYPE SHA256)
|
||||
set(SSE2NEON_FILE sse2neon-${SSE2NEON_VERSION}.tar.gz)
|
||||
set(SSE2NEON_GIT https://github.com/DLTcollab/sse2neon.git)
|
||||
set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)
|
||||
|
||||
set(BROTLI_VERSION 1.0.9)
|
||||
set(BROTLI_URI https://github.com/google/brotli/archive/refs/tags/v${BROTLI_VERSION}.tar.gz)
|
||||
@@ -559,22 +544,15 @@ set(BROTLI_HASH_TYPE SHA256)
|
||||
set(BROTLI_FILE brotli-v${BROTLI_VERSION}.tar.gz)
|
||||
set(BROTLI_CPE "cpe:2.3:a:google:brotli:${BROTLI_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(OPENPGL_VERSION v0.4.1-beta)
|
||||
set(OPENPGL_SHORT_VERSION 0.4.1)
|
||||
set(OPENPGL_URI https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/${OPENPGL_VERSION}.tar.gz)
|
||||
set(OPENPGL_HASH db63f5dac5cfa8c110ede241f0c413f00db0c4748697381c4fa23e0f9e82a754)
|
||||
set(OPENPGL_HASH_TYPE SHA256)
|
||||
set(OPENPGL_FILE openpgl-${OPENPGL_VERSION}.tar.gz)
|
||||
|
||||
set(LEVEL_ZERO_VERSION v1.8.5)
|
||||
set(LEVEL_ZERO_VERSION v1.7.15)
|
||||
set(LEVEL_ZERO_URI https://github.com/oneapi-src/level-zero/archive/refs/tags/${LEVEL_ZERO_VERSION}.tar.gz)
|
||||
set(LEVEL_ZERO_HASH b6e9663bbcc53c148d32376998298bec6f7c434ef2218c61fa708963e3a09394)
|
||||
set(LEVEL_ZERO_HASH c39bb05a8e5898aa6c444e1704105b93d3f1888b9c333f8e7e73825ffbfb2617)
|
||||
set(LEVEL_ZERO_HASH_TYPE SHA256)
|
||||
set(LEVEL_ZERO_FILE level-zero-${LEVEL_ZERO_VERSION}.tar.gz)
|
||||
|
||||
set(DPCPP_VERSION 20221019)
|
||||
set(DPCPP_VERSION 20220812)
|
||||
set(DPCPP_URI https://github.com/intel/llvm/archive/refs/tags/sycl-nightly/${DPCPP_VERSION}.tar.gz)
|
||||
set(DPCPP_HASH 2f533946e91ce3829431758ea17b0b834b960c1a796e9e4563c86e03eb9603a2)
|
||||
set(DPCPP_HASH 0e3c95346c295f5cf80f3a42d80b1c49481955898530242636ddc002627248d6)
|
||||
set(DPCPP_HASH_TYPE SHA256)
|
||||
set(DPCPP_FILE DPCPP-${DPCPP_VERSION}.tar.gz)
|
||||
|
||||
@@ -587,9 +565,9 @@ set(DPCPP_FILE DPCPP-${DPCPP_VERSION}.tar.gz)
|
||||
# will take care of building them, unpack is being done in dpcpp_deps.cmake
|
||||
|
||||
# Source llvm/lib/SYCLLowerIR/CMakeLists.txt
|
||||
set(VCINTRINSICS_VERSION abce9184b7a3a7fe1b02289b9285610d9dc45465)
|
||||
set(VCINTRINSICS_VERSION 984bb27baacce6ee5c716c2e64845f2a1928025b)
|
||||
set(VCINTRINSICS_URI https://github.com/intel/vc-intrinsics/archive/${VCINTRINSICS_VERSION}.tar.gz)
|
||||
set(VCINTRINSICS_HASH 3e9fd471246b87633b26f7e15e17ab7733d357458c53d5c5881c03929d6c551f)
|
||||
set(VCINTRINSICS_HASH abea415a15a0dd11fdc94dee8fb462910f2548311b787e02f42509789e1b0d7b)
|
||||
set(VCINTRINSICS_HASH_TYPE SHA256)
|
||||
set(VCINTRINSICS_FILE vc-intrinsics-${VCINTRINSICS_VERSION}.tar.gz)
|
||||
|
||||
@@ -601,9 +579,9 @@ set(OPENCLHEADERS_HASH_TYPE SHA256)
|
||||
set(OPENCLHEADERS_FILE opencl_headers-${OPENCLHEADERS_VERSION}.tar.gz)
|
||||
|
||||
# Source opencl/CMakeLists.txt
|
||||
set(ICDLOADER_VERSION 792682ad3d877ab38573b997808bab3b43902b70)
|
||||
set(ICDLOADER_VERSION aec3952654832211636fc4af613710f80e203b0a)
|
||||
set(ICDLOADER_URI https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/${ICDLOADER_VERSION}.tar.gz)
|
||||
set(ICDLOADER_HASH b33a0320d94bf300efa1da97931ded506d27813bd1148da6858fe79d412d1ea2)
|
||||
set(ICDLOADER_HASH e1880551d67bd8dc31d13de63b94bbfd6b1f315b6145dad1ffcd159b89bda93c)
|
||||
set(ICDLOADER_HASH_TYPE SHA256)
|
||||
set(ICDLOADER_FILE icdloader-${ICDLOADER_VERSION}.tar.gz)
|
||||
|
||||
@@ -618,9 +596,9 @@ set(MP11_FILE mp11-${MP11_VERSION}.tar.gz)
|
||||
|
||||
# Source llvm-spirv/CMakeLists.txt (repo)
|
||||
# Source llvm-spirv/spirv-headers-tag.conf (hash)
|
||||
set(SPIRV_HEADERS_VERSION 5a121866927a16ab9d49bed4788b532c7fcea766)
|
||||
set(SPIRV_HEADERS_VERSION 36c0c1596225e728bd49abb7ef56a3953e7ed468)
|
||||
set(SPIRV_HEADERS_URI https://github.com/KhronosGroup/SPIRV-Headers/archive/${SPIRV_HEADERS_VERSION}.tar.gz)
|
||||
set(SPIRV_HEADERS_HASH ec8ecb471a62672697846c436501638ab25447ae9d4a6761e0bfe8a9a839502a)
|
||||
set(SPIRV_HEADERS_HASH 7a5c89633f8740456fe8adee052033e134476d267411d1336c0cb1e587a9229a)
|
||||
set(SPIRV_HEADERS_HASH_TYPE SHA256)
|
||||
set(SPIRV_HEADERS_FILE SPIR-V-Headers-${SPIRV_HEADERS_VERSION}.tar.gz)
|
||||
|
||||
@@ -635,9 +613,9 @@ set(SPIRV_HEADERS_FILE SPIR-V-Headers-${SPIRV_HEADERS_VERSION}.tar.gz)
|
||||
# compiler, the versions used are taken from the following location
|
||||
# https://github.com/intel/intel-graphics-compiler/releases
|
||||
|
||||
set(IGC_VERSION 1.0.12149.1)
|
||||
set(IGC_VERSION 1.0.11222)
|
||||
set(IGC_URI https://github.com/intel/intel-graphics-compiler/archive/refs/tags/igc-${IGC_VERSION}.tar.gz)
|
||||
set(IGC_HASH 44f67f24e3bc5130f9f062533abf8154782a9d0a992bc19b498639a8521ae836)
|
||||
set(IGC_HASH d92f0608dcbb52690855685f9447282e5c09c0ba98ae35fabf114fcf8b1e9fcf)
|
||||
set(IGC_HASH_TYPE SHA256)
|
||||
set(IGC_FILE igc-${IGC_VERSION}.tar.gz)
|
||||
|
||||
@@ -657,15 +635,15 @@ set(IGC_LLVM_FILE ${IGC_LLVM_VERSION}.tar.gz)
|
||||
#
|
||||
# WARNING WARNING WARNING
|
||||
|
||||
set(IGC_OPENCL_CLANG_VERSION 363a5262d8c7cff3fb28f3bdb5d85c8d7e91c1bb)
|
||||
set(IGC_OPENCL_CLANG_VERSION bbdd1587f577397a105c900be114b56755d1f7dc)
|
||||
set(IGC_OPENCL_CLANG_URI https://github.com/intel/opencl-clang/archive/${IGC_OPENCL_CLANG_VERSION}.tar.gz)
|
||||
set(IGC_OPENCL_CLANG_HASH aa8cf72bb239722ce8ce44f79413c6887ecc8ca18477dd520aa5c4809756da9a)
|
||||
set(IGC_OPENCL_CLANG_HASH d08315f1b0d8a6fef33de2b3e6aa7356534c324910634962c72523d970773efc)
|
||||
set(IGC_OPENCL_CLANG_HASH_TYPE SHA256)
|
||||
set(IGC_OPENCL_CLANG_FILE opencl-clang-${IGC_OPENCL_CLANG_VERSION}.tar.gz)
|
||||
|
||||
set(IGC_VCINTRINSICS_VERSION v0.5.0)
|
||||
set(IGC_VCINTRINSICS_VERSION v0.4.0)
|
||||
set(IGC_VCINTRINSICS_URI https://github.com/intel/vc-intrinsics/archive/refs/tags/${IGC_VCINTRINSICS_VERSION}.tar.gz)
|
||||
set(IGC_VCINTRINSICS_HASH 70bb47c5e32173cf61514941e83ae7c7eb4485e6d2fca60cfa1f50d4f42c41f2)
|
||||
set(IGC_VCINTRINSICS_HASH c8b92682ad5031cf9d5b82a40e7d5c0e763cd9278660adbcaa69aab988e4b589)
|
||||
set(IGC_VCINTRINSICS_HASH_TYPE SHA256)
|
||||
set(IGC_VCINTRINSICS_FILE vc-intrinsics-${IGC_VCINTRINSICS_VERSION}.tar.gz)
|
||||
|
||||
@@ -681,9 +659,9 @@ set(IGC_SPIRV_TOOLS_HASH 6e19900e948944243024aedd0a201baf3854b377b9cc7a386553bc1
|
||||
set(IGC_SPIRV_TOOLS_HASH_TYPE SHA256)
|
||||
set(IGC_SPIRV_TOOLS_FILE SPIR-V-Tools-${IGC_SPIRV_TOOLS_VERSION}.tar.gz)
|
||||
|
||||
set(IGC_SPIRV_TRANSLATOR_VERSION a31ffaeef77e23d500b3ea3d35e0c42ff5648ad9)
|
||||
set(IGC_SPIRV_TRANSLATOR_VERSION 99420daab98998a7e36858befac9c5ed109d4920)
|
||||
set(IGC_SPIRV_TRANSLATOR_URI https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/${IGC_SPIRV_TRANSLATOR_VERSION}.tar.gz)
|
||||
set(IGC_SPIRV_TRANSLATOR_HASH 9e26c96a45341b8f8af521bacea20e752623346340addd02af95d669f6e89252)
|
||||
set(IGC_SPIRV_TRANSLATOR_HASH 77dfb4ddb6bfb993535562c02ddea23f0a0d1c5a0258c1afe7e27c894ff783a8)
|
||||
set(IGC_SPIRV_TRANSLATOR_HASH_TYPE SHA256)
|
||||
set(IGC_SPIRV_TRANSLATOR_FILE SPIR-V-Translator-${IGC_SPIRV_TRANSLATOR_VERSION}.tar.gz)
|
||||
|
||||
@@ -691,15 +669,15 @@ set(IGC_SPIRV_TRANSLATOR_FILE SPIR-V-Translator-${IGC_SPIRV_TRANSLATOR_VERSION}.
|
||||
### Intel Graphics Compiler DEPS END ###
|
||||
########################################
|
||||
|
||||
set(GMMLIB_VERSION intel-gmmlib-22.1.8)
|
||||
set(GMMLIB_VERSION intel-gmmlib-22.1.2)
|
||||
set(GMMLIB_URI https://github.com/intel/gmmlib/archive/refs/tags/${GMMLIB_VERSION}.tar.gz)
|
||||
set(GMMLIB_HASH bf23e9a3742b4fb98c7666c9e9b29f3219e4b2fb4d831aaf4eed71f5e2d17368)
|
||||
set(GMMLIB_HASH 3b9a6d5e7e3f5748b3d0a2fb0e980ae943907fece0980bd9c0508e71c838e334)
|
||||
set(GMMLIB_HASH_TYPE SHA256)
|
||||
set(GMMLIB_FILE ${GMMLIB_VERSION}.tar.gz)
|
||||
|
||||
set(OCLOC_VERSION 22.38.24278)
|
||||
set(OCLOC_VERSION 22.20.23198)
|
||||
set(OCLOC_URI https://github.com/intel/compute-runtime/archive/refs/tags/${OCLOC_VERSION}.tar.gz)
|
||||
set(OCLOC_HASH db0c542fccd651e6404b15a74d46027f1ce0eda8dc9e25a40cbb6c0faef257ee)
|
||||
set(OCLOC_HASH ab22b8bf2560a57fdd3def0e35a62ca75991406f959c0263abb00cd6cd9ae998)
|
||||
set(OCLOC_HASH_TYPE SHA256)
|
||||
set(OCLOC_FILE ocloc-${OCLOC_VERSION}.tar.gz)
|
||||
|
||||
|
@@ -1,27 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_wayland
|
||||
URL file://${PACKAGE_DIR}/${WAYLAND_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${WAYLAND_HASH_TYPE}=${WAYLAND_HASH}
|
||||
PREFIX ${BUILD_DIR}/wayland
|
||||
PATCH_COMMAND ${PATCH_CMD} -d ${BUILD_DIR}/wayland/src/external_wayland < ${PATCH_DIR}/wayland.diff
|
||||
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own LIBEXPAT & LIBXML2.
|
||||
#
|
||||
# NOTE: passing link args "ffi/lib" should not be needed, but
|
||||
# `pkgconfig` would incorrectly look in "ffi/lib/../lib64" otherwise.
|
||||
#
|
||||
# NOTE: `-lm` is needed for `libxml2` which is a static library that uses `libm.so`,
|
||||
# without this, math symbols such as `floor` aren't found.
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${LIBDIR}/expat/lib/pkgconfig:${LIBDIR}/xml2/lib/pkgconfig:${LIBDIR}/ffi/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
meson --prefix ${LIBDIR}/wayland -Ddocumentation=false -Dtests=false -D "c_link_args=-L${LIBDIR}/ffi/lib -lm" . ../external_wayland
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_wayland
|
||||
external_expat
|
||||
external_xml2
|
||||
external_ffi
|
||||
)
|
@@ -1,15 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# NOTE: currently only the header file is extracted, no compilation is needed
|
||||
# as the library is dynamically loaded when found on the system.
|
||||
|
||||
ExternalProject_Add(external_wayland_libdecor
|
||||
URL file://${PACKAGE_DIR}/${WAYLAND_LIBDECOR_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${WAYLAND_LIBDECOR_HASH_TYPE}=${WAYLAND_LIBDECOR_HASH}
|
||||
PREFIX ${BUILD_DIR}/wayland_libdecor
|
||||
BUILD_COMMAND echo .
|
||||
CONFIGURE_COMMAND echo .
|
||||
INSTALL_COMMAND cp ../external_wayland_libdecor/src/libdecor.h ${LIBDIR}/wayland_libdecor/include/libdecor-0/libdecor.h
|
||||
INSTALL_DIR ${LIBDIR}/wayland_libdecor/include/libdecor-0
|
||||
)
|
@@ -5,14 +5,7 @@ ExternalProject_Add(external_wayland_protocols
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH}
|
||||
PREFIX ${BUILD_DIR}/wayland-protocols
|
||||
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own WAYLAND.
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${LIBDIR}/wayland/lib64/pkgconfig:$PKG_CONFIG_PATH
|
||||
meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
|
||||
CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_wayland_protocols
|
||||
external_wayland
|
||||
)
|
||||
|
@@ -40,15 +40,15 @@ ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,ver-
|
||||
force-all,force-python,force-boost,force-tbb,\
|
||||
force-ocio,force-imath,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
|
||||
force-xr-openxr,force-level-zero,force-openpgl,\
|
||||
force-xr-openxr,force-level-zero,\
|
||||
build-all,build-python,build-boost,build-tbb,\
|
||||
build-ocio,build-imath,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
|
||||
build-xr-openxr,build-level-zero,build-openpgl,\
|
||||
build-xr-openxr,build-level-zero,\
|
||||
skip-python,skip-boost,skip-tbb,\
|
||||
skip-ocio,skip-imath,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd,\
|
||||
skip-xr-openxr,skip-level-zero,skip-openpgl \
|
||||
skip-xr-openxr,skip-level-zero \
|
||||
-- "$@" \
|
||||
)
|
||||
|
||||
@@ -232,9 +232,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--build-level-zero=<ver>
|
||||
Force the build of OneAPI Level Zero library.
|
||||
|
||||
--build-openpgl
|
||||
Force the build of OpenPGL library.
|
||||
|
||||
Note about the --build-foo options:
|
||||
* They force the script to prefer building dependencies rather than using available packages.
|
||||
This may make things simpler and allow working around some distribution bugs, but on the other hand it will
|
||||
@@ -305,9 +302,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--force-level-zero=<ver>
|
||||
Force the rebuild of OneAPI Level Zero library.
|
||||
|
||||
--force-openpgl
|
||||
Force the rebuild of OpenPGL library.
|
||||
|
||||
Note about the --force-foo options:
|
||||
* They obviously only have an effect if those libraries are built by this script
|
||||
(i.e. if there is no available and satisfactory package)!
|
||||
@@ -369,10 +363,7 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
Unconditionally skip OpenXR-SDK installation/building.
|
||||
|
||||
--skip-level-zero=<ver>
|
||||
Unconditionally skip OneAPI Level Zero installation/building.
|
||||
|
||||
--skip-openpgl
|
||||
Unconditionally skip OpenPGL installation/building.\""
|
||||
Unconditionally skip OneAPI Level Zero installation/building.\""
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Main Vars
|
||||
@@ -394,7 +385,7 @@ CLANG_FORMAT_VERSION="10.0"
|
||||
CLANG_FORMAT_VERSION_MIN="6.0"
|
||||
CLANG_FORMAT_VERSION_MEX="14.0"
|
||||
|
||||
PYTHON_VERSION="3.10.8"
|
||||
PYTHON_VERSION="3.10.2"
|
||||
PYTHON_VERSION_SHORT="3.10"
|
||||
PYTHON_VERSION_MIN="3.10"
|
||||
PYTHON_VERSION_MEX="3.12"
|
||||
@@ -505,7 +496,7 @@ OPENEXR_FORCE_REBUILD=false
|
||||
OPENEXR_SKIP=false
|
||||
_with_built_openexr=false
|
||||
|
||||
OIIO_VERSION="2.3.20.0"
|
||||
OIIO_VERSION="2.3.13.0"
|
||||
OIIO_VERSION_SHORT="2.3"
|
||||
OIIO_VERSION_MIN="2.1.12"
|
||||
OIIO_VERSION_MEX="2.4.0"
|
||||
@@ -523,8 +514,8 @@ LLVM_FORCE_REBUILD=false
|
||||
LLVM_SKIP=false
|
||||
|
||||
# OSL needs to be compiled for now!
|
||||
OSL_VERSION="1.12.6.2"
|
||||
OSL_VERSION_SHORT="1.12"
|
||||
OSL_VERSION="1.11.17.0"
|
||||
OSL_VERSION_SHORT="1.11"
|
||||
OSL_VERSION_MIN="1.11"
|
||||
OSL_VERSION_MEX="2.0"
|
||||
OSL_FORCE_BUILD=false
|
||||
@@ -602,14 +593,6 @@ LEVEL_ZERO_FORCE_BUILD=false
|
||||
LEVEL_ZERO_FORCE_REBUILD=false
|
||||
LEVEL_ZERO_SKIP=false
|
||||
|
||||
OPENPGL_VERSION="0.4.1"
|
||||
OPENPGL_VERSION_SHORT="0.4"
|
||||
OPENPGL_VERSION_MIN="0.4.1"
|
||||
OPENPGL_VERSION_MEX="0.5"
|
||||
OPENPGL_FORCE_BUILD=false
|
||||
OPENPGL_FORCE_REBUILD=false
|
||||
OPENPGL_SKIP=false
|
||||
|
||||
XR_OPENXR_VERSION="1.0.22"
|
||||
XR_OPENXR_VERSION_SHORT="1.0"
|
||||
XR_OPENXR_VERSION_MIN="1.0.8"
|
||||
@@ -618,8 +601,8 @@ XR_OPENXR_FORCE_BUILD=false
|
||||
XR_OPENXR_FORCE_REBUILD=false
|
||||
XR_OPENXR_SKIP=false
|
||||
|
||||
FFMPEG_VERSION="5.1.2"
|
||||
FFMPEG_VERSION_SHORT="5.1"
|
||||
FFMPEG_VERSION="5.0"
|
||||
FFMPEG_VERSION_SHORT="5.0"
|
||||
FFMPEG_VERSION_MIN="4.0"
|
||||
FFMPEG_VERSION_MEX="6.0"
|
||||
FFMPEG_FORCE_BUILD=false
|
||||
@@ -844,7 +827,6 @@ while true; do
|
||||
USD_FORCE_BUILD=true
|
||||
XR_OPENXR_FORCE_BUILD=true
|
||||
LEVEL_ZERO_FORCE_BUILD=true
|
||||
OPENPGL_FORCE_BUILD=true
|
||||
shift; continue
|
||||
;;
|
||||
--build-python)
|
||||
@@ -905,9 +887,6 @@ while true; do
|
||||
--build-level-zero)
|
||||
LEVEL_ZERO_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-openpgl)
|
||||
OPENPGL_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--force-all)
|
||||
PYTHON_FORCE_REBUILD=true
|
||||
BOOST_FORCE_REBUILD=true
|
||||
@@ -928,7 +907,6 @@ while true; do
|
||||
USD_FORCE_REBUILD=true
|
||||
XR_OPENXR_FORCE_REBUILD=true
|
||||
LEVEL_ZERO_FORCE_REBUILD=true
|
||||
OPENPGL_FORCE_REBUILD=true
|
||||
shift; continue
|
||||
;;
|
||||
--force-python)
|
||||
@@ -989,9 +967,6 @@ while true; do
|
||||
--force-level-zero)
|
||||
LEVEL_ZERO_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-openpgl)
|
||||
OPENPGL_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--skip-python)
|
||||
PYTHON_SKIP=true; shift; continue
|
||||
;;
|
||||
@@ -1049,9 +1024,6 @@ while true; do
|
||||
--skip-level-zero)
|
||||
LEVEL_ZERO_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-openpgl)
|
||||
OPENPGL_SKIP=true; shift; continue
|
||||
;;
|
||||
--)
|
||||
# no more arguments to parse
|
||||
break
|
||||
@@ -1139,7 +1111,7 @@ LLVM_SOURCE=( "$_LLVM_SOURCE_ROOT/llvm-$LLVM_VERSION.src.tar.xz" )
|
||||
LLVM_CLANG_SOURCE=( "$_LLVM_SOURCE_ROOT/clang-$LLVM_VERSION.src.tar.xz" "$_LLVM_SOURCE_ROOT/cfe-$LLVM_VERSION.src.tar.xz" )
|
||||
|
||||
OSL_USE_REPO=false
|
||||
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/v$OSL_VERSION.tar.gz" )
|
||||
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_BRANCH="master"
|
||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
||||
@@ -1201,9 +1173,6 @@ XR_OPENXR_REPO_BRANCH="master"
|
||||
|
||||
LEVEL_ZERO_SOURCE=("https://github.com/oneapi-src/level-zero/archive/refs/tags/v${LEVEL_ZERO_VERSION}.tar.gz")
|
||||
|
||||
OPENPGL_USE_REPO=false
|
||||
OPENPGL_SOURCE=( "https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/v${OPENPGL_VERSION}-beta.tar.gz" )
|
||||
|
||||
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
||||
|
||||
# C++11 is required now
|
||||
@@ -1222,9 +1191,9 @@ Those libraries should be available as packages in all recent distributions (opt
|
||||
* Basics of dev environment (cmake, gcc, svn , git, ...).
|
||||
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
|
||||
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
|
||||
* libwayland-client0, libdecor, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland)
|
||||
* libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland)
|
||||
* libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex.
|
||||
* libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].\""
|
||||
* libsdl2, libglew, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].\""
|
||||
|
||||
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
|
||||
|
||||
@@ -1258,8 +1227,7 @@ You may also want to build them yourself (optional ones are [between brackets]):
|
||||
* [Alembic $ALEMBIC_VERSION] (from $ALEMBIC_SOURCE).
|
||||
* [Universal Scene Description $USD_VERSION] (from $USD_SOURCE).
|
||||
* [OpenXR-SDK $XR_OPENXR_VERSION] (from $XR_OPENXR_SOURCE).
|
||||
* [OneAPI Level Zero $LEVEL_ZERO_VERSION] (from $LEVEL_ZERO_SOURCE).
|
||||
* [OpenPGL $OPENPGL_VERSION] (from $OPENPGL_SOURCE).\""
|
||||
* [OneAPI Level Zero $LEVEL_ZERO_VERSION] (from $LEVEL_ZERO_SOURCE).\""
|
||||
|
||||
if [ "$DO_SHOW_DEPS" = true ]; then
|
||||
PRINT ""
|
||||
@@ -1693,7 +1661,6 @@ _update_deps_tbb() {
|
||||
USD_FORCE_BUILD=true
|
||||
EMBREE_FORCE_BUILD=true
|
||||
OIDN_FORCE_BUILD=true
|
||||
OPENPGL_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OSD_FORCE_REBUILD=true
|
||||
@@ -1701,7 +1668,6 @@ _update_deps_tbb() {
|
||||
USD_FORCE_REBUILD=true
|
||||
EMBREE_FORCE_REBUILD=true
|
||||
OIDN_FORCE_REBUILD=true
|
||||
OPENPGL_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -3340,12 +3306,7 @@ _init_embree() {
|
||||
}
|
||||
|
||||
_update_deps_embree() {
|
||||
if [ "$1" = true ]; then
|
||||
OPENPGL_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OPENPGL_FORCE_REBUILD=true
|
||||
fi
|
||||
:
|
||||
}
|
||||
|
||||
clean_Embree() {
|
||||
@@ -3364,7 +3325,7 @@ compile_Embree() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled results!
|
||||
embree_magic=12
|
||||
embree_magic=11
|
||||
_init_embree
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -4001,112 +3962,6 @@ compile_Level_Zero() {
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Build OpenPGL
|
||||
|
||||
_init_openpgl() {
|
||||
_src=$SRC/openpgl-$OPENPGL_VERSION
|
||||
_git=false
|
||||
_inst=$INST/openpgl-$OPENPGL_VERSION_SHORT
|
||||
_inst_shortcut=$INST/openpgl
|
||||
}
|
||||
|
||||
_update_deps_openpgl() {
|
||||
:
|
||||
}
|
||||
|
||||
clean_OpenPGL() {
|
||||
_init_openpgl
|
||||
if [ -d $_inst ]; then
|
||||
# Force rebuilding the dependencies if needed.
|
||||
_update_deps_openpgl false true
|
||||
fi
|
||||
_clean
|
||||
}
|
||||
|
||||
compile_OpenPGL() {
|
||||
if [ "$NO_BUILD" = true ]; then
|
||||
WARNING "--no-build enabled, OpenPGL will not be compiled!"
|
||||
return
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled results!
|
||||
openpgl_magic=1
|
||||
_init_openpgl
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
_update_deps_openpgl true false
|
||||
|
||||
# Clean install if needed!
|
||||
magic_compile_check openpgl-$OPENPGL_VERSION $openpgl_magic
|
||||
if [ $? -eq 1 -o "$OPENPGL_FORCE_REBUILD" = true ]; then
|
||||
clean_OpenPGL
|
||||
fi
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
INFO "Building OpenPGL-$OPENPGL_VERSION"
|
||||
|
||||
# Force rebuilding the dependencies.
|
||||
_update_deps_openpgl true true
|
||||
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
download OPENPGL_SOURCE[@] "$_src.tar.gz"
|
||||
INFO "Unpacking OpenPGL-$OPENPGL_VERSION"
|
||||
tar -C $SRC --transform "s,(.*/?)openpgl-$OPENPGL_VERSION-beta[^/]*(.*),\1openpgl-$OPENPGL_VERSION\2,x" \
|
||||
-xf $_src.tar.gz
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
INFO "$_src"
|
||||
|
||||
# Always refresh the whole build!
|
||||
if [ -d build ]; then
|
||||
rm -rf build
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D OPENPGL_BUILD_STATIC=OFF"
|
||||
cmake_d="$cmake_d -D OPENPGL_BUILD_PYTHON=OFF"
|
||||
cmake_d="$cmake_d -D EMBREE_ISPC_SUPPORT=OFF"
|
||||
if [ -d $INST/tbb ]; then
|
||||
cmake_d="$cmake_d -D OPENPGL_TBB_ROOT=$INST/tbb"
|
||||
cmake_d="$cmake_d -D TBB_ROOT=$INST/tbb"
|
||||
fi
|
||||
|
||||
cmake $cmake_d ../
|
||||
|
||||
make -j$THREADS && make install
|
||||
make clean
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
ERROR "OpenPGL-$OPENPGL_VERSION failed to compile, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
magic_compile_set openpgl-$OPENPGL_VERSION $openpgl_magic
|
||||
|
||||
cd $CWD
|
||||
INFO "Done compiling OpenPGL-$OPENPGL_VERSION!"
|
||||
else
|
||||
INFO "Own OpenPGL-$OPENPGL_VERSION is up to date, nothing to do!"
|
||||
INFO "If you want to force rebuild of this lib, use the --force-openpgl option."
|
||||
fi
|
||||
|
||||
if [ -d $_inst ]; then
|
||||
_create_inst_shortcut
|
||||
fi
|
||||
|
||||
run_ldconfig "openpgl"
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Install on DEB-like
|
||||
|
||||
@@ -4205,12 +4060,11 @@ install_DEB() {
|
||||
_packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \
|
||||
git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \
|
||||
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
||||
libwayland-dev libdecor-0-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \
|
||||
libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \
|
||||
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
|
||||
libopenal-dev libepoxy-dev yasm \
|
||||
libopenal-dev libglew-dev yasm \
|
||||
libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \
|
||||
libgmp-dev libpugixml-dev libpotrace-dev libhpdf-dev libzstd-dev libpystring-dev \
|
||||
libglfw3-dev"
|
||||
libgmp-dev libpugixml-dev libpotrace-dev libhpdf-dev libzstd-dev libpystring-dev"
|
||||
|
||||
VORBIS_USE=true
|
||||
OGG_USE=true
|
||||
@@ -4740,18 +4594,6 @@ install_DEB() {
|
||||
PRINT ""
|
||||
compile_Level_Zero
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$OPENPGL_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenPGL installation, as requested..."
|
||||
elif [ "$OPENPGL_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenPGL building, as requested..."
|
||||
compile_OpenPGL
|
||||
else
|
||||
# No package currently!
|
||||
PRINT ""
|
||||
compile_OpenPGL
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -4928,9 +4770,9 @@ install_RPM() {
|
||||
_packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \
|
||||
libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \
|
||||
libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
|
||||
wayland-devel libdecor-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \
|
||||
wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \
|
||||
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
|
||||
libepoxy-devel yasm patch \
|
||||
glew-devel yasm patch \
|
||||
libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \
|
||||
gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel"
|
||||
|
||||
@@ -5459,18 +5301,6 @@ install_RPM() {
|
||||
PRINT ""
|
||||
compile_Level_Zero
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$OPENPGL_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenPGL installation, as requested..."
|
||||
elif [ "$OPENPGL_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenPGL building, as requested..."
|
||||
compile_OpenPGL
|
||||
else
|
||||
# No package currently!
|
||||
PRINT ""
|
||||
compile_OpenPGL
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -5582,7 +5412,7 @@ install_ARCH() {
|
||||
fi
|
||||
|
||||
_packages="$BASE_DEVEL git cmake fontconfig flex \
|
||||
libxi libxcursor libxrandr libxinerama libepoxy libdecor libpng libtiff wget openal \
|
||||
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
|
||||
$OPENJPEG_DEV yasm sdl2 fftw \
|
||||
libxml2 yaml-cpp tinyxml python-requests jemalloc gmp potrace pugixml libharu \
|
||||
zstd pystring"
|
||||
@@ -6067,18 +5897,6 @@ install_ARCH() {
|
||||
PRINT ""
|
||||
compile_Level_Zero
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$OPENPGL_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenPGL installation, as requested..."
|
||||
elif [ "$OPENPGL_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenPGL building, as requested..."
|
||||
compile_OpenPGL
|
||||
else
|
||||
# No package currently!
|
||||
PRINT ""
|
||||
compile_OpenPGL
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -6261,14 +6079,6 @@ install_OTHER() {
|
||||
INFO "Forced Level Zero building, as requested..."
|
||||
compile_Level_Zero
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$OPENPGL_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenPGL installation, as requested..."
|
||||
elif [ "$OPENPGL_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenPGL building, as requested..."
|
||||
compile_OpenPGL
|
||||
fi
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -6286,7 +6096,7 @@ print_info() {
|
||||
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
|
||||
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CLANG* -U *CYCLES*"
|
||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
|
||||
_buildargs="$_buildargs -U *EMBREE* -U *OPENIMAGEDENOISE* -U *OPENXR* -U *OPENPGL*"
|
||||
_buildargs="$_buildargs -U *EMBREE* -U *OPENIMAGEDENOISE* -U *OPENXR*"
|
||||
|
||||
_1="-D WITH_CODEC_SNDFILE=ON"
|
||||
PRINT " $_1"
|
||||
@@ -6517,16 +6327,6 @@ print_info() {
|
||||
#~ fi
|
||||
#~ fi
|
||||
|
||||
if [ "$OPENPGL_SKIP" = false ]; then
|
||||
if [ -d $INST/openpgl ]; then
|
||||
_1="-D openpgl_DIR=$INST/openpgl/lib/cmake/openpgl-$OPENPGL_VERSION"
|
||||
_2="-D WITH_CYCLES_PATH_GUIDING=ON"
|
||||
PRINT " $_1"
|
||||
PRINT " $_2"
|
||||
_buildargs="$_buildargs $_1 $_2"
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
PRINT "Or even simpler, just run (in your blender-source dir):"
|
||||
PRINT " make -j$THREADS BUILD_CMAKE_ARGS=\"$_buildargs\""
|
||||
|
@@ -1,130 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This script is part of the official build environment, see WIKI page for details.
|
||||
# https://wiki.blender.org/wiki/Building_Blender/Other/CentOS7ReleaseEnvironment
|
||||
|
||||
set -e
|
||||
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# yum-config-manager does not come in the default minimal install,
|
||||
# so make sure it is installed and available.
|
||||
yum -y update
|
||||
yum -y install yum-utils
|
||||
|
||||
# Install all the packages needed for a new toolchain.
|
||||
#
|
||||
# NOTE: Keep this separate from the packages install, since otherwise
|
||||
# older toolchain will be installed.
|
||||
yum -y update
|
||||
yum -y install epel-release
|
||||
yum -y install centos-release-scl
|
||||
yum -y install devtoolset-9
|
||||
|
||||
# Install packages needed for Blender's dependencies.
|
||||
PACKAGES_FOR_LIBS=(
|
||||
# Used to checkout Blender's code.
|
||||
git
|
||||
# Used to checkout Blender's `../lib/` directory.
|
||||
subversion
|
||||
# Used to extract packages.
|
||||
bzip2
|
||||
# Used to extract packages.
|
||||
tar
|
||||
# Blender and some dependencies use `cmake`.
|
||||
cmake3
|
||||
# Apply patches from Blender's: `./build_files/build_environment/patches`
|
||||
patch
|
||||
# Use by `cmake` and `autoconf`.
|
||||
make
|
||||
|
||||
# Required by: `external_nasm` which uses an `autoconf` build-system.
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
|
||||
# Meta-build system used by various packages.
|
||||
meson
|
||||
# Builds generated by meson use Ninja for the actual build.
|
||||
ninja-build
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_X11`.
|
||||
libXrandr-devel
|
||||
libXinerama-devel
|
||||
libXcursor-devel
|
||||
libXi-devel
|
||||
libX11-devel
|
||||
libXt-devel
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
mesa-libEGL-devel
|
||||
# Required by: Blender & `external_opensubdiv` (probably others).
|
||||
mesa-libGL-devel
|
||||
mesa-libGLU-devel
|
||||
|
||||
# Required by: `external_ispc`.
|
||||
zlib-devel
|
||||
# TODO: dependencies build without this, consider removal.
|
||||
rubygem-asciidoctor
|
||||
# TODO: dependencies build without this, consider removal.
|
||||
wget
|
||||
# Required by: `external_sqlite` as a build-time dependency (needed for the `tclsh` command).
|
||||
tcl
|
||||
# Required by: `external_aom`.
|
||||
# TODO: Blender is already building `external_nasm` which is listed as an alternative to `yasm`.
|
||||
# Why are both needed?
|
||||
yasm
|
||||
|
||||
# Required by: `meson` (Python based build system).
|
||||
python36
|
||||
# Required by: `mako` (Python module used for building `external_mesa`)
|
||||
python-setuptools
|
||||
|
||||
# Required by: `external_igc` & `external_osl` as a build-time dependency.
|
||||
bison
|
||||
# Required by: `external_osl` as a build-time dependency.
|
||||
flex
|
||||
# TODO: dependencies build without this, consider removal.
|
||||
ncurses-devel
|
||||
)
|
||||
|
||||
# Additional packages needed for building Blender.
|
||||
PACKAGES_FOR_BLENDER=(
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
libxkbcommon-devel
|
||||
)
|
||||
|
||||
yum -y install -y ${PACKAGES_FOR_LIBS[@]} ${PACKAGES_FOR_BLENDER[@]}
|
||||
|
||||
# Dependencies for Mesa
|
||||
yum -y install expat-devel
|
||||
python3 -m pip install mako
|
||||
|
||||
# Dependencies for pip (needed for buildbot-worker).
|
||||
yum -y install python36-pip python36-devel
|
||||
|
||||
# Dependencies for asound.
|
||||
yum -y install -y \
|
||||
alsa-lib-devel pulseaudio-libs-devel
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
|
||||
--family cmake
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
||||
--family cmake
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
||||
--family cmake
|
@@ -177,8 +177,7 @@ if(ILMBASE_INCLUDE_DIR)
|
||||
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
|
||||
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
|
||||
else()
|
||||
# Old versions (before 2.0?) do not have any version string,
|
||||
# just assuming 2.0 should be fine though.
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
|
||||
endif()
|
||||
@@ -196,13 +195,8 @@ else()
|
||||
# elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
|
||||
set(IlmBase_Libraries Half Iex Imath IlmThread)
|
||||
# else()
|
||||
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
|
||||
# set(IlmBase_Libraries
|
||||
# Half
|
||||
# Iex-${_ilmbase_libs_ver}
|
||||
# Imath-${_ilmbase_libs_ver}
|
||||
# IlmThread-${_ilmbase_libs_ver}
|
||||
# )
|
||||
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
|
||||
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
|
||||
endif()
|
||||
|
||||
|
||||
|
@@ -175,8 +175,7 @@ if(OPENEXR_INCLUDE_DIR)
|
||||
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
|
||||
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
|
||||
else()
|
||||
# Old versions (before 2.0?) do not have any version string,
|
||||
# just assuming 2.0 should be fine though.
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
|
||||
endif()
|
||||
|
@@ -0,0 +1,2 @@
|
||||
cmake_minimum_required (VERSION 2.4)
|
||||
add_subdirectory(build/cmake)
|
@@ -1,19 +0,0 @@
|
||||
--- a/src/dispatch_wgl.c 2022-08-04 17:45:13.144924705 +0200
|
||||
+++ b/src/dispatch_wgl.c 2022-08-04 17:45:47.657482971 +0200
|
||||
@@ -78,6 +78,8 @@
|
||||
if (!first_context_current) {
|
||||
first_context_current = true;
|
||||
} else {
|
||||
+ /* BLENDER: disable slow dispatch table switching. */
|
||||
+#if 0
|
||||
if (!already_switched_to_dispatch_table) {
|
||||
already_switched_to_dispatch_table = true;
|
||||
gl_switch_to_dispatch_table();
|
||||
@@ -86,6 +88,7 @@
|
||||
|
||||
gl_init_dispatch_table();
|
||||
wgl_init_dispatch_table();
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
@@ -36,15 +36,14 @@ diff -Naur OpenShadingLanguage-1.12.6.2/src/include/OSL/llvm_util.h external_osl
|
||||
#ifdef LLVM_NAMESPACE
|
||||
namespace llvm = LLVM_NAMESPACE;
|
||||
#endif
|
||||
@@ -455,7 +457,7 @@
|
||||
llvm::BasicBlock* masked_return_block() const;
|
||||
|
||||
bool is_masking_required() const { return m_is_masking_required; }
|
||||
@@ -101,6 +103,6 @@
|
||||
ScopedJitMemoryUser();
|
||||
~ScopedJitMemoryUser();
|
||||
};
|
||||
-
|
||||
+ static void Cleanup ();
|
||||
struct ScopedMasking {
|
||||
ScopedMasking() {}
|
||||
|
||||
/// Set debug level
|
||||
void debug(int d) { m_debug = d; }
|
||||
diff -Naur OpenShadingLanguage-1.12.6.2/src/liboslcomp/oslcomp.cpp external_osl/src/liboslcomp/oslcomp.cpp
|
||||
--- OpenShadingLanguage-1.12.6.2/src/liboslcomp/oslcomp.cpp 2022-09-30 17:43:53 -0600
|
||||
+++ external_osl/src/liboslcomp/oslcomp.cpp 2022-10-15 14:49:26 -0600
|
||||
@@ -65,15 +64,6 @@ diff -Naur OpenShadingLanguage-1.12.6.2/src/liboslcomp/oslcomp.cpp external_osl/
|
||||
diff -Naur OpenShadingLanguage-1.12.6.2/src/liboslexec/llvm_util.cpp external_osl/src/liboslexec/llvm_util.cpp
|
||||
--- OpenShadingLanguage-1.12.6.2/src/liboslexec/llvm_util.cpp 2022-09-30 17:43:53 -0600
|
||||
+++ external_osl/src/liboslexec/llvm_util.cpp 2022-10-15 15:53:11 -0600
|
||||
@@ -116,8 +116,6 @@
|
||||
return { A.data(), size_t(A.size()) };
|
||||
}
|
||||
|
||||
-
|
||||
-
|
||||
namespace pvt {
|
||||
|
||||
typedef llvm::SectionMemoryManager LLVMMemoryManager;
|
||||
@@ -182,6 +180,13 @@
|
||||
++jit_mem_hold_users;
|
||||
}
|
||||
@@ -88,24 +78,3 @@ diff -Naur OpenShadingLanguage-1.12.6.2/src/liboslexec/llvm_util.cpp external_os
|
||||
|
||||
LLVM_Util::ScopedJitMemoryUser::~ScopedJitMemoryUser()
|
||||
{
|
||||
diff --git a/src/include/OSL/mask.h b/src/include/OSL/mask.h
|
||||
index 24197af..b9275f6 100644
|
||||
--- a/src/include/OSL/mask.h
|
||||
+++ b/src/include/OSL/mask.h
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#include <immintrin.h>
|
||||
#include <type_traits>
|
||||
|
||||
#include <OSL/oslconfig.h>
|
||||
@@ -23,6 +22,8 @@ using std::countr_zero;
|
||||
|
||||
#elif OSL_INTEL_CLASSIC_COMPILER_VERSION
|
||||
|
||||
+#include <immintrin.h>
|
||||
+
|
||||
OSL_FORCEINLINE int popcount(uint32_t x) noexcept { return _mm_popcnt_u32(x);}
|
||||
OSL_FORCEINLINE int popcount(uint64_t x) noexcept { return _mm_popcnt_u64(x); }
|
||||
OSL_FORCEINLINE int countr_zero(uint32_t x) noexcept { return _bit_scan_forward(x); }
|
||||
|
@@ -1,11 +0,0 @@
|
||||
--- meson.build.orig 2022-06-30 22:59:11.000000000 +0100
|
||||
+++ meson.build 2022-09-27 13:21:26.428517668 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
'wayland', 'c',
|
||||
version: '1.21.0',
|
||||
license: 'MIT',
|
||||
- meson_version: '>= 0.56.0',
|
||||
+ meson_version: '>= 0.55.1',
|
||||
default_options: [
|
||||
'warning_level=2',
|
||||
'buildtype=debugoptimized',
|
@@ -1,47 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2022 Blender Foundation.
|
||||
|
||||
# This module defines
|
||||
# Epoxy_INCLUDE_DIRS, where to find epoxy/gl.h
|
||||
# Epoxy_LIBRARY, where to find the epoxy library.
|
||||
# Epoxy_ROOT_DIR, The base directory to search for epoxy.
|
||||
# This can also be an environment variable.
|
||||
# Epoxy_FOUND, If false, do not try to use epoxy.
|
||||
|
||||
IF(NOT EPOXY_ROOT_DIR AND NOT $ENV{EPOXY_ROOT_DIR} STREQUAL "")
|
||||
SET(EPOXY_ROOT_DIR $ENV{EPOXY_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(Epoxy_INCLUDE_DIR
|
||||
NAMES
|
||||
epoxy/gl.h
|
||||
HINTS
|
||||
${EPOXY_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(Epoxy_LIBRARY
|
||||
NAMES
|
||||
epoxy
|
||||
HINTS
|
||||
${EPOXY_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set Epoxy_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Epoxy DEFAULT_MSG
|
||||
Epoxy_LIBRARY Epoxy_INCLUDE_DIR)
|
||||
|
||||
IF(Epoxy_FOUND)
|
||||
SET(Epoxy_INCLUDE_DIRS ${Epoxy_INCLUDE_DIR})
|
||||
SET(Epoxy_LIBRARIES ${Epoxy_LIBRARY})
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
Epoxy_INCLUDE_DIR
|
||||
Epoxy_LIBRARY
|
||||
)
|
58
build_files/cmake/Modules/FindGLEW.cmake
Normal file
58
build_files/cmake/Modules/FindGLEW.cmake
Normal file
@@ -0,0 +1,58 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2014 Blender Foundation.
|
||||
|
||||
# - Find GLEW library
|
||||
# Find the native Glew includes and library
|
||||
# This module defines
|
||||
# GLEW_INCLUDE_DIRS, where to find glew.h, Set when
|
||||
# GLEW_INCLUDE_DIR is found.
|
||||
# GLEW_ROOT_DIR, The base directory to search for Glew.
|
||||
# This can also be an environment variable.
|
||||
# GLEW_FOUND, If false, do not try to use Glew.
|
||||
#
|
||||
# also defined,
|
||||
# GLEW_LIBRARY, where to find the Glew library.
|
||||
|
||||
# If GLEW_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "")
|
||||
SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_glew_SEARCH_DIRS
|
||||
${GLEW_ROOT_DIR}
|
||||
)
|
||||
|
||||
FIND_PATH(GLEW_INCLUDE_DIR
|
||||
NAMES
|
||||
GL/glew.h
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(GLEW_LIBRARY
|
||||
NAMES
|
||||
GLEW
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW DEFAULT_MSG
|
||||
GLEW_LIBRARY GLEW_INCLUDE_DIR)
|
||||
|
||||
IF(GLEW_FOUND)
|
||||
SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
GLEW_INCLUDE_DIR
|
||||
GLEW_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_glew_SEARCH_DIRS)
|
@@ -1,47 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2022 Blender Foundation.
|
||||
|
||||
# This module defines
|
||||
# LibEpoxy_INCLUDE_DIRS, where to find epoxy/gl.h
|
||||
# LibEpoxy_LIBRARY, where to find the epoxy library.
|
||||
# LibEpoxy_ROOT_DIR, The base directory to search for libepoxy.
|
||||
# This can also be an environment variable.
|
||||
# LibEpoxy_FOUND, If false, do not try to use libepoxy.
|
||||
|
||||
IF(NOT EPOXY_ROOT_DIR AND NOT $ENV{EPOXY_ROOT_DIR} STREQUAL "")
|
||||
SET(EPOXY_ROOT_DIR $ENV{EPOXY_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(LibEpoxy_INCLUDE_DIR
|
||||
NAMES
|
||||
epoxy/gl.h
|
||||
HINTS
|
||||
${EPOXY_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LibEpoxy_LIBRARY
|
||||
NAMES
|
||||
epoxy
|
||||
HINTS
|
||||
${EPOXY_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LibEpoxy_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibEpoxy DEFAULT_MSG
|
||||
LibEpoxy_LIBRARY LibEpoxy_INCLUDE_DIR)
|
||||
|
||||
IF(LibEpoxy_FOUND)
|
||||
SET(LibEpoxy_INCLUDE_DIRS ${LibEpoxy_INCLUDE_DIR})
|
||||
SET(LibEpoxy_LIBRARIES ${LibEpoxy_LIBRARY})
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LibEpoxy_INCLUDE_DIR
|
||||
LibEpoxy_LIBRARY
|
||||
)
|
@@ -1,59 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2022 Blender Foundation.
|
||||
|
||||
# - Find MoltenVK libraries
|
||||
# Find the MoltenVK includes and libraries
|
||||
# This module defines
|
||||
# MOLTENVK_INCLUDE_DIRS, where to find MoltenVK headers, Set when
|
||||
# MOLTENVK_INCLUDE_DIR is found.
|
||||
# MOLTENVK_LIBRARIES, libraries to link against to use MoltenVK.
|
||||
# MOLTENVK_ROOT_DIR, The base directory to search for MoltenVK.
|
||||
# This can also be an environment variable.
|
||||
# MOLTENVK_FOUND, If false, do not try to use MoltenVK.
|
||||
#
|
||||
|
||||
# If MOLTENVK_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT MOLTENVK_ROOT_DIR AND NOT $ENV{MOLTENVK_ROOT_DIR} STREQUAL "")
|
||||
SET(MOLTENVK_ROOT_DIR $ENV{MOLTENVK_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_moltenvk_SEARCH_DIRS
|
||||
${MOLTENVK_ROOT_DIR}
|
||||
${LIBDIR}/vulkan/MoltenVK
|
||||
)
|
||||
|
||||
|
||||
FIND_PATH(MOLTENVK_INCLUDE_DIR
|
||||
NAMES
|
||||
MoltenVK/vk_mvk_moltenvk.h
|
||||
HINTS
|
||||
${_moltenvk_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(MOLTENVK_LIBRARY
|
||||
NAMES
|
||||
MoltenVK
|
||||
HINTS
|
||||
${_moltenvk_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
dylib/macOS
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set MOLTENVK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MoltenVK DEFAULT_MSG MOLTENVK_LIBRARY MOLTENVK_INCLUDE_DIR)
|
||||
|
||||
IF(MOLTENVK_FOUND)
|
||||
SET(MOLTENVK_LIBRARIES ${MOLTENVK_LIBRARY})
|
||||
SET(MOLTENVK_INCLUDE_DIRS ${MOLTENVK_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
MOLTENVK_INCLUDE_DIR
|
||||
MOLTENVK_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_moltenvk_SEARCH_DIRS)
|
@@ -20,7 +20,6 @@ IF(NOT OSL_ROOT_DIR AND NOT $ENV{OSL_ROOT_DIR} STREQUAL "")
|
||||
ENDIF()
|
||||
|
||||
SET(_osl_FIND_COMPONENTS
|
||||
oslnoise
|
||||
oslcomp
|
||||
oslexec
|
||||
oslquery
|
||||
@@ -40,6 +39,7 @@ FIND_PATH(OSL_INCLUDE_DIR
|
||||
include
|
||||
)
|
||||
|
||||
SET(_osl_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
@@ -51,20 +51,9 @@ FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _osl_LIBRARIES "${OSL_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
# Note linking order matters, and oslnoise existence depends on version.
|
||||
SET(_osl_LIBRARIES ${OSL_OSLCOMP_LIBRARY})
|
||||
IF(APPLE)
|
||||
list(APPEND _osl_LIBRARIES -force_load ${OSL_OSLEXEC_LIBRARY})
|
||||
ELSE()
|
||||
list(APPEND _osl_LIBRARIES ${OSL_OSLEXEC_LIBRARY})
|
||||
ENDIF()
|
||||
list(APPEND _osl_LIBRARIES ${OSL_OSLQUERY_LIBRARY})
|
||||
IF(OSL_OSLNOISE_LIBRARY)
|
||||
list(APPEND _osl_LIBRARIES ${OSL_OSLNOISE_LIBRARY})
|
||||
ENDIF()
|
||||
|
||||
FIND_PROGRAM(OSL_COMPILER oslc
|
||||
HINTS ${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES bin)
|
||||
|
@@ -26,8 +26,7 @@ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
# Old versions (before 2.0?) do not have any version string,
|
||||
# just assuming this should be fine though.
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
|
||||
SET(_openexr_libs_ver_init "2.0")
|
||||
|
||||
SET(_openexr_SEARCH_DIRS
|
||||
|
80
build_files/cmake/Modules/FindOpenGLES.cmake
Normal file
80
build_files/cmake/Modules/FindOpenGLES.cmake
Normal file
@@ -0,0 +1,80 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2014 Blender Foundation.
|
||||
|
||||
# - Try to find OpenGLES
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENGLES_FOUND - system has OpenGLES and EGL
|
||||
# OPENGL_EGL_FOUND - system has EGL
|
||||
# OPENGLES_INCLUDE_DIR - the GLES include directory
|
||||
# OPENGLES_LIBRARY - the GLES library
|
||||
# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
|
||||
# OPENGLES_EGL_LIBRARY - the EGL library
|
||||
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
|
||||
# OPENGLES_INCLUDES - all includes needed for OpenGLES
|
||||
|
||||
# If OPENGLES_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opengles_SEARCH_DIRS
|
||||
${OPENGLES_ROOT_DIR}
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_INCLUDE_DIR
|
||||
NAMES
|
||||
GLES2/gl2.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_LIBRARY
|
||||
NAMES
|
||||
GLESv2
|
||||
PATHS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_EGL_INCLUDE_DIR
|
||||
NAMES
|
||||
EGL/egl.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_EGL_LIBRARY
|
||||
NAMES
|
||||
EGL
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGL_EGL_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGL_EGL_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
|
||||
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
|
||||
${OPENGLES_EGL_LIBRARY})
|
||||
SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
|
||||
SET(OPENGLES_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGLES_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENGLES_EGL_INCLUDE_DIR
|
||||
OPENGLES_EGL_LIBRARY
|
||||
OPENGLES_LIBRARY
|
||||
OPENGLES_INCLUDE_DIR
|
||||
)
|
||||
|
||||
UNSET(_opengles_SEARCH_DIRS)
|
@@ -34,17 +34,11 @@ SET(PYTHON_VERSION 3.10 CACHE STRING "Python Version (major and minor only)")
|
||||
MARK_AS_ADVANCED(PYTHON_VERSION)
|
||||
|
||||
|
||||
if(APPLE)
|
||||
if(WITH_PYTHON_MODULE)
|
||||
set(PYTHON_LINKFLAGS "-undefined dynamic_lookup")
|
||||
else()
|
||||
set(PYTHON_LINKFLAGS)
|
||||
endif()
|
||||
else()
|
||||
# See: http://docs.python.org/extending/embedding.html#linking-requirements
|
||||
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic" CACHE STRING "Linker flags for python")
|
||||
MARK_AS_ADVANCED(PYTHON_LINKFLAGS)
|
||||
endif()
|
||||
# See: http://docs.python.org/extending/embedding.html#linking-requirements
|
||||
# for why this is needed
|
||||
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic" CACHE STRING "Linker flags for python")
|
||||
MARK_AS_ADVANCED(PYTHON_LINKFLAGS)
|
||||
|
||||
|
||||
# if the user passes these defines as args, we don't want to overwrite
|
||||
SET(_IS_INC_DEF OFF)
|
||||
|
@@ -30,7 +30,6 @@ SET(_sycl_search_dirs
|
||||
# dpcpp binary.
|
||||
FIND_PROGRAM(SYCL_COMPILER
|
||||
NAMES
|
||||
icpx
|
||||
dpcpp
|
||||
clang++
|
||||
HINTS
|
||||
@@ -45,8 +44,7 @@ FIND_PROGRAM(SYCL_COMPILER
|
||||
# compiler.
|
||||
if(NOT SYCL_COMPILER)
|
||||
FIND_PROGRAM(SYCL_COMPILER
|
||||
NAMES
|
||||
icpx
|
||||
NAMES
|
||||
dpcpp
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
@@ -57,8 +55,6 @@ endif()
|
||||
|
||||
FIND_LIBRARY(SYCL_LIBRARY
|
||||
NAMES
|
||||
sycl7
|
||||
sycl6
|
||||
sycl
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
@@ -66,48 +62,23 @@ FIND_LIBRARY(SYCL_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
FIND_LIBRARY(SYCL_LIBRARY_DEBUG
|
||||
NAMES
|
||||
sycl7d
|
||||
sycl6d
|
||||
sycld
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
endif()
|
||||
|
||||
FIND_PATH(SYCL_INCLUDE_DIR
|
||||
NAMES
|
||||
sycl/sycl.hpp
|
||||
CL/sycl.hpp
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include/sycl
|
||||
)
|
||||
|
||||
IF(EXISTS "${SYCL_INCLUDE_DIR}/sycl/version.hpp")
|
||||
FILE(STRINGS "${SYCL_INCLUDE_DIR}/sycl/version.hpp" _libsycl_major_version REGEX "^#define __LIBSYCL_MAJOR_VERSION[ \t].*$")
|
||||
STRING(REGEX MATCHALL "[0-9]+" _libsycl_major_version ${_libsycl_major_version})
|
||||
FILE(STRINGS "${SYCL_INCLUDE_DIR}/sycl/version.hpp" _libsycl_minor_version REGEX "^#define __LIBSYCL_MINOR_VERSION[ \t].*$")
|
||||
STRING(REGEX MATCHALL "[0-9]+" _libsycl_minor_version ${_libsycl_minor_version})
|
||||
FILE(STRINGS "${SYCL_INCLUDE_DIR}/sycl/version.hpp" _libsycl_patch_version REGEX "^#define __LIBSYCL_PATCH_VERSION[ \t].*$")
|
||||
STRING(REGEX MATCHALL "[0-9]+" _libsycl_patch_version ${_libsycl_patch_version})
|
||||
|
||||
SET(SYCL_VERSION "${_libsycl_major_version}.${_libsycl_minor_version}.${_libsycl_patch_version}")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SYCL
|
||||
REQUIRED_VARS SYCL_LIBRARY SYCL_INCLUDE_DIR
|
||||
VERSION_VAR SYCL_VERSION
|
||||
)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SYCL DEFAULT_MSG SYCL_LIBRARY SYCL_INCLUDE_DIR)
|
||||
|
||||
IF(SYCL_FOUND)
|
||||
SET(SYCL_INCLUDE_DIR ${SYCL_INCLUDE_DIR} ${SYCL_INCLUDE_DIR}/sycl)
|
||||
get_filename_component(_SYCL_INCLUDE_PARENT_DIR ${SYCL_INCLUDE_DIR} DIRECTORY)
|
||||
SET(SYCL_INCLUDE_DIR ${SYCL_INCLUDE_DIR} ${_SYCL_INCLUDE_PARENT_DIR})
|
||||
ELSE()
|
||||
SET(SYCL_SYCL_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
@@ -32,8 +32,7 @@ FIND_PATH(USD_INCLUDE_DIR
|
||||
DOC "Universal Scene Description (USD) header files"
|
||||
)
|
||||
|
||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e.
|
||||
# "libusd_m.a" became "libusd_usd_m.a".
|
||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
|
||||
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
|
||||
FIND_LIBRARY(USD_LIBRARY
|
||||
NAMES
|
||||
|
@@ -268,8 +268,7 @@ same as the Google Test name (i.e. ``suite.testcase``); see also
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0057 NEW) # if IN_LIST
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
function(gtest_add_tests)
|
||||
|
||||
if(ARGC LESS 1)
|
||||
|
@@ -40,10 +40,12 @@ macro(BLENDER_SRC_GTEST_EX)
|
||||
set(MANIFEST "${CMAKE_BINARY_DIR}/tests.exe.manifest")
|
||||
endif()
|
||||
|
||||
add_definitions(-DBLENDER_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE})
|
||||
add_definitions(${GFLAGS_DEFINES})
|
||||
add_definitions(${GLOG_DEFINES})
|
||||
|
||||
add_executable(${TARGET_NAME} ${ARG_SRC} ${MANIFEST})
|
||||
setup_platform_linker_flags(${TARGET_NAME})
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE ${GFLAGS_DEFINES})
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE ${GLOG_DEFINES})
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${TEST_INC}")
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${TEST_INC_SYS}")
|
||||
target_link_libraries(${TARGET_NAME} ${ARG_EXTRA_LIBS} ${PLATFORM_LINKLIBS})
|
||||
|
@@ -103,6 +103,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MY_WC_BRANCH MATCHES "^blender-v")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_below_check)
|
||||
endif()
|
||||
|
||||
@@ -146,10 +150,10 @@ endif()
|
||||
# BUILD_PLATFORM is taken from CMake
|
||||
# but BUILD_DATE and BUILD_TIME are platform dependent
|
||||
if(NOT BUILD_DATE)
|
||||
string(TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC)
|
||||
STRING(TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC)
|
||||
endif()
|
||||
if(NOT BUILD_TIME)
|
||||
string(TIMESTAMP BUILD_TIME "%H:%M:%S" UTC)
|
||||
STRING(TIMESTAMP BUILD_TIME "%H:%M:%S" UTC)
|
||||
endif()
|
||||
|
||||
# Write a file with the BUILD_HASH define
|
||||
|
@@ -10,77 +10,40 @@ import tempfile
|
||||
from typing import (
|
||||
Any,
|
||||
List,
|
||||
Tuple,
|
||||
)
|
||||
|
||||
USE_VERBOSE = (os.environ.get("VERBOSE", None) is not None)
|
||||
# Could make configurable.
|
||||
USE_VERBOSE_PROGRESS = True
|
||||
|
||||
CHECKER_BIN = "cppcheck"
|
||||
USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
]
|
||||
|
||||
CHECKER_EXCLUDE_SOURCE_FILES = set(os.path.join(*f.split("/")) for f in (
|
||||
# These files hang (taking longer than 5min with v2.8.2 at time of writing).
|
||||
# All other files process in under around 10seconds.
|
||||
"source/blender/editors/space_text/text_format_pov.c",
|
||||
"source/blender/editors/space_text/text_format_pov_ini.c",
|
||||
))
|
||||
CHECKER_BIN = "cppcheck"
|
||||
|
||||
CHECKER_ARGS = [
|
||||
# Speed up execution.
|
||||
# As Blender has many defines, the total number of configurations is large making execution unreasonably slow.
|
||||
# This could be increased but do so with care.
|
||||
"--max-configs=1",
|
||||
|
||||
# Enable this when includes are missing.
|
||||
# "--check-config",
|
||||
|
||||
# Shows many pedantic issues, some are quite useful.
|
||||
"--enable=all",
|
||||
|
||||
# Also shows useful messages, even if some are false-positives.
|
||||
"--inconclusive",
|
||||
# not sure why this is needed, but it is.
|
||||
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
|
||||
"--suppress=*:%s/extern/glew/include/GL/glew.h:241" % project_source_info.SOURCE_DIR,
|
||||
"--max-configs=1", # speeds up execution
|
||||
# "--check-config", # when includes are missing
|
||||
"--enable=all", # if you want sixty hundred pedantic suggestions
|
||||
|
||||
# Quiet output, otherwise all defines/includes are printed (overly verbose).
|
||||
# Only enable this for troubleshooting (if defines are not set as expected for example).
|
||||
*(() if USE_VERBOSE else ("--quiet",))
|
||||
"--quiet",
|
||||
|
||||
# NOTE: `--cppcheck-build-dir=<dir>` is added later as a temporary directory.
|
||||
]
|
||||
|
||||
|
||||
def source_info_filter(
|
||||
source_info: List[Tuple[str, List[str], List[str]]],
|
||||
) -> List[Tuple[str, List[str], List[str]]]:
|
||||
source_dir = project_source_info.SOURCE_DIR
|
||||
if not source_dir.endswith(os.sep):
|
||||
source_dir += os.sep
|
||||
source_info_result = []
|
||||
for i, item in enumerate(source_info):
|
||||
c = item[0]
|
||||
if c.startswith(source_dir):
|
||||
c_relative = c[len(source_dir):]
|
||||
if c_relative in CHECKER_EXCLUDE_SOURCE_FILES:
|
||||
CHECKER_EXCLUDE_SOURCE_FILES.remove(c_relative)
|
||||
continue
|
||||
source_info_result.append(item)
|
||||
if CHECKER_EXCLUDE_SOURCE_FILES:
|
||||
sys.stderr.write("Error: exclude file(s) are missing: %r\n" % list(sorted(CHECKER_EXCLUDE_SOURCE_FILES)))
|
||||
sys.exit(1)
|
||||
return source_info_result
|
||||
if USE_QUIET:
|
||||
CHECKER_ARGS.append("--quiet")
|
||||
|
||||
|
||||
def cppcheck() -> None:
|
||||
source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
|
||||
source_defines = project_source_info.build_defines_as_args()
|
||||
|
||||
# Apply exclusion.
|
||||
source_info = source_info_filter(source_info)
|
||||
|
||||
check_commands = []
|
||||
for c, inc_dirs, defs in source_info:
|
||||
cmd = (
|
||||
@@ -97,7 +60,7 @@ def cppcheck() -> None:
|
||||
process_functions = []
|
||||
|
||||
def my_process(i: int, c: str, cmd: List[str]) -> subprocess.Popen[Any]:
|
||||
if USE_VERBOSE_PROGRESS:
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
|
@@ -8,11 +8,7 @@
|
||||
|
||||
set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
|
||||
# Sadly ASAN is more often broken than working with MSVC do not enable it in the
|
||||
# developer profile for now.
|
||||
if(NOT WIN32)
|
||||
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GTESTS ON CACHE BOOL "" FORCE)
|
||||
|
@@ -13,11 +13,10 @@ set(WITH_BULLET ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR_CPU ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_PATH_GUIDING ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
|
||||
@@ -66,11 +65,13 @@ set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
if(APPLE)
|
||||
set(WITH_COREAUDIO ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(WITH_WASAPI ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PULSEAUDIO ON CACHE BOOL "" FORCE)
|
||||
|
@@ -7,6 +7,8 @@
|
||||
# cmake -C../blender/build_files/cmake/config/blender_lite.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BLENDER_THUMBNAILER OFF CACHE BOOL "" FORCE)
|
||||
@@ -16,7 +18,7 @@ set(WITH_BULLET OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR_CPU OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
|
||||
@@ -33,7 +35,6 @@ set(WITH_IMAGE_OPENEXR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_WEBP OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_IME OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_STL OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -14,11 +14,10 @@ set(WITH_BULLET ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR_CPU ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_PATH_GUIDING ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
|
||||
@@ -67,11 +66,13 @@ if(APPLE)
|
||||
set(WITH_COREAUDIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_DEVICE_METAL ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(WITH_WASAPI ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PULSEAUDIO ON CACHE BOOL "" FORCE)
|
||||
|
@@ -8,81 +8,41 @@
|
||||
|
||||
set(WITH_PYTHON_MODULE ON CACHE BOOL "" FORCE)
|
||||
|
||||
# install into the systems python dir
|
||||
set(WITH_INSTALL_PORTABLE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Installation Configuration.
|
||||
#
|
||||
# NOTE: `WITH_INSTALL_PORTABLE` always defaults to ON when building as a Python module and
|
||||
# isn't set here as it makes changing the setting impractical.
|
||||
# Python-developers could prefer either ON/OFF depending on their usage:
|
||||
#
|
||||
# - When using the system's Python, disabling will install into their `site-packages`,
|
||||
# allowing them to run Python from any directory and `import bpy`.
|
||||
# - When using Blender's bundled Python in `./../lib/` it will install there
|
||||
# which isn't especially useful as it requires running Python from this directory too.
|
||||
#
|
||||
# So default `WITH_INSTALL_PORTABLE` to ON, and developers who don't use Python from `./../lib/`
|
||||
# can disable it if they wish to install into their systems Python.
|
||||
|
||||
# There is no point in copying python into Python.
|
||||
# no point int copying python into python
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# disable audio, its possible some devs may want this but for now disable
|
||||
# so the python module doesn't hold the audio device and loads quickly.
|
||||
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PULSEAUDIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# other features which are not especially useful as a python module
|
||||
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_NANOVDB OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# Depends on Python install, do this to quiet warning.
|
||||
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(WIN32)
|
||||
set(WITH_WINDOWS_BUNDLE_CRT OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Library Compatibility.
|
||||
|
||||
# JEMALLOC does not work with `dlopen()` of Python modules:
|
||||
# Jemalloc does not work with dlopen() of Python modules:
|
||||
# https://github.com/jemalloc/jemalloc/issues/1237
|
||||
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Application Support.
|
||||
|
||||
# Not useful to include with the Python module.
|
||||
# Although a way to extract this from Python could be handle,
|
||||
# this would be better exposed directly via the Python API.
|
||||
set(WITH_BLENDER_THUMBNAILER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Audio Support.
|
||||
|
||||
# Disable audio, its possible some developers may want this but for now disable
|
||||
# so the Python module doesn't hold the audio device and loads quickly.
|
||||
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_PULSEAUDIO OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_WINDOWS_BUNDLE_CRT OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(APPLE)
|
||||
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Input Device Support.
|
||||
|
||||
# Other features which are not especially useful as a python module.
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
if(WIN32 OR APPLE)
|
||||
set(WITH_INPUT_IME OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Language Support.
|
||||
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -1,33 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright 2022 Blender Foundation. All rights reserved.
|
||||
|
||||
# This file is used to test the system for headers & symbols.
|
||||
# Variables should use the `HAVE_` prefix.
|
||||
# Defines should use the same name as the CMAKE variable.
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
# Used for: `intern/guardedalloc/intern/mallocn_intern.h`.
|
||||
# Function `malloc_stats` is only available on GLIBC,
|
||||
# so check that before defining `HAVE_MALLOC_STATS`.
|
||||
check_symbol_exists(malloc_stats "malloc.h" HAVE_MALLOC_STATS_H)
|
||||
|
||||
# Used for: `source/creator/creator_signals.c`.
|
||||
# The function `feenableexcept` is not present non-GLIBC systems,
|
||||
# hence we need to check if it's available in the `fenv.h` file.
|
||||
set(HAVE_FEENABLEEXCEPT OFF)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
check_symbol_exists(feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
|
||||
endif()
|
||||
|
||||
# Used for: `source/blender/blenlib/intern/system.c`.
|
||||
# `execinfo` is not available on non-GLIBC systems (at least not on MUSL-LIBC),
|
||||
# so check the presence of the header before including it and using the it for back-trace.
|
||||
set(HAVE_EXECINFO_H OFF)
|
||||
if(NOT MSVC)
|
||||
include(CheckIncludeFiles)
|
||||
check_include_files("execinfo.h" HAVE_EXECINFO_H)
|
||||
if(HAVE_EXECINFO_H)
|
||||
add_definitions(-DHAVE_EXECINFO_H)
|
||||
endif()
|
||||
endif()
|
@@ -57,25 +57,6 @@ macro(path_ensure_trailing_slash
|
||||
unset(_path_sep)
|
||||
endmacro()
|
||||
|
||||
# Our own version of `cmake_path(IS_PREFIX ..)`.
|
||||
# This can be removed when 3.20 or greater is the minimum supported version.
|
||||
macro(path_is_prefix
|
||||
path_prefix path result_var
|
||||
)
|
||||
# Remove when CMAKE version is bumped to "3.20" or greater.
|
||||
# `cmake_path(IS_PREFIX ${path_prefix} ${path} NORMALIZE result_var)`
|
||||
# Get the normalized paths (needed to remove `..`).
|
||||
get_filename_component(_abs_prefix "${${path_prefix}}" ABSOLUTE)
|
||||
get_filename_component(_abs_suffix "${${path}}" ABSOLUTE)
|
||||
string(LENGTH "${_abs_prefix}" _len)
|
||||
string(SUBSTRING "${_abs_suffix}" 0 "${_len}" _substr)
|
||||
string(COMPARE EQUAL "${_abs_prefix}" "${_substr}" "${result_var}")
|
||||
unset(_abs_prefix)
|
||||
unset(_abs_suffix)
|
||||
unset(_len)
|
||||
unset(_substr)
|
||||
endmacro()
|
||||
|
||||
# foo_bar.spam --> foo_barMySuffix.spam
|
||||
macro(file_suffix
|
||||
file_name_new file_name file_suffix
|
||||
@@ -153,11 +134,12 @@ endfunction()
|
||||
|
||||
# Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
|
||||
# use it instead of include_directories()
|
||||
function(absolute_include_dirs
|
||||
includes_absolute)
|
||||
function(blender_include_dirs
|
||||
includes
|
||||
)
|
||||
|
||||
set(_ALL_INCS "")
|
||||
foreach(_INC ${ARGN})
|
||||
foreach(_INC ${ARGV})
|
||||
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
|
||||
list(APPEND _ALL_INCS ${_ABS_INC})
|
||||
# for checking for invalid includes, disable for regular use
|
||||
@@ -165,24 +147,22 @@ function(absolute_include_dirs
|
||||
# message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
|
||||
# endif()
|
||||
endforeach()
|
||||
|
||||
set(${includes_absolute} ${_ALL_INCS} PARENT_SCOPE)
|
||||
include_directories(${_ALL_INCS})
|
||||
endfunction()
|
||||
|
||||
function(blender_target_include_dirs
|
||||
name
|
||||
function(blender_include_dirs_sys
|
||||
includes
|
||||
)
|
||||
|
||||
absolute_include_dirs(_ALL_INCS ${ARGN})
|
||||
target_include_directories(${name} PRIVATE ${_ALL_INCS})
|
||||
endfunction()
|
||||
|
||||
function(blender_target_include_dirs_sys
|
||||
name
|
||||
)
|
||||
|
||||
absolute_include_dirs(_ALL_INCS ${ARGN})
|
||||
target_include_directories(${name} SYSTEM PRIVATE ${_ALL_INCS})
|
||||
set(_ALL_INCS "")
|
||||
foreach(_INC ${ARGV})
|
||||
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
|
||||
list(APPEND _ALL_INCS ${_ABS_INC})
|
||||
# if(NOT EXISTS "${_ABS_INC}/")
|
||||
# message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
|
||||
# endif()
|
||||
endforeach()
|
||||
include_directories(SYSTEM ${_ALL_INCS})
|
||||
endfunction()
|
||||
|
||||
# Set include paths for header files included with "*.h" syntax.
|
||||
@@ -288,10 +268,12 @@ function(blender_add_lib__impl
|
||||
|
||||
# message(STATUS "Configuring library ${name}")
|
||||
|
||||
add_library(${name} ${sources})
|
||||
# include_directories(${includes})
|
||||
# include_directories(SYSTEM ${includes_sys})
|
||||
blender_include_dirs("${includes}")
|
||||
blender_include_dirs_sys("${includes_sys}")
|
||||
|
||||
blender_target_include_dirs(${name} ${includes})
|
||||
blender_target_include_dirs_sys(${name} ${includes_sys})
|
||||
add_library(${name} ${sources})
|
||||
|
||||
# On Windows certain libraries have two sets of binaries: one for debug builds and one for
|
||||
# release builds. The root of this requirement goes into ABI, I believe, but that's outside
|
||||
@@ -400,7 +382,7 @@ function(blender_add_test_suite)
|
||||
cmake_parse_arguments(ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
# Figure out the release dir, as some tests need files from there.
|
||||
get_blender_test_install_dir(TEST_INSTALL_DIR)
|
||||
GET_BLENDER_TEST_INSTALL_DIR(TEST_INSTALL_DIR)
|
||||
if(APPLE)
|
||||
set(_test_release_dir ${TEST_INSTALL_DIR}/Blender.app/Contents/Resources/${BLENDER_VERSION})
|
||||
else()
|
||||
@@ -443,21 +425,21 @@ function(blender_add_test_lib
|
||||
|
||||
# This duplicates logic that's also in GTestTesting.cmake, macro BLENDER_SRC_GTEST_EX.
|
||||
# TODO(Sybren): deduplicate after the general approach in D7649 has been approved.
|
||||
list(APPEND includes
|
||||
LIST(APPEND includes
|
||||
${CMAKE_SOURCE_DIR}/tests/gtests
|
||||
)
|
||||
list(APPEND includes_sys
|
||||
LIST(APPEND includes_sys
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFLAGS_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/extern/gtest/include
|
||||
${CMAKE_SOURCE_DIR}/extern/gmock/include
|
||||
)
|
||||
add_definitions(-DBLENDER_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE})
|
||||
add_definitions(${GFLAGS_DEFINES})
|
||||
add_definitions(${GLOG_DEFINES})
|
||||
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_deps}")
|
||||
|
||||
target_compile_definitions(${name} PRIVATE ${GFLAGS_DEFINES})
|
||||
target_compile_definitions(${name} PRIVATE ${GLOG_DEFINES})
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY BLENDER_TEST_LIBS ${name})
|
||||
|
||||
blender_add_test_suite(
|
||||
@@ -487,16 +469,16 @@ function(blender_add_test_executable
|
||||
## Otherwise external projects will produce warnings that we cannot fix.
|
||||
remove_strict_flags()
|
||||
|
||||
blender_src_gtest_ex(
|
||||
include_directories(${includes})
|
||||
include_directories(${includes_sys})
|
||||
|
||||
BLENDER_SRC_GTEST_EX(
|
||||
NAME ${name}
|
||||
SRC "${sources}"
|
||||
EXTRA_LIBS "${library_deps}"
|
||||
SKIP_ADD_TEST
|
||||
)
|
||||
|
||||
blender_target_include_dirs(${name}_test ${includes})
|
||||
blender_target_include_dirs_sys(${name}_test ${includes_sys})
|
||||
|
||||
blender_add_test_suite(
|
||||
TARGET ${name}_test
|
||||
SUITE_NAME ${name}
|
||||
@@ -531,11 +513,6 @@ function(setup_platform_linker_flags
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${PLATFORM_LINKFLAGS}")
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " ${PLATFORM_LINKFLAGS_RELEASE}")
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||
|
||||
get_target_property(target_type ${target} TYPE)
|
||||
if (target_type STREQUAL "EXECUTABLE")
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${PLATFORM_LINKFLAGS_EXECUTABLE}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Platform specific libraries for targets.
|
||||
@@ -783,7 +760,7 @@ function(ADD_CHECK_C_COMPILER_FLAG
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
check_c_compiler_flag("${_FLAG}" "${_CACHE_VAR}")
|
||||
CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}")
|
||||
if(${_CACHE_VAR})
|
||||
# message(STATUS "Using CFLAG: ${_FLAG}")
|
||||
set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}" PARENT_SCOPE)
|
||||
@@ -800,7 +777,7 @@ function(ADD_CHECK_CXX_COMPILER_FLAG
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
check_cxx_compiler_flag("${_FLAG}" "${_CACHE_VAR}")
|
||||
CHECK_CXX_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}")
|
||||
if(${_CACHE_VAR})
|
||||
# message(STATUS "Using CXXFLAG: ${_FLAG}")
|
||||
set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}" PARENT_SCOPE)
|
||||
@@ -818,11 +795,9 @@ function(get_blender_version)
|
||||
# - BLENDER_VERSION_PATCH
|
||||
# - BLENDER_VERSION_CYCLE (alpha, beta, rc, release)
|
||||
|
||||
# So CMAKE depends on `BKE_blender.h`, beware of infinite-loops!
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender_version.h.done
|
||||
)
|
||||
# So cmake depends on BKE_blender.h, beware of inf-loops!
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender_version.h.done)
|
||||
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h _contents REGEX "^#define[ \t]+BLENDER_.*$")
|
||||
|
||||
@@ -1014,8 +989,7 @@ function(data_to_c_simple_icons
|
||||
add_custom_command(
|
||||
OUTPUT ${_file_from} ${_file_to}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
|
||||
# COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py
|
||||
# ${_path_from_abs} ${_file_from}
|
||||
# COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
|
||||
COMMAND "$<TARGET_FILE:datatoc_icon>" ${_path_from_abs} ${_file_from}
|
||||
COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
|
||||
DEPENDS
|
||||
@@ -1093,27 +1067,23 @@ function(msgfmt_simple
|
||||
endfunction()
|
||||
|
||||
function(find_python_package
|
||||
package
|
||||
relative_include_dir
|
||||
package
|
||||
relative_include_dir
|
||||
)
|
||||
|
||||
string(TOUPPER ${package} _upper_package)
|
||||
|
||||
# Set but invalid.
|
||||
# set but invalid
|
||||
if((NOT ${PYTHON_${_upper_package}_PATH} STREQUAL "") AND
|
||||
(NOT ${PYTHON_${_upper_package}_PATH} MATCHES NOTFOUND))
|
||||
# if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}/${package}")
|
||||
# message(
|
||||
# WARNING
|
||||
# "PYTHON_${_upper_package}_PATH is invalid, ${package} not found in "
|
||||
# "'${PYTHON_${_upper_package}_PATH}' "
|
||||
# "WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing Python"
|
||||
# )
|
||||
# set(WITH_PYTHON_INSTALL${_upper_package} OFF)
|
||||
# endif()
|
||||
# Not set, so initialize.
|
||||
# if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}/${package}")
|
||||
# message(WARNING "PYTHON_${_upper_package}_PATH is invalid, ${package} not found in '${PYTHON_${_upper_package}_PATH}' "
|
||||
# "WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
|
||||
# set(WITH_PYTHON_INSTALL${_upper_package} OFF)
|
||||
# endif()
|
||||
# not set, so initialize
|
||||
else()
|
||||
string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
|
||||
string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
|
||||
list(GET _PY_VER_SPLIT 0 _PY_VER_MAJOR)
|
||||
|
||||
# re-cache
|
||||
@@ -1214,6 +1184,8 @@ macro(openmp_delayload
|
||||
if(WITH_OPENMP)
|
||||
if(MSVC_CLANG)
|
||||
set(OPENMP_DLL_NAME "libomp")
|
||||
elseif(MSVC_VERSION EQUAL 1800)
|
||||
set(OPENMP_DLL_NAME "vcomp120")
|
||||
else()
|
||||
set(OPENMP_DLL_NAME "vcomp140")
|
||||
endif()
|
||||
@@ -1229,31 +1201,23 @@ macro(set_and_warn_dependency
|
||||
_dependency _setting _val)
|
||||
# when $_dependency is disabled, forces $_setting = $_val
|
||||
if(NOT ${${_dependency}} AND ${${_setting}})
|
||||
if(WITH_STRICT_BUILD_OPTIONS)
|
||||
message(SEND_ERROR "${_dependency} disabled but required by ${_setting}")
|
||||
else()
|
||||
message(STATUS "${_dependency} is disabled, setting ${_setting}=${_val}")
|
||||
endif()
|
||||
message(STATUS "'${_dependency}' is disabled: forcing 'set(${_setting} ${_val})'")
|
||||
set(${_setting} ${_val})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(set_and_warn_library_found
|
||||
_library_name _library_found _setting)
|
||||
if(((NOT ${_library_found}) OR (NOT ${${_library_found}})) AND ${${_setting}})
|
||||
if(WITH_STRICT_BUILD_OPTIONS)
|
||||
message(SEND_ERROR "${_library_name} required but not found")
|
||||
else()
|
||||
message(STATUS "${_library_name} not found, disabling ${_setting}")
|
||||
endif()
|
||||
set(${_setting} OFF)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(without_system_libs_begin)
|
||||
set(CMAKE_IGNORE_PATH "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES};${CMAKE_SYSTEM_INCLUDE_PATH};${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}")
|
||||
if(APPLE)
|
||||
# Avoid searching for headers in frameworks (like Mono), and libraries in LIBDIR.
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(without_system_libs_end)
|
||||
unset(CMAKE_IGNORE_PATH)
|
||||
if(APPLE)
|
||||
# FIRST is the default.
|
||||
set(CMAKE_FIND_FRAMEWORK FIRST)
|
||||
endif()
|
||||
endmacro()
|
||||
|
@@ -17,9 +17,9 @@ set(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR})
|
||||
set(CPACK_PACKAGE_CONTACT ${PROJECT_CONTACT})
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
|
||||
|
||||
|
||||
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
|
||||
@@ -106,8 +106,8 @@ if(WIN32)
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:medium)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender-launcher" "Blender ${MAJOR_VERSION}.${MINOR_VERSION}")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS "blender-launcher" "Blender ${MAJOR_VERSION}.${MINOR_VERSION}")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender-launcher" "Blender")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS "blender-launcher" "Blender")
|
||||
|
||||
include(CPack)
|
||||
|
||||
|
@@ -21,18 +21,6 @@ function(print_found_status
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Utility to install precompiled shared libraries.
|
||||
macro(add_bundled_libraries library)
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(_library_dir ${LIBDIR}/${library}/lib)
|
||||
file(GLOB _all_library_versions ${_library_dir}/*\.dylib*)
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_all_library_versions})
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARY_DIRS ${_library_dir})
|
||||
unset(_all_library_versions)
|
||||
unset(_library_dir)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Find system provided libraries.
|
||||
|
||||
@@ -43,18 +31,22 @@ find_package(BZip2 REQUIRED)
|
||||
list(APPEND ZLIB_LIBRARIES ${BZIP2_LIBRARIES})
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package(OpenAL REQUIRED)
|
||||
find_package(OpenAL)
|
||||
if(NOT OPENAL_FOUND)
|
||||
message(WARNING "OpenAL not found, disabling WITH_OPENAL")
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
find_library(JACK_FRAMEWORK
|
||||
NAMES jackmp
|
||||
)
|
||||
|
||||
if(JACK_FRAMEWORK)
|
||||
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
|
||||
if(NOT JACK_FRAMEWORK)
|
||||
message(STATUS "JACK not found, disabling WITH_JACK")
|
||||
set(WITH_JACK OFF)
|
||||
else()
|
||||
set_and_warn_library_found("JACK" JACK_FRAMEWORK WITH_JACK)
|
||||
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -71,15 +63,6 @@ if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
# Avoid searching for headers since this would otherwise override our lib
|
||||
# directory as well as PYTHON_ROOT_DIR.
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
|
||||
# Optionally use system Python if PYTHON_ROOT_DIR is specified.
|
||||
if(WITH_PYTHON AND (WITH_PYTHON_MODULE AND PYTHON_ROOT_DIR))
|
||||
find_package(PythonLibsUnix REQUIRED)
|
||||
endif()
|
||||
|
||||
# Prefer lib directory paths
|
||||
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
|
||||
set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
|
||||
@@ -97,23 +80,10 @@ if(WITH_ALEMBIC)
|
||||
endif()
|
||||
|
||||
if(WITH_USD)
|
||||
find_package(USD REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
find_package(MoltenVK REQUIRED)
|
||||
|
||||
if(EXISTS ${LIBDIR}/vulkan)
|
||||
set(VULKAN_FOUND On)
|
||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan/macOS)
|
||||
set(VULKAN_INCLUDE_DIR ${VULKAN_ROOT_DIR}/include)
|
||||
set(VULKAN_LIBRARY ${VULKAN_ROOT_DIR}/lib/libvulkan.1.dylib)
|
||||
|
||||
set(VULKAN_INCLUDE_DIRS ${VULKAN_INCLUDE_DIR} ${MOLTENVK_INCLUDE_DIRS})
|
||||
set(VULKAN_LIBRARIES ${VULKAN_LIBRARY} ${MOLTENVK_LIBRARIES})
|
||||
else()
|
||||
message(WARNING "Vulkan SDK was not found, disabling WITH_VULKAN_BACKEND")
|
||||
set(WITH_VULKAN_BACKEND OFF)
|
||||
find_package(USD)
|
||||
if(NOT USD_FOUND)
|
||||
message(STATUS "USD not found, disabling WITH_USD")
|
||||
set(WITH_USD OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -141,8 +111,34 @@ if(WITH_CODEC_SNDFILE)
|
||||
unset(_sndfile_VORBISENC_LIBRARY)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON AND NOT (WITH_PYTHON_MODULE AND PYTHON_ROOT_DIR))
|
||||
find_package(PythonLibsUnix REQUIRED)
|
||||
if(WITH_PYTHON)
|
||||
# Use precompiled libraries by default.
|
||||
SET(PYTHON_VERSION 3.10 CACHE STRING "Python Version (major and minor only)")
|
||||
if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
|
||||
# Normally cached but not since we include them with blender.
|
||||
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")
|
||||
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}")
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}.a)
|
||||
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
|
||||
else()
|
||||
# Module must be compiled against Python framework.
|
||||
set(_py_framework "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}")
|
||||
set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}")
|
||||
set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}")
|
||||
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}")
|
||||
unset(_py_framework)
|
||||
endif()
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
|
||||
# needed for Audaspace, numpy is installed into python site-packages
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include")
|
||||
|
||||
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
|
||||
message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
@@ -205,6 +201,11 @@ if(WITH_JACK)
|
||||
string(APPEND PLATFORM_LINKFLAGS " -F/Library/Frameworks -weak_framework jackmp")
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
|
||||
# force cmake to link right framework
|
||||
string(APPEND PLATFORM_LINKFLAGS " /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
find_package(OpenCOLLADA)
|
||||
find_library(PCRE_LIBRARIES NAMES pcre HINTS ${LIBDIR}/opencollada/lib)
|
||||
@@ -225,9 +226,6 @@ if(WITH_SDL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy)
|
||||
find_package(Epoxy REQUIRED)
|
||||
|
||||
set(PNG_ROOT ${LIBDIR}/png)
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
@@ -236,12 +234,20 @@ find_package(JPEG REQUIRED)
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
set(TIFF_ROOT ${LIBDIR}/tiff)
|
||||
find_package(TIFF REQUIRED)
|
||||
find_package(TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
message(WARNING "TIFF not found, disabling WITH_IMAGE_TIFF")
|
||||
set(WITH_IMAGE_TIFF OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_WEBP)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
find_package(WebP REQUIRED)
|
||||
find_package(WebP)
|
||||
if(NOT WEBP_FOUND)
|
||||
message(WARNING "WebP not found, disabling WITH_IMAGE_WEBP")
|
||||
set(WITH_IMAGE_WEBP OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
@@ -271,7 +277,11 @@ if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||
endif()
|
||||
|
||||
if(WITH_PUGIXML)
|
||||
find_package(PugiXML REQUIRED)
|
||||
find_package(PugiXML)
|
||||
if(NOT PUGIXML_FOUND)
|
||||
message(WARNING "PugiXML not found, disabling WITH_PUGIXML")
|
||||
set(WITH_PUGIXML OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
@@ -289,7 +299,12 @@ if(WITH_OPENIMAGEIO)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package(OpenColorIO 2.0.0 REQUIRED)
|
||||
find_package(OpenColorIO 2.0.0)
|
||||
|
||||
if(NOT OPENCOLORIO_FOUND)
|
||||
set(WITH_OPENCOLORIO OFF)
|
||||
message(STATUS "OpenColorIO not found, disabling WITH_OPENCOLORIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
@@ -316,18 +331,38 @@ if(WITH_LLVM)
|
||||
if(WITH_CLANG)
|
||||
find_package(Clang)
|
||||
if(NOT CLANG_FOUND)
|
||||
message(FATAL_ERROR "Clang not found.")
|
||||
message(FATAL_ERROR "Clang not found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
find_package(OSL REQUIRED)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl)
|
||||
|
||||
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
|
||||
# WARNING! depends on correct order of OSL libs linking
|
||||
list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
|
||||
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
|
||||
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
|
||||
find_path(OSL_SHADER_DIR NAMES stdosl.h PATHS ${CYCLES_OSL}/share/OSL/shaders)
|
||||
|
||||
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER AND OSL_SHADER_DIR)
|
||||
set(OSL_FOUND TRUE)
|
||||
else()
|
||||
message(WARNING "OSL not found, disabling WITH_CYCLES_OSL")
|
||||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
find_package(Embree 3.8.0 REQUIRED)
|
||||
# Increase stack size for Embree, only works for executables.
|
||||
if(NOT WITH_PYTHON_MODULE)
|
||||
string(APPEND PLATFORM_LINKFLAGS " -Wl,-stack_size,0x100000")
|
||||
endif()
|
||||
|
||||
# Embree static library linking can mix up SSE and AVX symbols, causing
|
||||
# crashes on macOS systems with older CPUs that don't have AVX. Using
|
||||
@@ -341,15 +376,28 @@ if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
find_package(OpenImageDenoise REQUIRED)
|
||||
find_package(OpenImageDenoise)
|
||||
|
||||
if(NOT OPENIMAGEDENOISE_FOUND)
|
||||
set(WITH_OPENIMAGEDENOISE OFF)
|
||||
message(STATUS "OpenImageDenoise not found, disabling WITH_OPENIMAGEDENOISE")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_TBB)
|
||||
find_package(TBB REQUIRED)
|
||||
find_package(TBB)
|
||||
if(NOT TBB_FOUND)
|
||||
message(WARNING "TBB not found, disabling WITH_TBB")
|
||||
set(WITH_TBB OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_POTRACE)
|
||||
find_package(Potrace REQUIRED)
|
||||
find_package(Potrace)
|
||||
if(NOT POTRACE_FOUND)
|
||||
message(WARNING "potrace not found, disabling WITH_POTRACE")
|
||||
set(WITH_POTRACE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
|
||||
@@ -364,31 +412,30 @@ if(WITH_OPENMP)
|
||||
set(OpenMP_LIBRARY_DIR "${LIBDIR}/openmp/lib/")
|
||||
set(OpenMP_LINKER_FLAGS "-L'${OpenMP_LIBRARY_DIR}' -lomp")
|
||||
set(OpenMP_LIBRARY "${OpenMP_LIBRARY_DIR}/libomp.dylib")
|
||||
add_bundled_libraries(openmp)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK REQUIRED)
|
||||
find_package(XR_OpenXR_SDK)
|
||||
if(NOT XR_OPENXR_SDK_FOUND)
|
||||
message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR")
|
||||
set(WITH_XR_OPENXR OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GMP)
|
||||
find_package(GMP REQUIRED)
|
||||
find_package(GMP)
|
||||
if(NOT GMP_FOUND)
|
||||
message(WARNING "GMP not found, disabling WITH_GMP")
|
||||
set(WITH_GMP OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_HARU)
|
||||
find_package(Haru REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)
|
||||
find_package(openpgl QUIET)
|
||||
if(openpgl_FOUND)
|
||||
get_target_property(OPENPGL_LIBRARIES openpgl::openpgl LOCATION)
|
||||
get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES)
|
||||
message(STATUS "Found OpenPGL: ${OPENPGL_LIBRARIES}")
|
||||
else()
|
||||
set(WITH_CYCLES_PATH_GUIDING OFF)
|
||||
message(STATUS "OpenPGL not found, disabling WITH_CYCLES_PATH_GUIDING")
|
||||
find_package(Haru)
|
||||
if(NOT HARU_FOUND)
|
||||
message(WARNING "Haru not found, disabling WITH_HARU")
|
||||
set(WITH_HARU OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -399,9 +446,6 @@ if(EXISTS ${LIBDIR})
|
||||
without_system_libs_end()
|
||||
endif()
|
||||
|
||||
# Restore to default.
|
||||
set(CMAKE_FIND_FRAMEWORK FIRST)
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Set compiler and linker flags.
|
||||
|
||||
@@ -434,9 +478,6 @@ string(APPEND PLATFORM_LINKFLAGS
|
||||
string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++")
|
||||
string(APPEND PLATFORM_LINKFLAGS " -stdlib=libc++")
|
||||
|
||||
# Make stack size more similar to Embree, required for Embree.
|
||||
string(APPEND PLATFORM_LINKFLAGS_EXECUTABLE " -Wl,-stack_size,0x100000")
|
||||
|
||||
# Suppress ranlib "has no symbols" warnings (workaround for T48250)
|
||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
@@ -460,27 +501,17 @@ if(WITH_COMPILER_CCACHE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_COMPILER_ASAN)
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${COMPILER_ASAN_LIBRARY})
|
||||
endif()
|
||||
# For binaries that are built but not installed (also not distributed) (datatoc,
|
||||
# makesdna, tests, etc.), we add an rpath to the OpenMP library dir through
|
||||
# CMAKE_BUILD_RPATH. This avoids having to make many copies of the dylib next to each binary.
|
||||
#
|
||||
# For the installed Python module and installed Blender executable, CMAKE_INSTALL_RPATH
|
||||
# is modified to find the dylib in an adjacent folder. Install step puts the libraries there.
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
list(APPEND CMAKE_BUILD_RPATH "${OpenMP_LIBRARY_DIR}")
|
||||
|
||||
if(PLATFORM_BUNDLED_LIBRARIES)
|
||||
# For the installed Python module and installed Blender executable, we set the
|
||||
# rpath to the location where install step will copy the shared libraries.
|
||||
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
|
||||
if(WITH_PYTHON_MODULE)
|
||||
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/lib")
|
||||
else()
|
||||
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/../Resources/lib")
|
||||
endif()
|
||||
|
||||
# For binaries that are built but not installed (like makesdan or tests), we add
|
||||
# the original directory of all shared libraries to the rpath. This is needed because
|
||||
# these can be in different folders, and because the build and install folder may be
|
||||
# different.
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
list(APPEND CMAKE_BUILD_RPATH ${PLATFORM_BUNDLED_LIBRARY_DIRS})
|
||||
endif()
|
||||
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
|
||||
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/../Resources/${BLENDER_VERSION}/lib")
|
||||
|
||||
# Same as `CFBundleIdentifier` in Info.plist.
|
||||
set(CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.blenderfoundation.blender")
|
||||
|
@@ -26,6 +26,11 @@ if(NOT DEFINED LIBDIR)
|
||||
else()
|
||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND
|
||||
CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3)
|
||||
message(FATAL_ERROR "GCC version must be at least 9.3 for precompiled libraries, found ${CMAKE_C_COMPILER_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Avoid namespace pollustion.
|
||||
@@ -83,15 +88,6 @@ macro(find_package_wrapper)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Utility to install precompiled shared libraries.
|
||||
macro(add_bundled_libraries library)
|
||||
if(EXISTS ${LIBDIR})
|
||||
file(GLOB _all_library_versions ${LIBDIR}/${library}/lib/*\.so*)
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_all_library_versions})
|
||||
unset(_all_library_versions)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Precompiled Libraries
|
||||
#
|
||||
@@ -106,23 +102,6 @@ find_package_wrapper(JPEG REQUIRED)
|
||||
find_package_wrapper(PNG REQUIRED)
|
||||
find_package_wrapper(ZLIB REQUIRED)
|
||||
find_package_wrapper(Zstd REQUIRED)
|
||||
find_package_wrapper(Epoxy REQUIRED)
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
find_package_wrapper(Vulkan REQUIRED)
|
||||
endif()
|
||||
|
||||
function(check_freetype_for_brotli)
|
||||
include(CheckSymbolExists)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${FREETYPE_INCLUDE_DIRS})
|
||||
check_symbol_exists(FT_CONFIG_OPTION_USE_BROTLI "freetype/config/ftconfig.h" HAVE_BROTLI)
|
||||
unset(CMAKE_REQUIRED_INCLUDES)
|
||||
if(NOT HAVE_BROTLI)
|
||||
unset(HAVE_BROTLI CACHE)
|
||||
message(FATAL_ERROR "Freetype needs to be compiled with brotli support!")
|
||||
endif()
|
||||
unset(HAVE_BROTLI CACHE)
|
||||
endfunction()
|
||||
|
||||
if(NOT WITH_SYSTEM_FREETYPE)
|
||||
# FreeType compiled with Brotli compression for woff2.
|
||||
@@ -138,64 +117,47 @@ if(NOT WITH_SYSTEM_FREETYPE)
|
||||
# ${BROTLI_LIBRARIES}
|
||||
# )
|
||||
endif()
|
||||
check_freetype_for_brotli()
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# This could be used, see: D14954 for details.
|
||||
# `find_package(PythonLibs)`
|
||||
# No way to set py35, remove for now.
|
||||
# find_package(PythonLibs)
|
||||
|
||||
# Use our own instead, since without Python is such a rare case,
|
||||
# require this package.
|
||||
# XXX: Linking errors with Debian static Python (sigh).
|
||||
# find_package_wrapper(PythonLibsUnix REQUIRED)
|
||||
# Use our own instead, since without py is such a rare case,
|
||||
# require this package
|
||||
# XXX Linking errors with debian static python :/
|
||||
# find_package_wrapper(PythonLibsUnix REQUIRED)
|
||||
find_package(PythonLibsUnix REQUIRED)
|
||||
|
||||
if(WITH_PYTHON_MODULE AND NOT WITH_INSTALL_PORTABLE)
|
||||
# Installing into `site-packages`, warn when installing into `./../lib/`
|
||||
# which script authors almost certainly don't want.
|
||||
if(EXISTS ${LIBDIR})
|
||||
path_is_prefix(LIBDIR PYTHON_SITE_PACKAGES _is_prefix)
|
||||
if(_is_prefix)
|
||||
message(WARNING "
|
||||
Building Blender with the following configuration:
|
||||
- WITH_PYTHON_MODULE=ON
|
||||
- WITH_INSTALL_PORTABLE=OFF
|
||||
- LIBDIR=\"${LIBDIR}\"
|
||||
- PYTHON_SITE_PACKAGES=\"${PYTHON_SITE_PACKAGES}\"
|
||||
In this case you may want to either:
|
||||
- Use the system Python's site-packages, see:
|
||||
python -c \"import site; print(site.getsitepackages()[0])\"
|
||||
- Set WITH_INSTALL_PORTABLE=ON to create a stand-alone \"bpy\" module
|
||||
which you will need to ensure is in Python's module search path.
|
||||
Proceeding with PYTHON_SITE_PACKAGES install target, you have been warned!"
|
||||
)
|
||||
endif()
|
||||
unset(_is_prefix)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package_wrapper(OpenEXR) # our own module
|
||||
set_and_warn_library_found("OpenEXR" OPENEXR_FOUND WITH_IMAGE_OPENEXR)
|
||||
if(NOT OPENEXR_FOUND)
|
||||
set(WITH_IMAGE_OPENEXR OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG)
|
||||
find_package_wrapper(OpenJPEG)
|
||||
set_and_warn_library_found("OpenJPEG" OPENJPEG_FOUND WITH_IMAGE_OPENJPEG)
|
||||
if(NOT OPENJPEG_FOUND)
|
||||
set(WITH_IMAGE_OPENJPEG OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
# XXX Linking errors with debian static tiff :/
|
||||
# find_package_wrapper(TIFF)
|
||||
find_package(TIFF)
|
||||
set_and_warn_library_found("TIFF" TIFF_FOUND WITH_IMAGE_TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
set(WITH_IMAGE_TIFF OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package_wrapper(OpenAL)
|
||||
set_and_warn_library_found("OpenAL" OPENAL_FOUND WITH_OPENAL)
|
||||
if(NOT OPENAL_FOUND)
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
@@ -217,14 +179,18 @@ if(WITH_SDL)
|
||||
SDL_LIBRARY
|
||||
)
|
||||
# unset(SDLMAIN_LIBRARY CACHE)
|
||||
set_and_warn_library_found("SDL" SDL_FOUND WITH_SDL)
|
||||
if(NOT SDL_FOUND)
|
||||
set(WITH_SDL OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Codecs
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
find_package_wrapper(SndFile)
|
||||
set_and_warn_library_found("libsndfile" SNDFILE_FOUND WITH_CODEC_SNDFILE)
|
||||
if(NOT SNDFILE_FOUND)
|
||||
set(WITH_CODEC_SNDFILE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
@@ -252,12 +218,17 @@ if(WITH_CODEC_FFMPEG)
|
||||
endif()
|
||||
find_package(FFmpeg)
|
||||
|
||||
set_and_warn_library_found("FFmpeg" FFMPEG_FOUND WITH_CODEC_FFMPEG)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
set(WITH_CODEC_FFMPEG OFF)
|
||||
message(STATUS "FFmpeg not found, disabling it")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
find_package_wrapper(Fftw3)
|
||||
set_and_warn_library_found("fftw3" FFTW3_FOUND WITH_FFTW3)
|
||||
if(NOT FFTW3_FOUND)
|
||||
set(WITH_FFTW3 OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
@@ -272,23 +243,25 @@ if(WITH_OPENCOLLADA)
|
||||
endif()
|
||||
find_package_wrapper(XML2)
|
||||
else()
|
||||
set_and_warn_library_found("OpenCollada" OPENCOLLADA_FOUND WITH_OPENCOLLADA)
|
||||
set(WITH_OPENCOLLADA OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
find_package_wrapper(JeMalloc)
|
||||
set_and_warn_library_found("JeMalloc" JEMALLOC_FOUND WITH_MEM_JEMALLOC)
|
||||
if(NOT JEMALLOC_FOUND)
|
||||
set(WITH_MEM_JEMALLOC OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_INPUT_NDOF)
|
||||
find_package_wrapper(Spacenav)
|
||||
set_and_warn_library_found("SpaceNav" SPACENAV_FOUND WITH_INPUT_NDOF)
|
||||
|
||||
if(SPACENAV_FOUND)
|
||||
# use generic names within blenders buildsystem.
|
||||
set(NDOF_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIRS})
|
||||
set(NDOF_LIBRARIES ${SPACENAV_LIBRARIES})
|
||||
else()
|
||||
set(WITH_INPUT_NDOF OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -298,8 +271,6 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
set(OSL_ROOT ${CYCLES_OSL})
|
||||
endif()
|
||||
find_package_wrapper(OSL)
|
||||
set_and_warn_library_found("OSL" OSL_FOUND WITH_CYCLES_OSL)
|
||||
|
||||
if(OSL_FOUND)
|
||||
if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")
|
||||
# Note: --whole-archive is needed to force loading of all symbols in liboslexec,
|
||||
@@ -310,43 +281,45 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
-Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "OSL not found, disabling it from Cycles")
|
||||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
||||
if(WITH_CYCLES_DEVICE_ONEAPI)
|
||||
set(CYCLES_LEVEL_ZERO ${LIBDIR}/level-zero CACHE PATH "Path to Level Zero installation")
|
||||
if(EXISTS ${CYCLES_LEVEL_ZERO} AND NOT LEVEL_ZERO_ROOT_DIR)
|
||||
set(LEVEL_ZERO_ROOT_DIR ${CYCLES_LEVEL_ZERO})
|
||||
endif()
|
||||
|
||||
set(CYCLES_SYCL ${LIBDIR}/dpcpp CACHE PATH "Path to oneAPI DPC++ compiler")
|
||||
set(CYCLES_SYCL ${LIBDIR}/dpcpp CACHE PATH "Path to DPC++ and SYCL installation")
|
||||
if(EXISTS ${CYCLES_SYCL} AND NOT SYCL_ROOT_DIR)
|
||||
set(SYCL_ROOT_DIR ${CYCLES_SYCL})
|
||||
endif()
|
||||
file(GLOB _sycl_runtime_libraries
|
||||
${SYCL_ROOT_DIR}/lib/libsycl.so
|
||||
${SYCL_ROOT_DIR}/lib/libsycl.so.*
|
||||
${SYCL_ROOT_DIR}/lib/libpi_*.so
|
||||
)
|
||||
list(FILTER _sycl_runtime_libraries EXCLUDE REGEX ".*\.py")
|
||||
list(REMOVE_ITEM _sycl_runtime_libraries "${SYCL_ROOT_DIR}/lib/libpi_opencl.so")
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_sycl_runtime_libraries})
|
||||
unset(_sycl_runtime_libraries)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
find_package_wrapper(OpenVDB)
|
||||
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
||||
find_package_wrapper(Blosc)
|
||||
|
||||
if(OPENVDB_FOUND)
|
||||
find_package_wrapper(Blosc)
|
||||
set_and_warn_library_found("Blosc" BLOSC_FOUND WITH_OPENVDB_BLOSC)
|
||||
if(NOT OPENVDB_FOUND)
|
||||
set(WITH_OPENVDB OFF)
|
||||
set(WITH_OPENVDB_BLOSC OFF)
|
||||
message(STATUS "OpenVDB not found, disabling it")
|
||||
elseif(NOT BLOSC_FOUND)
|
||||
set(WITH_OPENVDB_BLOSC OFF)
|
||||
message(STATUS "Blosc not found, disabling it for OpenVBD")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
find_package_wrapper(NanoVDB)
|
||||
set_and_warn_library_found("NanoVDB" NANOVDB_FOUND WITH_NANOVDB)
|
||||
|
||||
if(NOT NANOVDB_FOUND)
|
||||
set(WITH_NANOVDB OFF)
|
||||
message(STATUS "NanoVDB not found, disabling it")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CPU_SIMD AND SUPPORT_NEON_BUILD)
|
||||
@@ -355,12 +328,18 @@ endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
find_package_wrapper(Alembic)
|
||||
set_and_warn_library_found("Alembic" ALEMBIC_FOUND WITH_ALEMBIC)
|
||||
|
||||
if(NOT ALEMBIC_FOUND)
|
||||
set(WITH_ALEMBIC OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_USD)
|
||||
find_package_wrapper(USD)
|
||||
set_and_warn_library_found("USD" USD_FOUND WITH_USD)
|
||||
|
||||
if(NOT USD_FOUND)
|
||||
set(WITH_USD OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
@@ -413,13 +392,20 @@ endif()
|
||||
|
||||
if(WITH_PUGIXML)
|
||||
find_package_wrapper(PugiXML)
|
||||
set_and_warn_library_found("PugiXML" PUGIXML_FOUND WITH_PUGIXML)
|
||||
|
||||
if(NOT PUGIXML_FOUND)
|
||||
set(WITH_PUGIXML OFF)
|
||||
message(STATUS "PugiXML not found, disabling WITH_PUGIXML")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_WEBP)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
find_package_wrapper(WebP)
|
||||
set_and_warn_library_found("WebP" WEBP_FOUND WITH_IMAGE_WEBP)
|
||||
if(NOT WEBP_FOUND)
|
||||
set(WITH_IMAGE_WEBP OFF)
|
||||
message(WARNING "WebP not found, disabling WITH_IMAGE_WEBP")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
@@ -444,7 +430,10 @@ if(WITH_OPENIMAGEIO)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES "${WEBP_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
set_and_warn_library_found("OPENIMAGEIO" OPENIMAGEIO_FOUND WITH_OPENIMAGEIO)
|
||||
if(NOT OPENIMAGEIO_FOUND)
|
||||
set(WITH_OPENIMAGEIO OFF)
|
||||
message(STATUS "OpenImageIO not found, disabling WITH_CYCLES")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
@@ -454,7 +443,10 @@ if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
|
||||
set_and_warn_library_found("OpenColorIO" OPENCOLORIO_FOUND WITH_OPENCOLORIO)
|
||||
if(NOT OPENCOLORIO_FOUND)
|
||||
set(WITH_OPENCOLORIO OFF)
|
||||
message(STATUS "OpenColorIO not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
@@ -463,7 +455,11 @@ endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
find_package_wrapper(OpenImageDenoise)
|
||||
set_and_warn_library_found("OpenImageDenoise" OPENIMAGEDENOISE_FOUND WITH_OPENIMAGEDENOISE)
|
||||
|
||||
if(NOT OPENIMAGEDENOISE_FOUND)
|
||||
set(WITH_OPENIMAGEDENOISE OFF)
|
||||
message(STATUS "OpenImageDenoise not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
@@ -472,19 +468,24 @@ if(WITH_LLVM)
|
||||
endif()
|
||||
|
||||
find_package_wrapper(LLVM)
|
||||
set_and_warn_library_found("LLVM" LLVM_FOUND WITH_LLVM)
|
||||
|
||||
if(LLVM_FOUND)
|
||||
if(WITH_CLANG)
|
||||
find_package_wrapper(Clang)
|
||||
set_and_warn_library_found("Clang" CLANG_FOUND WITH_CLANG)
|
||||
if(WITH_CLANG)
|
||||
find_package_wrapper(Clang)
|
||||
endif()
|
||||
# Symbol conflicts with same UTF library used by OpenCollada
|
||||
if(EXISTS ${LIBDIR})
|
||||
if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0"))
|
||||
list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Symbol conflicts with same UTF library used by OpenCollada
|
||||
if(EXISTS ${LIBDIR})
|
||||
if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0"))
|
||||
list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
|
||||
endif()
|
||||
if(NOT LLVM_FOUND)
|
||||
set(WITH_LLVM OFF)
|
||||
set(WITH_CLANG OFF)
|
||||
message(STATUS "LLVM not found")
|
||||
else()
|
||||
if(NOT CLANG_FOUND)
|
||||
set(WITH_CLANG OFF)
|
||||
message(STATUS "Clang not found")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -495,43 +496,49 @@ if(WITH_OPENSUBDIV)
|
||||
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
|
||||
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
|
||||
set_and_warn_library_found("OpenSubdiv" OPENSUBDIV_FOUND WITH_OPENSUBDIV)
|
||||
if(NOT OPENSUBDIV_FOUND)
|
||||
set(WITH_OPENSUBDIV OFF)
|
||||
message(STATUS "OpenSubdiv not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_TBB)
|
||||
find_package_wrapper(TBB)
|
||||
set_and_warn_library_found("TBB" TBB_FOUND WITH_TBB)
|
||||
if(NOT TBB_FOUND)
|
||||
message(WARNING "TBB not found, disabling WITH_TBB")
|
||||
set(WITH_TBB OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK)
|
||||
set_and_warn_library_found("OpenXR-SDK" XR_OPENXR_SDK_FOUND WITH_XR_OPENXR)
|
||||
if(NOT XR_OPENXR_SDK_FOUND)
|
||||
message(WARNING "OpenXR-SDK not found, disabling WITH_XR_OPENXR")
|
||||
set(WITH_XR_OPENXR OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GMP)
|
||||
find_package_wrapper(GMP)
|
||||
set_and_warn_library_found("GMP" GMP_FOUND WITH_GMP)
|
||||
if(NOT GMP_FOUND)
|
||||
message(WARNING "GMP not found, disabling WITH_GMP")
|
||||
set(WITH_GMP OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_POTRACE)
|
||||
find_package_wrapper(Potrace)
|
||||
set_and_warn_library_found("Potrace" POTRACE_FOUND WITH_POTRACE)
|
||||
if(NOT POTRACE_FOUND)
|
||||
message(WARNING "potrace not found, disabling WITH_POTRACE")
|
||||
set(WITH_POTRACE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_HARU)
|
||||
find_package_wrapper(Haru)
|
||||
set_and_warn_library_found("Haru" HARU_FOUND WITH_HARU)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)
|
||||
find_package_wrapper(openpgl)
|
||||
if(openpgl_FOUND)
|
||||
get_target_property(OPENPGL_LIBRARIES openpgl::openpgl LOCATION)
|
||||
get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES)
|
||||
message(STATUS "Found OpenPGL: ${OPENPGL_LIBRARIES}")
|
||||
else()
|
||||
set(WITH_CYCLES_PATH_GUIDING OFF)
|
||||
message(STATUS "OpenPGL not found, disabling WITH_CYCLES_PATH_GUIDING")
|
||||
if(NOT HARU_FOUND)
|
||||
message(WARNING "Haru not found, disabling WITH_HARU")
|
||||
set(WITH_HARU OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -587,7 +594,6 @@ if(WITH_SYSTEM_FREETYPE)
|
||||
if(NOT FREETYPE_FOUND)
|
||||
message(FATAL_ERROR "Failed finding system FreeType version!")
|
||||
endif()
|
||||
check_freetype_for_brotli()
|
||||
endif()
|
||||
|
||||
if(WITH_LZO AND WITH_SYSTEM_LZO)
|
||||
@@ -607,136 +613,70 @@ endif()
|
||||
# Jack is intended to use the system library.
|
||||
if(WITH_JACK)
|
||||
find_package_wrapper(Jack)
|
||||
set_and_warn_library_found("JACK" JACK_FOUND WITH_JACK)
|
||||
if(NOT JACK_FOUND)
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Pulse is intended to use the system library.
|
||||
if(WITH_PULSEAUDIO)
|
||||
find_package_wrapper(Pulse)
|
||||
set_and_warn_library_found("PulseAudio" PULSE_FOUND WITH_PULSEAUDIO)
|
||||
if(NOT PULSE_FOUND)
|
||||
set(WITH_PULSEAUDIO OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Audio IO
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
find_package_wrapper(Audaspace)
|
||||
set(AUDASPACE_FOUND ${AUDASPACE_FOUND} AND ${AUDASPACE_C_FOUND})
|
||||
set_and_warn_library_found("External Audaspace" AUDASPACE_FOUND WITH_SYSTEM_AUDASPACE)
|
||||
if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
|
||||
message(FATAL_ERROR "Audaspace external library not found!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_WAYLAND)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(xkbcommon xkbcommon)
|
||||
pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12)
|
||||
pkg_check_modules(wayland-egl REQUIRED wayland-egl)
|
||||
pkg_check_modules(wayland-scanner REQUIRED wayland-scanner)
|
||||
pkg_check_modules(xkbcommon REQUIRED xkbcommon)
|
||||
pkg_check_modules(wayland-cursor REQUIRED wayland-cursor)
|
||||
|
||||
# When dynamically linked WAYLAND is used and `${LIBDIR}/wayland` is present,
|
||||
# there is no need to search for the libraries as they are not needed for building.
|
||||
# Only the headers are needed which can reference the known paths.
|
||||
if(EXISTS "${LIBDIR}/wayland" AND WITH_GHOST_WAYLAND_DYNLOAD)
|
||||
set(_use_system_wayland OFF)
|
||||
else()
|
||||
set(_use_system_wayland ON)
|
||||
if(WITH_GHOST_WAYLAND_DBUS)
|
||||
pkg_check_modules(dbus REQUIRED dbus-1)
|
||||
endif()
|
||||
|
||||
if(_use_system_wayland)
|
||||
pkg_check_modules(wayland-client wayland-client>=1.12)
|
||||
pkg_check_modules(wayland-egl wayland-egl)
|
||||
pkg_check_modules(wayland-scanner wayland-scanner)
|
||||
pkg_check_modules(wayland-cursor wayland-cursor)
|
||||
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
else()
|
||||
# CentOS 7 packages have too old a version, a newer version exist in the
|
||||
# precompiled libraries.
|
||||
find_path(WAYLAND_PROTOCOLS_DIR
|
||||
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
||||
PATH_SUFFIXES share/wayland-protocols
|
||||
PATHS ${LIBDIR}/wayland-protocols
|
||||
if(WITH_GHOST_WAYLAND_LIBDECOR)
|
||||
pkg_check_modules(libdecor REQUIRED libdecor-0>=0.1)
|
||||
endif()
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
${xkbcommon_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
${wayland-client_LINK_LIBRARIES}
|
||||
${wayland-egl_LINK_LIBRARIES}
|
||||
${wayland-cursor_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
if(EXISTS ${WAYLAND_PROTOCOLS_DIR})
|
||||
set(wayland-protocols_FOUND ON)
|
||||
endif()
|
||||
|
||||
set(wayland-client_INCLUDE_DIRS "${LIBDIR}/wayland/include")
|
||||
set(wayland-egl_INCLUDE_DIRS "${LIBDIR}/wayland/include")
|
||||
set(wayland-cursor_INCLUDE_DIRS "${LIBDIR}/wayland/include")
|
||||
|
||||
set(wayland-client_FOUND ON)
|
||||
set(wayland-egl_FOUND ON)
|
||||
set(wayland-scanner_FOUND ON)
|
||||
set(wayland-cursor_FOUND ON)
|
||||
endif()
|
||||
mark_as_advanced(WAYLAND_PROTOCOLS_DIR)
|
||||
|
||||
set_and_warn_library_found("wayland-client" wayland-client_FOUND WITH_GHOST_WAYLAND)
|
||||
set_and_warn_library_found("wayland-egl" wayland-egl_FOUND WITH_GHOST_WAYLAND)
|
||||
set_and_warn_library_found("wayland-scanner" wayland-scanner_FOUND WITH_GHOST_WAYLAND)
|
||||
set_and_warn_library_found("wayland-cursor" wayland-cursor_FOUND WITH_GHOST_WAYLAND)
|
||||
set_and_warn_library_found("wayland-protocols" wayland-protocols_FOUND WITH_GHOST_WAYLAND)
|
||||
set_and_warn_library_found("xkbcommon" xkbcommon_FOUND WITH_GHOST_WAYLAND)
|
||||
if(WITH_GHOST_WAYLAND_DBUS)
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
${dbus_LINK_LIBRARIES}
|
||||
)
|
||||
add_definitions(-DWITH_GHOST_WAYLAND_DBUS)
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_WAYLAND)
|
||||
if(WITH_GHOST_WAYLAND_DBUS)
|
||||
pkg_check_modules(dbus REQUIRED dbus-1)
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_WAYLAND_LIBDECOR)
|
||||
if(_use_system_wayland)
|
||||
pkg_check_modules(libdecor REQUIRED libdecor-0>=0.1)
|
||||
else()
|
||||
set(libdecor_INCLUDE_DIRS "${LIBDIR}/wayland_libdecor/include/libdecor-0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_WAYLAND_DBUS)
|
||||
add_definitions(-DWITH_GHOST_WAYLAND_DBUS)
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_WAYLAND_LIBDECOR)
|
||||
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${LIBDIR}/wayland/bin/wayland-scanner")
|
||||
set(WAYLAND_SCANNER "${LIBDIR}/wayland/bin/wayland-scanner")
|
||||
else()
|
||||
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
||||
endif()
|
||||
mark_as_advanced(WAYLAND_SCANNER)
|
||||
|
||||
# When using dynamic loading, headers generated
|
||||
# from older versions of `wayland-scanner` aren't compatible.
|
||||
if(WITH_GHOST_WAYLAND_DYNLOAD)
|
||||
execute_process(
|
||||
COMMAND ${WAYLAND_SCANNER} --version
|
||||
# The version is written to the `stderr`.
|
||||
ERROR_VARIABLE _wayland_scanner_out
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
if(WITH_GHOST_WAYLAND_LIBDECOR)
|
||||
if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
${libdecor_LIBRARIES}
|
||||
)
|
||||
if(NOT "${_wayland_scanner_out}" STREQUAL "")
|
||||
string(
|
||||
REGEX REPLACE
|
||||
"^wayland-scanner[ \t]+([0-9]+)\.([0-9]+).*"
|
||||
"\\1.\\2"
|
||||
_wayland_scanner_ver
|
||||
"${_wayland_scanner_out}"
|
||||
)
|
||||
if("${_wayland_scanner_ver}" VERSION_LESS "1.20")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Found ${WAYLAND_SCANNER} version \"${_wayland_scanner_ver}\", "
|
||||
"the minimum version is 1.20!"
|
||||
)
|
||||
endif()
|
||||
unset(_wayland_scanner_ver)
|
||||
else()
|
||||
message(WARNING "Unable to access the version from ${WAYLAND_SCANNER}, continuing.")
|
||||
endif()
|
||||
unset(_wayland_scanner_out)
|
||||
endif()
|
||||
# End wayland-scanner version check.
|
||||
|
||||
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
|
||||
endif()
|
||||
|
||||
unset(_use_system_wayland)
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_X11)
|
||||
@@ -745,8 +685,12 @@ if(WITH_GHOST_X11)
|
||||
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
|
||||
mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
|
||||
|
||||
if(WITH_X11_XINPUT)
|
||||
if(NOT X11_Xinput_LIB)
|
||||
if(X11_Xinput_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "LibXi not found. Disable WITH_X11_XINPUT if you
|
||||
want to build without tablet support")
|
||||
endif()
|
||||
@@ -756,14 +700,18 @@ if(WITH_GHOST_X11)
|
||||
# XXX, why doesn't cmake make this available?
|
||||
find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
|
||||
mark_as_advanced(X11_Xxf86vmode_LIB)
|
||||
if(NOT X11_Xxf86vmode_LIB)
|
||||
if(X11_Xxf86vmode_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXxf86vm not found. Disable WITH_X11_XF86VMODE if you
|
||||
want to build without")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_X11_XFIXES)
|
||||
if(NOT X11_Xfixes_LIB)
|
||||
if(X11_Xfixes_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXfixes not found. Disable WITH_X11_XFIXES if you
|
||||
want to build without")
|
||||
endif()
|
||||
@@ -772,7 +720,9 @@ if(WITH_GHOST_X11)
|
||||
if(WITH_X11_ALPHA)
|
||||
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
|
||||
mark_as_advanced(X11_Xrender_LIB)
|
||||
if(NOT X11_Xrender_LIB)
|
||||
if(X11_Xrender_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you
|
||||
want to build without")
|
||||
endif()
|
||||
@@ -846,8 +796,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
"The mold linker could not find the directory containing the linker command "
|
||||
"(typically "
|
||||
"\"${MOLD_PREFIX}/libexec/mold/ld\") or "
|
||||
"\"${MOLD_PREFIX}/lib/mold/ld\") using system linker."
|
||||
)
|
||||
"\"${MOLD_PREFIX}/lib/mold/ld\") using system linker.")
|
||||
set(WITH_LINKER_MOLD OFF)
|
||||
endif()
|
||||
unset(MOLD_PREFIX)
|
||||
@@ -986,8 +935,7 @@ function(CONFIGURE_ATOMIC_LIB_IF_NEEDED)
|
||||
int main(int argc, char **argv) {
|
||||
std::atomic<uint64_t> uint64; uint64++;
|
||||
return 0;
|
||||
}"
|
||||
)
|
||||
}")
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITHOUT_LIBATOMIC)
|
||||
@@ -999,7 +947,6 @@ function(CONFIGURE_ATOMIC_LIB_IF_NEEDED)
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES atomic)
|
||||
check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITH_LIBATOMIC)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
if(ATOMIC_OPS_WITH_LIBATOMIC)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -latomic" PARENT_SCOPE)
|
||||
@@ -1012,17 +959,4 @@ function(CONFIGURE_ATOMIC_LIB_IF_NEEDED)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
configure_atomic_lib_if_needed()
|
||||
|
||||
if(PLATFORM_BUNDLED_LIBRARIES)
|
||||
# For the installed Python module and installed Blender executable, we set the
|
||||
# rpath to the relative path where the install step will copy the shared libraries.
|
||||
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
|
||||
list(APPEND CMAKE_INSTALL_RPATH $ORIGIN/lib)
|
||||
|
||||
# For executables that are built but not installed (mainly tests) we set an absolute
|
||||
# rpath to the lib folder. This is needed because these can be in different folders,
|
||||
# and because the build and install folder may be different.
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
list(APPEND CMAKE_BUILD_RPATH $ORIGIN/lib ${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib)
|
||||
endif()
|
||||
CONFIGURE_ATOMIC_LIB_IF_NEEDED()
|
||||
|
@@ -26,7 +26,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(OPENMP_FOUND ON)
|
||||
set(OpenMP_C_FLAGS "/clang:-fopenmp")
|
||||
set(OpenMP_CXX_FLAGS "/clang:-fopenmp")
|
||||
get_filename_component(LLVMROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\LLVM\\LLVM;]" ABSOLUTE CACHE)
|
||||
GET_FILENAME_COMPONENT(LLVMROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\LLVM\\LLVM;]" ABSOLUTE CACHE)
|
||||
set(CLANG_OPENMP_DLL "${LLVMROOT}/bin/libomp.dll")
|
||||
set(CLANG_OPENMP_LIB "${LLVMROOT}/lib/libomp.lib")
|
||||
if(NOT EXISTS "${CLANG_OPENMP_DLL}")
|
||||
@@ -74,6 +74,27 @@ add_definitions(-DWIN32)
|
||||
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
||||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
||||
|
||||
# Minimum MSVC Version
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(_min_ver "18.0.31101")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2013 (Update 4, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
if(MSVC_VERSION EQUAL 1900)
|
||||
set(_min_ver "19.0.24210")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2015 (Update 3, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
unset(_min_ver)
|
||||
|
||||
# needed for some MSVC installations
|
||||
# 4099 : PDB 'filename' was not found with 'object/library'
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /SAFESEH:NO /ignore:4099")
|
||||
@@ -125,7 +146,7 @@ endif()
|
||||
if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28.29828)
|
||||
#set a flag so we don't have to do this comparison all the time
|
||||
set(MSVC_ASAN ON)
|
||||
SET(MSVC_ASAN ON)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address")
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO")
|
||||
@@ -137,7 +158,7 @@ endif()
|
||||
|
||||
|
||||
# C++ standards conformace (/permissive-) is available on msvc 15.5 (1912) and up
|
||||
if(NOT MSVC_CLANG)
|
||||
if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG)
|
||||
string(APPEND CMAKE_CXX_FLAGS " /permissive-")
|
||||
# Two-phase name lookup does not place nicely with OpenMP yet, so disable for now
|
||||
string(APPEND CMAKE_CXX_FLAGS " /Zc:twoPhase-")
|
||||
@@ -150,11 +171,10 @@ endif()
|
||||
|
||||
# Debug Symbol format
|
||||
# sccache # MSVC_ASAN # format # why
|
||||
# ON # ON # Z7 # sccache will only play nice with Z7.
|
||||
# ON # OFF # Z7 # sccache will only play nice with Z7.
|
||||
# OFF # ON # Zi # Asan will not play nice with Edit and Continue.
|
||||
# OFF # OFF # ZI # Neither ASAN nor sscache is enabled Edit and
|
||||
# Continue is available.
|
||||
# ON # ON # Z7 # sccache will only play nice with Z7
|
||||
# ON # OFF # Z7 # sccache will only play nice with Z7
|
||||
# OFF # ON # Zi # Asan will not play nice with Edit and Continue
|
||||
# OFF # OFF # ZI # Neither asan nor sscache is enabled Edit and Continue is available
|
||||
|
||||
# Release Symbol format
|
||||
# sccache # MSVC_ASAN # format # why
|
||||
@@ -165,20 +185,20 @@ endif()
|
||||
|
||||
|
||||
if(WITH_WINDOWS_SCCACHE)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER sccache)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
|
||||
set(SYMBOL_FORMAT /Z7)
|
||||
set(SYMBOL_FORMAT_RELEASE /Z7)
|
||||
else()
|
||||
unset(CMAKE_C_COMPILER_LAUNCHER)
|
||||
unset(CMAKE_CXX_COMPILER_LAUNCHER)
|
||||
if(MSVC_ASAN)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER sccache)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
|
||||
set(SYMBOL_FORMAT /Z7)
|
||||
set(SYMBOL_FORMAT_RELEASE /Z7)
|
||||
else()
|
||||
set(SYMBOL_FORMAT /ZI)
|
||||
set(SYMBOL_FORMAT_RELEASE /Zi)
|
||||
endif()
|
||||
else()
|
||||
unset(CMAKE_C_COMPILER_LAUNCHER)
|
||||
unset(CMAKE_CXX_COMPILER_LAUNCHER)
|
||||
if(MSVC_ASAN)
|
||||
set(SYMBOL_FORMAT /Z7)
|
||||
set(SYMBOL_FORMAT_RELEASE /Z7)
|
||||
else()
|
||||
set(SYMBOL_FORMAT /ZI)
|
||||
set(SYMBOL_FORMAT_RELEASE /Zi)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_WINDOWS_PDB)
|
||||
@@ -198,7 +218,7 @@ unset(SYMBOL_FORMAT)
|
||||
unset(SYMBOL_FORMAT_RELEASE)
|
||||
|
||||
# JMC is available on msvc 15.8 (1915) and up
|
||||
if(NOT MSVC_CLANG)
|
||||
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
|
||||
string(APPEND CMAKE_CXX_FLAGS_DEBUG " /JMC")
|
||||
endif()
|
||||
|
||||
@@ -231,6 +251,9 @@ if(NOT DEFINED LIBDIR)
|
||||
elseif(MSVC_VERSION GREATER 1919)
|
||||
message(STATUS "Visual Studio 2019 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc15)
|
||||
elseif(MSVC_VERSION GREATER 1909)
|
||||
message(STATUS "Visual Studio 2017 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc15)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
@@ -241,8 +264,10 @@ endif()
|
||||
|
||||
include(platform_old_libs_update)
|
||||
|
||||
# Only supported in the VS IDE & Clang Tidy needs to be on.
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio.+" AND WITH_CLANG_TIDY)
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio.+" AND # Only supported in the VS IDE
|
||||
MSVC_VERSION GREATER_EQUAL 1924 AND # Supported for 16.4+
|
||||
WITH_CLANG_TIDY # And Clang Tidy needs to be on
|
||||
)
|
||||
set(CMAKE_VS_GLOBALS
|
||||
"RunCodeAnalysis=false"
|
||||
"EnableMicrosoftCodeAnalysis=false"
|
||||
@@ -253,7 +278,8 @@ endif()
|
||||
|
||||
# Mark libdir as system headers with a lower warn level, to resolve some warnings
|
||||
# that we have very little control over
|
||||
if(NOT MSVC_CLANG AND # Available with MSVC 15.7+ but not for CLANG.
|
||||
if(MSVC_VERSION GREATER_EQUAL 1914 AND # Available with 15.7+
|
||||
NOT MSVC_CLANG AND # But not for clang
|
||||
NOT WITH_WINDOWS_SCCACHE AND # And not when sccache is enabled
|
||||
NOT VS_CLANG_TIDY) # Clang-tidy does not like these options
|
||||
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
|
||||
@@ -297,13 +323,6 @@ if(NOT JPEG_FOUND)
|
||||
set(JPEG_LIBRARIES ${LIBDIR}/jpeg/lib/libjpeg.lib)
|
||||
endif()
|
||||
|
||||
set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy)
|
||||
windows_find_package(Epoxy REQUIRED)
|
||||
if(NOT EPOXY_FOUND)
|
||||
set(Epoxy_INCLUDE_DIRS ${LIBDIR}/epoxy/include)
|
||||
set(Epoxy_LIBRARIES ${LIBDIR}/epoxy/lib/epoxy.lib)
|
||||
endif()
|
||||
|
||||
set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
|
||||
set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC3.lib)
|
||||
|
||||
@@ -327,10 +346,18 @@ if(WITH_FFTW3)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_WEBP)
|
||||
set(WEBP_INCLUDE_DIRS ${LIBDIR}/webp/include)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
set(WEBP_LIBRARIES ${LIBDIR}/webp/lib/webp.lib ${LIBDIR}/webp/lib/webpdemux.lib ${LIBDIR}/webp/lib/webpmux.lib)
|
||||
set(WEBP_FOUND ON)
|
||||
windows_find_package(WebP)
|
||||
if(NOT WEBP_FOUND)
|
||||
if(EXISTS ${LIBDIR}/webp)
|
||||
set(WEBP_INCLUDE_DIRS ${LIBDIR}/webp/include)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
set(WEBP_LIBRARIES ${LIBDIR}/webp/lib/webp.lib ${LIBDIR}/webp/lib/webpdemux.lib ${LIBDIR}/webp/lib/webpmux.lib)
|
||||
set(WEBP_FOUND ON)
|
||||
else()
|
||||
message(STATUS "WITH_IMAGE_WEBP is ON but WEBP libraries are not found, setting WITH_IMAGE_WEBP=OFF")
|
||||
set(WITH_IMAGE_WEBP OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
@@ -392,7 +419,7 @@ if(WITH_CODEC_FFMPEG)
|
||||
${LIBDIR}/ffmpeg/lib/avdevice.lib
|
||||
${LIBDIR}/ffmpeg/lib/avutil.lib
|
||||
${LIBDIR}/ffmpeg/lib/swscale.lib
|
||||
)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -419,7 +446,7 @@ if(WITH_IMAGE_OPENEXR)
|
||||
warn_hardcoded_paths(OpenEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${IMATH_INCLUDE_DIRS} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${IMATH_INCLUDE_DIRS} ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
# Check if the 3.x library name exists
|
||||
# if not assume this is a 2.x library folder
|
||||
@@ -473,16 +500,12 @@ if(WITH_JACK)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# Cache version for make_bpy_wheel.py to detect.
|
||||
unset(PYTHON_VERSION CACHE)
|
||||
set(PYTHON_VERSION "3.10" CACHE STRING "Python version")
|
||||
SET(PYTHON_VERSION 3.10 CACHE STRING "Python Version (major and minor only)")
|
||||
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
set(PYTHON_LIBRARY_DEBUG ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}_d.lib)
|
||||
|
||||
set(PYTHON_EXECUTABLE ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/bin/python$<$<CONFIG:Debug>:_d>.exe)
|
||||
|
||||
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/include)
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/lib/site-packages/numpy/core/include)
|
||||
set(NUMPY_FOUND ON)
|
||||
@@ -545,14 +568,12 @@ if(WITH_BOOST)
|
||||
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized ${BOOST_LIBPATH}/libboost_wave-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized ${BOOST_LIBPATH}/libboost_locale-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_locale-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
debug ${BOOST_LIBPATH}/libboost_locale-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
else() # we found boost using find_package
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
@@ -568,8 +589,7 @@ if(WITH_OPENIMAGEIO)
|
||||
if(NOT OpenImageIO_FOUND)
|
||||
set(OPENIMAGEIO ${LIBDIR}/OpenImageIO)
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_INCLUDE_DIR ${OPENIMAGEIO}/include)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OIIO_OPTIMIZED optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO.lib optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util.lib)
|
||||
set(OIIO_DEBUG debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_d.lib debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util_d.lib)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
||||
@@ -660,8 +680,7 @@ if(WITH_OPENIMAGEDENOISE)
|
||||
optimized ${OPENIMAGEDENOISE_LIBPATH}/dnnl.lib
|
||||
debug ${OPENIMAGEDENOISE_LIBPATH}/OpenImageDenoise_d.lib
|
||||
debug ${OPENIMAGEDENOISE_LIBPATH}/common_d.lib
|
||||
debug ${OPENIMAGEDENOISE_LIBPATH}/dnnl_d.lib
|
||||
)
|
||||
debug ${OPENIMAGEDENOISE_LIBPATH}/dnnl_d.lib)
|
||||
set(OPENIMAGEDENOISE_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
@@ -731,7 +750,7 @@ if(WITH_TBB)
|
||||
endif()
|
||||
|
||||
# used in many places so include globally, like OpenGL
|
||||
include_directories(SYSTEM "${PTHREADS_INCLUDE_DIRS}")
|
||||
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
|
||||
|
||||
set(WINTAB_INC ${LIBDIR}/wintab/include)
|
||||
|
||||
@@ -764,11 +783,9 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_NOISE NAMES oslnoise PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_EXEC_DEBUG NAMES oslexec_d PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_COMP_DEBUG NAMES oslcomp_d PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_QUERY_DEBUG NAMES oslquery_d PATHS ${CYCLES_OSL}/lib)
|
||||
find_library(OSL_LIB_NOISE_DEBUG NAMES oslnoise_d PATHS ${CYCLES_OSL}/lib)
|
||||
list(APPEND OSL_LIBRARIES
|
||||
optimized ${OSL_LIB_COMP}
|
||||
optimized ${OSL_LIB_EXEC}
|
||||
@@ -778,22 +795,15 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
debug ${OSL_LIB_QUERY_DEBUG}
|
||||
${PUGIXML_LIBRARIES}
|
||||
)
|
||||
if(OSL_LIB_NOISE)
|
||||
list(APPEND OSL_LIBRARIES optimized ${OSL_LIB_NOISE})
|
||||
endif()
|
||||
if(OSL_LIB_NOISE_DEBUG)
|
||||
list(APPEND OSL_LIBRARIES debug ${OSL_LIB_NOISE_DEBUG})
|
||||
endif()
|
||||
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
|
||||
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
|
||||
file(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MAJOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+[0-9]+.*$")
|
||||
file(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MINOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+[0-9]+.*$")
|
||||
string(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR})
|
||||
string(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR})
|
||||
|
||||
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
|
||||
set(OSL_FOUND TRUE)
|
||||
else()
|
||||
message(STATUS "OSL not found")
|
||||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
@@ -819,8 +829,7 @@ if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
debug ${LIBDIR}/embree/lib/math_d.lib
|
||||
debug ${LIBDIR}/embree/lib/simd_d.lib
|
||||
debug ${LIBDIR}/embree/lib/sys_d.lib
|
||||
debug ${LIBDIR}/embree/lib/tasking_d.lib
|
||||
)
|
||||
debug ${LIBDIR}/embree/lib/tasking_d.lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -847,8 +856,8 @@ endif()
|
||||
|
||||
if(WINDOWS_PYTHON_DEBUG)
|
||||
# Include the system scripts in the blender_python_system_scripts project.
|
||||
file(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/release/scripts/*.*" )
|
||||
add_custom_target(blender_python_system_scripts SOURCES ${inFiles})
|
||||
FILE(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/release/scripts/*.*" )
|
||||
ADD_CUSTOM_TARGET(blender_python_system_scripts SOURCES ${inFiles})
|
||||
foreach(_source IN ITEMS ${inFiles})
|
||||
get_filename_component(_source_path "${_source}" PATH)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/release/scripts/" "" _source_path "${_source_path}")
|
||||
@@ -868,8 +877,8 @@ if(WINDOWS_PYTHON_DEBUG)
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH ${USER_SCRIPTS_ROOT} USER_SCRIPTS_ROOT)
|
||||
file(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/*.*" )
|
||||
add_custom_target(blender_python_user_scripts SOURCES ${inFiles})
|
||||
FILE(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/*.*" )
|
||||
ADD_CUSTOM_TARGET(blender_python_user_scripts SOURCES ${inFiles})
|
||||
foreach(_source IN ITEMS ${inFiles})
|
||||
get_filename_component(_source_path "${_source}" PATH)
|
||||
string(REPLACE "${USER_SCRIPTS_ROOT}" "" _source_path "${_source_path}")
|
||||
@@ -893,16 +902,21 @@ if(WINDOWS_PYTHON_DEBUG)
|
||||
endif()
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
set(XR_OPENXR_SDK ${LIBDIR}/xr_openxr_sdk)
|
||||
set(XR_OPENXR_SDK_LIBPATH ${LIBDIR}/xr_openxr_sdk/lib)
|
||||
set(XR_OPENXR_SDK_INCLUDE_DIR ${XR_OPENXR_SDK}/include)
|
||||
# This is the old name of this library, it is checked to
|
||||
# support the transition between the old and new lib versions
|
||||
# this can be removed after the next lib update.
|
||||
if(EXISTS ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
|
||||
set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
|
||||
if(EXISTS ${LIBDIR}/xr_openxr_sdk)
|
||||
set(XR_OPENXR_SDK ${LIBDIR}/xr_openxr_sdk)
|
||||
set(XR_OPENXR_SDK_LIBPATH ${LIBDIR}/xr_openxr_sdk/lib)
|
||||
set(XR_OPENXR_SDK_INCLUDE_DIR ${XR_OPENXR_SDK}/include)
|
||||
# This is the old name of this library, it is checked to
|
||||
# support the transition between the old and new lib versions
|
||||
# this can be removed after the next lib update.
|
||||
if(EXISTS ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
|
||||
set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
|
||||
else()
|
||||
set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loaderd.lib)
|
||||
endif()
|
||||
else()
|
||||
set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loaderd.lib)
|
||||
message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR")
|
||||
set(WITH_XR_OPENXR OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -920,65 +934,19 @@ if(WITH_POTRACE)
|
||||
endif()
|
||||
|
||||
if(WITH_HARU)
|
||||
set(HARU_FOUND ON)
|
||||
set(HARU_ROOT_DIR ${LIBDIR}/haru)
|
||||
set(HARU_INCLUDE_DIRS ${HARU_ROOT_DIR}/include)
|
||||
set(HARU_LIBRARIES ${HARU_ROOT_DIR}/lib/libhpdfs.lib)
|
||||
endif()
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
if(EXISTS ${LIBDIR}/vulkan)
|
||||
set(VULKAN_FOUND On)
|
||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan)
|
||||
set(VULKAN_INCLUDE_DIR ${VULKAN_ROOT_DIR}/include)
|
||||
set(VULKAN_INCLUDE_DIRS ${VULKAN_INCLUDE_DIR})
|
||||
set(VULKAN_LIBRARY ${VULKAN_ROOT_DIR}/lib/vulkan-1.lib)
|
||||
set(VULKAN_LIBRARIES ${VULKAN_LIBRARY})
|
||||
if(EXISTS ${LIBDIR}/haru)
|
||||
set(HARU_FOUND ON)
|
||||
set(HARU_ROOT_DIR ${LIBDIR}/haru)
|
||||
set(HARU_INCLUDE_DIRS ${HARU_ROOT_DIR}/include)
|
||||
set(HARU_LIBRARIES ${HARU_ROOT_DIR}/lib/libhpdfs.lib)
|
||||
else()
|
||||
message(WARNING "Vulkan SDK was not found, disabling WITH_VULKAN_BACKEND")
|
||||
set(WITH_VULKAN_BACKEND OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)
|
||||
find_package(openpgl QUIET)
|
||||
if(openpgl_FOUND)
|
||||
get_target_property(OPENPGL_LIBRARIES_RELEASE openpgl::openpgl LOCATION_RELEASE)
|
||||
get_target_property(OPENPGL_LIBRARIES_DEBUG openpgl::openpgl LOCATION_DEBUG)
|
||||
set(OPENPGL_LIBRARIES optimized ${OPENPGL_LIBRARIES_RELEASE} debug ${OPENPGL_LIBRARIES_DEBUG})
|
||||
get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES)
|
||||
else()
|
||||
set(WITH_CYCLES_PATH_GUIDING OFF)
|
||||
message(STATUS "OpenPGL not found, disabling WITH_CYCLES_PATH_GUIDING")
|
||||
message(WARNING "Haru was not found, disabling WITH_HARU")
|
||||
set(WITH_HARU OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ZSTD_INCLUDE_DIRS ${LIBDIR}/zstd/include)
|
||||
set(ZSTD_LIBRARIES ${LIBDIR}/zstd/lib/zstd_static.lib)
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
||||
set(LEVEL_ZERO_ROOT_DIR ${LIBDIR}/level_zero)
|
||||
set(CYCLES_SYCL ${LIBDIR}/dpcpp CACHE PATH "Path to oneAPI DPC++ compiler")
|
||||
if(EXISTS ${CYCLES_SYCL} AND NOT SYCL_ROOT_DIR)
|
||||
set(SYCL_ROOT_DIR ${CYCLES_SYCL})
|
||||
endif()
|
||||
file(GLOB _sycl_runtime_libraries_glob
|
||||
${SYCL_ROOT_DIR}/bin/sycl.dll
|
||||
${SYCL_ROOT_DIR}/bin/sycl[0-9].dll
|
||||
)
|
||||
foreach(sycl_runtime_library IN LISTS _sycl_runtime_libraries_glob)
|
||||
string(REPLACE ".dll" "$<$<CONFIG:Debug>:d>.dll" sycl_runtime_library ${sycl_runtime_library})
|
||||
list(APPEND _sycl_runtime_libraries ${sycl_runtime_library})
|
||||
endforeach()
|
||||
unset(_sycl_runtime_libraries_glob)
|
||||
|
||||
file(GLOB _sycl_pi_runtime_libraries_glob
|
||||
${SYCL_ROOT_DIR}/bin/pi_*.dll
|
||||
)
|
||||
list(REMOVE_ITEM _sycl_pi_runtime_libraries_glob "${SYCL_ROOT_DIR}/bin/pi_opencl.dll")
|
||||
list (APPEND _sycl_runtime_libraries ${_sycl_pi_runtime_libraries_glob})
|
||||
unset(_sycl_pi_runtime_libraries_glob)
|
||||
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_sycl_runtime_libraries})
|
||||
unset(_sycl_runtime_libraries)
|
||||
endif()
|
||||
set(LEVEL_ZERO_ROOT_DIR ${LIBDIR}/level_zero)
|
||||
set(SYCL_ROOT_DIR ${LIBDIR}/dpcpp)
|
||||
|
@@ -3,22 +3,20 @@
|
||||
# First generate the manifest for tests since it will not need the dependency on the CRT.
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest @ONLY)
|
||||
|
||||
# Always detect system libraries, since they are also used by oneAPI.
|
||||
# But don't always install them, only for WITH_WINDOWS_BUNDLE_CRT=ON.
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
|
||||
|
||||
# This sometimes can change when updates are installed and the compiler version
|
||||
# changes, so test if it exists and if not, give InstallRequiredSystemLibraries
|
||||
# another chance to figure out the path.
|
||||
if(MSVC_REDIST_DIR AND NOT EXISTS "${MSVC_REDIST_DIR}")
|
||||
unset(MSVC_REDIST_DIR CACHE)
|
||||
endif()
|
||||
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
if(WITH_WINDOWS_BUNDLE_CRT)
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
|
||||
|
||||
# This sometimes can change when updates are installed and the compiler version
|
||||
# changes, so test if it exists and if not, give InstallRequiredSystemLibraries
|
||||
# another chance to figure out the path.
|
||||
if(MSVC_REDIST_DIR AND NOT EXISTS "${MSVC_REDIST_DIR}")
|
||||
unset(MSVC_REDIST_DIR CACHE)
|
||||
endif()
|
||||
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
# ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
|
||||
# redirects for this dll, for details see T88813.
|
||||
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
||||
|
@@ -30,8 +30,6 @@ from typing import (
|
||||
cast,
|
||||
)
|
||||
|
||||
import shlex
|
||||
|
||||
|
||||
SOURCE_DIR = join(dirname(__file__), "..", "..")
|
||||
SOURCE_DIR = normpath(SOURCE_DIR)
|
||||
@@ -162,7 +160,7 @@ def build_info(
|
||||
|
||||
for c in compilers:
|
||||
args = args.replace(c, fake_compiler)
|
||||
args = shlex.split(args)
|
||||
args = args.split()
|
||||
# end
|
||||
|
||||
# remove compiler
|
||||
|
@@ -5,38 +5,38 @@
|
||||
update-code:
|
||||
git:
|
||||
submodules:
|
||||
- branch: master
|
||||
- branch: blender-v3.3-release
|
||||
commit_id: HEAD
|
||||
path: release/scripts/addons
|
||||
- branch: master
|
||||
- branch: blender-v3.3-release
|
||||
commit_id: HEAD
|
||||
path: release/scripts/addons_contrib
|
||||
- branch: master
|
||||
- branch: blender-v3.3-release
|
||||
commit_id: HEAD
|
||||
path: release/datafiles/locale
|
||||
- branch: master
|
||||
- branch: blender-v3.3-release
|
||||
commit_id: HEAD
|
||||
path: source/tools
|
||||
svn:
|
||||
libraries:
|
||||
darwin-arm64:
|
||||
branch: trunk
|
||||
branch: tags/blender-3.3-release
|
||||
commit_id: HEAD
|
||||
path: lib/darwin_arm64
|
||||
darwin-x86_64:
|
||||
branch: trunk
|
||||
branch: tags/blender-3.3-release
|
||||
commit_id: HEAD
|
||||
path: lib/darwin
|
||||
linux-x86_64:
|
||||
branch: trunk
|
||||
branch: tags/blender-3.3-release
|
||||
commit_id: HEAD
|
||||
path: lib/linux_centos7_x86_64
|
||||
windows-amd64:
|
||||
branch: trunk
|
||||
branch: tags/blender-3.3-release
|
||||
commit_id: HEAD
|
||||
path: lib/win64_vc15
|
||||
tests:
|
||||
branch: trunk
|
||||
branch: tags/blender-3.3-release
|
||||
commit_id: HEAD
|
||||
path: lib/tests
|
||||
benchmarks:
|
||||
@@ -58,8 +58,6 @@ buildbot:
|
||||
version: '5.3.22480'
|
||||
optix:
|
||||
version: '7.3.0'
|
||||
ocloc:
|
||||
version: '101.3430'
|
||||
cmake:
|
||||
default:
|
||||
version: any
|
||||
|
@@ -1,246 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
"""
|
||||
Make Python wheel package (`*.whl`) file from Blender built with 'WITH_PYTHON_MODULE' enabled.
|
||||
|
||||
Example
|
||||
=======
|
||||
|
||||
If the "bpy" module was build on Linux using the command:
|
||||
|
||||
make bpy lite
|
||||
|
||||
The command to package it as a wheel is:
|
||||
|
||||
./build_files/utils/make_bpy_wheel.py ../build_linux_bpy_lite/bin --output-dir=./
|
||||
|
||||
This will create a `*.whl` file in the current directory.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import make_utils
|
||||
import os
|
||||
import re
|
||||
import platform
|
||||
import string
|
||||
import setuptools # type: ignore
|
||||
import sys
|
||||
|
||||
from typing import (
|
||||
Generator,
|
||||
List,
|
||||
Optional,
|
||||
Sequence,
|
||||
Tuple,
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Long Description
|
||||
|
||||
long_description = """# Blender
|
||||
|
||||
[Blender](https://www.blender.org) is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing.
|
||||
|
||||
This package provides Blender as a Python module for use in studio pipelines, web services, scientific research, and more.
|
||||
|
||||
## Documentation
|
||||
|
||||
* [Blender Python API](https://docs.blender.org/api/current/)
|
||||
* [Blender as a Python Module](https://docs.blender.org/api/current/info_advanced_blender_as_bpy.html)
|
||||
|
||||
## Requirements
|
||||
|
||||
[System requirements](https://www.blender.org/download/requirements/) are the same as Blender.
|
||||
|
||||
Each Blender release supports one Python version, and the package is only compatible with that version."""
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Generic Functions
|
||||
|
||||
def find_dominating_file(
|
||||
path: str,
|
||||
search: Sequence[str],
|
||||
) -> str:
|
||||
while True:
|
||||
for d in search:
|
||||
if os.path.exists(os.path.join(path, d)):
|
||||
return os.path.join(path, d)
|
||||
path_next = os.path.normpath(os.path.join(path, ".."))
|
||||
if path == path_next:
|
||||
break
|
||||
path = path_next
|
||||
return ""
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# CMake Cache Access
|
||||
|
||||
def cmake_cache_var_iter(filepath_cmake_cache: str) -> Generator[Tuple[str, str, str], None, None]:
|
||||
import re
|
||||
re_cache = re.compile(r"([A-Za-z0-9_\-]+)?:?([A-Za-z0-9_\-]+)?=(.*)$")
|
||||
with open(filepath_cmake_cache, "r", encoding="utf-8") as cache_file:
|
||||
for l in cache_file:
|
||||
match = re_cache.match(l.strip())
|
||||
if match is not None:
|
||||
var, type_, val = match.groups()
|
||||
yield (var, type_ or "", val)
|
||||
|
||||
|
||||
def cmake_cache_var(filepath_cmake_cache: str, var: str) -> Optional[str]:
|
||||
for var_iter, type_iter, value_iter in cmake_cache_var_iter(filepath_cmake_cache):
|
||||
if var == var_iter:
|
||||
return value_iter
|
||||
return None
|
||||
|
||||
|
||||
def cmake_cache_var_or_exit(filepath_cmake_cache: str, var: str) -> str:
|
||||
value = cmake_cache_var(filepath_cmake_cache, var)
|
||||
if value is None:
|
||||
sys.stderr.write("Unable to find %r in %r, abort!\n" % (var, filepath_cmake_cache))
|
||||
sys.exit(1)
|
||||
return value
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Argument Parser
|
||||
|
||||
def argparse_create() -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawTextHelpFormatter)
|
||||
parser.add_argument(
|
||||
"install_dir",
|
||||
metavar='INSTALL_DIR',
|
||||
type=str,
|
||||
help="The installation directory containing the \"bpy\" package.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--build-dir",
|
||||
metavar='BUILD_DIR',
|
||||
default=None,
|
||||
help="The build directory containing 'CMakeCache.txt' (search parent directories of INSTALL_DIR when omitted).",
|
||||
required=False,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--output-dir",
|
||||
metavar='OUTPUT_DIR',
|
||||
default=None,
|
||||
help="The destination directory for the '*.whl' file (use INSTALL_DIR when omitted).",
|
||||
required=False,
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Main Function
|
||||
|
||||
def main() -> None:
|
||||
|
||||
# Parse arguments.
|
||||
args = argparse_create().parse_args()
|
||||
|
||||
install_dir = os.path.abspath(args.install_dir)
|
||||
output_dir = os.path.abspath(args.output_dir) if args.output_dir else install_dir
|
||||
|
||||
if args.build_dir:
|
||||
build_dir = os.path.abspath(args.build_dir)
|
||||
filepath_cmake_cache = os.path.join(build_dir, "CMakeCache.txt")
|
||||
del build_dir
|
||||
if not os.path.exists(filepath_cmake_cache):
|
||||
sys.stderr.write("File not found %r, abort!\n" % filepath_cmake_cache)
|
||||
sys.exit(1)
|
||||
else:
|
||||
filepath_cmake_cache = find_dominating_file(install_dir, ("CMakeCache.txt",))
|
||||
if not filepath_cmake_cache:
|
||||
# Should never fail.
|
||||
sys.stderr.write("Unable to find CMakeCache.txt in or above %r, abort!\n" % install_dir)
|
||||
sys.exit(1)
|
||||
|
||||
# Get the major and minor Python version.
|
||||
python_version = cmake_cache_var_or_exit(filepath_cmake_cache, "PYTHON_VERSION")
|
||||
python_version_number = (
|
||||
tuple(int("".join(c for c in digit if c in string.digits)) for digit in python_version.split(".")) +
|
||||
# Support version without a minor version "3" (add zero).
|
||||
tuple((0, 0, 0))
|
||||
)
|
||||
python_version_str = "%d.%d" % python_version_number[:2]
|
||||
|
||||
# Get Blender version.
|
||||
blender_version_str = str(make_utils.parse_blender_version())
|
||||
|
||||
# Set platform tag following conventions.
|
||||
if sys.platform == "darwin":
|
||||
target = cmake_cache_var_or_exit(filepath_cmake_cache, "CMAKE_OSX_DEPLOYMENT_TARGET").split(".")
|
||||
machine = cmake_cache_var_or_exit(filepath_cmake_cache, "CMAKE_OSX_ARCHITECTURES")
|
||||
platform_tag = "macosx_%d_%d_%s" % (int(target[0]), int(target[1]), machine)
|
||||
elif sys.platform == "win32":
|
||||
platform_tag = "win_%s" % (platform.machine().lower())
|
||||
elif sys.platform == "linux":
|
||||
glibc = os.confstr("CS_GNU_LIBC_VERSION")
|
||||
if glibc is None:
|
||||
sys.stderr.write("Unable to find \"CS_GNU_LIBC_VERSION\", abort!\n")
|
||||
sys.exit(1)
|
||||
glibc = "%s_%s" % tuple(glibc.split()[1].split(".")[:2])
|
||||
platform_tag = "manylinux_%s_%s" % (glibc, platform.machine().lower())
|
||||
else:
|
||||
sys.stderr.write("Unsupported platform: %s, abort!\n" % (sys.platform))
|
||||
sys.exit(1)
|
||||
|
||||
os.chdir(install_dir)
|
||||
|
||||
# Include all files recursively.
|
||||
def package_files(root_dir: str) -> List[str]:
|
||||
paths = []
|
||||
for path, dirs, files in os.walk(root_dir):
|
||||
paths += [os.path.join("..", path, f) for f in files]
|
||||
return paths
|
||||
|
||||
# Ensure this wheel is marked platform specific.
|
||||
class BinaryDistribution(setuptools.dist.Distribution): # type: ignore
|
||||
def has_ext_modules(self) -> bool:
|
||||
return True
|
||||
|
||||
# Build wheel.
|
||||
sys.argv = [sys.argv[0], "bdist_wheel"]
|
||||
|
||||
setuptools.setup(
|
||||
name="bpy",
|
||||
version=blender_version_str,
|
||||
install_requires=["cython", "numpy", "requests", "zstandard"],
|
||||
python_requires="==%d.%d.*" % (python_version_number[0], python_version_number[1]),
|
||||
packages=["bpy"],
|
||||
package_data={"": package_files("bpy")},
|
||||
distclass=BinaryDistribution,
|
||||
options={"bdist_wheel": {"plat_name": platform_tag}},
|
||||
|
||||
description="Blender as a Python module",
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
license="GPL-3.0",
|
||||
author="Blender Foundation",
|
||||
author_email="bf-committers@blender.org",
|
||||
url="https://www.blender.org"
|
||||
)
|
||||
|
||||
if not os.path.exists(output_dir):
|
||||
os.makedirs(output_dir)
|
||||
|
||||
# Move wheel to output directory.
|
||||
dist_dir = os.path.join(install_dir, "dist")
|
||||
for f in os.listdir(dist_dir):
|
||||
if f.endswith(".whl"):
|
||||
blender_py = "cp%d%d" % (python_version_number[0], python_version_number[1])
|
||||
|
||||
# No apparent way to override this ABI version with setuptools, so rename.
|
||||
sys_py = "cp%d%d" % (sys.version_info.major, sys.version_info.minor)
|
||||
if hasattr(sys, "abiflags"):
|
||||
sys_py_abi = sys_py + sys.abiflags
|
||||
renamed_f = f.replace(sys_py_abi, blender_py).replace(sys_py, blender_py)
|
||||
else:
|
||||
renamed_f = f.replace(sys_py, blender_py)
|
||||
|
||||
os.rename(os.path.join(dist_dir, f), os.path.join(output_dir, renamed_f))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import argparse
|
||||
import make_utils
|
||||
import dataclasses
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
@@ -19,8 +19,6 @@ from typing import Iterable, TextIO, Optional, Any, Union
|
||||
SKIP_NAMES = {
|
||||
".gitignore",
|
||||
".gitmodules",
|
||||
".gitattributes",
|
||||
".git-blame-ignore-revs",
|
||||
".arcconfig",
|
||||
".svn",
|
||||
}
|
||||
@@ -52,7 +50,7 @@ def main() -> None:
|
||||
|
||||
print(f"Output dir: {curdir}")
|
||||
|
||||
version = make_utils.parse_blender_version()
|
||||
version = parse_blender_version(blender_srcdir)
|
||||
tarball = tarball_path(curdir, version, cli_args)
|
||||
manifest = manifest_path(tarball)
|
||||
packages_dir = packages_path(curdir, cli_args)
|
||||
@@ -64,7 +62,53 @@ def main() -> None:
|
||||
print("Done!")
|
||||
|
||||
|
||||
def tarball_path(output_dir: Path, version: make_utils.BlenderVersion, cli_args: Any) -> Path:
|
||||
@dataclasses.dataclass
|
||||
class BlenderVersion:
|
||||
version: int # 293 for 2.93.1
|
||||
patch: int # 1 for 2.93.1
|
||||
cycle: str # 'alpha', 'beta', 'release', maybe others.
|
||||
|
||||
@property
|
||||
def is_release(self) -> bool:
|
||||
return self.cycle == "release"
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""Convert to version string.
|
||||
|
||||
>>> str(BlenderVersion(293, 1, "alpha"))
|
||||
'2.93.1-alpha'
|
||||
>>> str(BlenderVersion(327, 0, "release"))
|
||||
'3.27.0'
|
||||
"""
|
||||
version_major = self.version // 100
|
||||
version_minor = self.version % 100
|
||||
as_string = f"{version_major}.{version_minor}.{self.patch}"
|
||||
if self.is_release:
|
||||
return as_string
|
||||
return f"{as_string}-{self.cycle}"
|
||||
|
||||
|
||||
def parse_blender_version(blender_srcdir: Path) -> BlenderVersion:
|
||||
version_path = blender_srcdir / "source/blender/blenkernel/BKE_blender_version.h"
|
||||
|
||||
version_info = {}
|
||||
line_re = re.compile(r"^#define (BLENDER_VERSION[A-Z_]*)\s+([0-9a-z]+)$")
|
||||
|
||||
with version_path.open(encoding="utf-8") as version_file:
|
||||
for line in version_file:
|
||||
match = line_re.match(line.strip())
|
||||
if not match:
|
||||
continue
|
||||
version_info[match.group(1)] = match.group(2)
|
||||
|
||||
return BlenderVersion(
|
||||
int(version_info["BLENDER_VERSION"]),
|
||||
int(version_info["BLENDER_VERSION_PATCH"]),
|
||||
version_info["BLENDER_VERSION_CYCLE"],
|
||||
)
|
||||
|
||||
|
||||
def tarball_path(output_dir: Path, version: BlenderVersion, cli_args: Any) -> Path:
|
||||
extra = ""
|
||||
if cli_args.include_packages:
|
||||
extra = "-with-libraries"
|
||||
@@ -104,7 +148,7 @@ def packages_path(current_directory: Path, cli_args: Any) -> Optional[Path]:
|
||||
|
||||
|
||||
def create_manifest(
|
||||
version: make_utils.BlenderVersion,
|
||||
version: BlenderVersion,
|
||||
outpath: Path,
|
||||
blender_srcdir: Path,
|
||||
packages_dir: Optional[Path],
|
||||
@@ -126,9 +170,9 @@ def main_files_to_manifest(blender_srcdir: Path, outfile: TextIO) -> None:
|
||||
|
||||
|
||||
def submodules_to_manifest(
|
||||
blender_srcdir: Path, version: make_utils.BlenderVersion, outfile: TextIO
|
||||
blender_srcdir: Path, version: BlenderVersion, outfile: TextIO
|
||||
) -> None:
|
||||
skip_addon_contrib = version.is_release()
|
||||
skip_addon_contrib = version.is_release
|
||||
assert not blender_srcdir.is_absolute()
|
||||
|
||||
for line in git_command("-C", blender_srcdir, "submodule"):
|
||||
@@ -156,11 +200,7 @@ def packages_to_manifest(outfile: TextIO, packages_dir: Path) -> None:
|
||||
|
||||
|
||||
def create_tarball(
|
||||
version: make_utils.BlenderVersion,
|
||||
tarball: Path,
|
||||
manifest: Path,
|
||||
blender_srcdir: Path,
|
||||
packages_dir: Optional[Path],
|
||||
version: BlenderVersion, tarball: Path, manifest: Path, blender_srcdir: Path, packages_dir: Optional[Path]
|
||||
) -> None:
|
||||
print(f'Creating archive: "{tarball}" ...', end="", flush=True)
|
||||
command = ["tar"]
|
||||
|
@@ -18,13 +18,8 @@ import sys
|
||||
import make_utils
|
||||
from make_utils import call, check_output
|
||||
|
||||
from typing import (
|
||||
List,
|
||||
Optional,
|
||||
)
|
||||
|
||||
|
||||
def print_stage(text: str) -> None:
|
||||
def print_stage(text):
|
||||
print("")
|
||||
print(text)
|
||||
print("")
|
||||
@@ -32,7 +27,7 @@ def print_stage(text: str) -> None:
|
||||
# Parse arguments
|
||||
|
||||
|
||||
def parse_arguments() -> argparse.Namespace:
|
||||
def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--no-libraries", action="store_true")
|
||||
parser.add_argument("--no-blender", action="store_true")
|
||||
@@ -41,28 +36,47 @@ def parse_arguments() -> argparse.Namespace:
|
||||
parser.add_argument("--svn-command", default="svn")
|
||||
parser.add_argument("--svn-branch", default=None)
|
||||
parser.add_argument("--git-command", default="git")
|
||||
|
||||
# NOTE: Both old and new style command line flags, so that the Buildbot can use the new style.
|
||||
# It is not possible to know from the Buildbot which style to use when building patches.
|
||||
#
|
||||
# Acts as an alias: `use_centos_libraries or use_linux_libraries`.
|
||||
parser.add_argument("--use-centos-libraries", action="store_true")
|
||||
parser.add_argument("--use-linux-libraries", action="store_true")
|
||||
|
||||
parser.add_argument("--architecture", type=str, choices=("x86_64", "amd64", "arm64",))
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def get_blender_git_root() -> str:
|
||||
def get_blender_git_root():
|
||||
return check_output([args.git_command, "rev-parse", "--show-toplevel"])
|
||||
|
||||
# Setup for precompiled libraries and tests from svn.
|
||||
|
||||
def get_effective_architecture(args):
|
||||
if args.architecture:
|
||||
return args.architecture
|
||||
|
||||
def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None:
|
||||
# Check platform.version to detect arm64 with x86_64 python binary.
|
||||
if "ARM64" in platform.version():
|
||||
return "arm64"
|
||||
|
||||
return platform.machine().lower()
|
||||
|
||||
|
||||
def svn_update(args, release_version):
|
||||
svn_non_interactive = [args.svn_command, '--non-interactive']
|
||||
|
||||
lib_dirpath = os.path.join(get_blender_git_root(), '..', 'lib')
|
||||
svn_url = make_utils.svn_libraries_base_url(release_version, args.svn_branch)
|
||||
|
||||
# Checkout precompiled libraries
|
||||
architecture = get_effective_architecture(args)
|
||||
if sys.platform == 'darwin':
|
||||
# Check platform.version to detect arm64 with x86_64 python binary.
|
||||
if platform.machine() == 'arm64' or ('ARM64' in platform.version()):
|
||||
if architecture == 'arm64':
|
||||
lib_platform = "darwin_arm64"
|
||||
elif platform.machine() == 'x86_64':
|
||||
elif architecture == 'x86_64':
|
||||
lib_platform = "darwin"
|
||||
else:
|
||||
lib_platform = None
|
||||
@@ -71,7 +85,7 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None
|
||||
# this script is bundled as part of the precompiled libraries. However it
|
||||
# is used by the buildbot.
|
||||
lib_platform = "win64_vc15"
|
||||
elif args.use_centos_libraries:
|
||||
elif args.use_centos_libraries or args.use_linux_libraries:
|
||||
lib_platform = "linux_centos7_x86_64"
|
||||
else:
|
||||
# No precompiled libraries for Linux.
|
||||
@@ -105,42 +119,39 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None
|
||||
call(svn_non_interactive + ["checkout", svn_url_tests, lib_tests_dirpath])
|
||||
|
||||
# Update precompiled libraries and tests
|
||||
print_stage("Updating Precompiled Libraries and Tests")
|
||||
|
||||
if not os.path.isdir(lib_dirpath):
|
||||
print("Library path: %r, not found, skipping" % lib_dirpath)
|
||||
else:
|
||||
paths_local_and_remote = []
|
||||
if os.path.exists(os.path.join(lib_dirpath, ".svn")):
|
||||
print_stage("Updating Precompiled Libraries and Tests (one repository)")
|
||||
paths_local_and_remote.append((lib_dirpath, svn_url))
|
||||
else:
|
||||
print_stage("Updating Precompiled Libraries and Tests (multiple repositories)")
|
||||
# Separate paths checked out.
|
||||
for dirname in os.listdir(lib_dirpath):
|
||||
if dirname.startswith("."):
|
||||
# Temporary paths such as ".mypy_cache" will report a warning, skip hidden directories.
|
||||
continue
|
||||
if os.path.isdir(lib_dirpath):
|
||||
for dirname in os.listdir(lib_dirpath):
|
||||
dirpath = os.path.join(lib_dirpath, dirname)
|
||||
|
||||
dirpath = os.path.join(lib_dirpath, dirname)
|
||||
if not (os.path.isdir(dirpath) and os.path.exists(os.path.join(dirpath, ".svn"))):
|
||||
continue
|
||||
if dirname == ".svn":
|
||||
# Cleanup must be run from svn root directory if it exists.
|
||||
if not make_utils.command_missing(args.svn_command):
|
||||
call(svn_non_interactive + ["cleanup", lib_dirpath])
|
||||
continue
|
||||
|
||||
paths_local_and_remote.append((dirpath, svn_url + dirname))
|
||||
svn_dirpath = os.path.join(dirpath, ".svn")
|
||||
svn_root_dirpath = os.path.join(lib_dirpath, ".svn")
|
||||
|
||||
if paths_local_and_remote:
|
||||
if make_utils.command_missing(args.svn_command):
|
||||
sys.stderr.write("svn not found, can't update libraries\n")
|
||||
sys.exit(1)
|
||||
if (
|
||||
os.path.isdir(dirpath) and
|
||||
(os.path.exists(svn_dirpath) or os.path.exists(svn_root_dirpath))
|
||||
):
|
||||
if make_utils.command_missing(args.svn_command):
|
||||
sys.stderr.write("svn not found, can't update libraries\n")
|
||||
sys.exit(1)
|
||||
|
||||
for dirpath, svn_url_full in paths_local_and_remote:
|
||||
call(svn_non_interactive + ["cleanup", dirpath])
|
||||
# Cleanup to continue with interrupted downloads.
|
||||
if os.path.exists(svn_dirpath):
|
||||
call(svn_non_interactive + ["cleanup", dirpath])
|
||||
# Switch to appropriate branch and update.
|
||||
call(svn_non_interactive + ["switch", svn_url_full, dirpath], exit_on_error=False)
|
||||
call(svn_non_interactive + ["switch", svn_url + dirname, dirpath], exit_on_error=False)
|
||||
call(svn_non_interactive + ["update", dirpath])
|
||||
|
||||
|
||||
# Test if git repo can be updated.
|
||||
def git_update_skip(args: argparse.Namespace, check_remote_exists: bool = True) -> str:
|
||||
def git_update_skip(args, check_remote_exists=True):
|
||||
if make_utils.command_missing(args.git_command):
|
||||
sys.stderr.write("git not found, can't update code\n")
|
||||
sys.exit(1)
|
||||
@@ -172,17 +183,13 @@ def git_update_skip(args: argparse.Namespace, check_remote_exists: bool = True)
|
||||
|
||||
|
||||
# Update blender repository.
|
||||
def blender_update(args: argparse.Namespace) -> None:
|
||||
def blender_update(args):
|
||||
print_stage("Updating Blender Git Repository")
|
||||
call([args.git_command, "pull", "--rebase"])
|
||||
|
||||
|
||||
# Update submodules.
|
||||
def submodules_update(
|
||||
args: argparse.Namespace,
|
||||
release_version: Optional[str],
|
||||
branch: Optional[str],
|
||||
) -> str:
|
||||
def submodules_update(args, release_version, branch):
|
||||
print_stage("Updating Submodules")
|
||||
if make_utils.command_missing(args.git_command):
|
||||
sys.stderr.write("git not found, can't update code\n")
|
||||
@@ -224,8 +231,7 @@ def submodules_update(
|
||||
elif make_utils.git_branch_exists(args.git_command, submodule_branch_fallback):
|
||||
submodule_branch = submodule_branch_fallback
|
||||
else:
|
||||
# Skip.
|
||||
submodule_branch = ""
|
||||
submodule_branch = None
|
||||
|
||||
# Switch to branch and pull.
|
||||
if submodule_branch:
|
||||
@@ -243,14 +249,15 @@ if __name__ == "__main__":
|
||||
blender_skip_msg = ""
|
||||
submodules_skip_msg = ""
|
||||
|
||||
# Test if we are building a specific release version.
|
||||
branch = make_utils.git_branch(args.git_command)
|
||||
if branch == 'HEAD':
|
||||
sys.stderr.write('Blender git repository is in detached HEAD state, must be in a branch\n')
|
||||
sys.exit(1)
|
||||
|
||||
tag = make_utils.git_tag(args.git_command)
|
||||
release_version = make_utils.git_branch_release_version(branch, tag)
|
||||
blender_version = make_utils. parse_blender_version()
|
||||
if blender_version.cycle != 'alpha':
|
||||
major = blender_version.version // 100
|
||||
minor = blender_version.version % 100
|
||||
branch = f"blender-v{major}.{minor}-release"
|
||||
release_version = f"{major}.{minor}"
|
||||
else:
|
||||
branch = 'main'
|
||||
release_version = None
|
||||
|
||||
if not args.no_libraries:
|
||||
svn_update(args, release_version)
|
||||
|
@@ -11,13 +11,8 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from typing import (
|
||||
Sequence,
|
||||
Optional,
|
||||
)
|
||||
|
||||
|
||||
def call(cmd: Sequence[str], exit_on_error: bool = True, silent: bool = False) -> int:
|
||||
def call(cmd, exit_on_error=True, silent=False):
|
||||
if not silent:
|
||||
print(" ".join(cmd))
|
||||
|
||||
@@ -35,7 +30,7 @@ def call(cmd: Sequence[str], exit_on_error: bool = True, silent: bool = False) -
|
||||
return retcode
|
||||
|
||||
|
||||
def check_output(cmd: Sequence[str], exit_on_error: bool = True) -> str:
|
||||
def check_output(cmd, exit_on_error=True):
|
||||
# Flush to ensure correct order output on Windows.
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
@@ -52,14 +47,14 @@ def check_output(cmd: Sequence[str], exit_on_error: bool = True) -> str:
|
||||
return output.strip()
|
||||
|
||||
|
||||
def git_branch_exists(git_command: str, branch: str) -> bool:
|
||||
def git_branch_exists(git_command, branch):
|
||||
return (
|
||||
call([git_command, "rev-parse", "--verify", branch], exit_on_error=False, silent=True) == 0 or
|
||||
call([git_command, "rev-parse", "--verify", "remotes/origin/" + branch], exit_on_error=False, silent=True) == 0
|
||||
)
|
||||
|
||||
|
||||
def git_branch(git_command: str) -> str:
|
||||
def git_branch(git_command):
|
||||
# Get current branch name.
|
||||
try:
|
||||
branch = subprocess.check_output([git_command, "rev-parse", "--abbrev-ref", "HEAD"])
|
||||
@@ -70,7 +65,7 @@ def git_branch(git_command: str) -> str:
|
||||
return branch.strip().decode('utf8')
|
||||
|
||||
|
||||
def git_tag(git_command: str) -> Optional[str]:
|
||||
def git_tag(git_command):
|
||||
# Get current tag name.
|
||||
try:
|
||||
tag = subprocess.check_output([git_command, "describe", "--exact-match"], stderr=subprocess.STDOUT)
|
||||
@@ -80,19 +75,18 @@ def git_tag(git_command: str) -> Optional[str]:
|
||||
return tag.strip().decode('utf8')
|
||||
|
||||
|
||||
def git_branch_release_version(branch: str, tag: Optional[str]) -> Optional[str]:
|
||||
re_match = re.search("^blender-v(.*)-release$", branch)
|
||||
release_version = None
|
||||
if re_match:
|
||||
release_version = re_match.group(1)
|
||||
def git_branch_release_version(branch, tag):
|
||||
release_version = re.search("^blender-v(.*)-release$", branch)
|
||||
if release_version:
|
||||
release_version = release_version.group(1)
|
||||
elif tag:
|
||||
re_match = re.search(r"^v([0-9]*\.[0-9]*).*", tag)
|
||||
if re_match:
|
||||
release_version = re_match.group(1)
|
||||
release_version = re.search(r"^v([0-9]*\.[0-9]*).*", tag)
|
||||
if release_version:
|
||||
release_version = release_version.group(1)
|
||||
return release_version
|
||||
|
||||
|
||||
def svn_libraries_base_url(release_version: Optional[str], branch: Optional[str] = None) -> str:
|
||||
def svn_libraries_base_url(release_version, branch=None):
|
||||
if release_version:
|
||||
svn_branch = "tags/blender-" + release_version + "-release"
|
||||
elif branch:
|
||||
@@ -102,7 +96,7 @@ def svn_libraries_base_url(release_version: Optional[str], branch: Optional[str]
|
||||
return "https://svn.blender.org/svnroot/bf-blender/" + svn_branch + "/lib/"
|
||||
|
||||
|
||||
def command_missing(command: str) -> bool:
|
||||
def command_missing(command):
|
||||
# Support running with Python 2 for macOS
|
||||
if sys.version_info >= (3, 0):
|
||||
return shutil.which(command) is None
|
||||
@@ -111,7 +105,7 @@ def command_missing(command: str) -> bool:
|
||||
|
||||
|
||||
class BlenderVersion:
|
||||
def __init__(self, version: int, patch: int, cycle: str):
|
||||
def __init__(self, version, patch, cycle):
|
||||
# 293 for 2.93.1
|
||||
self.version = version
|
||||
# 1 for 2.93.1
|
||||
|
@@ -80,11 +80,9 @@ if NOT "%1" == "" (
|
||||
REM Non-Build Commands
|
||||
) else if "%1" == "update" (
|
||||
SET BUILD_UPDATE=1
|
||||
SET BUILD_UPDATE_SVN=1
|
||||
set BUILD_UPDATE_ARGS=
|
||||
) else if "%1" == "code_update" (
|
||||
SET BUILD_UPDATE=1
|
||||
SET BUILD_UPDATE_SVN=0
|
||||
set BUILD_UPDATE_ARGS="--no-libraries"
|
||||
) else if "%1" == "ninja" (
|
||||
SET BUILD_WITH_NINJA=1
|
||||
|
@@ -34,4 +34,3 @@ set BUILD_WITH_SCCACHE=
|
||||
set ICONS=
|
||||
set ICONS_GEOM=
|
||||
set DOC_PY=
|
||||
SET BUILD_UPDATE_SVN=
|
@@ -1,24 +0,0 @@
|
||||
if "%BUILD_VS_YEAR%"=="2019" set BUILD_VS_LIBDIRPOST=vc15
|
||||
if "%BUILD_VS_YEAR%"=="2022" set BUILD_VS_LIBDIRPOST=vc15
|
||||
|
||||
set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%
|
||||
set BUILD_VS_LIBDIR="%BLENDER_DIR%..\lib\%BUILD_VS_SVNDIR%"
|
||||
|
||||
cd %BUILD_VS_LIBDIR%
|
||||
:RETRY
|
||||
"%SVN%" update
|
||||
if errorlevel 1 (
|
||||
set /p LibRetry= "Error during update, retry? y/n"
|
||||
if /I "!LibRetry!"=="Y" (
|
||||
"%SVN%" cleanup
|
||||
goto RETRY
|
||||
)
|
||||
echo.
|
||||
echo Error: Download of external libraries failed.
|
||||
echo This is needed for building, please manually run 'svn cleanup' and 'svn update' in
|
||||
echo %BUILD_VS_LIBDIR% , until this is resolved you CANNOT make a successful blender build
|
||||
echo.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
cd %BLENDER_DIR%
|
@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = V3.5
|
||||
PROJECT_NUMBER = V3.3
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@@ -139,7 +139,7 @@ https://www.blender.org''')
|
||||
|
||||
l = lines.pop(0)
|
||||
if l:
|
||||
assert l.startswith('\t')
|
||||
assert(l.startswith('\t'))
|
||||
l = l[1:] # Remove first white-space (tab).
|
||||
|
||||
fh.write('%s\n' % man_format(l))
|
||||
|
@@ -1,6 +1,4 @@
|
||||
"""
|
||||
.. _modal_operator:
|
||||
|
||||
Modal Execution
|
||||
+++++++++++++++
|
||||
|
||||
|
@@ -134,6 +134,7 @@ batch = batch_for_shader(shader, 'LINES', {"pos": coords})
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
shader.uniform_float("color", (1, 1, 0, 1))
|
||||
batch.draw(shader)
|
||||
|
||||
|
@@ -14,36 +14,33 @@ from random import random
|
||||
from mathutils import Vector
|
||||
from gpu_extras.batch import batch_for_shader
|
||||
|
||||
vert_out = gpu.types.GPUStageInterfaceInfo("my_interface")
|
||||
vert_out.smooth('FLOAT', "v_ArcLength")
|
||||
vertex_shader = '''
|
||||
uniform mat4 u_ViewProjectionMatrix;
|
||||
|
||||
shader_info = gpu.types.GPUShaderCreateInfo()
|
||||
shader_info.push_constant('MAT4', "u_ViewProjectionMatrix")
|
||||
shader_info.push_constant('FLOAT', "u_Scale")
|
||||
shader_info.vertex_in(0, 'VEC3', "position")
|
||||
shader_info.vertex_in(1, 'FLOAT', "arcLength")
|
||||
shader_info.vertex_out(vert_out)
|
||||
shader_info.fragment_out(0, 'VEC4', "FragColor")
|
||||
in vec3 position;
|
||||
in float arcLength;
|
||||
|
||||
shader_info.vertex_source(
|
||||
"void main()"
|
||||
"{"
|
||||
" v_ArcLength = arcLength;"
|
||||
" gl_Position = u_ViewProjectionMatrix * vec4(position, 1.0f);"
|
||||
"}"
|
||||
)
|
||||
out float v_ArcLength;
|
||||
|
||||
shader_info.fragment_source(
|
||||
"void main()"
|
||||
"{"
|
||||
" if (step(sin(v_ArcLength * u_Scale), 0.5) == 1) discard;"
|
||||
" FragColor = vec4(1.0);"
|
||||
"}"
|
||||
)
|
||||
void main()
|
||||
{
|
||||
v_ArcLength = arcLength;
|
||||
gl_Position = u_ViewProjectionMatrix * vec4(position, 1.0f);
|
||||
}
|
||||
'''
|
||||
|
||||
shader = gpu.shader.create_from_info(shader_info)
|
||||
del vert_out
|
||||
del shader_info
|
||||
fragment_shader = '''
|
||||
uniform float u_Scale;
|
||||
|
||||
in float v_ArcLength;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (step(sin(v_ArcLength * u_Scale), 0.5) == 1) discard;
|
||||
FragColor = vec4(1.0);
|
||||
}
|
||||
'''
|
||||
|
||||
coords = [Vector((random(), random(), random())) * 5 for _ in range(5)]
|
||||
|
||||
@@ -51,6 +48,7 @@ arc_lengths = [0]
|
||||
for a, b in zip(coords[:-1], coords[1:]):
|
||||
arc_lengths.append(arc_lengths[-1] + (a - b).length)
|
||||
|
||||
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
|
||||
batch = batch_for_shader(
|
||||
shader, 'LINE_STRIP',
|
||||
{"position": coords, "arcLength": arc_lengths},
|
||||
@@ -58,6 +56,7 @@ batch = batch_for_shader(
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
matrix = bpy.context.region_data.perspective_matrix
|
||||
shader.uniform_float("u_ViewProjectionMatrix", matrix)
|
||||
shader.uniform_float("u_Scale", 10)
|
||||
|
@@ -6,41 +6,38 @@ import bpy
|
||||
import gpu
|
||||
from gpu_extras.batch import batch_for_shader
|
||||
|
||||
vertex_shader = '''
|
||||
uniform mat4 viewProjectionMatrix;
|
||||
|
||||
vert_out = gpu.types.GPUStageInterfaceInfo("my_interface")
|
||||
vert_out.smooth('VEC3', "pos")
|
||||
in vec3 position;
|
||||
out vec3 pos;
|
||||
|
||||
shader_info = gpu.types.GPUShaderCreateInfo()
|
||||
shader_info.push_constant('MAT4', "viewProjectionMatrix")
|
||||
shader_info.push_constant('FLOAT', "brightness")
|
||||
shader_info.vertex_in(0, 'VEC3', "position")
|
||||
shader_info.vertex_out(vert_out)
|
||||
shader_info.fragment_out(0, 'VEC4', "FragColor")
|
||||
void main()
|
||||
{
|
||||
pos = position;
|
||||
gl_Position = viewProjectionMatrix * vec4(position, 1.0f);
|
||||
}
|
||||
'''
|
||||
|
||||
shader_info.vertex_source(
|
||||
"void main()"
|
||||
"{"
|
||||
" pos = position;"
|
||||
" gl_Position = viewProjectionMatrix * vec4(position, 1.0f);"
|
||||
"}"
|
||||
)
|
||||
fragment_shader = '''
|
||||
uniform float brightness;
|
||||
|
||||
shader_info.fragment_source(
|
||||
"void main()"
|
||||
"{"
|
||||
" FragColor = vec4(pos * brightness, 1.0);"
|
||||
"}"
|
||||
)
|
||||
in vec3 pos;
|
||||
out vec4 FragColor;
|
||||
|
||||
shader = gpu.shader.create_from_info(shader_info)
|
||||
del vert_out
|
||||
del shader_info
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(pos * brightness, 1.0);
|
||||
}
|
||||
'''
|
||||
|
||||
coords = [(1, 1, 1), (2, 0, 0), (-2, -1, 3)]
|
||||
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
|
||||
batch = batch_for_shader(shader, 'TRIS', {"position": coords})
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
matrix = bpy.context.region_data.perspective_matrix
|
||||
shader.uniform_float("viewProjectionMatrix", matrix)
|
||||
shader.uniform_float("brightness", 0.5)
|
||||
|
@@ -22,6 +22,7 @@ batch = batch_for_shader(shader, 'LINES', {"pos": coords}, indices=indices)
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
shader.uniform_float("color", (1, 0, 0, 1))
|
||||
batch.draw(shader)
|
||||
|
||||
|
@@ -18,6 +18,7 @@ batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices)
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
shader.uniform_float("color", (0, 0.5, 0.5, 1.0))
|
||||
batch.draw(shader)
|
||||
|
||||
|
@@ -56,6 +56,7 @@ batch = batch_for_shader(
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
shader.uniform_sampler("image", texture)
|
||||
batch.draw(shader)
|
||||
|
||||
|
@@ -35,37 +35,35 @@ with offscreen.bind():
|
||||
# Drawing the generated texture in 3D space
|
||||
#############################################
|
||||
|
||||
vert_out = gpu.types.GPUStageInterfaceInfo("my_interface")
|
||||
vert_out.smooth('VEC2', "uvInterp")
|
||||
vertex_shader = '''
|
||||
uniform mat4 modelMatrix;
|
||||
uniform mat4 viewProjectionMatrix;
|
||||
|
||||
shader_info = gpu.types.GPUShaderCreateInfo()
|
||||
shader_info.push_constant('MAT4', "viewProjectionMatrix")
|
||||
shader_info.push_constant('MAT4', "modelMatrix")
|
||||
shader_info.sampler(0, 'FLOAT_2D', "image")
|
||||
shader_info.vertex_in(0, 'VEC2', "position")
|
||||
shader_info.vertex_in(1, 'VEC2', "uv")
|
||||
shader_info.vertex_out(vert_out)
|
||||
shader_info.fragment_out(0, 'VEC4', "FragColor")
|
||||
in vec2 position;
|
||||
in vec2 uv;
|
||||
|
||||
shader_info.vertex_source(
|
||||
"void main()"
|
||||
"{"
|
||||
" uvInterp = uv;"
|
||||
" gl_Position = viewProjectionMatrix * modelMatrix * vec4(position, 0.0, 1.0);"
|
||||
"}"
|
||||
)
|
||||
out vec2 uvInterp;
|
||||
|
||||
shader_info.fragment_source(
|
||||
"void main()"
|
||||
"{"
|
||||
" FragColor = texture(image, uvInterp);"
|
||||
"}"
|
||||
)
|
||||
void main()
|
||||
{
|
||||
uvInterp = uv;
|
||||
gl_Position = viewProjectionMatrix * modelMatrix * vec4(position, 0.0, 1.0);
|
||||
}
|
||||
'''
|
||||
|
||||
shader = gpu.shader.create_from_info(shader_info)
|
||||
del vert_out
|
||||
del shader_info
|
||||
fragment_shader = '''
|
||||
uniform sampler2D image;
|
||||
|
||||
in vec2 uvInterp;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = texture(image, uvInterp);
|
||||
}
|
||||
'''
|
||||
|
||||
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
|
||||
batch = batch_for_shader(
|
||||
shader, 'TRI_FAN',
|
||||
{
|
||||
@@ -76,6 +74,7 @@ batch = batch_for_shader(
|
||||
|
||||
|
||||
def draw():
|
||||
shader.bind()
|
||||
shader.uniform_float("modelMatrix", Matrix.Translation((1, 2, 3)) @ Matrix.Scale(3, 4))
|
||||
shader.uniform_float("viewProjectionMatrix", bpy.context.region_data.perspective_matrix)
|
||||
shader.uniform_sampler("image", offscreen.texture_color)
|
||||
|
@@ -1,13 +1,13 @@
|
||||
sphinx==5.3.0
|
||||
sphinx==5.0.1
|
||||
|
||||
# Sphinx dependencies that are important
|
||||
Jinja2==3.1.2
|
||||
Pygments==2.13.0
|
||||
Pygments==2.12.0
|
||||
docutils==0.17.1
|
||||
snowballstemmer==2.2.0
|
||||
babel==2.11.0
|
||||
requests==2.28.1
|
||||
babel==2.10.1
|
||||
requests==2.27.1
|
||||
|
||||
# Only needed to match the theme used for the official documentation.
|
||||
# Without this theme, the default theme will be used.
|
||||
sphinx_rtd_theme==1.1.0
|
||||
sphinx_rtd_theme==1.0.0
|
||||
|
@@ -1,9 +1,7 @@
|
||||
:tocdepth: 2
|
||||
|
||||
Change Log
|
||||
**********
|
||||
|
||||
Changes in Blender's Python API between releases.
|
||||
Blender API Change Log
|
||||
**********************
|
||||
|
||||
.. note, this document is auto generated by sphinx_changelog_gen.py
|
||||
|
||||
|
@@ -1,15 +0,0 @@
|
||||
.. _info_advanced-index:
|
||||
|
||||
********
|
||||
Advanced
|
||||
********
|
||||
|
||||
This chapter covers advanced use (topics which may not be required for typical usage).
|
||||
|
||||
.. NOTE(@campbellbarton): Blender-as-a-Python-module is too obscure a topic to list directly on the main-page,
|
||||
so opt for an "Advanced" page which can be expanded on as needed.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
info_advanced_blender_as_bpy.rst
|
@@ -1,126 +0,0 @@
|
||||
|
||||
**************************
|
||||
Blender as a Python Module
|
||||
**************************
|
||||
|
||||
Blender supports being built as a Python module,
|
||||
allowing ``import bpy`` to be added to any Python script, providing access to Blender's features.
|
||||
|
||||
.. note::
|
||||
|
||||
At time of writing official builds are not available,
|
||||
using this requires compiling Blender yourself see
|
||||
`build instructions <https://wiki.blender.org/w/index.php?title=Building_Blender/Other/BlenderAsPyModule>`__.
|
||||
|
||||
|
||||
Use Cases
|
||||
=========
|
||||
|
||||
Python developers may wish to integrate Blender scripts which don't center around Blender.
|
||||
|
||||
Possible uses include:
|
||||
|
||||
- Visualizing data by rendering images and animations.
|
||||
- Image processing using Blender's compositor.
|
||||
- Video editing (using Blender's sequencer).
|
||||
- 3D file conversion.
|
||||
- Development, accessing ``bpy`` from Python IDE's and debugging tools for example.
|
||||
- Automation.
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
For the most part using Blender as a Python module is equivalent to running a script in background-mode
|
||||
(passing the command-line arguments ``--background`` or ``-b``),
|
||||
however there are some differences to be aware of.
|
||||
|
||||
.. Sorted alphabetically as there isn't an especially a logical order to show them.
|
||||
|
||||
Blender's Executable Access
|
||||
The attribute :class:`bpy.app.binary_path` defaults to an empty string.
|
||||
|
||||
If you wish to point this to the location of a known executable you may set the value.
|
||||
|
||||
This example searches for the binary, setting it when found:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import bpy
|
||||
import shutil
|
||||
|
||||
blender_bin = shutil.which("blender")
|
||||
if blender_bin:
|
||||
print("Found:", blender_bin)
|
||||
bpy.app.binary_path = blender_bin
|
||||
else:
|
||||
print("Unable to find blender!")
|
||||
|
||||
Blender's Internal Modules
|
||||
There are many modules included with Blender such as :mod:`gpu` and :mod:`mathuils`.
|
||||
It's important that these are imported after ``bpy`` or they will not be found.
|
||||
|
||||
Command Line Arguments Unsupported
|
||||
Functionality controlled by command line arguments (shown by calling ``blender --help`` aren't accessible).
|
||||
|
||||
Typically this isn't such a limitation although there are some command line arguments that don't have
|
||||
equivalents in Blender's Python API (``--threads`` and ``--log`` for example).
|
||||
|
||||
.. note::
|
||||
|
||||
Access to these settings may be added in the future as needed.
|
||||
|
||||
Resource Sharing (GPU)
|
||||
It's possible other Python modules make use of the GPU in a way that prevents Blender/Cycles from accessing the GPU.
|
||||
|
||||
Signal Handlers
|
||||
Blender's typical signal handlers are not initialized, so there is no special handling for ``Control-C``
|
||||
to cancel a render and a crash log is not written in the event of a crash.
|
||||
|
||||
Startup and Preferences
|
||||
When the ``bpy`` module loads it contains the default startup scene
|
||||
(instead of an "empty" blend-file as you might expect), so there is a default cube, camera and light.
|
||||
|
||||
If you wish to start from an empty file use: ``bpy.ops.wm.read_factory_settings(use_empty=True)``.
|
||||
|
||||
The users startup and preferences are ignored to prevent your local configuration from impacting scripts behavior.
|
||||
The Python module behaves as if ``--factory-startup`` was passed as a command line argument.
|
||||
|
||||
The users preferences and startup can be loaded using operators:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import bpy
|
||||
|
||||
bpy.ops.wm.read_userpref()
|
||||
bpy.ops.wm.read_homefile()
|
||||
|
||||
|
||||
Limitations
|
||||
===========
|
||||
|
||||
Most constraints of Blender as an application still apply:
|
||||
|
||||
Reloading Unsupported
|
||||
Reloading the ``bpy`` module via ``importlib.reload`` will raise an exception
|
||||
instead of reloading and resetting the module.
|
||||
|
||||
Instead, the operator ``bpy.ops.wm.read_factory_settings()`` can be used to reset the internal state.
|
||||
|
||||
Single Blend File Restriction
|
||||
Only a single ``.blend`` file can be edited at a time.
|
||||
|
||||
.. hint::
|
||||
|
||||
As with the application it's possible to start multiple instances,
|
||||
each with their own ``bpy`` and therefor Blender state.
|
||||
Python provides the ``multiprocessing`` module to make communicating with sub-processes more convenient.
|
||||
|
||||
In some cases the library API may be an alternative to starting separate processes,
|
||||
although this API operates on reading and writing ID data-blocks and isn't
|
||||
a complete substitute for loading ``.blend`` files, see:
|
||||
|
||||
- :meth:`bpy.types.BlendDataLibraries.load`
|
||||
- :meth:`bpy.types.BlendDataLibraries.write`
|
||||
- :meth:`bpy.types.BlendData.temp_data`
|
||||
supports a temporary data-context to avoid manipulating the current ``.blend`` file.
|
@@ -1,6 +1,6 @@
|
||||
|
||||
*******************
|
||||
API Reference Usage
|
||||
Reference API Usage
|
||||
*******************
|
||||
|
||||
Blender has many interlinking data types which have an auto-generated reference API which often has the information
|
||||
|
@@ -86,8 +86,7 @@ No updates after setting values
|
||||
Sometimes you want to modify values from Python and immediately access the updated values, e.g:
|
||||
Once changing the objects :class:`bpy.types.Object.location`
|
||||
you may want to access its transformation right after from :class:`bpy.types.Object.matrix_world`,
|
||||
but this doesn't work as you might expect. There are similar issues with changes to the UI, that
|
||||
are covered in the next section.
|
||||
but this doesn't work as you might expect.
|
||||
|
||||
Consider the calculations that might contribute to the object's final transformation, this includes:
|
||||
|
||||
@@ -111,35 +110,6 @@ Now all dependent data (child objects, modifiers, drivers, etc.)
|
||||
have been recalculated and are available to the script within the active view layer.
|
||||
|
||||
|
||||
No updates after changing UI context
|
||||
------------------------------------
|
||||
|
||||
Similar to the previous issue, some changes to the UI may also not have an immediate effect. For example, setting
|
||||
:class:`bpy.types.Window.workspace` doesn't seem to cause an observable effect in the immediately following code
|
||||
(:class:`bpy.types.Window.workspace` is still the same), but the UI will in fact reflect the change. Some of the
|
||||
properties that behave that way are:
|
||||
|
||||
- :class:`bpy.types.Window.workspace`
|
||||
- :class:`bpy.types.Window.screen`
|
||||
- :class:`bpy.types.Window.scene`
|
||||
- :class:`bpy.types.Area.type`
|
||||
- :class:`bpy.types.Area.uitype`
|
||||
|
||||
Such changes impact the UI, and with that the context (:class:`bpy.context`) quite drastically. This can break
|
||||
Blender's context management. So Blender delays this change until after operators have run and just before the UI is
|
||||
redrawn, making sure that context can be changed safely.
|
||||
|
||||
If you rely on executing code with an updated context this can be worked around by executing the code in a delayed
|
||||
fashion as well. Possible options include:
|
||||
|
||||
- :ref:`Modal Operator <modal_operator>`.
|
||||
- :class:`bpy.app.handlers`.
|
||||
- :class:`bpy.app.timer`.
|
||||
|
||||
It's also possible to depend on drawing callbacks although these should generally be avoided as failure to draw a
|
||||
hidden panel, region, cursor, etc. could cause your script to be unreliable
|
||||
|
||||
|
||||
Can I redraw during script execution?
|
||||
-------------------------------------
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
.. _info_overview:
|
||||
|
||||
************
|
||||
API Overview
|
||||
************
|
||||
*******************
|
||||
Python API Overview
|
||||
*******************
|
||||
|
||||
The purpose of this document is to explain how Python and Blender fit together,
|
||||
covering some of the functionality that may not be obvious from reading the API references
|
||||
|
@@ -241,9 +241,9 @@ def main():
|
||||
comment_washed = []
|
||||
comment = [] if comment is None else comment
|
||||
for i, l in enumerate(comment):
|
||||
assert ((l.strip() == "") or
|
||||
(l in {"/*", " *"}) or
|
||||
(l.startswith(("/* ", " * "))))
|
||||
assert((l.strip() == "") or
|
||||
(l in {"/*", " *"}) or
|
||||
(l.startswith(("/* ", " * "))))
|
||||
|
||||
l = l[3:]
|
||||
if i == 0 and not l.strip():
|
||||
@@ -270,7 +270,7 @@ def main():
|
||||
tp_sub = None
|
||||
else:
|
||||
print(arg)
|
||||
assert 0
|
||||
assert(0)
|
||||
|
||||
tp_str = ""
|
||||
|
||||
@@ -315,7 +315,7 @@ def main():
|
||||
tp_str += " or any sequence of 3 floats"
|
||||
elif tp == BMO_OP_SLOT_PTR:
|
||||
tp_str = "dict"
|
||||
assert tp_sub is not None
|
||||
assert(tp_sub is not None)
|
||||
if tp_sub == BMO_OP_SLOT_SUBTYPE_PTR_BMESH:
|
||||
tp_str = ":class:`bmesh.types.BMesh`"
|
||||
elif tp_sub == BMO_OP_SLOT_SUBTYPE_PTR_SCENE:
|
||||
@@ -330,10 +330,10 @@ def main():
|
||||
tp_str = ":class:`bpy.types.bpy_struct`"
|
||||
else:
|
||||
print("Can't find", vars_dict_reverse[tp_sub])
|
||||
assert 0
|
||||
assert(0)
|
||||
|
||||
elif tp == BMO_OP_SLOT_ELEMENT_BUF:
|
||||
assert tp_sub is not None
|
||||
assert(tp_sub is not None)
|
||||
|
||||
ls = []
|
||||
if tp_sub & BM_VERT:
|
||||
@@ -342,7 +342,7 @@ def main():
|
||||
ls.append(":class:`bmesh.types.BMEdge`")
|
||||
if tp_sub & BM_FACE:
|
||||
ls.append(":class:`bmesh.types.BMFace`")
|
||||
assert ls # Must be at least one.
|
||||
assert(ls) # must be at least one
|
||||
|
||||
if tp_sub & BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE:
|
||||
tp_str = "/".join(ls)
|
||||
@@ -367,10 +367,10 @@ def main():
|
||||
tp_str += "unknown internal data, not compatible with python"
|
||||
else:
|
||||
print("Can't find", vars_dict_reverse[tp_sub])
|
||||
assert 0
|
||||
assert(0)
|
||||
else:
|
||||
print("Can't find", vars_dict_reverse[tp])
|
||||
assert 0
|
||||
assert(0)
|
||||
|
||||
args_wash.append((name, tp_str, comment))
|
||||
return args_wash
|
||||
@@ -394,7 +394,7 @@ def main():
|
||||
fw(" :return:\n\n")
|
||||
|
||||
for (name, tp, comment) in args_out_wash:
|
||||
assert name.endswith(".out")
|
||||
assert(name.endswith(".out"))
|
||||
name = name[:-4]
|
||||
fw(" - ``%s``: %s\n\n" % (name, comment))
|
||||
fw(" **type** %s\n" % tp)
|
||||
|
@@ -101,7 +101,7 @@ def api_dump(args):
|
||||
|
||||
version, version_key = api_version()
|
||||
if version is None:
|
||||
raise ValueError("API dumps can only be generated from within Blender.")
|
||||
raise(ValueError("API dumps can only be generated from within Blender."))
|
||||
|
||||
dump = {}
|
||||
dump_module = dump["bpy.types"] = {}
|
||||
@@ -250,7 +250,7 @@ def api_changelog(args):
|
||||
|
||||
version, version_key = api_version()
|
||||
if version is None and (filepath_in_from is None or filepath_in_to is None):
|
||||
raise ValueError("API dumps files must be given when ran outside of Blender.")
|
||||
raise(ValueError("API dumps files must be given when ran outside of Blender."))
|
||||
|
||||
with open(indexpath, 'r', encoding='utf-8') as file_handle:
|
||||
index = json.load(file_handle)
|
||||
@@ -258,21 +258,17 @@ def api_changelog(args):
|
||||
if filepath_in_to is None:
|
||||
filepath_in_to = index.get(version_key, None)
|
||||
if filepath_in_to is None:
|
||||
raise ValueError("Cannot find API dump file for Blender version " + str(version) + " in index file.")
|
||||
raise(ValueError("Cannot find API dump file for Blender version " + str(version) + " in index file."))
|
||||
|
||||
print("Found to file: %r" % filepath_in_to)
|
||||
|
||||
if filepath_in_from is None:
|
||||
version_from, version_from_key = api_version_previous_in_index(index, version)
|
||||
if version_from is None:
|
||||
raise ValueError("No previous version of Blender could be found in the index.")
|
||||
raise(ValueError("No previous version of Blender could be found in the index."))
|
||||
filepath_in_from = index.get(version_from_key, None)
|
||||
if filepath_in_from is None:
|
||||
raise ValueError(
|
||||
"Cannot find API dump file for previous Blender version " +
|
||||
str(version_from) +
|
||||
" in index file."
|
||||
)
|
||||
raise(ValueError("Cannot find API dump file for previous Blender version " + str(version_from) + " in index file."))
|
||||
|
||||
print("Found from file: %r" % filepath_in_from)
|
||||
|
||||
@@ -281,7 +277,7 @@ def api_changelog(args):
|
||||
|
||||
with open(os.path.join(rootpath, filepath_in_to), 'r', encoding='utf-8') as file_handle:
|
||||
dump_version, dict_to = json.load(file_handle)
|
||||
assert tuple(dump_version) == version
|
||||
assert(tuple(dump_version) == version)
|
||||
|
||||
api_changes = []
|
||||
|
||||
@@ -349,10 +345,8 @@ def api_changelog(args):
|
||||
fw(""
|
||||
":tocdepth: 2\n"
|
||||
"\n"
|
||||
"Change Log\n"
|
||||
"**********\n"
|
||||
"\n"
|
||||
"Changes in Blender's Python API between releases.\n"
|
||||
"Blender API Change Log\n"
|
||||
"**********************\n"
|
||||
"\n"
|
||||
".. note, this document is auto generated by sphinx_changelog_gen.py\n"
|
||||
"\n"
|
||||
|
@@ -387,35 +387,23 @@ EXAMPLE_SET_USED = set()
|
||||
# RST files directory.
|
||||
RST_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "rst"))
|
||||
|
||||
# Extra info, not api reference docs stored in `./rst/info_*`.
|
||||
# Pairs of (file, description), the title makes from the RST files are displayed before the description.
|
||||
# extra info, not api reference docs
|
||||
# stored in ./rst/info_*
|
||||
INFO_DOCS = (
|
||||
("info_quickstart.rst",
|
||||
"New to Blender or scripting and want to get your feet wet?"),
|
||||
"Quickstart: New to Blender or scripting and want to get your feet wet?"),
|
||||
("info_overview.rst",
|
||||
"A more complete explanation of Python integration."),
|
||||
"API Overview: A more complete explanation of Python integration"),
|
||||
("info_api_reference.rst",
|
||||
"Examples of how to use the API reference docs."),
|
||||
"API Reference Usage: examples of how to use the API reference docs"),
|
||||
("info_best_practice.rst",
|
||||
"Conventions to follow for writing good scripts."),
|
||||
"Best Practice: Conventions to follow for writing good scripts"),
|
||||
("info_tips_and_tricks.rst",
|
||||
"Hints to help you while writing scripts for Blender."),
|
||||
"Tips and Tricks: Hints to help you while writing scripts for Blender"),
|
||||
("info_gotcha.rst",
|
||||
"Some of the problems you may encounter when writing scripts."),
|
||||
("info_advanced.rst",
|
||||
"Topics which may not be required for typical usage."),
|
||||
("change_log.rst",
|
||||
"List of changes since last Blender release"),
|
||||
"Gotcha's: Some of the problems you may encounter when writing scripts"),
|
||||
("change_log.rst", "Change Log: List of changes since last Blender release"),
|
||||
)
|
||||
# Referenced indirectly.
|
||||
INFO_DOCS_OTHER = (
|
||||
# Included by: `info_advanced.rst`.
|
||||
"info_advanced_blender_as_bpy.rst",
|
||||
)
|
||||
|
||||
# Hide the actual TOC, use a separate list that links to the items.
|
||||
# This is done so a short description can be included with each link.
|
||||
USE_INFO_DOCS_FANCY_INDEX = True
|
||||
|
||||
# only support for properties atm.
|
||||
RNA_BLACKLIST = {
|
||||
@@ -1459,15 +1447,15 @@ def pyrna2sphinx(basepath):
|
||||
# If the link has been written, no need to inline the enum items.
|
||||
enum_text = "" if enum_descr_override else pyrna_enum2sphinx(prop)
|
||||
if prop.name or prop.description or enum_text:
|
||||
fw(ident + ":%s%s: " % (id_name, identifier))
|
||||
fw(ident + ":%s%s:\n\n" % (id_name, identifier))
|
||||
|
||||
if prop.name or prop.description:
|
||||
fw(", ".join(val for val in (prop.name, prop.description.replace("\n", "")) if val) + "\n")
|
||||
fw(indent(", ".join(val for val in (prop.name, prop.description) if val), ident + " ") + "\n\n")
|
||||
|
||||
# Special exception, can't use generic code here for enums.
|
||||
if enum_text:
|
||||
fw("\n")
|
||||
write_indented_lines(ident + " ", fw, enum_text)
|
||||
fw("\n")
|
||||
del enum_text
|
||||
# end enum exception
|
||||
|
||||
@@ -1482,7 +1470,7 @@ def pyrna2sphinx(basepath):
|
||||
|
||||
struct_module_name = struct.module_name
|
||||
if USE_ONLY_BUILTIN_RNA_TYPES:
|
||||
assert struct_module_name == "bpy.types"
|
||||
assert(struct_module_name == "bpy.types")
|
||||
filepath = os.path.join(basepath, "%s.%s.rst" % (struct_module_name, struct.identifier))
|
||||
file = open(filepath, "w", encoding="utf-8")
|
||||
fw = file.write
|
||||
@@ -1916,7 +1904,7 @@ except ModuleNotFoundError:
|
||||
# fw(" 'collapse_navigation': True,\n")
|
||||
fw(" 'sticky_navigation': False,\n")
|
||||
fw(" 'navigation_depth': 1,\n")
|
||||
fw(" 'includehidden': False,\n")
|
||||
# fw(" 'includehidden': True,\n")
|
||||
# fw(" 'titles_only': False\n")
|
||||
fw(" }\n\n")
|
||||
|
||||
@@ -1988,21 +1976,12 @@ def write_rst_index(basepath):
|
||||
|
||||
if not EXCLUDE_INFO_DOCS:
|
||||
fw(".. toctree::\n")
|
||||
if USE_INFO_DOCS_FANCY_INDEX:
|
||||
fw(" :hidden:\n")
|
||||
fw(" :maxdepth: 1\n")
|
||||
fw(" :caption: Documentation\n\n")
|
||||
for info, info_desc in INFO_DOCS:
|
||||
fw(" %s\n" % info)
|
||||
fw(" %s <%s>\n" % (info_desc, info))
|
||||
fw("\n")
|
||||
|
||||
if USE_INFO_DOCS_FANCY_INDEX:
|
||||
# Show a fake TOC, allowing for an extra description to be shown as well as the title.
|
||||
fw(title_string("Documentation", "="))
|
||||
for info, info_desc in INFO_DOCS:
|
||||
fw("- :doc:`%s`: %s\n" % (info.removesuffix(".rst"), info_desc))
|
||||
fw("\n")
|
||||
|
||||
fw(".. toctree::\n")
|
||||
fw(" :maxdepth: 1\n")
|
||||
fw(" :caption: Application Modules\n\n")
|
||||
@@ -2335,8 +2314,6 @@ def copy_handwritten_rsts(basepath):
|
||||
if not EXCLUDE_INFO_DOCS:
|
||||
for info, _info_desc in INFO_DOCS:
|
||||
shutil.copy2(os.path.join(RST_DIR, info), basepath)
|
||||
for info in INFO_DOCS_OTHER:
|
||||
shutil.copy2(os.path.join(RST_DIR, info), basepath)
|
||||
|
||||
# TODO: put this docs in Blender's code and use import as per modules above.
|
||||
handwritten_modules = [
|
||||
|
16
extern/CMakeLists.txt
vendored
16
extern/CMakeLists.txt
vendored
@@ -32,6 +32,14 @@ if(WITH_BINRELOC)
|
||||
add_subdirectory(binreloc)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_GLEW)
|
||||
if(WITH_GLEW_ES)
|
||||
add_subdirectory(glew-es)
|
||||
else()
|
||||
add_subdirectory(glew)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LZO AND NOT WITH_SYSTEM_LZO)
|
||||
add_subdirectory(lzo)
|
||||
endif()
|
||||
@@ -40,7 +48,7 @@ if(WITH_LZMA)
|
||||
add_subdirectory(lzma)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES OR WITH_COMPOSITOR_CPU OR WITH_OPENSUBDIV)
|
||||
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
|
||||
add_subdirectory(clew)
|
||||
if((WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX) AND WITH_CUDA_DYNLOAD)
|
||||
add_subdirectory(cuew)
|
||||
@@ -88,10 +96,6 @@ if(WITH_MOD_FLUID)
|
||||
add_subdirectory(mantaflow)
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
if(WITH_COMPOSITOR)
|
||||
add_subdirectory(smaa_areatex)
|
||||
endif()
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
add_subdirectory(vulkan_memory_allocator)
|
||||
endif()
|
||||
|
4
extern/gflags/CMakeLists.txt
vendored
4
extern/gflags/CMakeLists.txt
vendored
@@ -3,7 +3,9 @@
|
||||
|
||||
# Too noisy for code we don't maintain.
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
add_cxx_flag("-Wno-cast-function-type")
|
||||
if(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "8.0")
|
||||
add_cxx_flag("-Wno-cast-function-type")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(INC
|
||||
|
33
extern/glew-es/CMakeLists.txt
vendored
Normal file
33
extern/glew-es/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright 2013 Blender Foundation. All rights reserved.
|
||||
|
||||
set(INC
|
||||
include
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
list(APPEND INC_SYS
|
||||
${X11_X11_INCLUDE_PATH}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
src/glew.c
|
||||
|
||||
include/GL/eglew.h
|
||||
include/GL/glesew.h
|
||||
include/GL/glew.h
|
||||
include/GL/glxew.h
|
||||
include/GL/wglew.h
|
||||
)
|
||||
|
||||
set(LIB
|
||||
)
|
||||
|
||||
add_definitions(${GL_DEFINITIONS})
|
||||
|
||||
blender_add_lib(extern_glew_es "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
73
extern/glew-es/LICENSE.txt
vendored
Normal file
73
extern/glew-es/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
The OpenGL Extension Wrangler Library
|
||||
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
Copyright (C) 2002, Lev Povalahev
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* The name of the author may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Mesa 3-D graphics library
|
||||
Version: 7.0
|
||||
|
||||
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
Copyright (c) 2007 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
5
extern/glew-es/README.blender
vendored
Normal file
5
extern/glew-es/README.blender
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
Project: The OpenGL Extension Wrangler Library
|
||||
URL: http://glew.sourceforge.net/
|
||||
License: Check LICENSE.txt
|
||||
Upstream version: 2.0.0
|
||||
Local modifications: None
|
20525
extern/glew-es/include/GL/glew.h
vendored
Normal file
20525
extern/glew-es/include/GL/glew.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1649
extern/glew-es/include/GL/glxew.h
vendored
Normal file
1649
extern/glew-es/include/GL/glxew.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1424
extern/glew-es/include/GL/wglew.h
vendored
Normal file
1424
extern/glew-es/include/GL/wglew.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
22401
extern/glew-es/src/glew.c
vendored
Normal file
22401
extern/glew-es/src/glew.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
54
extern/glew/CMakeLists.txt
vendored
Normal file
54
extern/glew/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright 2006 Blender Foundation. All rights reserved.
|
||||
|
||||
# avoid noisy warnings
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
add_c_flag(
|
||||
"-Wno-strict-prototypes"
|
||||
)
|
||||
endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "12.1"))
|
||||
add_c_flag(
|
||||
"-Wno-address"
|
||||
)
|
||||
endif()
|
||||
|
||||
# MSVC's inliner is not having a happy time with glewIsSupported
|
||||
# causing this to be one of the most expensive things to build
|
||||
# in blender. Optimize for size rather than speed sidesteps this
|
||||
# problem, more details at
|
||||
# https://developercommunity.visualstudio.com/content/problem/732941/slow-compilation-of-glewc-for-visual-studio-2019-x.html
|
||||
|
||||
if(MSVC)
|
||||
add_c_flag("/Os")
|
||||
endif()
|
||||
|
||||
set(INC
|
||||
include
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
list(APPEND INC_SYS
|
||||
${X11_X11_INCLUDE_PATH}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
src/glew.c
|
||||
|
||||
include/GL/eglew.h
|
||||
include/GL/glew.h
|
||||
include/GL/glxew.h
|
||||
include/GL/wglew.h
|
||||
)
|
||||
|
||||
set(LIB
|
||||
)
|
||||
|
||||
add_definitions(${GL_DEFINITIONS})
|
||||
|
||||
blender_add_lib(extern_glew "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
73
extern/glew/LICENSE.txt
vendored
Normal file
73
extern/glew/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
The OpenGL Extension Wrangler Library
|
||||
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
Copyright (C) 2002, Lev Povalahev
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* The name of the author may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Mesa 3-D graphics library
|
||||
Version: 7.0
|
||||
|
||||
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
Copyright (c) 2007 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
5
extern/glew/README.blender
vendored
Normal file
5
extern/glew/README.blender
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
Project: The OpenGL Extension Wrangler Library
|
||||
URL: http://glew.sourceforge.net/
|
||||
License: Check LICENSE.txt
|
||||
Upstream version: 2.0.0
|
||||
Local modifications: None
|
2261
extern/glew/include/GL/eglew.h
vendored
Normal file
2261
extern/glew/include/GL/eglew.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20113
extern/glew/include/GL/glew.h
vendored
Normal file
20113
extern/glew/include/GL/glew.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user