Compare commits
386 Commits
transform-
...
UI-experim
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0fd7310b51 | ||
![]() |
83a2d3dcf5 | ||
![]() |
6ec01dcbf2 | ||
![]() |
7c1f329f28 | ||
![]() |
77d809cd6b | ||
![]() |
3b29e53626 | ||
![]() |
97eed9b85b | ||
![]() |
f0a42fe815 | ||
![]() |
52042f8591 | ||
![]() |
86d768efc5 | ||
![]() |
c53a3edb7c | ||
![]() |
2daae19227 | ||
![]() |
f6fd536d2c | ||
![]() |
1ecd773713 | ||
![]() |
9f0a2f1887 | ||
![]() |
60c3289df5 | ||
![]() |
b72194f61d | ||
![]() |
684b3ef857 | ||
![]() |
48302aec4a | ||
![]() |
28a50b309d | ||
![]() |
7b3858dbe4 | ||
![]() |
4ff1181f7c | ||
![]() |
f5c6cd475d | ||
![]() |
c8131cb0f6 | ||
![]() |
63eeb6bc88 | ||
![]() |
38f258a814 | ||
![]() |
1936754ff2 | ||
![]() |
3e90ee2537 | ||
![]() |
cf1cdba64e | ||
![]() |
0f06bef713 | ||
![]() |
e6c5611dbc | ||
![]() |
c52c11b304 | ||
![]() |
10678f7572 | ||
![]() |
338d9e128f | ||
![]() |
cd06b57d4d | ||
![]() |
bf10989da0 | ||
![]() |
a6455356e7 | ||
![]() |
573c4fda8f | ||
![]() |
c3bfe6d786 | ||
![]() |
ca7f2749a0 | ||
1be1136785 | |||
![]() |
4b4c45c4bc | ||
![]() |
64d3a13835 | ||
![]() |
c73b8584ab | ||
![]() |
91d88785bb | ||
![]() |
e9fd345055 | ||
![]() |
dfe2eb9391 | ||
![]() |
77457735a8 | ||
![]() |
313cfcb093 | ||
![]() |
47da6a91c3 | ||
![]() |
28b5f3f599 | ||
![]() |
d331306c88 | ||
![]() |
fd0b0124c3 | ||
![]() |
408e89ddbe | ||
![]() |
9f8eb0e1eb | ||
![]() |
978cbb7486 | ||
![]() |
956e488a70 | ||
![]() |
7c8892f36f | ||
![]() |
9babf138aa | ||
![]() |
1f99e5efe7 | ||
![]() |
fe85eb5608 | ||
![]() |
e50ca409b9 | ||
![]() |
65552f9bc9 | ||
![]() |
042e8e4b77 | ||
![]() |
6049a90473 | ||
![]() |
065b2fbde8 | ||
![]() |
184de260ca | ||
![]() |
90ca0643af | ||
![]() |
910316681a | ||
![]() |
0d0948bf90 | ||
![]() |
cc5b831a66 | ||
![]() |
6b540e07a5 | ||
![]() |
93828de99b | ||
![]() |
086f0dac81 | ||
![]() |
1a852d5dbe | ||
![]() |
247ecd5ab0 | ||
![]() |
55d8c24773 | ||
![]() |
12883426a4 | ||
![]() |
d506cf1924 | ||
![]() |
ff34f47d82 | ||
![]() |
8bdc6ca147 | ||
![]() |
165ec9ebd7 | ||
![]() |
14a715679f | ||
![]() |
1f2d886e03 | ||
![]() |
8e0c18f8ca | ||
![]() |
e2be60494a | ||
![]() |
f92c118978 | ||
![]() |
43284f1a1b | ||
![]() |
81545372fe | ||
![]() |
2baee18081 | ||
![]() |
f4965181cb | ||
![]() |
80f4d742a8 | ||
![]() |
fbb953f6cd | ||
![]() |
b8a5ddde1d | ||
![]() |
0fb26a94f5 | ||
![]() |
911b84233e | ||
![]() |
c3e466a082 | ||
![]() |
dd7c442cd8 | ||
![]() |
bbfcd55395 | ||
![]() |
728197c9fb | ||
![]() |
687410a01d | ||
![]() |
28a8dbba51 | ||
![]() |
61f52072e1 | ||
![]() |
3b42468bff | ||
![]() |
fd6ecc069f | ||
![]() |
0fa4a2aa3c | ||
![]() |
5e05c17d7e | ||
![]() |
418da7b710 | ||
![]() |
13a091bd61 | ||
![]() |
406367751c | ||
![]() |
41c3228743 | ||
![]() |
bd9fde8486 | ||
![]() |
a8225f2ffd | ||
![]() |
962ce2a550 | ||
![]() |
6e85ac1ee0 | ||
![]() |
7530cfccc2 | ||
![]() |
1f5e4741b0 | ||
![]() |
c066dded99 | ||
![]() |
d4d97f79f4 | ||
![]() |
8c0ecb5ac6 | ||
![]() |
b97db10438 | ||
![]() |
ab9eee4bfb | ||
![]() |
e0b92ca72b | ||
![]() |
131caabfdb | ||
![]() |
a638db50ca | ||
![]() |
60ec6a5419 | ||
![]() |
123dfe809b | ||
![]() |
58b32bacee | ||
![]() |
a05cbcfa7c | ||
![]() |
c5d4607792 | ||
![]() |
0435e3c6b2 | ||
![]() |
97c12109ec | ||
![]() |
fa7188c7da | ||
![]() |
ee7841307a | ||
![]() |
980820124a | ||
![]() |
1c686a0e0f | ||
![]() |
f3f65f38b7 | ||
![]() |
868b1e3032 | ||
![]() |
b2318ef25f | ||
![]() |
677d7906ab | ||
![]() |
700c8c691c | ||
![]() |
c6801d7cdd | ||
![]() |
2524b2b5b9 | ||
![]() |
271b53fa57 | ||
![]() |
029bc907dd | ||
![]() |
96e7a92a23 | ||
![]() |
fa85fd2b6a | ||
![]() |
cddab657e8 | ||
![]() |
9de6520251 | ||
![]() |
f4b3975d65 | ||
![]() |
882e675a82 | ||
![]() |
5f07a20062 | ||
![]() |
611c52ea2f | ||
![]() |
bd11884d16 | ||
![]() |
a05c604880 | ||
![]() |
2e917e67d4 | ||
![]() |
667718bc7f | ||
![]() |
04f11fb12e | ||
![]() |
c2400ced81 | ||
![]() |
2487ee35a8 | ||
![]() |
6272babfba | ||
![]() |
2246310e3e | ||
![]() |
c2d8261b43 | ||
![]() |
0dd2ed3c6c | ||
![]() |
b3587b8aa2 | ||
![]() |
d031455395 | ||
![]() |
afc342f222 | ||
![]() |
1d463591aa | ||
![]() |
ebfe499e10 | ||
![]() |
0fdac7ca7b | ||
![]() |
2719a3d593 | ||
![]() |
6c865717c5 | ||
![]() |
6b8ca6a76c | ||
![]() |
3b11fb1b9e | ||
![]() |
4f5ca0389c | ||
![]() |
ec9c60b7bb | ||
![]() |
54369a5535 | ||
![]() |
d5f379c853 | ||
![]() |
979e6c362f | ||
![]() |
0ecc1252c6 | ||
![]() |
da40b73f32 | ||
![]() |
57b5496589 | ||
![]() |
1971b9aba9 | ||
![]() |
e732ede8bb | ||
![]() |
0457d74d86 | ||
![]() |
d1236a06b7 | ||
![]() |
56f6802034 | ||
![]() |
058b8df861 | ||
![]() |
1340b98184 | ||
![]() |
078fb9bf27 | ||
![]() |
a55f90ac16 | ||
![]() |
4ee1de8c3c | ||
![]() |
bb0ec82bc4 | ||
![]() |
cf05007f3c | ||
![]() |
d9a4a566a7 | ||
![]() |
dd972eafd9 | ||
![]() |
f5a44de5bf | ||
![]() |
87cfee895b | ||
![]() |
7f15a91b51 | ||
![]() |
b749dc875f | ||
![]() |
f8f684e4be | ||
![]() |
b8bb9d8cc7 | ||
![]() |
b2b3c99628 | ||
![]() |
171a2c072f | ||
![]() |
47d37c568e | ||
![]() |
3e0d5da5eb | ||
![]() |
e29deba64e | ||
![]() |
fe0d6d99b0 | ||
![]() |
12a999305f | ||
![]() |
7858d0d09e | ||
![]() |
560557adfa | ||
![]() |
739c08ee8e | ||
![]() |
1d73b724ab | ||
![]() |
85ce5339a7 | ||
![]() |
770b0325a6 | ||
![]() |
9e9514c10c | ||
![]() |
02296fccef | ||
![]() |
0a93cd9eee | ||
![]() |
04fe09b216 | ||
![]() |
bc9a48b0db | ||
8cad3e3581 | |||
02c142e582 | |||
81c56d15c7 | |||
1dba2cd025 | |||
26a74c8e11 | |||
748d9eca90 | |||
60927ae2e0 | |||
f1462c759f | |||
59dd3735bf | |||
d67d29035a | |||
f07ca03185 | |||
a8b00f679a | |||
bffa829b40 | |||
97053e034a | |||
7414464e23 | |||
f902bbad83 | |||
eca3250c89 | |||
f9cedb4896 | |||
b68a951e91 | |||
16478df500 | |||
b0c0505624 | |||
018593b75a | |||
a1e28859c7 | |||
380a32581f | |||
8ffd46d139 | |||
4887f7b48c | |||
ad23e225c9 | |||
00fe49de83 | |||
bc99082e45 | |||
3d74e55dd7 | |||
c32ac24d41 | |||
7163ddf53e | |||
1740ee2d3d | |||
91ed7c270c | |||
1a366cb02a | |||
bffde905b6 | |||
6b8ebd6bd6 | |||
74308df3f0 | |||
9880af5779 | |||
9a9347eb8d | |||
443ef39203 | |||
58fedf3b67 | |||
4380a92c05 | |||
a6a6c49398 | |||
6da4973e8e | |||
f64e323e2b | |||
fac8a0c4f9 | |||
182545c820 | |||
0fb37c710f | |||
ef8a3d65f1 | |||
04671df15f | |||
5d2f1a9466 | |||
ab46b5ed62 | |||
5feafed611 | |||
09d18fb74d | |||
b51ee540ae | |||
7d79196698 | |||
81e2e1be41 | |||
d4c9ff8a21 | |||
787743b1ed | |||
0a7eb30cee | |||
b0f53133c1 | |||
8abeeafcb6 | |||
cb2f1eb3eb | |||
aad164978c | |||
e01e074276 | |||
de94752d8e | |||
a6adbc968f | |||
1138a296cb | |||
9720402fca | |||
73efb36091 | |||
1f501db162 | |||
af74cba653 | |||
2b1bdb5412 | |||
a99f5a7463 | |||
2a3d6efa96 | |||
aae1162945 | |||
dd43f9c056 | |||
ff50cd9740 | |||
44b4ced395 | |||
bfa17440eb | |||
eb3d1e3e4f | |||
6279dde2f2 | |||
ef310b2ae1 | |||
bfa6b80b8b | |||
fee102e818 | |||
896ee44ed6 | |||
134d69582c | |||
6ce5174301 | |||
58f7e89e39 | |||
36f18cd35c | |||
d7fa0fcaae | |||
275a26353e | |||
2dd9e41d93 | |||
195788a24a | |||
141f2c1d5c | |||
2114f49750 | |||
6e56dcdc79 | |||
01a37d8b03 | |||
f2db6b227c | |||
aa22fa21f9 | |||
dfaddba86c | |||
b089332a4d | |||
6968547b80 | |||
6c999f6ca4 | |||
016168652f | |||
4e4c1a0ea0 | |||
2a18501562 | |||
4b11cf171a | |||
71f1a3b1e2 | |||
e51d7a7a85 | |||
388dc24330 | |||
97bb7d0a5b | |||
ffac46c30c | |||
1f9f58938d | |||
585204bd61 | |||
80c9a971f9 | |||
28599523fc | |||
057c7fd6cb | |||
050bc3f3c4 | |||
c56b812f76 | |||
814fb1e775 | |||
4581091fc4 | |||
a4bb56f9ba | |||
8b90c081b0 | |||
687cb3ab86 | |||
9c5e1a0ea5 | |||
ebfad36a22 | |||
1b936e8ce6 | |||
c5a9add370 | |||
14686a3677 | |||
543dfc2a6a | |||
face9721d8 | |||
e8d49c06c0 | |||
334b25a226 | |||
e15819daf3 | |||
c1ffa9d0e0 | |||
3a55705044 | |||
02b81b3bca | |||
671a508ae3 | |||
e2c5839114 | |||
237d7f3188 | |||
b9b0495de9 | |||
6f0602ca17 | |||
2fa1dfacda | |||
f8b19d1d6e | |||
ce9603e382 | |||
37a7421e10 | |||
007974899f | |||
88105788ac | |||
6c09f016de | |||
2ee254e1a8 | |||
392e9e18f1 | |||
d928155df1 | |||
7e2dd7d3e1 | |||
2b7f356442 | |||
8e1208c974 | |||
4ce4f57acf | |||
18cffd6fbf | |||
088ff210a9 | |||
10a3ca0189 | |||
60e77c50ee | |||
3982f9daf0 | |||
6dcc3f0b91 | |||
2bb6d18f41 | |||
f0cf10b3b9 |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -22,7 +22,6 @@ Desktop.ini
|
||||
# commonly used paths in blender
|
||||
/blender.bin
|
||||
/user-config.py
|
||||
/BUILD_NOTES.txt
|
||||
|
||||
# local patches
|
||||
/*.patch
|
||||
@@ -33,9 +32,3 @@ Desktop.ini
|
||||
/doc/python_api/sphinx-in-tmp/
|
||||
/doc/python_api/sphinx-in/
|
||||
/doc/python_api/sphinx-out/
|
||||
/doc/python_api/rst/bmesh.ops.rst
|
||||
/doc/python_api/rst/in_menu.png
|
||||
/doc/python_api/rst/menu_id.png
|
||||
/doc/python_api/rst/op_prop.png
|
||||
/doc/python_api/rst/run_script.png
|
||||
/doc/python_api/rst/spacebar.png
|
||||
|
14
.gitmodules
vendored
14
.gitmodules
vendored
@@ -1,24 +1,16 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
branch = blender2.8
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
url = ../blender-translations.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "source/tools"]
|
||||
path = source/tools
|
||||
url = ../blender-dev-tools.git
|
||||
branch = master
|
||||
[submodule "scons"]
|
||||
path = scons
|
||||
url = ../scons.git
|
||||
ignore = all
|
||||
branch = master
|
||||
|
1962
CMakeLists.txt
1962
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
114
GNUmakefile
114
GNUmakefile
@@ -1,4 +1,4 @@
|
||||
# -*- mode: gnumakefile; tab-width: 4; indent-tabs-mode: t; -*-
|
||||
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
|
||||
# vim: tabstop=4
|
||||
#
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
@@ -87,13 +87,13 @@ ifndef NPROCS
|
||||
NPROCS:=$(shell nproc)
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
|
||||
endif
|
||||
ifeq ($(OS), FreeBSD)
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -113,21 +113,21 @@ CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
|
||||
# X11 spesific
|
||||
ifdef DISPLAY
|
||||
CMAKE_CONFIG_TOOL = cmake-gui
|
||||
else
|
||||
else
|
||||
CMAKE_CONFIG_TOOL = ccmake
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build Blender
|
||||
all: .FORCE
|
||||
all: FORCE
|
||||
@echo
|
||||
@echo Configuring Blender in \"$(BUILD_DIR)\" ...
|
||||
|
||||
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
||||
# # $(CMAKE_CONFIG); \
|
||||
# # fi
|
||||
|
||||
|
||||
# # do this always incase of failed initial build, could be smarter here...
|
||||
@$(CMAKE_CONFIG)
|
||||
|
||||
@@ -136,7 +136,7 @@ all: .FORCE
|
||||
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
|
||||
@echo
|
||||
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
|
||||
@echo Blender successfully built, run from: "$(BUILD_DIR)/bin/blender"
|
||||
@echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
|
||||
@echo
|
||||
|
||||
debug: all
|
||||
@@ -149,13 +149,13 @@ bpy: all
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration (save some cd'ing around)
|
||||
config: .FORCE
|
||||
config: FORCE
|
||||
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Help for build targets
|
||||
help: .FORCE
|
||||
help: FORCE
|
||||
@echo ""
|
||||
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
|
||||
@echo " * debug - build a debug binary"
|
||||
@@ -182,20 +182,14 @@ help: .FORCE
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Testing Targets (not associated with building blender)"
|
||||
@echo " * test - run ctest, currently tests import/export,"
|
||||
@echo " operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker"
|
||||
@echo " which detects errors in the cmake file list definitions"
|
||||
@echo " * test_pep8 - checks all python script are pep8"
|
||||
@echo " which are tagged to use the stricter formatting"
|
||||
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
|
||||
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
|
||||
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
|
||||
@echo " * test_style_c - checks C/C++ conforms with blenders style guide:"
|
||||
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_c - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
|
||||
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide:"
|
||||
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
|
||||
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo ""
|
||||
@echo "Static Source Code Checking (not associated with building blender)"
|
||||
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
|
||||
@@ -234,13 +228,13 @@ help: .FORCE
|
||||
# -----------------------------------------------------------------------------
|
||||
# Packages
|
||||
#
|
||||
package_debian: .FORCE
|
||||
package_debian: FORCE
|
||||
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
|
||||
|
||||
package_pacman: .FORCE
|
||||
package_pacman: FORCE
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
|
||||
|
||||
package_archive: .FORCE
|
||||
package_archive: FORCE
|
||||
make -C "$(BUILD_DIR)" -s package_archive
|
||||
@echo archive in "$(BUILD_DIR)/release"
|
||||
|
||||
@@ -248,24 +242,24 @@ package_archive: .FORCE
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
#
|
||||
test: .FORCE
|
||||
test: FORCE
|
||||
cd $(BUILD_DIR) ; ctest . --output-on-failure
|
||||
|
||||
# run pep8 check check on scripts we distribute.
|
||||
test_pep8: .FORCE
|
||||
test_pep8: FORCE
|
||||
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
|
||||
@echo "written: test_pep8.log"
|
||||
|
||||
# run some checks on our cmakefiles.
|
||||
test_cmake: .FORCE
|
||||
test_cmake: FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
||||
@echo "written: test_cmake_consistency.log"
|
||||
|
||||
# run deprecation tests, see if we have anything to remove.
|
||||
test_deprecated: .FORCE
|
||||
test_deprecated: FORCE
|
||||
$(PYTHON) tests/check_deprecated.py
|
||||
|
||||
test_style_c: .FORCE
|
||||
test_style_c: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
@@ -273,7 +267,7 @@ test_style_c: .FORCE
|
||||
"$(BLENDER_DIR)/source/creator" \
|
||||
--no-length-check
|
||||
|
||||
test_style_c_qtc: .FORCE
|
||||
test_style_c_qtc: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
@@ -286,7 +280,7 @@ test_style_c_qtc: .FORCE
|
||||
@echo "written: test_style.tasks"
|
||||
|
||||
|
||||
test_style_osl: .FORCE
|
||||
test_style_osl: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
@@ -294,7 +288,7 @@ test_style_osl: .FORCE
|
||||
"$(BLENDER_DIR)/release/scripts/templates_osl"
|
||||
|
||||
|
||||
test_style_osl_qtc: .FORCE
|
||||
test_style_osl_qtc: FORCE
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
@@ -309,13 +303,13 @@ test_style_osl_qtc: .FORCE
|
||||
# Project Files
|
||||
#
|
||||
|
||||
project_qtcreator: .FORCE
|
||||
project_qtcreator: FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_netbeans: .FORCE
|
||||
project_netbeans: FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_eclipse: .FORCE
|
||||
project_eclipse: FORCE
|
||||
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
|
||||
|
||||
|
||||
@@ -323,40 +317,40 @@ project_eclipse: .FORCE
|
||||
# Static Checking
|
||||
#
|
||||
|
||||
check_cppcheck: .FORCE
|
||||
check_cppcheck: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
|
||||
"$(BLENDER_DIR)/check_cppcheck.txt"
|
||||
@echo "written: check_cppcheck.txt"
|
||||
|
||||
check_clang_array: .FORCE
|
||||
check_clang_array: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
|
||||
|
||||
check_splint: .FORCE
|
||||
check_splint: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
|
||||
|
||||
check_sparse: .FORCE
|
||||
check_sparse: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
|
||||
|
||||
check_smatch: .FORCE
|
||||
check_smatch: FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
|
||||
|
||||
check_spelling_py: .FORCE
|
||||
check_spelling_py: FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/release/scripts"
|
||||
|
||||
check_spelling_c: .FORCE
|
||||
check_spelling_c: FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
@@ -365,7 +359,7 @@ check_spelling_c: .FORCE
|
||||
"$(BLENDER_DIR)/intern/guardedalloc" \
|
||||
"$(BLENDER_DIR)/intern/ghost" \
|
||||
|
||||
check_spelling_c_qtc: .FORCE
|
||||
check_spelling_c_qtc: FORCE
|
||||
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
@@ -376,13 +370,13 @@ check_spelling_c_qtc: .FORCE
|
||||
> \
|
||||
"$(BLENDER_DIR)/check_spelling_c.tasks"
|
||||
|
||||
check_spelling_osl: .FORCE
|
||||
check_spelling_osl: FORCE
|
||||
cd "$(BUILD_DIR)" ;\
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
|
||||
|
||||
check_descriptions: .FORCE
|
||||
check_descriptions: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
|
||||
|
||||
@@ -390,19 +384,19 @@ check_descriptions: .FORCE
|
||||
# Utilities
|
||||
#
|
||||
|
||||
tgz: .FORCE
|
||||
tgz: FORCE
|
||||
./build_files/utils/build_tgz.sh
|
||||
|
||||
icons: .FORCE
|
||||
icons: FORCE
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
|
||||
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
||||
|
||||
update: .FORCE
|
||||
update: FORCE
|
||||
if [ -d "../lib" ]; then \
|
||||
svn update ../lib/* ; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git submodule update --remote
|
||||
git submodule foreach git pull --rebase origin master
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -410,25 +404,23 @@ update: .FORCE
|
||||
#
|
||||
|
||||
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
|
||||
doc_py: .FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
|
||||
--python doc/python_api/sphinx_doc_gen.py
|
||||
doc_py: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
|
||||
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
|
||||
|
||||
doc_doxy: .FORCE
|
||||
doc_doxy: FORCE
|
||||
cd doc/doxygen; doxygen Doxyfile
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
|
||||
|
||||
doc_dna: .FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
|
||||
--python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
doc_dna: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
|
||||
|
||||
doc_man: .FORCE
|
||||
doc_man: FORCE
|
||||
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
|
||||
|
||||
help_features: .FORCE
|
||||
help_features: FORCE
|
||||
@$(PYTHON) -c \
|
||||
"import re; \
|
||||
print('\n'.join([ \
|
||||
@@ -439,9 +431,9 @@ help_features: .FORCE
|
||||
if w.startswith('WITH_')]))" | uniq
|
||||
|
||||
|
||||
clean: .FORCE
|
||||
clean: FORCE
|
||||
$(MAKE) -C "$(BUILD_DIR)" clean
|
||||
|
||||
.PHONY: all
|
||||
|
||||
.FORCE:
|
||||
FORCE:
|
||||
|
1420
SConstruct
Normal file
1420
SConstruct
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,12 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,7 +14,7 @@
|
||||
set(LLVM_VERSION_MINOR 4)
|
||||
@@ -13,7 +13,7 @@
|
||||
set(LLVM_VERSION_MAJOR 3)
|
||||
set(LLVM_VERSION_MINOR 1)
|
||||
|
||||
if (NOT PACKAGE_VERSION)
|
||||
- set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
|
||||
+ set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
|
||||
endif()
|
||||
-set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}svn")
|
||||
+set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}")
|
||||
|
||||
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
|
||||
|
1555
build_files/build_environment/prepare_release_env.sh
Executable file
1555
build_files/build_environment/prepare_release_env.sh
Executable file
File diff suppressed because it is too large
Load Diff
@@ -1,143 +0,0 @@
|
||||
# ######## Global feature set settings ########
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
|
||||
|
||||
# Detect which libc we'll be linking against.
|
||||
# Some of the paths will depend on this
|
||||
|
||||
if (EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
|
||||
message(STATUS "Building in GLibc-2.19 environment")
|
||||
set(GLIBC "2.19")
|
||||
set(MULTILIB "/x86_64-linux-gnu")
|
||||
elseif (EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
|
||||
message(STATUS "Building in GLibc-2.19 environment")
|
||||
set(GLIBC "2.19")
|
||||
set(MULTILIB "/i386-linux-gnu")
|
||||
elseif (EXISTS "/lib/libc-2.11.3.so")
|
||||
message(STATUS "Building in GLibc-2.11 environment")
|
||||
set(GLIBC "2.11")
|
||||
set(MULTILIB "")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown build environment")
|
||||
endif()
|
||||
|
||||
# Default to only build Blender, not the player
|
||||
set(WITH_BLENDER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Linux-specific build options ########
|
||||
# Options which are specific to Linux-only platforms
|
||||
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Official release-specific build options ########
|
||||
# Options which are specific to Linux release builds only
|
||||
set(WITH_JACK_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SYSTEM_GLEW OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_OPENMP_STATIC ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_PYTHON_INSTALL_NUMPY ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Release environment specific settings ########
|
||||
# All the hardcoded libraru paths and such
|
||||
|
||||
# LLVM libraries
|
||||
set(LLVM_VERSION "3.4" CACHE STRING "" FORCE)
|
||||
set(LLVM_ROOT_DIR "/opt/lib/llvm-${LLVM_VERSION}" CACHE STRING "" FORCE)
|
||||
set(LLVM_STATIC ON CACHE BOOL "" FORCE)
|
||||
|
||||
# BOOST libraries
|
||||
set(BOOST_ROOT "/opt/lib/boost" CACHE STRING "" FORCE)
|
||||
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
|
||||
|
||||
# FFmpeg libraries
|
||||
set(FFMPEG "/opt/lib/ffmpeg" CACHE STRING "" FORCE)
|
||||
set(FFMPEG_LIBRARIES
|
||||
avdevice avformat avcodec avutil avfilter swscale swresample
|
||||
/usr/lib${MULTILIB}/libxvidcore.a
|
||||
/usr/lib${MULTILIB}/libx264.a
|
||||
/usr/lib${MULTILIB}/libmp3lame.a
|
||||
/usr/lib${MULTILIB}/libvpx.a
|
||||
/usr/lib${MULTILIB}/libvorbis.a
|
||||
/usr/lib${MULTILIB}/libogg.a
|
||||
/usr/lib${MULTILIB}/libvorbisenc.a
|
||||
/usr/lib${MULTILIB}/libtheora.a
|
||||
/usr/lib${MULTILIB}/libschroedinger-1.0.a
|
||||
/usr/lib${MULTILIB}/liborc-0.4.a
|
||||
CACHE STRING "" FORCE
|
||||
)
|
||||
|
||||
# SndFile libraries
|
||||
set(SNDFILE_LIBRARY "/usr/lib/libsndfile.a;/usr/lib/libFLAC.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenAL libraries
|
||||
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)
|
||||
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include" CACHE STRING "" FORCE)
|
||||
set(OPENAL_LIBRARY
|
||||
${OPENAL_ROOT_DIR}/lib/libopenal.a
|
||||
${OPENAL_ROOT_DIR}/lib/libcommon.a
|
||||
CACHE STRING "" FORCE
|
||||
)
|
||||
|
||||
# OpenCollada libraries
|
||||
set(OPENCOLLADA_UTF_LIBRARY "" CACHE STRING "" FORCE)
|
||||
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
|
||||
set(PCRE_LIBRARY "/usr/lib${MULTILIB}/libpcre.a" CACHE STRING "" FORCE)
|
||||
set(XML2_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
|
||||
set(XML2_LIBRARY "/usr/lib${MULTILIB}/libxml2.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenColorIO libraries
|
||||
set(OPENCOLORIO_ROOT_DIR "/opt/lib/ocio" CACHE STRING "" FORCE)
|
||||
set(OPENCOLORIO_OPENCOLORIO_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libOpenColorIO.a" CACHE STRING "" FORCE)
|
||||
set(OPENCOLORIO_TINYXML_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libtinyxml.a" CACHE STRING "" FORCE)
|
||||
set(OPENCOLORIO_YAML-CPP_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libyaml-cpp.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenImageIO
|
||||
if(GLIBC EQUAL "2.19")
|
||||
set(OPENIMAGEIO_LIBRARY
|
||||
/opt/lib/oiio/lib/libOpenImageIO.a
|
||||
/opt/lib/oiio/lib/libOpenImageIO_Util.a
|
||||
/usr/lib${MULTILIB}/libwebp.a
|
||||
/usr/lib${MULTILIB}/liblzma.a
|
||||
/usr/lib${MULTILIB}/libjbig.a
|
||||
CACHE STRING "" FORCE
|
||||
)
|
||||
endif()
|
||||
|
||||
# OpenSubdiv libraries
|
||||
set(OPENSUBDIV_ROOT_DIR "/opt/lib/opensubdiv" CACHE STRING "" FORCE)
|
||||
set(OPENSUBDIV_OSDCPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdCPU.a" CACHE STRING "" FORCE)
|
||||
set(OPENSUBDIV_OSDGPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdGPU.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenEXR libraries
|
||||
set(OPENEXR_ROOT_DIR "/opt/lib/openexr" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_HALF_LIBRARY "/opt/lib/openexr/lib/libHalf.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_IEX_LIBRARY "/opt/lib/openexr/lib/libIex.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_ILMIMF_LIBRARY "/opt/lib/openexr/lib/libIlmImf.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_ILMTHREAD_LIBRARY "/opt/lib/openexr/lib/libIlmThread.a" CACHE STRING "" FORCE)
|
||||
set(OPENEXR_IMATH_LIBRARY "/opt/lib/openexr/lib/libImath.a" CACHE STRING "" FORCE)
|
||||
|
||||
# JeMalloc library
|
||||
set(JEMALLOC_LIBRARY "/opt/lib/jemalloc/lib/libjemalloc.a" CACHE STRING "" FORCE)
|
||||
|
||||
# Space navigation
|
||||
set(SPACENAV_ROOT_DIR "/opt/lib/libspnav" CACHE STRING "" FORCE)
|
||||
|
||||
# Force some system libraries to be static
|
||||
set(FFTW3_LIBRARY "/usr/lib${MULTILIB}/libfftw3.a" CACHE STRING "" FORCE)
|
||||
set(JPEG_LIBRARY "/usr/lib${MULTILIB}/libjpeg.a" CACHE STRING "" FORCE)
|
||||
set(PNG_LIBRARY "/usr/lib${MULTILIB}/libpng.a" CACHE STRING "" FORCE)
|
||||
set(TIFF_LIBRARY "/usr/lib${MULTILIB}/libtiff.a" CACHE STRING "" FORCE)
|
||||
set(ZLIB_LIBRARY "/usr/lib${MULTILIB}/libz.a" CACHE STRING "" FORCE)
|
||||
|
||||
# OpenVDB
|
||||
set(OPENVDB_LIBRARY
|
||||
/opt/lib/openvdb/lib/libopenvdb.a
|
||||
/opt/lib/blosc/lib/libblosc.a
|
||||
CACHE BOOL "" FORCE
|
||||
)
|
||||
|
||||
# Additional linking libraries
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++" CACHE STRING "" FORCE)
|
@@ -1,12 +0,0 @@
|
||||
# This is applied as an ovveride on top of blender_linux.config
|
||||
# Disables all the areas which are not needed for the player.
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
@@ -0,0 +1,5 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
@@ -0,0 +1,5 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
185
build_files/buildbot/config/user-config-glibc211-i686.py
Normal file
185
build_files/buildbot/config/user-config-glibc211-i686.py
Normal file
@@ -0,0 +1,185 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 4
|
||||
WITHOUT_BF_OVERWRITE_INSTALL = True
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = True
|
||||
WITH_BF_STATICOPENCOLLADA=True
|
||||
BF_OPENCOLLADA = '/opt/lib/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADASaxFrameworkLoader.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
|
||||
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
|
||||
BF_PCRE_LIB = ''
|
||||
BF_EXPAT_LIB = ''
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Blender player (would be enabled in it's own config)
|
||||
WITH_BF_PLAYER = False
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# FFT
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
WITH_BF_STATICOIIO = True
|
||||
BF_OIIO = '/opt/lib/oiio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
WITH_BF_STATICLLVM = False
|
||||
BF_LLVM = '/opt/lib/llvm-3.4.2'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# OpenSubdiv
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
WITH_BF_STATICOPENSUBDIV = True
|
||||
BF_OPENSUBDIV = '/opt/lib/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV}/lib/libosdCPU.a ${BF_OPENSUBDIV}/lib/libosdGPU.a'
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
185
build_files/buildbot/config/user-config-glibc211-x86_64.py
Normal file
185
build_files/buildbot/config/user-config-glibc211-x86_64.py
Normal file
@@ -0,0 +1,185 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 4
|
||||
WITHOUT_BF_OVERWRITE_INSTALL = True
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = True
|
||||
WITH_BF_STATICOPENCOLLADA=True
|
||||
BF_OPENCOLLADA = '/opt/lib/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADASaxFrameworkLoader.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
|
||||
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
|
||||
BF_PCRE_LIB = ''
|
||||
BF_EXPAT_LIB = ''
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Blender player (would be enabled in it's own config)
|
||||
WITH_BF_PLAYER = False
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# FFT
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
WITH_BF_STATICOIIO = True
|
||||
BF_OIIO = '/opt/lib/oiio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
WITH_BF_STATICLLVM = False
|
||||
BF_LLVM = '/opt/lib/llvm-3.4.2'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# OpenSubdiv
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
WITH_BF_STATICOPENSUBDIV = True
|
||||
BF_OPENSUBDIV = '/opt/lib/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV}/lib/libosdCPU.a ${BF_OPENSUBDIV}/lib/libosdGPU.a'
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
9
build_files/buildbot/config/user-config-mac-i386.py
Normal file
9
build_files/buildbot/config/user-config-mac-i386.py
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = True
|
||||
|
||||
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !
|
||||
|
||||
WITH_BF_COLLADA = False # we drop 32bit, newest collada is only x86_64 !
|
||||
|
6
build_files/buildbot/config/user-config-mac-x86_64.py
Normal file
6
build_files/buildbot/config/user-config-mac-x86_64.py
Normal file
@@ -0,0 +1,6 @@
|
||||
#CC = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang"
|
||||
#CXX = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang++"
|
||||
|
||||
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = True
|
126
build_files/buildbot/config/user-config-player-glibc211-i686.py
Normal file
126
build_files/buildbot/config/user-config-player-glibc211-i686.py
Normal file
@@ -0,0 +1,126 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 4
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = False
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Do not build blender when building blenderplayer
|
||||
WITH_BF_NOBLENDER = True
|
||||
WITH_BF_PLAYER = True
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Motion Tracking
|
||||
WITH_BF_LIBMV = False
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
@@ -0,0 +1,126 @@
|
||||
BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 4
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
# OpenCollada configuration
|
||||
WITH_BF_COLLADA = False
|
||||
|
||||
# FFMPEG configuration
|
||||
WITH_BF_FFMPEG = True
|
||||
WITH_BF_STATICFFMPEG = True
|
||||
|
||||
BF_FFMPEG = '/opt/lib/ffmpeg'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libavfilter.a ${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
|
||||
'${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libswresample.a ' + \
|
||||
'/usr/lib/libxvidcore.a /usr/lib/libx264.a /usr/lib/libmp3lame.a /usr/lib/libvpx.a /usr/lib/libvorbis.a ' + \
|
||||
'/usr/lib/libogg.a /usr/lib/libvorbisenc.a /usr/lib/libtheora.a /usr/lib/libschroedinger-1.0.a ' + \
|
||||
'/usr/lib/liborc-0.4.a'
|
||||
|
||||
# Don't depend on system's libstdc++
|
||||
WITH_BF_STATICCXX = True
|
||||
BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
WITH_BF_FREETYPE_STATIC = False
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
BF_OPENEXR = '/opt/lib/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
WITH_BF_STATICOPENEXR = True
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
WITH_BF_STATICTIFF = True
|
||||
BF_TIFF_LIB_STATIC = '${BF_TIFF}/lib/libtiff.a'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
WITH_BF_STATICJPEG = True
|
||||
BF_JPEG_LIB_STATIC= '${BF_JPEG}/lib/libjpeg.a'
|
||||
|
||||
WITH_BF_STATICLIBSAMPLERATE = True
|
||||
|
||||
WITH_BF_PNG = True
|
||||
WITH_BF_STATICPNG = True
|
||||
BF_PNG_LIB_STATIC = '${BF_PNG}/lib/libpng.a'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
WITH_BF_STATICOPENMP = True
|
||||
BF_OPENMP_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.a'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_BULLET = True
|
||||
|
||||
# Do not build blender when building blenderplayer
|
||||
WITH_BF_NOBLENDER = True
|
||||
WITH_BF_PLAYER = True
|
||||
|
||||
# Use jemalloc memory manager
|
||||
WITH_BF_JEMALLOC = True
|
||||
WITH_BF_STATICJEMALLOC = True
|
||||
BF_JEMALLOC = '/opt/lib/jemalloc'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
|
||||
# Use 3d mouse library
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = True
|
||||
BF_3DMOUSE = '/opt/lib/libspnav'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
|
||||
# Color management
|
||||
WITH_BF_OCIO = True
|
||||
WITH_BF_STATICOCIO = True
|
||||
BF_OCIO = '/opt/lib/ocio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = True
|
||||
BF_BOOST = '/opt/lib/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# JACK
|
||||
WITH_BF_JACK = True
|
||||
WITH_BF_JACK_DYNLOAD = True
|
||||
|
||||
# Motion Tracking
|
||||
WITH_BF_LIBMV = False
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_FFTW3 = True
|
||||
WITH_BF_STATICFFTW3 = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
@@ -4,10 +4,10 @@
|
||||
# <pep8 compliant>
|
||||
|
||||
# List of the branches being built automatically overnight
|
||||
NIGHT_SCHEDULE_BRANCHES = [None, "blender2.8"]
|
||||
NIGHT_SCHEDULE_BRANCHES = [None]
|
||||
|
||||
# List of the branches available for force build
|
||||
FORCE_SCHEDULE_BRANCHES = ["master", "blender2.8", "experimental-build"]
|
||||
FORCE_SCHEDULE_BRANCHES = ["master", "gooseberry", "experimental-build"]
|
||||
|
||||
"""
|
||||
Stock Twisted directory lister doesn't provide any information about last file
|
||||
@@ -87,14 +87,14 @@ c['change_source'] = GitPoller(
|
||||
|
||||
# CODEBASES
|
||||
#
|
||||
# Allow to control separately things like branches for each repo and submodules.
|
||||
# Allow to controll separately things like branches for each repo and submodules.
|
||||
|
||||
all_repositories = {
|
||||
r'git://git.blender.org/blender.git': 'blender',
|
||||
r'git://git.blender.org/blender-translations.git': 'blender-translations',
|
||||
r'git://git.blender.org/blender-addons.git': 'blender-addons',
|
||||
r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib',
|
||||
r'git://git.blender.org/blender-dev-tools.git': 'blender-dev-tools',
|
||||
r'git://git.blender.org/scons.git': 'scons',
|
||||
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
|
||||
}
|
||||
|
||||
@@ -127,16 +127,9 @@ def schedule_force_build(name):
|
||||
project=forcesched.FixedParameter(name="project", default="", hide=True)),
|
||||
# For now, hide other codebases.
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-translations"),
|
||||
forcesched.CodebaseParameter(
|
||||
codebase="blender-addons",
|
||||
branch=forcesched.ChoiceStringParameter(
|
||||
name="branch", choices=["master", "blender2.8"], default="master"),
|
||||
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
|
||||
project=forcesched.FixedParameter(name="project", default="", hide=True),
|
||||
revision=forcesched.FixedParameter(name="revision", default="", hide=True),
|
||||
),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-addons"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-dev-tools"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="scons"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="lib svn")],
|
||||
properties=[]))
|
||||
|
||||
@@ -146,17 +139,13 @@ def schedule_build(name, hour, minute=0):
|
||||
scheduler_name = "nightly " + name
|
||||
if current_branch:
|
||||
scheduler_name += ' ' + current_branch
|
||||
# Use special addons submodule branch when building blender2.8 branch.
|
||||
addons_branch = "master"
|
||||
if current_branch == "blender2.8":
|
||||
addons_branch = "blender2.8"
|
||||
c['schedulers'].append(timed.Nightly(name=scheduler_name,
|
||||
codebases={
|
||||
"blender": {"repository": ""},
|
||||
"blender-translations": {"repository": "", "branch": "master"},
|
||||
"blender-addons": {"repository": "", "branch": addons_branch},
|
||||
"blender-addons": {"repository": "", "branch": "master"},
|
||||
"blender-addons-contrib": {"repository": "", "branch": "master"},
|
||||
"blender-dev-tools": {"repository": "", "branch": "master"},
|
||||
"scons": {"repository": "", "branch": "master"},
|
||||
"lib svn": {"repository": "", "branch": "trunk"}},
|
||||
branch=current_branch,
|
||||
builderNames=[name],
|
||||
@@ -236,7 +225,8 @@ def git_step(branch=''):
|
||||
|
||||
|
||||
def git_submodules_update():
|
||||
command = ['git', 'submodule', 'update', '--remote']
|
||||
command = ['git', 'submodule', 'foreach', '--recursive',
|
||||
'git', 'pull', 'origin', 'master']
|
||||
return ShellCommand(name='Submodules Update',
|
||||
command=command,
|
||||
description='updating',
|
||||
@@ -245,10 +235,7 @@ def git_submodules_update():
|
||||
|
||||
|
||||
def lib_svn_step(dir):
|
||||
name = "lib svn"
|
||||
if dir == "darwin":
|
||||
name = "C++11 lib svn"
|
||||
return SVN(name=name,
|
||||
return SVN(name='lib svn',
|
||||
baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir,
|
||||
codebase='lib svn',
|
||||
mode='update',
|
||||
@@ -277,14 +264,11 @@ def generic_builder(id, libdir='', branch='', rsync=False):
|
||||
f = BuildFactory()
|
||||
if libdir != '':
|
||||
f.addStep(lib_svn_step(libdir))
|
||||
# Special trick to make sure we always have all the libs.
|
||||
if libdir.startswith("darwin"):
|
||||
f.addStep(lib_svn_step("darwin"))
|
||||
|
||||
for submodule in ('blender-translations',
|
||||
'blender-addons',
|
||||
'blender-addons-contrib',
|
||||
'blender-dev-tools'):
|
||||
'scons'):
|
||||
f.addStep(git_submodule_step(submodule))
|
||||
|
||||
f.addStep(git_step(branch))
|
||||
@@ -298,29 +282,41 @@ def generic_builder(id, libdir='', branch='', rsync=False):
|
||||
descriptionDone='packaged'))
|
||||
if rsync:
|
||||
f.addStep(rsync_step(id, branch, rsync_script))
|
||||
elif id.find('cmake') != -1:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
slavesrc='buildbot_upload.zip',
|
||||
masterdest=filename,
|
||||
maxsize=150 * 1024 * 1024))
|
||||
else:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
slavesrc='buildbot_upload.zip',
|
||||
masterdest=filename,
|
||||
maxsize=180 * 1024 * 1024,
|
||||
maxsize=150 * 1024 * 1024,
|
||||
workdir='install'))
|
||||
f.addStep(MasterShellCommand(name='unpack',
|
||||
command=['python2.7', unpack_script, filename],
|
||||
command=['python', unpack_script, filename],
|
||||
description='unpacking',
|
||||
descriptionDone='unpacked'))
|
||||
return f
|
||||
|
||||
# Builders
|
||||
# builders
|
||||
|
||||
add_builder(c, 'mac_x86_64_10_6_cmake', 'darwin-9.x.universal', generic_builder, hour=5)
|
||||
# add_builder(c, 'linux_glibc211_i686_cmake', '', generic_builder, hour=1)
|
||||
# add_builder(c, 'linux_glibc211_x86_64_cmake', '', generic_builder, hour=2)
|
||||
add_builder(c, 'linux_glibc219_i686_cmake', '', generic_builder, hour=3)
|
||||
add_builder(c, 'linux_glibc219_x86_64_cmake', '', generic_builder, hour=4)
|
||||
add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=5)
|
||||
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
|
||||
add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
|
||||
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
|
||||
#add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
|
||||
#add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
|
||||
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
|
||||
add_builder(c, 'win32_cmake_vc2015', 'windows_vc14', generic_builder, hour=5)
|
||||
add_builder(c, 'win64_cmake_vc2015', 'win64_vc14', generic_builder, hour=6)
|
||||
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
|
||||
#add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
|
||||
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
|
||||
#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder, hour=2)
|
||||
|
||||
# Multiview branch
|
||||
add_builder(c, 'multiview_win64_scons', 'win64', generic_builder, 'multiview', hour=4)
|
||||
add_builder(c, 'multiview_win32_scons', 'windows', generic_builder, 'multiview', hour=5)
|
||||
|
||||
# STATUS TARGETS
|
||||
#
|
||||
|
@@ -67,9 +67,6 @@ def get_platform(filename):
|
||||
|
||||
|
||||
def get_branch(filename):
|
||||
if filename.startswith("blender-2.8"):
|
||||
return "blender2.8"
|
||||
|
||||
tokens = filename.split("-")
|
||||
branch = ""
|
||||
|
||||
|
@@ -31,175 +31,168 @@ if len(sys.argv) < 2:
|
||||
builder = sys.argv[1]
|
||||
|
||||
# we run from build/ directory
|
||||
blender_dir = os.path.join('..', 'blender.git')
|
||||
|
||||
|
||||
def parse_header_file(filename, define):
|
||||
import re
|
||||
regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
|
||||
with open(filename, "r") as file:
|
||||
for l in file:
|
||||
match = regex.match(l)
|
||||
if match:
|
||||
return match.group(1)
|
||||
return None
|
||||
blender_dir = '../blender.git'
|
||||
|
||||
if 'cmake' in builder:
|
||||
# cmake
|
||||
|
||||
# Some fine-tuning configuration
|
||||
blender_dir = os.path.join('..', blender_dir)
|
||||
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
|
||||
install_dir = os.path.abspath(os.path.join('..', 'install', builder))
|
||||
targets = ['blender']
|
||||
# set build options
|
||||
cmake_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
|
||||
|
||||
chroot_name = None # If not None command will be delegated to that chroot
|
||||
cuda_chroot_name = None # If not None cuda compilationcommand will be delegated to that chroot
|
||||
build_cubins = True # Whether to build Cycles CUDA kernels
|
||||
bits = 64
|
||||
if builder.endswith('mac_x86_64_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
|
||||
elif builder.endswith('mac_i386_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=i386')
|
||||
elif builder.endswith('mac_ppc_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
|
||||
|
||||
# Config file to be used (relative to blender's sources root)
|
||||
cmake_config_file = "build_files/cmake/config/blender_full.cmake"
|
||||
cmake_player_config_file = None
|
||||
cmake_cuda_config_file = None
|
||||
if 'win64' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
|
||||
elif 'win32' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013"'])
|
||||
|
||||
# Set build options.
|
||||
cmake_options = []
|
||||
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
|
||||
cuda_cmake_options = []
|
||||
|
||||
if builder.startswith('mac'):
|
||||
# Set up OSX architecture
|
||||
if builder.endswith('x86_64_10_6_cmake'):
|
||||
cmake_extra_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
|
||||
cmake_extra_options.append('-DWITH_CODEC_QUICKTIME=OFF')
|
||||
cmake_extra_options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6')
|
||||
|
||||
|
||||
elif builder.startswith('win'):
|
||||
if builder.endswith('_vc2015'):
|
||||
if builder.startswith('win64'):
|
||||
cmake_options.extend(['-G', 'Visual Studio 14 2015 Win64'])
|
||||
elif builder.startswith('win32'):
|
||||
bits = 32
|
||||
cmake_options.extend(['-G', 'Visual Studio 14 2015'])
|
||||
cmake_extra_options.append('-DCUDA_NVCC_FLAGS=--cl-version;2013;' +
|
||||
'--compiler-bindir;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin')
|
||||
else:
|
||||
if builder.startswith('win64'):
|
||||
cmake_options.extend(['-G', 'Visual Studio 12 2013 Win64'])
|
||||
elif builder.startswith('win32'):
|
||||
bits = 32
|
||||
cmake_options.extend(['-G', 'Visual Studio 12 2013'])
|
||||
|
||||
elif builder.startswith('linux'):
|
||||
tokens = builder.split("_")
|
||||
glibc = tokens[1]
|
||||
if glibc == 'glibc219':
|
||||
deb_name = "jessie"
|
||||
elif glibc == 'glibc211':
|
||||
deb_name = "squeeze"
|
||||
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
|
||||
cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_' + deb_name + '_x86_64'
|
||||
targets = ['player', 'blender']
|
||||
elif builder.endswith('i686_cmake'):
|
||||
bits = 32
|
||||
chroot_name = 'buildbot_' + deb_name + '_i686'
|
||||
cuda_chroot_name = 'buildbot_' + deb_name + '_x86_64'
|
||||
targets = ['player', 'blender', 'cuda']
|
||||
|
||||
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
|
||||
|
||||
# Prepare CMake options needed to configure cuda binaries compilation.
|
||||
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=%s" % ('ON' if build_cubins else 'OFF'))
|
||||
cuda_cmake_options.append("-DCYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61")
|
||||
if build_cubins or 'cuda' in targets:
|
||||
if bits == 32:
|
||||
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=OFF")
|
||||
else:
|
||||
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=ON")
|
||||
|
||||
# Only modify common cmake options if cuda doesn't require separate target.
|
||||
if 'cuda' not in targets:
|
||||
cmake_options += cuda_cmake_options
|
||||
|
||||
cmake_options.append("-DCMAKE_INSTALL_PREFIX=%s" % (install_dir))
|
||||
|
||||
cmake_options += cmake_extra_options
|
||||
|
||||
# Prepare chroot command prefix if needed
|
||||
if chroot_name:
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
|
||||
if 'win32' not in builder:
|
||||
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
|
||||
else:
|
||||
chroot_prefix = []
|
||||
if cuda_chroot_name:
|
||||
cuda_chroot_prefix = ['schroot', '-c', cuda_chroot_name, '--']
|
||||
else:
|
||||
cuda_chroot_prefix = chroot_prefix[:]
|
||||
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=0")
|
||||
# configure and make
|
||||
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
|
||||
# Make sure no garbage remained from the previous run
|
||||
if 'win32' in builder:
|
||||
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/Property:PlatformToolset=v120_xp', '/p:Configuration=Release'])
|
||||
elif 'win64' in builder:
|
||||
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
|
||||
else:
|
||||
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
# scons
|
||||
os.chdir(blender_dir)
|
||||
scons_cmd = [python_bin, 'scons/scons.py']
|
||||
scons_options = ['BF_FANCY=False']
|
||||
|
||||
# We're using the same rules as release builder, so tweak
|
||||
# build and install dirs
|
||||
build_dir = os.path.join('..', 'build', builder)
|
||||
install_dir = os.path.join('..', 'install', builder)
|
||||
|
||||
# Clean install directory so we'll be sure there's no
|
||||
# residual libs and files remained from the previous install.
|
||||
if os.path.isdir(install_dir):
|
||||
shutil.rmtree(install_dir)
|
||||
|
||||
for target in targets:
|
||||
print("Building target %s" % (target))
|
||||
# Construct build directory name based on the target
|
||||
target_build_dir = build_dir
|
||||
target_chroot_prefix = chroot_prefix[:]
|
||||
if target != 'blender':
|
||||
target_build_dir += '_' + target
|
||||
target_name = 'install'
|
||||
# Make sure build directory exists and enter it
|
||||
if not os.path.isdir(target_build_dir):
|
||||
os.mkdir(target_build_dir)
|
||||
os.chdir(target_build_dir)
|
||||
# Tweaking CMake options to respect the target
|
||||
target_cmake_options = cmake_options[:]
|
||||
if target == 'player':
|
||||
target_cmake_options.append("-C" + os.path.join(blender_dir, cmake_player_config_file))
|
||||
elif target == 'cuda':
|
||||
target_cmake_options += cuda_cmake_options
|
||||
target_chroot_prefix = cuda_chroot_prefix[:]
|
||||
target_name = 'cycles_kernel_cuda'
|
||||
# If cuda binaries are compiled as a separate target, make sure
|
||||
# other targets don't compile cuda binaries.
|
||||
if 'cuda' in targets and target != 'cuda':
|
||||
target_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
|
||||
# Configure the build
|
||||
print("CMake options:")
|
||||
print(target_cmake_options)
|
||||
if os.path.exists('CMakeCache.txt'):
|
||||
print("Removing CMake cache")
|
||||
os.remove('CMakeCache.txt')
|
||||
retcode = subprocess.call(target_chroot_prefix + ['cmake', blender_dir] + target_cmake_options)
|
||||
if retcode != 0:
|
||||
print('Condifuration FAILED!')
|
||||
sys.exit(retcode)
|
||||
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
config_dir = os.path.join(buildbot_dir, 'config')
|
||||
|
||||
if 'win32' in builder or 'win64' in builder:
|
||||
command = ['cmake', '--build', '.', '--target', target_name, '--config', 'Release']
|
||||
else:
|
||||
command = target_chroot_prefix + ['make', '-s', '-j2', target_name]
|
||||
if builder.find('linux') != -1:
|
||||
configs = []
|
||||
if builder.endswith('linux_glibc211_x86_64_scons'):
|
||||
configs = ['user-config-player-glibc211-x86_64.py',
|
||||
'user-config-cuda-glibc211-x86_64.py',
|
||||
'user-config-glibc211-x86_64.py'
|
||||
]
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
cuda_chroot = 'buildbot_squeeze_x86_64'
|
||||
elif builder.endswith('linux_glibc211_i386_scons'):
|
||||
configs = ['user-config-player-glibc211-i686.py',
|
||||
'user-config-cuda-glibc211-i686.py',
|
||||
'user-config-glibc211-i686.py']
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
|
||||
print("Executing command:")
|
||||
print(command)
|
||||
retcode = subprocess.call(command)
|
||||
# use 64bit cuda toolkit, so there'll be no memory limit issues
|
||||
cuda_chroot = 'buildbot_squeeze_x86_64'
|
||||
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
# Compilation will happen inside of chroot environment
|
||||
prog_scons_cmd = ['schroot', '-c', chroot_name, '--'] + scons_cmd
|
||||
cuda_scons_cmd = ['schroot', '-c', cuda_chroot, '--'] + scons_cmd
|
||||
|
||||
if builder.startswith('linux') and target == 'cuda':
|
||||
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
|
||||
blender_version = int(parse_header_file(blender_h, 'BLENDER_VERSION'))
|
||||
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
|
||||
kernels = os.path.join(target_build_dir, 'intern', 'cycles', 'kernel')
|
||||
install_kernels = os.path.join(install_dir, blender_version, 'scripts', 'addons', 'cycles', 'lib')
|
||||
os.mkdir(install_kernels)
|
||||
print("Copying cuda binaries from %s to %s" % (kernels, install_kernels))
|
||||
os.system('cp %s/*.cubin %s' % (kernels, install_kernels))
|
||||
common_options = ['BF_INSTALLDIR=' + install_dir] + scons_options
|
||||
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
||||
for config in configs:
|
||||
config_fpath = os.path.join(config_dir, config)
|
||||
|
||||
scons_options = []
|
||||
|
||||
if config.find('player') != -1:
|
||||
scons_options.append('BF_BUILDDIR=%s_player' % (build_dir))
|
||||
elif config.find('cuda') != -1:
|
||||
scons_options.append('BF_BUILDDIR=%s_cuda' % (build_dir))
|
||||
else:
|
||||
scons_options.append('BF_BUILDDIR=%s' % (build_dir))
|
||||
|
||||
scons_options += common_options
|
||||
|
||||
if config.find('player') != -1:
|
||||
scons_options.append('blenderplayer')
|
||||
cur_scons_cmd = prog_scons_cmd
|
||||
elif config.find('cuda') != -1:
|
||||
scons_options.append('cudakernels')
|
||||
cur_scons_cmd = cuda_scons_cmd
|
||||
|
||||
if config.find('i686') != -1:
|
||||
scons_options.append('BF_BITNESS=32')
|
||||
elif config.find('x86_64') != -1:
|
||||
scons_options.append('BF_BITNESS=64')
|
||||
else:
|
||||
scons_options.append('blender')
|
||||
cur_scons_cmd = prog_scons_cmd
|
||||
|
||||
scons_options.append('BF_CONFIG=' + config_fpath)
|
||||
|
||||
retcode = subprocess.call(cur_scons_cmd + scons_options)
|
||||
if retcode != 0:
|
||||
print('Error building rules with config ' + config)
|
||||
sys.exit(retcode)
|
||||
|
||||
sys.exit(0)
|
||||
else:
|
||||
if builder.find('win') != -1:
|
||||
bitness = '32'
|
||||
|
||||
if builder.find('win64') != -1:
|
||||
bitness = '64'
|
||||
|
||||
scons_options.append('BF_INSTALLDIR=' + install_dir)
|
||||
scons_options.append('BF_BUILDDIR=' + build_dir)
|
||||
scons_options.append('BF_BITNESS=' + bitness)
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
if builder.find('mingw') != -1:
|
||||
scons_options.append('BF_TOOLSET=mingw')
|
||||
if builder.endswith('vc2013'):
|
||||
scons_options.append('MSVS_VERSION=12.0')
|
||||
scons_options.append('MSVC_VERSION=12.0')
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=1')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
scons_options.append('BF_NUMJOBS=1')
|
||||
|
||||
elif builder.find('mac') != -1:
|
||||
if builder.find('x86_64') != -1:
|
||||
config = 'user-config-mac-x86_64.py'
|
||||
else:
|
||||
config = 'user-config-mac-i386.py'
|
||||
|
||||
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
|
||||
|
||||
if builder.find('win') != -1:
|
||||
if not os.path.exists(install_dir):
|
||||
os.makedirs(install_dir)
|
||||
if builder.endswith('vc2013'):
|
||||
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
|
||||
if builder.find('win64') == -1:
|
||||
dlls_path = '..\\..\\..\\redist\\x86'
|
||||
else:
|
||||
dlls_path = '..\\..\\..\\redist\\amd64'
|
||||
for dll in dlls:
|
||||
shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
|
||||
sys.exit(retcode)
|
||||
|
@@ -36,91 +36,112 @@ builder = sys.argv[1]
|
||||
# Never write branch if it is master.
|
||||
branch = sys.argv[2] if (len(sys.argv) >= 3 and sys.argv[2] != 'master') else ''
|
||||
|
||||
blender_dir = os.path.join('..', 'blender.git')
|
||||
build_dir = os.path.join('..', 'build', builder)
|
||||
install_dir = os.path.join('..', 'install', builder)
|
||||
buildbot_upload_zip = os.path.abspath(os.path.join(os.path.dirname(install_dir), "buildbot_upload.zip"))
|
||||
# scons does own packaging
|
||||
if builder.find('scons') != -1:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
upload_filename = None # Name of the archive to be uploaded
|
||||
# (this is the name of archive which will appear on the
|
||||
# download page)
|
||||
upload_filepath = None # Filepath to be uploaded to the server
|
||||
# (this folder will be packed)
|
||||
os.chdir('../blender.git')
|
||||
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
|
||||
|
||||
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
config_dir = os.path.join(buildbot_dir, 'config')
|
||||
build_dir = os.path.join('..', 'build', builder)
|
||||
install_dir = os.path.join('..', 'install', builder)
|
||||
|
||||
def parse_header_file(filename, define):
|
||||
import re
|
||||
regex = re.compile("^#\s*define\s+%s\s+(.*)" % define)
|
||||
with open(filename, "r") as file:
|
||||
for l in file:
|
||||
match = regex.match(l)
|
||||
if match:
|
||||
return match.group(1)
|
||||
return None
|
||||
if builder.find('linux') != -1:
|
||||
scons_options += ['WITH_BF_NOBLENDER=True', 'WITH_BF_PLAYER=False',
|
||||
'BF_BUILDDIR=' + build_dir,
|
||||
'BF_INSTALLDIR=' + install_dir,
|
||||
'WITHOUT_BF_INSTALL=True']
|
||||
|
||||
config = None
|
||||
bits = None
|
||||
|
||||
# Make sure install directory always exists
|
||||
if not os.path.exists(install_dir):
|
||||
os.makedirs(install_dir)
|
||||
if builder.endswith('linux_glibc211_x86_64_scons'):
|
||||
config = 'user-config-glibc211-x86_64.py'
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
bits = 64
|
||||
elif builder.endswith('linux_glibc211_i386_scons'):
|
||||
config = 'user-config-glibc211-i686.py'
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
bits = 32
|
||||
|
||||
if config is not None:
|
||||
config_fpath = os.path.join(config_dir, config)
|
||||
scons_options.append('BF_CONFIG=' + config_fpath)
|
||||
|
||||
def create_tar_bz2(src, dest, package_name):
|
||||
# One extra to remove leading os.sep when cleaning root for package_root
|
||||
ln = len(src) + 1
|
||||
flist = list()
|
||||
blender = os.path.join(install_dir, 'blender')
|
||||
blenderplayer = os.path.join(install_dir, 'blenderplayer')
|
||||
subprocess.call(['schroot', '-c', chroot_name, '--', 'strip', '--strip-all', blender, blenderplayer])
|
||||
|
||||
# Create list of tuples containing file and archive name
|
||||
for root, dirs, files in os.walk(src):
|
||||
package_root = os.path.join(package_name, root[ln:])
|
||||
flist.extend([(os.path.join(root, file), os.path.join(package_root, file)) for file in files])
|
||||
extra = '/' + os.path.join('home', 'sources', 'release-builder', 'extra')
|
||||
mesalibs = os.path.join(extra, 'mesalibs' + str(bits) + '.tar.bz2')
|
||||
software_gl = os.path.join(extra, 'blender-softwaregl')
|
||||
|
||||
import tarfile
|
||||
package = tarfile.open(dest, 'w:bz2')
|
||||
for entry in flist:
|
||||
package.add(entry[0], entry[1], recursive=False)
|
||||
package.close()
|
||||
os.system('tar -xpf %s -C %s' % (mesalibs, install_dir))
|
||||
os.system('cp %s %s' % (software_gl, install_dir))
|
||||
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
|
||||
|
||||
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', python_bin, 'scons/scons.py'] + scons_options)
|
||||
|
||||
if builder.find('cmake') != -1:
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
if builder.find('win') != -1:
|
||||
bitness = '32'
|
||||
|
||||
if builder.find('win64') != -1:
|
||||
bitness = '64'
|
||||
|
||||
scons_options.append('BF_INSTALLDIR=' + install_dir)
|
||||
scons_options.append('BF_BUILDDIR=' + build_dir)
|
||||
scons_options.append('BF_BITNESS=' + bitness)
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
if builder.find('mingw') != -1:
|
||||
scons_options.append('BF_TOOLSET=mingw')
|
||||
if builder.endswith('vc2013'):
|
||||
scons_options.append('MSVS_VERSION=12.0')
|
||||
scons_options.append('MSVC_VERSION=12.0')
|
||||
|
||||
elif builder.find('mac') != -1:
|
||||
if builder.find('x86_64') != -1:
|
||||
config = 'user-config-mac-x86_64.py'
|
||||
else:
|
||||
config = 'user-config-mac-i386.py'
|
||||
|
||||
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
# CMake
|
||||
if 'win' in builder or 'mac' in builder:
|
||||
os.chdir(build_dir)
|
||||
|
||||
if 'win' in builder:
|
||||
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
retcode = subprocess.call(['cpack', '-G', 'ZIP'])
|
||||
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
|
||||
|
||||
# TODO(sergey): Such magic usually happens in SCon's packaging but we don't have it
|
||||
# TODO(sergey): Such magic usually happens in SCon's packaging bu we don't have it
|
||||
# in the CMake yet. For until then we do some magic here.
|
||||
tokens = result_file.split('-')
|
||||
blender_version = tokens[1].split('.')
|
||||
blender_full_version = '.'.join(blender_version[0:2])
|
||||
git_hash = tokens[2].split('.')[1]
|
||||
platform = builder.split('_')[0]
|
||||
if platform == 'mac':
|
||||
# Special exception for OSX
|
||||
platform = 'OSX-10.6-'
|
||||
if builder.endswith('x86_64_10_6_cmake'):
|
||||
platform += 'x86_64'
|
||||
elif builder.endswith('i386_10_6_cmake'):
|
||||
platform += 'i386'
|
||||
elif builder.endswith('ppc_10_6_cmake'):
|
||||
platform += 'ppc'
|
||||
if builder.endswith('vc2015'):
|
||||
platform += "-vc14"
|
||||
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
|
||||
# NOTE: Blender 2.8 is already respected by blender_full_version.
|
||||
if branch != '' and branch != 'blender2.8':
|
||||
if branch != '':
|
||||
builderified_name = branch + "-" + builderified_name
|
||||
|
||||
os.rename(result_file, "{}.zip".format(builderified_name))
|
||||
# create zip file
|
||||
try:
|
||||
if os.path.exists(buildbot_upload_zip):
|
||||
os.remove(buildbot_upload_zip)
|
||||
z = zipfile.ZipFile(buildbot_upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
upload_zip = "buildbot_upload.zip"
|
||||
if os.path.exists(upload_zip):
|
||||
os.remove(upload_zip)
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write("{}.zip".format(builderified_name))
|
||||
z.close()
|
||||
sys.exit(retcode)
|
||||
@@ -128,115 +149,48 @@ if builder.find('cmake') != -1:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
elif builder.startswith('linux_'):
|
||||
blender = os.path.join(install_dir, 'blender')
|
||||
blenderplayer = os.path.join(install_dir, 'blenderplayer')
|
||||
|
||||
buildinfo_h = os.path.join(build_dir, "source", "creator", "buildinfo.h")
|
||||
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
|
||||
# clean release directory if it already exists
|
||||
release_dir = 'release'
|
||||
|
||||
# Get version information
|
||||
blender_version = int(parse_header_file(blender_h, 'BLENDER_VERSION'))
|
||||
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
|
||||
blender_hash = parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1]
|
||||
blender_glibc = builder.split('_')[1]
|
||||
if os.path.exists(release_dir):
|
||||
for f in os.listdir(release_dir):
|
||||
if os.path.isfile(os.path.join(release_dir, f)):
|
||||
os.remove(os.path.join(release_dir, f))
|
||||
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
bits = 64
|
||||
blender_arch = 'x86_64'
|
||||
elif builder.endswith('i686_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
bits = 32
|
||||
blender_arch = 'i686'
|
||||
|
||||
# Strip all unused symbols from the binaries
|
||||
print("Stripping binaries...")
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
subprocess.call(chroot_prefix + ['strip', '--strip-all', blender, blenderplayer])
|
||||
|
||||
print("Stripping python...")
|
||||
py_target = os.path.join(install_dir, blender_version)
|
||||
subprocess.call(chroot_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
|
||||
|
||||
# Copy all specific files which are too specific to be copied by
|
||||
# the CMake rules themselves
|
||||
print("Copying extra scripts and libs...")
|
||||
|
||||
extra = '/' + os.path.join('home', 'sources', 'release-builder', 'extra')
|
||||
mesalibs = os.path.join(extra, 'mesalibs' + str(bits) + '.tar.bz2')
|
||||
software_gl = os.path.join(blender_dir, 'release', 'bin', 'blender-softwaregl')
|
||||
icons = os.path.join(blender_dir, 'release', 'freedesktop', 'icons')
|
||||
|
||||
os.system('tar -xpf %s -C %s' % (mesalibs, install_dir))
|
||||
os.system('cp %s %s' % (software_gl, install_dir))
|
||||
os.system('cp -r %s %s' % (icons, install_dir))
|
||||
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
|
||||
|
||||
# Construct archive name
|
||||
package_name = 'blender-%s-%s-linux-%s-%s' % (blender_version,
|
||||
blender_hash,
|
||||
blender_glibc,
|
||||
blender_arch)
|
||||
# NOTE: Blender 2.8 is already respected by blender_full_version.
|
||||
if branch != '' and branch != 'blender2.8':
|
||||
package_name = branch + "-" + package_name
|
||||
|
||||
upload_filename = package_name + ".tar.bz2"
|
||||
|
||||
print("Creating .tar.bz2 archive")
|
||||
upload_filepath = install_dir + '.tar.bz2'
|
||||
create_tar_bz2(install_dir, upload_filepath, package_name)
|
||||
else:
|
||||
print("Unknown building system")
|
||||
# create release package
|
||||
try:
|
||||
subprocess.call(['make', 'package_archive'])
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Make package release failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
# find release directory, must exist this time
|
||||
if not os.path.exists(release_dir):
|
||||
sys.stderr.write("Failed to find release directory %r.\n" % release_dir)
|
||||
sys.exit(1)
|
||||
|
||||
if upload_filepath is None:
|
||||
# clean release directory if it already exists
|
||||
release_dir = 'release'
|
||||
# find release package
|
||||
file = None
|
||||
filepath = None
|
||||
|
||||
if os.path.exists(release_dir):
|
||||
for f in os.listdir(release_dir):
|
||||
if os.path.isfile(os.path.join(release_dir, f)):
|
||||
os.remove(os.path.join(release_dir, f))
|
||||
for f in os.listdir(release_dir):
|
||||
rf = os.path.join(release_dir, f)
|
||||
if os.path.isfile(rf) and f.startswith('blender'):
|
||||
file = f
|
||||
filepath = rf
|
||||
|
||||
# create release package
|
||||
try:
|
||||
subprocess.call(['make', 'package_archive'])
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Make package release failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
# find release directory, must exist this time
|
||||
if not os.path.exists(release_dir):
|
||||
sys.stderr.write("Failed to find release directory %r.\n" % release_dir)
|
||||
sys.exit(1)
|
||||
|
||||
# find release package
|
||||
file = None
|
||||
filepath = None
|
||||
|
||||
for f in os.listdir(release_dir):
|
||||
rf = os.path.join(release_dir, f)
|
||||
if os.path.isfile(rf) and f.startswith('blender'):
|
||||
file = f
|
||||
filepath = rf
|
||||
|
||||
if not file:
|
||||
sys.stderr.write("Failed to find release package.\n")
|
||||
sys.exit(1)
|
||||
|
||||
upload_filename = file
|
||||
upload_filepath = filepath
|
||||
if not file:
|
||||
sys.stderr.write("Failed to find release package.\n")
|
||||
sys.exit(1)
|
||||
|
||||
# create zip file
|
||||
try:
|
||||
upload_zip = os.path.join(buildbot_upload_zip)
|
||||
upload_zip = "buildbot_upload.zip"
|
||||
if os.path.exists(upload_zip):
|
||||
os.remove(upload_zip)
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write(upload_filepath, arcname=upload_filename)
|
||||
z.write(filepath, arcname=file)
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
|
@@ -19,7 +19,6 @@
|
||||
# <pep8 compliant>
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
# get builder name
|
||||
@@ -34,26 +33,8 @@ blender_dir = '../blender.git'
|
||||
|
||||
if "cmake" in builder:
|
||||
# cmake
|
||||
|
||||
print("Automated tests are still DISABLED!")
|
||||
sys.exit(0)
|
||||
|
||||
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
|
||||
chroot_name = None
|
||||
chroot_prefix = []
|
||||
|
||||
"""
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_x86_64'
|
||||
elif builder.endswith('i686_cmake'):
|
||||
chroot_name = 'buildbot_squeeze_i686'
|
||||
if chroot_name:
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
"""
|
||||
|
||||
os.chdir(build_dir)
|
||||
retcode = subprocess.call(chroot_prefix + ['ctest', '--output-on-failure'])
|
||||
retcode = subprocess.call(['ctest', '.' '--output-on-failure'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
||||
# scons
|
||||
pass
|
||||
|
@@ -1,70 +0,0 @@
|
||||
# - Find Alembic library
|
||||
# Find the native Alembic includes and libraries
|
||||
# This module defines
|
||||
# ALEMBIC_INCLUDE_DIRS, where to find Alembic headers, Set when
|
||||
# ALEMBIC_INCLUDE_DIR is found.
|
||||
# ALEMBIC_LIBRARIES, libraries to link against to use Alembic.
|
||||
# ALEMBIC_ROOT_DIR, The base directory to search for Alembic.
|
||||
# This can also be an environment variable.
|
||||
# ALEMBIC_FOUND, If false, do not try to use Alembic.
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If ALEMBIC_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT ALEMBIC_ROOT_DIR AND NOT $ENV{ALEMBIC_ROOT_DIR} STREQUAL "")
|
||||
SET(ALEMBIC_ROOT_DIR $ENV{ALEMBIC_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_alembic_SEARCH_DIRS
|
||||
${ALEMBIC_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/alembic
|
||||
)
|
||||
|
||||
FIND_PATH(ALEMBIC_INCLUDE_DIR
|
||||
NAMES
|
||||
Alembic/Abc/All.h
|
||||
HINTS
|
||||
${_alembic_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ALEMBIC_LIBRARY
|
||||
NAMES
|
||||
Alembic
|
||||
HINTS
|
||||
${_alembic_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib lib/static
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALEMBIC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALEMBIC DEFAULT_MSG ALEMBIC_LIBRARY ALEMBIC_INCLUDE_DIR)
|
||||
|
||||
IF(ALEMBIC_FOUND)
|
||||
SET(ALEMBIC_LIBRARIES ${ALEMBIC_LIBRARY})
|
||||
SET(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
ENDIF(ALEMBIC_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
ALEMBIC_INCLUDE_DIR
|
||||
ALEMBIC_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_alembic_SEARCH_DIRS)
|
@@ -1,69 +0,0 @@
|
||||
# - Find HDF5 library
|
||||
# Find the native HDF5 includes and libraries
|
||||
# This module defines
|
||||
# HDF5_INCLUDE_DIRS, where to find hdf5.h, Set when HDF5_INCLUDE_DIR is found.
|
||||
# HDF5_LIBRARIES, libraries to link against to use HDF5.
|
||||
# HDF5_ROOT_DIR, The base directory to search for HDF5.
|
||||
# This can also be an environment variable.
|
||||
# HDF5_FOUND, If false, do not try to use HDF5.
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If HDF5_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT HDF5_ROOT_DIR AND NOT $ENV{HDF5_ROOT_DIR} STREQUAL "")
|
||||
SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_hdf5_SEARCH_DIRS
|
||||
${HDF5_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/hdf5
|
||||
)
|
||||
|
||||
FIND_LIBRARY(HDF5_LIBRARY
|
||||
NAMES
|
||||
hdf5
|
||||
HINTS
|
||||
${_hdf5_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_PATH(HDF5_INCLUDE_DIR
|
||||
NAMES
|
||||
hdf5.h
|
||||
HINTS
|
||||
${_hdf5_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set HDF5_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HDF5 DEFAULT_MSG HDF5_LIBRARY HDF5_INCLUDE_DIR)
|
||||
|
||||
IF(HDF5_FOUND)
|
||||
SET(HDF5_LIBRARIES ${HDF5_LIBRARY})
|
||||
SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
|
||||
ENDIF(HDF5_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
HDF5_INCLUDE_DIR
|
||||
HDF5_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_hdf5_SEARCH_DIRS)
|
@@ -1,15 +1,15 @@
|
||||
# - Find JACK library
|
||||
# Find the native JACK includes and library
|
||||
# - Find Jack library
|
||||
# Find the native Jack includes and library
|
||||
# This module defines
|
||||
# JACK_INCLUDE_DIRS, where to find jack.h, Set when
|
||||
# JACK_INCLUDE_DIR is found.
|
||||
# JACK_LIBRARIES, libraries to link against to use JACK.
|
||||
# JACK_ROOT_DIR, The base directory to search for JACK.
|
||||
# JACK_LIBRARIES, libraries to link against to use Jack.
|
||||
# JACK_ROOT_DIR, The base directory to search for Jack.
|
||||
# This can also be an environment variable.
|
||||
# JACK_FOUND, If false, do not try to use JACK.
|
||||
# JACK_FOUND, If false, do not try to use Jack.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# JACK_LIBRARY, where to find the JACK library.
|
||||
# JACK_LIBRARY, where to find the Jack library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
|
@@ -64,9 +64,7 @@ if(LLVM_STATIC)
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
else()
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES
|
||||
LLVM-${LLVM_VERSION}
|
||||
LLVMAnalysis # check for the static library as a fall-back
|
||||
NAMES LLVM-${LLVM_VERSION}
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
endif()
|
||||
|
||||
|
@@ -39,7 +39,6 @@ SET(_opensubdiv_SEARCH_DIRS
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/opensubdiv
|
||||
/opt/lib/osd # install_deps.sh
|
||||
)
|
||||
|
||||
FIND_PATH(OPENSUBDIV_INCLUDE_DIR
|
||||
|
@@ -1,74 +0,0 @@
|
||||
# - Find OPENVDB library
|
||||
# Find the native OPENVDB includes and library
|
||||
# This module defines
|
||||
# OPENVDB_INCLUDE_DIRS, where to find openvdb.h, Set when
|
||||
# OPENVDB_INCLUDE_DIR is found.
|
||||
# OPENVDB_LIBRARIES, libraries to link against to use OPENVDB.
|
||||
# OPENVDB_ROOT_DIR, The base directory to search for OPENVDB.
|
||||
# This can also be an environment variable.
|
||||
# OPENVDB_FOUND, If false, do not try to use OPENVDB.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENVDB_LIBRARY, where to find the OPENVDB library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENVDB_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENVDB_ROOT_DIR AND NOT $ENV{OPENVDB_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENVDB_ROOT_DIR $ENV{OPENVDB_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_openvdb_SEARCH_DIRS
|
||||
${OPENVDB_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/openvdb
|
||||
/opt/lib/openvdb
|
||||
)
|
||||
|
||||
FIND_PATH(OPENVDB_INCLUDE_DIR
|
||||
NAMES
|
||||
openvdb/openvdb.h
|
||||
HINTS
|
||||
${_openvdb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENVDB_LIBRARY
|
||||
NAMES
|
||||
openvdb
|
||||
HINTS
|
||||
${_openvdb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENVDB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENVDB DEFAULT_MSG
|
||||
OPENVDB_LIBRARY OPENVDB_INCLUDE_DIR)
|
||||
|
||||
IF(OPENVDB_FOUND)
|
||||
SET(OPENVDB_LIBRARIES ${OPENVDB_LIBRARY})
|
||||
SET(OPENVDB_INCLUDE_DIRS ${OPENVDB_INCLUDE_DIR})
|
||||
ENDIF(OPENVDB_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENVDB_INCLUDE_DIR
|
||||
OPENVDB_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_openvdb_SEARCH_DIRS)
|
@@ -38,7 +38,7 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
|
||||
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(PYTHON_VERSION 3.5 CACHE STRING "Python Version (major and minor only)")
|
||||
SET(PYTHON_VERSION 3.4 CACHE STRING "Python Version (major and minor only)")
|
||||
MARK_AS_ADVANCED(PYTHON_VERSION)
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ IF(PYTHONLIBSUNIX_FOUND)
|
||||
)
|
||||
|
||||
# we need this for installation
|
||||
# XXX No more valid with debian-like py3.5 packages...
|
||||
# XXX No more valid with debian-like py3.4 packages...
|
||||
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
|
||||
|
||||
# not required for build, just used when bundling Python.
|
||||
|
@@ -1,73 +0,0 @@
|
||||
# - Find TBB library
|
||||
# Find the native TBB includes and library
|
||||
# This module defines
|
||||
# TBB_INCLUDE_DIRS, where to find tbb.h, Set when
|
||||
# TBB is found.
|
||||
# TBB_LIBRARIES, libraries to link against to use TBB.
|
||||
# TBB_ROOT_DIR, The base directory to search for TBB.
|
||||
# This can also be an environment variable.
|
||||
# TBB_FOUND, If false, do not try to use TBB.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# TBB_LIBRARY, where to find the TBB library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If TBB_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT TBB_ROOT_DIR AND NOT $ENV{TBB_ROOT_DIR} STREQUAL "")
|
||||
SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_tbb_SEARCH_DIRS
|
||||
${TBB_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/tbb
|
||||
)
|
||||
|
||||
FIND_PATH(TBB_INCLUDE_DIR
|
||||
NAMES
|
||||
tbb/tbb.h
|
||||
HINTS
|
||||
${_tbb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(TBB_LIBRARY
|
||||
NAMES
|
||||
tbb
|
||||
HINTS
|
||||
${_tbb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set TBB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
|
||||
TBB_LIBRARY TBB_INCLUDE_DIR)
|
||||
|
||||
IF(TBB_FOUND)
|
||||
SET(TBB_LIBRARIES ${TBB_LIBRARY})
|
||||
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(TBB_TBB_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
TBB_INCLUDE_DIR
|
||||
TBB_LIBRARY
|
||||
)
|
@@ -20,32 +20,28 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
|
||||
set(TEST_INC
|
||||
${_current_include_directories}
|
||||
${CMAKE_SOURCE_DIR}/tests/gtests
|
||||
${CMAKE_SOURCE_DIR}/extern/glog/src
|
||||
${CMAKE_SOURCE_DIR}/extern/gflags/src
|
||||
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src
|
||||
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags
|
||||
${CMAKE_SOURCE_DIR}/extern/gtest/include
|
||||
${CMAKE_SOURCE_DIR}/extern/gmock/include
|
||||
)
|
||||
unset(_current_include_directories)
|
||||
|
||||
add_executable(${NAME}_test ${SRC})
|
||||
target_link_libraries(${NAME}_test
|
||||
${EXTRA_LIBS}
|
||||
${PLATFORM_LINKLIBS}
|
||||
bf_testing_main
|
||||
bf_intern_guardedalloc
|
||||
extern_gtest
|
||||
extern_gmock
|
||||
# needed for glog
|
||||
${PTHREADS_LIBRARIES}
|
||||
extern_glog
|
||||
extern_gflags)
|
||||
extern_glog)
|
||||
set_target_properties(${NAME}_test PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
|
||||
INCLUDE_DIRECTORIES "${TEST_INC}")
|
||||
if(${DO_ADD_TEST})
|
||||
add_test(NAME ${NAME}_test COMMAND ${TESTS_OUTPUT_DIR}/${NAME}_test WORKING_DIRECTORY $<TARGET_FILE_DIR:blender>)
|
||||
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
@@ -1,10 +1,5 @@
|
||||
# This is called by cmake as an external process from
|
||||
# This is called by cmake as an extermal process from
|
||||
# ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h
|
||||
# Caller must define:
|
||||
# SOURCE_DIR
|
||||
# Optional overrides:
|
||||
# BUILD_DATE
|
||||
# BUILD_TIME
|
||||
|
||||
# Extract working copy information for SOURCE_DIR into MY_XXX variables
|
||||
# with a default in case anything fails, for example when using git-svn
|
||||
@@ -14,153 +9,137 @@ set(MY_WC_COMMIT_TIMESTAMP 0)
|
||||
|
||||
# Guess if this is a git working copy and then look up the revision
|
||||
if(EXISTS ${SOURCE_DIR}/.git)
|
||||
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# The FindGit.cmake module is part of the standard distribution
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||
|
||||
if(MY_WC_BRANCH STREQUAL "HEAD")
|
||||
# Detached HEAD, check whether commit hash is reachable
|
||||
# in the master branch
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_VARIABLE MY_WC_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git branch --list master blender-v* --contains ${MY_WC_HASH}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_contains_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT _git_contains_check STREQUAL "")
|
||||
set(MY_WC_BRANCH "master")
|
||||
else()
|
||||
execute_process(COMMAND git show-ref --tags -d
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_tag_hashes
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git rev-parse HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_head_hash
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(_git_tag_hashes MATCHES "${_git_head_hash}")
|
||||
set(MY_WC_BRANCH "master")
|
||||
else()
|
||||
execute_process(COMMAND git branch --contains ${MY_WC_HASH}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_contains_branches
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "^\\*[ \t]+" "" _git_contains_branches "${_git_contains_branches}")
|
||||
string(REGEX REPLACE "[\r\n]+" ";" _git_contains_branches "${_git_contains_branches}")
|
||||
string(REGEX REPLACE ";[ \t]+" ";" _git_contains_branches "${_git_contains_branches}")
|
||||
foreach(_branch ${_git_contains_branches})
|
||||
if(NOT "${_branch}" MATCHES "\\(HEAD.*")
|
||||
set(MY_WC_BRANCH "${_branch}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
unset(_branch)
|
||||
unset(_git_contains_branches)
|
||||
endif()
|
||||
|
||||
unset(_git_tag_hashes)
|
||||
unset(_git_head_hashs)
|
||||
endif()
|
||||
|
||||
|
||||
unset(_git_contains_check)
|
||||
else()
|
||||
execute_process(COMMAND git log HEAD..@{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_below_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(NOT _git_below_check STREQUAL "")
|
||||
# If there're commits between HEAD and upstream this means
|
||||
# that we're reset-ed to older revision. Use it's hash then.
|
||||
if(MY_WC_BRANCH STREQUAL "HEAD")
|
||||
# Detached HEAD, check whether commit hash is reachable
|
||||
# in the master branch
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
execute_process(COMMAND git rev-parse --short @{u}
|
||||
|
||||
execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_VARIABLE _git_contains_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}")
|
||||
if(_git_contains_check STREQUAL "master")
|
||||
set(MY_WC_BRANCH "master")
|
||||
else()
|
||||
execute_process(COMMAND git show-ref --tags -d
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_tag_hashes
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git rev-parse HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_head_hash
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(_git_tag_hashes MATCHES "${_git_head_hash}")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_tag_hashes)
|
||||
unset(_git_head_hashs)
|
||||
endif()
|
||||
|
||||
|
||||
unset(_git_contains_check)
|
||||
else()
|
||||
execute_process(COMMAND git log HEAD..@{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_below_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
if(MY_WC_HASH STREQUAL "")
|
||||
# Local branch, not set to upstream.
|
||||
# Well, let's use HEAD for now
|
||||
if(NOT _git_below_check STREQUAL "")
|
||||
# If there're commits between HEAD and upstream this means
|
||||
# that we're reset-ed to older revision. Use it's hash then.
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
execute_process(COMMAND git rev-parse --short @{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
if(MY_WC_HASH STREQUAL "")
|
||||
# Local branch, not set to upstream.
|
||||
# Well, let's use HEAD for now
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MY_WC_BRANCH MATCHES "^blender-v")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_below_check)
|
||||
endif()
|
||||
|
||||
if(MY_WC_BRANCH MATCHES "^blender-v")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_below_check)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND git log -1 --format=%ct
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# May fail in rare cases
|
||||
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
|
||||
set(MY_WC_COMMIT_TIMESTAMP 0)
|
||||
endif()
|
||||
|
||||
# Update GIT index before getting dirty files
|
||||
execute_process(COMMAND git update-index -q --refresh
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git diff-index --name-only HEAD --
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_changed_files
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT _git_changed_files STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
else()
|
||||
# Unpushed commits are also considered local modifications
|
||||
execute_process(COMMAND git log @{u}..
|
||||
execute_process(COMMAND git log -1 --format=%ct
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_unpushed_log
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(NOT _git_unpushed_log STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# May fail in rare cases
|
||||
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
|
||||
set(MY_WC_COMMIT_TIMESTAMP 0)
|
||||
endif()
|
||||
unset(_git_unpushed_log)
|
||||
endif()
|
||||
|
||||
unset(_git_changed_files)
|
||||
# Update GIT index before getting dirty files
|
||||
execute_process(COMMAND git update-index -q --refresh
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git diff-index --name-only HEAD --
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_changed_files
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT _git_changed_files STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
else()
|
||||
# Unpushed commits are also considered local modifications
|
||||
execute_process(COMMAND git log @{u}..
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_unpushed_log
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(NOT _git_unpushed_log STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
endif()
|
||||
unset(_git_unpushed_log)
|
||||
endif()
|
||||
|
||||
unset(_git_changed_files)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
|
||||
# but BUILD_DATE and BUILD_TIME are platform dependent
|
||||
if(UNIX)
|
||||
if(NOT BUILD_DATE)
|
||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT BUILD_TIME)
|
||||
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
if(NOT BUILD_DATE)
|
||||
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT BUILD_TIME)
|
||||
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(WIN32)
|
||||
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
# Write a file with the BUILD_HASH define
|
||||
|
@@ -239,8 +239,8 @@ def file_check_arg_sizes(tu):
|
||||
if 0:
|
||||
print("---",
|
||||
" <~> ".join(
|
||||
[" ".join([t.spelling for t in C.get_tokens()])
|
||||
for C in node.get_children()]
|
||||
[" ".join([t.spelling for t in C.get_tokens()])
|
||||
for C in node.get_children()]
|
||||
))
|
||||
# print(node.location)
|
||||
|
||||
|
@@ -29,11 +29,11 @@ if not sys.version.startswith("3"):
|
||||
sys.exit(1)
|
||||
|
||||
from cmake_consistency_check_config import (
|
||||
IGNORE,
|
||||
UTF8_CHECK,
|
||||
SOURCE_DIR,
|
||||
BUILD_DIR,
|
||||
)
|
||||
IGNORE,
|
||||
UTF8_CHECK,
|
||||
SOURCE_DIR,
|
||||
BUILD_DIR,
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
@@ -240,10 +240,9 @@ def cmake_get_src(f):
|
||||
filen.close()
|
||||
|
||||
|
||||
def is_ignore(f, ignore_used):
|
||||
for index, ig in enumerate(IGNORE):
|
||||
def is_ignore(f):
|
||||
for ig in IGNORE:
|
||||
if ig in f:
|
||||
ignore_used[index] = True
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -279,17 +278,16 @@ def main():
|
||||
# Write a 'sed' script, useful if we get a lot of these
|
||||
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
|
||||
|
||||
|
||||
if is_err:
|
||||
raise Exception("CMake referenecs missing files, aborting!")
|
||||
del is_err
|
||||
del errs
|
||||
|
||||
ignore_used = [False] * len(IGNORE)
|
||||
|
||||
# now check on files not accounted for.
|
||||
print("\nC/C++ Files CMake doesnt know about...")
|
||||
for cf in sorted(source_list(SOURCE_DIR, is_c)):
|
||||
if not is_ignore(cf, ignore_used):
|
||||
if not is_ignore(cf):
|
||||
if cf not in global_c:
|
||||
print("missing_c: ", cf)
|
||||
|
||||
@@ -306,7 +304,7 @@ def main():
|
||||
|
||||
print("\nC/C++ Headers CMake doesnt know about...")
|
||||
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
|
||||
if not is_ignore(hf, ignore_used):
|
||||
if not is_ignore(hf):
|
||||
if hf not in global_h:
|
||||
print("missing_h: ", hf)
|
||||
|
||||
@@ -327,12 +325,5 @@ def main():
|
||||
if i > 1:
|
||||
traceback.print_exc()
|
||||
|
||||
# Check ignores aren't stale
|
||||
print("\nCheck for unused 'IGNORE' paths...")
|
||||
for index, ig in enumerate(IGNORE):
|
||||
if not ignore_used[index]:
|
||||
print("unused ignore: %r" % ig)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@@ -3,9 +3,16 @@ import os
|
||||
IGNORE = (
|
||||
"/test/",
|
||||
"/tests/gtests/",
|
||||
"/BSP_GhostTest/",
|
||||
"/release/",
|
||||
"/xembed/",
|
||||
"/TerraplayNetwork/",
|
||||
"/ik_glut_test/",
|
||||
|
||||
# specific source files
|
||||
"extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
|
||||
@@ -14,8 +21,31 @@ IGNORE = (
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.cpp",
|
||||
"extern/eltopo/common/meshes/meshloader.cpp",
|
||||
"extern/eltopo/common/openglutils.cpp",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
|
||||
"source/blender/imbuf/intern/imbuf_cocoa.m",
|
||||
"extern/recastnavigation/Recast/Source/RecastLog.cpp",
|
||||
"extern/recastnavigation/Recast/Source/RecastTimer.cpp",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.cpp",
|
||||
"intern/cycles/render/film_response.cpp",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_2.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_2_d.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_9.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_3_d.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_2_4_d.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_2.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_3.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_4.cc",
|
||||
"extern/libmv/third_party/ceres/internal/ceres/generated/schur_eliminator_4_4_d.cc",
|
||||
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
|
||||
@@ -25,13 +55,21 @@ IGNORE = (
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
|
||||
"extern/carve/include/carve/config.h",
|
||||
"extern/carve/include/carve/random/random.h",
|
||||
"extern/carve/patches/files/config.h",
|
||||
"extern/carve/patches/files/random.h",
|
||||
"extern/eltopo/common/meshes/Edge.hpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.hpp",
|
||||
"extern/eltopo/common/meshes/TriangleIndex.hpp",
|
||||
"extern/eltopo/common/meshes/meshloader.h",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.h",
|
||||
"extern/recastnavigation/Recast/Include/RecastLog.h",
|
||||
"extern/recastnavigation/Recast/Include/RecastTimer.h",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
|
||||
)
|
||||
"intern/cycles/render/film_response.h",
|
||||
"extern/carve/include/carve/config.h",
|
||||
"extern/carve/include/carve/external/boost/random.hpp",
|
||||
"extern/carve/patches/files/config.h",
|
||||
"extern/carve/patches/files/random.hpp",
|
||||
)
|
||||
|
||||
UTF8_CHECK = True
|
||||
|
||||
|
@@ -29,27 +29,20 @@ Example linux usage
|
||||
Windows not supported so far
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
# until we have arg parsing
|
||||
import project_info
|
||||
if not project_info.init(sys.argv[-1]):
|
||||
sys.exit(1)
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
# is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
cmake_cache_var,
|
||||
project_name_get,
|
||||
)
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
# is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
cmake_cache_var,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
@@ -57,8 +50,6 @@ from os.path import join, dirname, normpath, relpath, exists
|
||||
|
||||
|
||||
def create_nb_project_main():
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
files = list(source_list(SOURCE_DIR, filename_check=is_project_file))
|
||||
files_rel = [relpath(f, start=PROJECT_DIR) for f in files]
|
||||
files_rel.sort()
|
||||
@@ -81,6 +72,7 @@ def create_nb_project_main():
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = project_name_get()
|
||||
|
||||
|
||||
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
|
||||
make_exe_basename = os.path.basename(make_exe)
|
||||
|
||||
@@ -215,8 +207,8 @@ def create_nb_project_main():
|
||||
build_cmd = "${MAKE} -f Makefile"
|
||||
clean_cmd = "${MAKE} -f Makefile clean"
|
||||
|
||||
f.write(' <buildCommand>%s</buildCommand>\n' % escape(build_cmd))
|
||||
f.write(' <cleanCommand>%s</cleanCommand>\n' % escape(clean_cmd))
|
||||
f.write(' <buildCommand>%s</buildCommand>\n' % build_cmd)
|
||||
f.write(' <cleanCommand>%s</cleanCommand>\n' % clean_cmd)
|
||||
f.write(' <executablePath>./bin/blender</executablePath>\n')
|
||||
del build_cmd, clean_cmd
|
||||
|
||||
@@ -227,7 +219,7 @@ def create_nb_project_main():
|
||||
f.write(' </incDir>\n')
|
||||
f.write(' <preprocessorList>\n')
|
||||
for cdef in defines:
|
||||
f.write(' <Elem>%s</Elem>\n' % escape(cdef))
|
||||
f.write(' <Elem>%s</Elem>\n' % cdef)
|
||||
f.write(' </preprocessorList>\n')
|
||||
|
||||
f.write(' <cTool>\n')
|
||||
|
@@ -24,14 +24,28 @@
|
||||
|
||||
r"""
|
||||
Example Linux usage:
|
||||
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py --build-dir ~/blender-git/cmake
|
||||
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
|
||||
|
||||
Example Win32 usage:
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py --build-dir c:\blender_dev\cmake_build
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
|
||||
"""
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def quote_define(define):
|
||||
@@ -41,20 +55,7 @@ def quote_define(define):
|
||||
return define
|
||||
|
||||
|
||||
def create_qtc_project_main(name):
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
def create_qtc_project_main():
|
||||
files = list(source_list(SOURCE_DIR, filename_check=is_project_file))
|
||||
files_rel = [os.path.relpath(f, start=PROJECT_DIR) for f in files]
|
||||
files_rel.sort()
|
||||
@@ -62,14 +63,14 @@ def create_qtc_project_main(name):
|
||||
# --- qtcreator specific, simple format
|
||||
if SIMPLE_PROJECTFILE:
|
||||
# --- qtcreator specific, simple format
|
||||
PROJECT_NAME = name or "Blender"
|
||||
PROJECT_NAME = "Blender"
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(sorted(list(set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f))))))
|
||||
for f in files_rel if is_c_header(f))))))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
@@ -87,11 +88,14 @@ def create_qtc_project_main(name):
|
||||
|
||||
# for some reason it doesnt give all internal includes
|
||||
includes = list(set(includes) | set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f)))
|
||||
for f in files_rel if is_c_header(f)))
|
||||
includes.sort()
|
||||
|
||||
# be tricky, get the project name from CMake if we can!
|
||||
PROJECT_NAME = name or project_name_get()
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender"
|
||||
else:
|
||||
# be tricky, get the project name from CMake if we can!
|
||||
PROJECT_NAME = project_name_get()
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
@@ -115,7 +119,7 @@ def create_qtc_project_main(name):
|
||||
f.write("\n")
|
||||
|
||||
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
|
||||
if os.name != "nt":
|
||||
if sys.platform != "win32":
|
||||
defines_final += cmake_compiler_defines()
|
||||
f.write("\n".join(defines_final))
|
||||
|
||||
@@ -123,23 +127,17 @@ def create_qtc_project_main(name):
|
||||
# --- end
|
||||
|
||||
|
||||
def create_qtc_project_python(name):
|
||||
from project_info import (
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_py,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
def create_qtc_project_python():
|
||||
files = list(source_list(SOURCE_DIR, filename_check=is_py))
|
||||
files_rel = [os.path.relpath(f, start=PROJECT_DIR) for f in files]
|
||||
files_rel.sort()
|
||||
|
||||
# --- qtcreator specific, simple format
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = (name or project_name_get()) + "_Python"
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender_Python"
|
||||
else:
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = project_name_get() + "_Python"
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
@@ -157,43 +155,9 @@ def create_qtc_project_python(name):
|
||||
print("Python project file written to: %r" % qtc_prj)
|
||||
|
||||
|
||||
def argparse_create():
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="This script generates Qt Creator project files for Blender",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-n", "--name",
|
||||
dest="name",
|
||||
metavar='NAME', type=str,
|
||||
help="Override default project name (\"Blender\")",
|
||||
required=False,
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-b", "--build-dir",
|
||||
dest="build_dir",
|
||||
metavar='BUILD_DIR', type=str,
|
||||
help="Specify the build path (or fallback to the $PWD)",
|
||||
required=False,
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse_create()
|
||||
args = parser.parse_args()
|
||||
name = args.name
|
||||
|
||||
import project_info
|
||||
if not project_info.init(args.build_dir):
|
||||
return
|
||||
|
||||
create_qtc_project_main(name)
|
||||
create_qtc_project_python(name)
|
||||
create_qtc_project_main()
|
||||
create_qtc_project_python()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@@ -32,7 +32,8 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
]
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "python2"
|
||||
|
||||
@@ -42,7 +43,7 @@ CHECKER_ARGS = [
|
||||
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
|
||||
# stupid but needed
|
||||
"-Dbool=char"
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
|
@@ -32,7 +32,8 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
]
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "cppcheck"
|
||||
|
||||
@@ -43,7 +44,7 @@ CHECKER_ARGS = [
|
||||
"--max-configs=1", # speeds up execution
|
||||
# "--check-config", # when includes are missing
|
||||
"--enable=all", # if you want sixty hundred pedantic suggestions
|
||||
]
|
||||
]
|
||||
|
||||
if USE_QUIET:
|
||||
CHECKER_ARGS.append("--quiet")
|
||||
|
@@ -25,13 +25,14 @@
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
]
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "smatch"
|
||||
CHECKER_ARGS = [
|
||||
"--full-path",
|
||||
"--two-passes",
|
||||
]
|
||||
]
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
|
@@ -25,11 +25,12 @@
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
]
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "sparse"
|
||||
CHECKER_ARGS = [
|
||||
]
|
||||
]
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
|
@@ -25,7 +25,8 @@
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
]
|
||||
"blender/intern/opennl",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "splint"
|
||||
|
||||
@@ -61,7 +62,7 @@ CHECKER_ARGS = [
|
||||
# dummy, witjout this splint complains with:
|
||||
# /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON
|
||||
"-D_PC_MAX_CANON=0",
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
import project_source_info
|
||||
|
@@ -4,15 +4,12 @@
|
||||
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_ALEMBIC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
|
||||
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_CYCLES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
|
||||
@@ -28,6 +25,7 @@ set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_REDCODE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
|
||||
@@ -44,8 +42,7 @@ set(WITH_OPENAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
@@ -56,23 +53,17 @@ set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
# platform dependent options
|
||||
# platform dependant options
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
else()
|
||||
# MinGW exceptions
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif (APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
|
@@ -8,15 +8,12 @@
|
||||
set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SYSTEM_GLEW ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
|
||||
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_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
|
||||
@@ -32,6 +29,7 @@ set(WITH_IMAGE_FRAMESERVER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_REDCODE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
@@ -49,8 +47,7 @@ set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -1,79 +0,0 @@
|
||||
# Turn everything ON thats expected for an official release builds.
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_ALEMBIC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
|
||||
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_CYCLES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZMA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
|
||||
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE)
|
||||
|
||||
# platform dependent options
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
else()
|
||||
# MinGW exceptions
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
@@ -31,5 +31,3 @@ set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -74,7 +74,7 @@ def main():
|
||||
"rebuild_cache",
|
||||
"depend",
|
||||
"cmake_check_build_system",
|
||||
])
|
||||
])
|
||||
|
||||
targets -= set(bad)
|
||||
|
||||
|
@@ -103,23 +103,6 @@ macro(file_list_suffix
|
||||
|
||||
endmacro()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
macro(find_package_static)
|
||||
set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
find_package(${ARGV})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_cmake_find_library_suffixes_back})
|
||||
unset(_cmake_find_library_suffixes_back)
|
||||
endmacro()
|
||||
|
||||
macro(find_library_static)
|
||||
set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
find_library(${ARGV})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_cmake_find_library_suffixes_back})
|
||||
unset(_cmake_find_library_suffixes_back)
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
function(target_link_libraries_optimized
|
||||
TARGET
|
||||
@@ -141,6 +124,22 @@ function(target_link_libraries_debug
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(target_link_libraries_decoupled
|
||||
target
|
||||
libraries_var
|
||||
)
|
||||
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(${target} ${${libraries_var}})
|
||||
else()
|
||||
# For MSVC we link to different libraries depending whether
|
||||
# release or debug target is being built.
|
||||
file_list_suffix(_libraries_debug "${${libraries_var}}" "_d")
|
||||
target_link_libraries_debug(${target} "${_libraries_debug}")
|
||||
target_link_libraries_optimized(${target} "${${libraries_var}}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
|
||||
# use it instead of include_directories()
|
||||
function(blender_include_dirs
|
||||
@@ -196,33 +195,8 @@ function(blender_source_group
|
||||
endfunction()
|
||||
|
||||
|
||||
# Support per-target CMake flags
|
||||
# Read from: CMAKE_C_FLAGS_**** (made upper case) when set.
|
||||
#
|
||||
# 'name' should alway match the target name,
|
||||
# use this macro before add_library or add_executable.
|
||||
#
|
||||
# Optionally takes an arg passed to set(), eg PARENT_SCOPE.
|
||||
macro(add_cc_flags_custom_test
|
||||
name
|
||||
)
|
||||
|
||||
string(TOUPPER ${name} _name_upper)
|
||||
if(DEFINED CMAKE_C_FLAGS_${_name_upper})
|
||||
message(STATUS "Using custom CFLAGS: CMAKE_C_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_name_upper}}" ${ARGV1})
|
||||
endif()
|
||||
if(DEFINED CMAKE_CXX_FLAGS_${_name_upper})
|
||||
message(STATUS "Using custom CXXFLAGS: CMAKE_CXX_FLAGS_${_name_upper} in \"${CMAKE_CURRENT_SOURCE_DIR}\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_name_upper}}" ${ARGV1})
|
||||
endif()
|
||||
unset(_name_upper)
|
||||
|
||||
endmacro()
|
||||
|
||||
|
||||
# only MSVC uses SOURCE_GROUP
|
||||
function(blender_add_lib__impl
|
||||
function(blender_add_lib_nolist
|
||||
name
|
||||
sources
|
||||
includes
|
||||
@@ -250,18 +224,6 @@ function(blender_add_lib__impl
|
||||
endfunction()
|
||||
|
||||
|
||||
function(blender_add_lib_nolist
|
||||
name
|
||||
sources
|
||||
includes
|
||||
includes_sys
|
||||
)
|
||||
|
||||
add_cc_flags_custom_test(${name} PARENT_SCOPE)
|
||||
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
|
||||
endfunction()
|
||||
|
||||
function(blender_add_lib
|
||||
name
|
||||
sources
|
||||
@@ -269,9 +231,7 @@ function(blender_add_lib
|
||||
includes_sys
|
||||
)
|
||||
|
||||
add_cc_flags_custom_test(${name} PARENT_SCOPE)
|
||||
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
|
||||
blender_add_lib_nolist(${name} "${sources}" "${includes}" "${includes_sys}")
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
|
||||
endfunction()
|
||||
@@ -279,9 +239,6 @@ endfunction()
|
||||
|
||||
function(SETUP_LIBDIRS)
|
||||
|
||||
# NOTE: For all new libraries, use absolute library paths.
|
||||
# This should eventually be phased out.
|
||||
|
||||
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
|
||||
|
||||
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
|
||||
@@ -308,8 +265,11 @@ function(SETUP_LIBDIRS)
|
||||
if(WITH_OPENCOLORIO)
|
||||
link_directories(${OPENCOLORIO_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
link_directories(${OPENVDB_LIBPATH})
|
||||
if(WITH_IMAGE_OPENJPEG AND WITH_SYSTEM_OPENJPEG)
|
||||
link_directories(${OPENJPEG_LIBPATH})
|
||||
endif()
|
||||
if(WITH_CODEC_QUICKTIME)
|
||||
link_directories(${QUICKTIME_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENAL)
|
||||
link_directories(${OPENAL_LIBPATH})
|
||||
@@ -325,17 +285,14 @@ function(SETUP_LIBDIRS)
|
||||
endif()
|
||||
if(WITH_OPENCOLLADA)
|
||||
link_directories(${OPENCOLLADA_LIBPATH})
|
||||
## Never set
|
||||
# link_directories(${PCRE_LIBPATH})
|
||||
# link_directories(${EXPAT_LIBPATH})
|
||||
link_directories(${PCRE_LIBPATH})
|
||||
link_directories(${EXPAT_LIBPATH})
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
link_directories(${LLVM_LIBPATH})
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
link_directories(${ALEMBIC_LIBPATH})
|
||||
link_directories(${HDF5_LIBPATH})
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
link_directories(${JEMALLOC_LIBPATH})
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT UNIX)
|
||||
@@ -359,6 +316,7 @@ function(setup_liblinks
|
||||
target_link_libraries(
|
||||
${target}
|
||||
${PNG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${FREETYPE_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -415,11 +373,15 @@ function(setup_liblinks
|
||||
if(WITH_OPENCOLORIO)
|
||||
target_link_libraries(${target} ${OPENCOLORIO_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
if(WITH_OPENSUBDIV)
|
||||
if(WIN32 AND NOT UNIX)
|
||||
file_list_suffix(OPENSUBDIV_LIBRARIES_DEBUG "${OPENSUBDIV_LIBRARIES}" "_d")
|
||||
target_link_libraries_debug(${target} "${OPENSUBDIV_LIBRARIES_DEBUG}")
|
||||
target_link_libraries_optimized(${target} "${OPENSUBDIV_LIBRARIES}")
|
||||
unset(OPENSUBDIV_LIBRARIES_DEBUG)
|
||||
else()
|
||||
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||
@@ -431,11 +393,15 @@ function(setup_liblinks
|
||||
endif()
|
||||
endif()
|
||||
target_link_libraries(${target} ${JPEG_LIBRARIES})
|
||||
if(WITH_ALEMBIC)
|
||||
target_link_libraries(${target} ${ALEMBIC_LIBRARIES} ${HDF5_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
target_link_libraries(${target} ${OPENEXR_LIBRARIES})
|
||||
if(WIN32 AND NOT UNIX AND NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
file_list_suffix(OPENEXR_LIBRARIES_DEBUG "${OPENEXR_LIBRARIES}" "_d")
|
||||
target_link_libraries_debug(${target} "${OPENEXR_LIBRARIES_DEBUG}")
|
||||
target_link_libraries_optimized(${target} "${OPENEXR_LIBRARIES}")
|
||||
unset(OPENEXR_LIBRARIES_DEBUG)
|
||||
else()
|
||||
target_link_libraries(${target} ${OPENEXR_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENJPEG AND WITH_SYSTEM_OPENJPEG)
|
||||
target_link_libraries(${target} ${OPENJPEG_LIBRARIES})
|
||||
@@ -474,6 +440,9 @@ function(setup_liblinks
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_INPUT_NDOF)
|
||||
target_link_libraries(${target} ${NDOF_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
target_link_libraries(${target} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
@@ -483,36 +452,18 @@ function(setup_liblinks
|
||||
if(WIN32 AND NOT UNIX)
|
||||
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(WITH_OPENMP_STATIC)
|
||||
target_link_libraries(${target} ${OpenMP_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_INPUT_NDOF)
|
||||
target_link_libraries(${target} ${NDOF_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
|
||||
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
|
||||
target_link_libraries(${target} "extern_clew")
|
||||
if(WITH_CUDA_DYNLOAD)
|
||||
target_link_libraries(${target} "extern_cuew")
|
||||
else()
|
||||
target_link_libraries(${target} ${CUDA_CUDA_LIBRARY})
|
||||
endif()
|
||||
target_link_libraries(${target} "extern_cuew")
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${target}
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
#system libraries with no dependencies such as platform link libs or opengl should go last
|
||||
target_link_libraries(${target}
|
||||
${BLENDER_GL_LIBRARIES})
|
||||
|
||||
#target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(${target} ${PLATFORM_LINKLIBS})
|
||||
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -532,7 +483,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
if(WITH_CYCLES)
|
||||
list(APPEND BLENDER_LINK_LIBS
|
||||
cycles_render
|
||||
cycles_graph
|
||||
cycles_bvh
|
||||
cycles_device
|
||||
cycles_kernel
|
||||
@@ -597,13 +547,11 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_modifiers
|
||||
bf_bmesh
|
||||
bf_gpu
|
||||
bf_draw
|
||||
bf_intern_gawain
|
||||
bf_blenloader
|
||||
bf_blenkernel
|
||||
bf_physics
|
||||
bf_nodes
|
||||
bf_rna
|
||||
bf_blenloader
|
||||
bf_imbuf
|
||||
bf_blenlib
|
||||
bf_depsgraph
|
||||
@@ -615,7 +563,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_imbuf_openimageio
|
||||
bf_imbuf_dds
|
||||
bf_collada
|
||||
bf_alembic
|
||||
bf_intern_elbeem
|
||||
bf_intern_memutil
|
||||
bf_intern_guardedalloc
|
||||
@@ -627,7 +574,7 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
ge_phys_bullet
|
||||
bf_intern_smoke
|
||||
extern_lzma
|
||||
extern_curve_fit_nd
|
||||
extern_colamd
|
||||
ge_logic_ketsji
|
||||
extern_recastnavigation
|
||||
ge_logic
|
||||
@@ -640,6 +587,7 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
ge_logic_loopbacknetwork
|
||||
bf_intern_moto
|
||||
extern_openjpeg
|
||||
extern_redcode
|
||||
ge_videotex
|
||||
bf_dna
|
||||
bf_blenfont
|
||||
@@ -649,20 +597,19 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_intern_dualcon
|
||||
bf_intern_cycles
|
||||
cycles_render
|
||||
cycles_graph
|
||||
cycles_bvh
|
||||
cycles_device
|
||||
cycles_kernel
|
||||
cycles_util
|
||||
cycles_subd
|
||||
bf_intern_raskter
|
||||
bf_intern_opencolorio
|
||||
bf_intern_eigen
|
||||
extern_rangetree
|
||||
extern_wcwidth
|
||||
bf_intern_libmv
|
||||
extern_libmv
|
||||
extern_glog
|
||||
extern_gflags
|
||||
extern_sdlew
|
||||
extern_eigen3
|
||||
|
||||
bf_intern_glew_mx
|
||||
)
|
||||
@@ -709,6 +656,10 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
|
||||
endif()
|
||||
|
||||
if(WITH_INPUT_NDOF)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_ghostndof3dconnexion)
|
||||
endif()
|
||||
|
||||
if(WITH_MOD_BOOLEAN)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_carve)
|
||||
endif()
|
||||
@@ -725,6 +676,10 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENNL)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_render" "bf_intern_opennl")
|
||||
endif()
|
||||
|
||||
if(WITH_BULLET)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
|
||||
endif()
|
||||
@@ -733,22 +688,10 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
|
||||
endif()
|
||||
|
||||
if(WITH_GAMEENGINE_DECKLINK)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_decklink)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_gpudirect)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
if(WITH_OPENSUBDIV)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_opensubdiv)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_openvdb)
|
||||
endif()
|
||||
|
||||
foreach(SORTLIB ${BLENDER_SORTED_LIBS})
|
||||
set(REMLIB ${SORTLIB})
|
||||
foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
|
||||
@@ -835,11 +778,15 @@ macro(TEST_SSE_SUPPORT
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
endmacro()
|
||||
|
||||
# Only print message if running CMake first time
|
||||
macro(message_first_run)
|
||||
if(FIRST_RUN)
|
||||
message(${ARGV})
|
||||
endif()
|
||||
macro(TEST_STDBOOL_SUPPORT)
|
||||
include(CheckCSourceRuns)
|
||||
|
||||
# This program will compile correctly if and only if
|
||||
# this C compiler supports C99 stdbool.
|
||||
check_c_source_runs("
|
||||
#include <stdbool.h>
|
||||
int main(void) { return (int)false; }"
|
||||
HAVE_STDBOOL_H)
|
||||
endmacro()
|
||||
|
||||
macro(TEST_UNORDERED_MAP_SUPPORT)
|
||||
@@ -848,24 +795,16 @@ macro(TEST_UNORDERED_MAP_SUPPORT)
|
||||
# and define the include path
|
||||
# This module defines
|
||||
# HAVE_UNORDERED_MAP, whether unordered_map implementation was found
|
||||
#
|
||||
#
|
||||
# HAVE_STD_UNORDERED_MAP_HEADER, <unordered_map.h> was found
|
||||
# HAVE_UNORDERED_MAP_IN_STD_NAMESPACE, unordered_map is in namespace std
|
||||
# HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE, unordered_map is in namespace std::tr1
|
||||
#
|
||||
#
|
||||
# UNORDERED_MAP_INCLUDE_PREFIX, include path prefix for unordered_map, if found
|
||||
# UNORDERED_MAP_NAMESPACE, namespace for unordered_map, if found
|
||||
|
||||
include(CheckIncludeFileCXX)
|
||||
|
||||
# Workaround for newer GCC (6.x+) where C++11 was enabled by default, which lead us
|
||||
# to a situation when there is <unordered_map> include but which can't be used uless
|
||||
# C++11 is enabled.
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
|
||||
set(HAVE_STD_UNORDERED_MAP_HEADER False)
|
||||
else()
|
||||
CHECK_INCLUDE_FILE_CXX("unordered_map" HAVE_STD_UNORDERED_MAP_HEADER)
|
||||
endif()
|
||||
CHECK_INCLUDE_FILE_CXX("unordered_map" HAVE_STD_UNORDERED_MAP_HEADER)
|
||||
if(HAVE_STD_UNORDERED_MAP_HEADER)
|
||||
# Even so we've found unordered_map header file it doesn't
|
||||
# mean unordered_map and unordered_set will be declared in
|
||||
@@ -884,7 +823,7 @@ macro(TEST_UNORDERED_MAP_SUPPORT)
|
||||
}"
|
||||
HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
|
||||
if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
|
||||
message_first_run(STATUS "Found unordered_map/set in std namespace.")
|
||||
message(STATUS "Found unordered_map/set in std namespace.")
|
||||
|
||||
set(HAVE_UNORDERED_MAP "TRUE")
|
||||
set(UNORDERED_MAP_INCLUDE_PREFIX "")
|
||||
@@ -897,26 +836,26 @@ macro(TEST_UNORDERED_MAP_SUPPORT)
|
||||
}"
|
||||
HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
|
||||
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
|
||||
message_first_run(STATUS "Found unordered_map/set in std::tr1 namespace.")
|
||||
message(STATUS "Found unordered_map/set in std::tr1 namespace.")
|
||||
|
||||
set(HAVE_UNORDERED_MAP "TRUE")
|
||||
set(UNORDERED_MAP_INCLUDE_PREFIX "")
|
||||
set(UNORDERED_MAP_NAMESPACE "std::tr1")
|
||||
else()
|
||||
message_first_run(STATUS "Found <unordered_map> but cannot find either std::unordered_map "
|
||||
"or std::tr1::unordered_map.")
|
||||
message(STATUS "Found <unordered_map> but cannot find either std::unordered_map "
|
||||
"or std::tr1::unordered_map.")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
CHECK_INCLUDE_FILE_CXX("tr1/unordered_map" HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
|
||||
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
|
||||
message_first_run(STATUS "Found unordered_map/set in std::tr1 namespace.")
|
||||
message(STATUS "Found unordered_map/set in std::tr1 namespace.")
|
||||
|
||||
set(HAVE_UNORDERED_MAP "TRUE")
|
||||
set(UNORDERED_MAP_INCLUDE_PREFIX "tr1")
|
||||
set(UNORDERED_MAP_NAMESPACE "std::tr1")
|
||||
else()
|
||||
message_first_run(STATUS "Unable to find <unordered_map> or <tr1/unordered_map>. ")
|
||||
message(STATUS "Unable to find <unordered_map> or <tr1/unordered_map>. ")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -935,16 +874,8 @@ macro(TEST_SHARED_PTR_SUPPORT)
|
||||
# otherwise it's assumed to be defined in std namespace.
|
||||
|
||||
include(CheckIncludeFileCXX)
|
||||
include(CheckCXXSourceCompiles)
|
||||
set(SHARED_PTR_FOUND FALSE)
|
||||
# Workaround for newer GCC (6.x+) where C++11 was enabled by default, which lead us
|
||||
# to a situation when there is <unordered_map> include but which can't be used uless
|
||||
# C++11 is enabled.
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
|
||||
set(HAVE_STD_MEMORY_HEADER False)
|
||||
else()
|
||||
CHECK_INCLUDE_FILE_CXX(memory HAVE_STD_MEMORY_HEADER)
|
||||
endif()
|
||||
CHECK_INCLUDE_FILE_CXX(memory HAVE_STD_MEMORY_HEADER)
|
||||
if(HAVE_STD_MEMORY_HEADER)
|
||||
# Finding the memory header doesn't mean that shared_ptr is in std
|
||||
# namespace.
|
||||
@@ -952,6 +883,7 @@ macro(TEST_SHARED_PTR_SUPPORT)
|
||||
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
|
||||
# order to support this, we do an extra check to see which namespace
|
||||
# should be used.
|
||||
include(CheckCXXSourceCompiles)
|
||||
CHECK_CXX_SOURCE_COMPILES("#include <memory>
|
||||
int main() {
|
||||
std::shared_ptr<int> int_ptr;
|
||||
@@ -960,7 +892,7 @@ macro(TEST_SHARED_PTR_SUPPORT)
|
||||
HAVE_SHARED_PTR_IN_STD_NAMESPACE)
|
||||
|
||||
if(HAVE_SHARED_PTR_IN_STD_NAMESPACE)
|
||||
message_first_run("-- Found shared_ptr in std namespace using <memory> header.")
|
||||
message("-- Found shared_ptr in std namespace using <memory> header.")
|
||||
set(SHARED_PTR_FOUND TRUE)
|
||||
else()
|
||||
CHECK_CXX_SOURCE_COMPILES("#include <memory>
|
||||
@@ -970,7 +902,7 @@ macro(TEST_SHARED_PTR_SUPPORT)
|
||||
}"
|
||||
HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
|
||||
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
|
||||
message_first_run("-- Found shared_ptr in std::tr1 namespace using <memory> header.")
|
||||
message("-- Found shared_ptr in std::tr1 namespace using <memory> header.")
|
||||
set(SHARED_PTR_TR1_NAMESPACE TRUE)
|
||||
set(SHARED_PTR_FOUND TRUE)
|
||||
endif()
|
||||
@@ -991,7 +923,7 @@ macro(TEST_SHARED_PTR_SUPPORT)
|
||||
}"
|
||||
HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
|
||||
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
|
||||
message_first_run("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header.")
|
||||
message("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header.")
|
||||
set(SHARED_PTR_TR1_MEMORY_HEADER TRUE)
|
||||
set(SHARED_PTR_TR1_NAMESPACE TRUE)
|
||||
set(SHARED_PTR_FOUND TRUE)
|
||||
@@ -1037,7 +969,6 @@ macro(remove_strict_flags)
|
||||
remove_cc_flag(
|
||||
"-Wstrict-prototypes"
|
||||
"-Wmissing-prototypes"
|
||||
"-Wmissing-declarations"
|
||||
"-Wmissing-format-attribute"
|
||||
"-Wunused-local-typedefs"
|
||||
"-Wunused-macros"
|
||||
@@ -1119,19 +1050,6 @@ macro(remove_strict_flags_file
|
||||
|
||||
endmacro()
|
||||
|
||||
# External libs may need 'signed char' to be default.
|
||||
macro(remove_cc_flag_unsigned_char)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|Intel)$")
|
||||
remove_cc_flag("-funsigned-char")
|
||||
elseif(MSVC)
|
||||
remove_cc_flag("/J")
|
||||
else()
|
||||
message(WARNING
|
||||
"Compiler '${CMAKE_C_COMPILER_ID}' failed to disable 'unsigned char' flag."
|
||||
"Build files need updating."
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(ADD_CHECK_C_COMPILER_FLAG
|
||||
_CFLAGS
|
||||
@@ -1178,10 +1096,10 @@ function(get_blender_version)
|
||||
# - BLENDER_VERSION_CYCLE (alpha, beta, rc, release)
|
||||
|
||||
# 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)
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender.h.done)
|
||||
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h _contents REGEX "^#define[ \t]+BLENDER_.*$")
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h _contents REGEX "^#define[ \t]+BLENDER_.*$")
|
||||
|
||||
string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION[ \t]+([0-9]+).*" "\\1" _out_version "${_contents}")
|
||||
string(REGEX REPLACE ".*#define[ \t]+BLENDER_SUBVERSION[ \t]+([0-9]+).*" "\\1" _out_subversion "${_contents}")
|
||||
@@ -1274,7 +1192,7 @@ macro(blender_project_hack_post)
|
||||
# MINGW workaround for -ladvapi32 being included which surprisingly causes
|
||||
# string formatting of floats, eg: printf("%.*f", 3, value). to crash blender
|
||||
# with a meaningless stack trace. by overriding this flag we ensure we only
|
||||
# have libs we define.
|
||||
# have libs we define and that cmake & scons builds match.
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
|
||||
mark_as_advanced(
|
||||
@@ -1532,21 +1450,17 @@ function(find_python_package
|
||||
)
|
||||
|
||||
if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}")
|
||||
message(WARNING
|
||||
"Python package '${package}' path could not be found in:\n"
|
||||
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}', "
|
||||
"\n"
|
||||
"The 'WITH_PYTHON_INSTALL_${_upper_package}' option will be ignored when installing Python.\n"
|
||||
"The build will be usable, only add-ons that depend on this package won't be functional."
|
||||
)
|
||||
message(WARNING "'${package}' path could not be found in:\n"
|
||||
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}', "
|
||||
"WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
|
||||
set(WITH_PYTHON_INSTALL_${_upper_package} OFF PARENT_SCOPE)
|
||||
else()
|
||||
message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# like Python's 'print(dir())'
|
||||
@@ -1556,44 +1470,3 @@ function(print_all_vars)
|
||||
message("${_var}=${${_var}}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
macro(openmp_delayload
|
||||
projectname
|
||||
)
|
||||
if(MSVC)
|
||||
if(WITH_OPENMP)
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(OPENMP_DLL_NAME "vcomp120")
|
||||
else()
|
||||
set(OPENMP_DLL_NAME "vcomp140")
|
||||
endif()
|
||||
SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_RELEASE "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||
SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_DEBUG "/DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
|
||||
SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||
SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_MINSIZEREL "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||
endif(WITH_OPENMP)
|
||||
endif(MSVC)
|
||||
endmacro()
|
||||
|
||||
MACRO(WINDOWS_SIGN_TARGET target)
|
||||
if(WITH_WINDOWS_CODESIGN)
|
||||
if(!SIGNTOOL_EXE)
|
||||
error("Codesigning is enabled, but signtool is not found")
|
||||
else()
|
||||
if(WINDOWS_CODESIGN_PFX_PASSWORD)
|
||||
set(CODESIGNPASSWORD /p ${WINDOWS_CODESIGN_PFX_PASSWORD})
|
||||
else()
|
||||
if($ENV{PFXPASSWORD})
|
||||
set(CODESIGNPASSWORD /p $ENV{PFXPASSWORD})
|
||||
else()
|
||||
message(FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.")
|
||||
endif()
|
||||
endif()
|
||||
add_custom_command(TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}>
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
ENDMACRO()
|
||||
|
@@ -1,7 +1,5 @@
|
||||
string(TIMESTAMP CURRENT_YEAR "%Y")
|
||||
|
||||
set(PROJECT_DESCRIPTION "Blender is the free and open source 3D creation suite software.")
|
||||
set(PROJECT_COPYRIGHT "Copyright (C) 2001-${CURRENT_YEAR} Blender Foundation")
|
||||
set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/renderer.")
|
||||
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation")
|
||||
set(PROJECT_CONTACT "foundation@blender.org")
|
||||
set(PROJECT_VENDOR "Blender Foundation")
|
||||
|
||||
@@ -39,22 +37,7 @@ unset(MY_WC_HASH)
|
||||
|
||||
# Force Package Name
|
||||
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
|
||||
if(MSVC)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(PACKAGE_ARCH windows64)
|
||||
else()
|
||||
set(PACKAGE_ARCH windows32)
|
||||
endif()
|
||||
else(MSVC)
|
||||
set(PACKAGE_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
|
||||
if(CPACK_OVERRIDE_PACKAGENAME)
|
||||
set(CPACK_PACKAGE_FILE_NAME ${CPACK_OVERRIDE_PACKAGENAME}-${PACKAGE_ARCH})
|
||||
else()
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${PACKAGE_ARCH})
|
||||
endif()
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# RPM packages
|
||||
@@ -83,14 +66,13 @@ if(WIN32)
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
|
||||
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
|
||||
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
|
||||
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
|
||||
|
||||
set(CPACK_WIX_TEMPLATE ${LIBDIR}/package/installer_wix/WIX.template)
|
||||
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
|
||||
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
|
||||
|
||||
@@ -99,8 +81,6 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS "blender" "blender")
|
||||
|
||||
include(CPack)
|
||||
|
||||
# Target for build_archive.py script, to automatically pass along
|
||||
@@ -137,3 +117,4 @@ unset(MINOR_VERSION)
|
||||
unset(PATCH_VERSION)
|
||||
|
||||
unset(BUILD_REV)
|
||||
|
||||
|
@@ -1,470 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Apple.
|
||||
|
||||
set(MACOSX_DEPLOYMENT_TARGET "10.9")
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
if(WITH_CXX11)
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
|
||||
else()
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package(OpenAL)
|
||||
if(OPENAL_FOUND)
|
||||
set(WITH_OPENAL ON)
|
||||
set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include")
|
||||
else()
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES Alembic)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
set(OPENSUBDIV ${LIBDIR}/opensubdiv)
|
||||
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
|
||||
find_library(OSD_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
|
||||
find_library(OSD_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
|
||||
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
|
||||
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
|
||||
list(APPEND OPENSUBDIV_LIBRARIES ${OSD_LIB_CPU} ${OSD_LIB_GPU})
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
find_library(JACK_FRAMEWORK
|
||||
NAMES jackmp
|
||||
)
|
||||
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
|
||||
if(NOT JACK_FRAMEWORK)
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# we use precompiled libraries for py 3.5 and up by default
|
||||
set(PYTHON_VERSION 3.5)
|
||||
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}m")
|
||||
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
|
||||
set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
|
||||
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
|
||||
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
|
||||
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}m")
|
||||
set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}m")
|
||||
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
|
||||
#set(PYTHON_LIBRARY python${PYTHON_VERSION})
|
||||
#set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
|
||||
|
||||
unset(_py_framework)
|
||||
endif()
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
|
||||
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
|
||||
message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBRARIES fftw3)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
set(PNG_LIBRARIES png)
|
||||
set(JPEG_LIBRARIES jpeg)
|
||||
|
||||
set(ZLIB /usr)
|
||||
set(ZLIB_INCLUDE_DIRS "${ZLIB}/include")
|
||||
set(ZLIB_LIBRARIES z bz2)
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
set(FREETYPE_LIBRARY freetype)
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
|
||||
if(WITH_CXX11)
|
||||
set(OPENEXR_POSTFIX -2_2)
|
||||
else()
|
||||
set(OPENEXR_POSTFIX)
|
||||
endif()
|
||||
set(OPENEXR_LIBRARIES
|
||||
Iex${OPENEXR_POSTFIX}
|
||||
Half
|
||||
IlmImf${OPENEXR_POSTFIX}
|
||||
Imath${OPENEXR_POSTFIX}
|
||||
IlmThread${OPENEXR_POSTFIX})
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
|
||||
set(FFMPEG_LIBRARIES
|
||||
avcodec avdevice avformat avutil
|
||||
mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg
|
||||
)
|
||||
if(WITH_CXX11)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} schroedinger orc vpx webp swresample)
|
||||
endif()
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENJPEG OR WITH_CODEC_FFMPEG)
|
||||
# use openjpeg from libdir that is linked into ffmpeg
|
||||
if(WITH_CXX11)
|
||||
set(OPENJPEG ${LIBDIR}/openjpeg)
|
||||
set(WITH_SYSTEM_OPENJPEG ON)
|
||||
set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
|
||||
set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjpeg.a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(SYSTEMSTUBS_LIBRARY
|
||||
NAMES
|
||||
SystemStubs
|
||||
PATHS
|
||||
)
|
||||
mark_as_advanced(SYSTEMSTUBS_LIBRARY)
|
||||
if(SYSTEMSTUBS_LIBRARY)
|
||||
list(APPEND PLATFORM_LINKLIBS SystemStubs)
|
||||
endif()
|
||||
|
||||
set(PLATFORM_CFLAGS "-pipe -funsigned-char")
|
||||
set(PLATFORM_LINKFLAGS
|
||||
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio"
|
||||
)
|
||||
if(WITH_CODEC_QUICKTIME)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
|
||||
if(CMAKE_OSX_ARCHITECTURES MATCHES i386)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
|
||||
# libSDL still needs 32bit carbon quicktime
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CXX11)
|
||||
list(APPEND PLATFORM_LINKLIBS c++)
|
||||
else()
|
||||
list(APPEND PLATFORM_LINKLIBS stdc++)
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
|
||||
# force cmake to link right framework
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${LIBDIR}/opencollada/include/COLLADAStreamWriter
|
||||
${LIBDIR}/opencollada/include/COLLADABaseUtils
|
||||
${LIBDIR}/opencollada/include/COLLADAFramework
|
||||
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
|
||||
${LIBDIR}/opencollada/include/GeneratedSaxParser
|
||||
)
|
||||
|
||||
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
OpenCOLLADASaxFrameworkLoader
|
||||
-lOpenCOLLADAFramework
|
||||
-lOpenCOLLADABaseUtils
|
||||
-lOpenCOLLADAStreamWriter
|
||||
-lMathMLSolver
|
||||
-lGeneratedSaxParser
|
||||
-lxml2 -lbuffer -lftoa
|
||||
)
|
||||
# Use UTF functions from collada if LLVM is not enabled
|
||||
if(NOT WITH_LLVM)
|
||||
list(APPEND OPENCOLLADA_LIBRARIES -lUTF)
|
||||
endif()
|
||||
# pcre is bundled with openCollada
|
||||
#set(PCRE ${LIBDIR}/pcre)
|
||||
#set(PCRE_LIBPATH ${PCRE}/lib)
|
||||
set(PCRE_LIBRARIES pcre)
|
||||
#libxml2 is used
|
||||
#set(EXPAT ${LIBDIR}/expat)
|
||||
#set(EXPAT_LIBPATH ${EXPAT}/lib)
|
||||
set(EXPAT_LIB)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBRARY SDL2)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
if(WITH_CXX11)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lazy_framework ForceFeedback")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib)
|
||||
|
||||
set(JPEG "${LIBDIR}/jpeg")
|
||||
set(JPEG_INCLUDE_DIR "${JPEG}/include")
|
||||
set(JPEG_LIBPATH ${JPEG}/lib)
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
set(TIFF ${LIBDIR}/tiff)
|
||||
set(TIFF_INCLUDE_DIR ${TIFF}/include)
|
||||
set(TIFF_LIBRARY tiff)
|
||||
set(TIFF_LIBPATH ${TIFF}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(WITH_CXX11)
|
||||
set(BOOST_POSTFIX)
|
||||
else()
|
||||
set(BOOST_POSTFIX -mt)
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
boost_date_time${BOOST_POSTFIX}
|
||||
boost_filesystem${BOOST_POSTFIX}
|
||||
boost_regex${BOOST_POSTFIX}
|
||||
boost_system${BOOST_POSTFIX}
|
||||
boost_thread${BOOST_POSTFIX}
|
||||
boost_wave${BOOST_POSTFIX}
|
||||
)
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND BOOST_LIBRARIES boost_locale${BOOST_POSTFIX})
|
||||
endif()
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
list(APPEND BOOST_LIBRARIES boost_serialization${BOOST_POSTFIX})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND BOOST_LIBRARIES boost_iostreams${BOOST_POSTFIX})
|
||||
endif()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it !
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OPENIMAGEIO_LIBRARIES
|
||||
${OPENIMAGEIO}/lib/libOpenImageIO.a
|
||||
${PNG_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${TIFF_LIBRARY}
|
||||
${OPENEXR_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
if(WITH_CXX11)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${LIBDIR}/ffmpeg/lib/libwebp.a)
|
||||
endif()
|
||||
set(OPENIMAGEIO_LIBPATH
|
||||
${OPENIMAGEIO}/lib
|
||||
${JPEG_LIBPATH}
|
||||
${PNG_LIBPATH}
|
||||
${TIFF_LIBPATH}
|
||||
${OPENEXR_LIBPATH}
|
||||
${ZLIB_LIBPATH}
|
||||
)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
|
||||
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
|
||||
set(TBB_INCLUDE_DIRS ${LIBDIR}/tbb/include)
|
||||
set(TBB_LIBRARIES ${LIBDIR}/tbb/lib/libtbb.a)
|
||||
set(OPENVDB_LIBRARIES openvdb blosc ${TBB_LIBRARIES})
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
set(LLVM_VERSION "3.4" CACHE STRING "Version of LLVM to use")
|
||||
if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
|
||||
set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
|
||||
else()
|
||||
set(LLVM_CONFIG llvm-config)
|
||||
endif()
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --version
|
||||
OUTPUT_VARIABLE LLVM_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --prefix
|
||||
OUTPUT_VARIABLE LLVM_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libdir
|
||||
OUTPUT_VARIABLE LLVM_LIBPATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES LLVMAnalysis # first of a whole bunch of libs to get
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
|
||||
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
|
||||
if(LLVM_STATIC)
|
||||
# if static LLVM libraries were requested, use llvm-config to generate
|
||||
# the list of what libraries we need, and substitute that in the right
|
||||
# way for LLVM_LIBRARY.
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
|
||||
OUTPUT_VARIABLE LLVM_LIBRARY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "LLVM not found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
|
||||
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)
|
||||
|
||||
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_OPENMP)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE COMPILER_VENDOR)
|
||||
string(SUBSTRING "${COMPILER_VENDOR}" 0 5 VENDOR_NAME) # truncate output
|
||||
if(${VENDOR_NAME} MATCHES "Apple") # Apple does not support OpenMP reliable with gcc and not with clang
|
||||
set(WITH_OPENMP OFF)
|
||||
else() # vanilla gcc or clang_omp support OpenMP
|
||||
message(STATUS "Using special OpenMP enabled compiler !") # letting find_package(OpenMP) module work for gcc
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang") # clang-omp in darwin libs
|
||||
set(OPENMP_FOUND ON)
|
||||
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C compiler flags for OpenMP parallization" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE)
|
||||
include_directories(${LIBDIR}/openmp/include)
|
||||
link_directories(${LIBDIR}/openmp/lib)
|
||||
# This is a workaround for our helperbinaries ( datatoc, masgfmt, ... ),
|
||||
# They are linked also to omp lib, so we need it in builddir for runtime exexcution,
|
||||
# TODO: remove all unneeded dependencies from these
|
||||
|
||||
# for intermediate binaries, in respect to lib ID
|
||||
execute_process(
|
||||
COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES}
|
||||
${LIBDIR}/openmp/lib/libiomp5.dylib
|
||||
${CMAKE_BINARY_DIR}/Resources/lib/libiomp5.dylib)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(EXETYPE MACOSX_BUNDLE)
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
|
||||
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "i386")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
|
||||
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
|
||||
endif()
|
||||
|
||||
if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
|
||||
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
|
||||
endif()
|
||||
# Get rid of eventually clashes, we export some symbols explicite as local
|
||||
set(PLATFORM_LINKFLAGS
|
||||
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map"
|
||||
)
|
||||
|
||||
if(WITH_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
# 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>")
|
||||
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
@@ -1,428 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for any *nix system including Linux and Unix.
|
||||
|
||||
macro(find_package_wrapper)
|
||||
if(WITH_STATIC_LIBS)
|
||||
find_package_static(${ARGV})
|
||||
else()
|
||||
find_package(${ARGV})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
find_package_wrapper(JPEG REQUIRED)
|
||||
find_package_wrapper(PNG REQUIRED)
|
||||
find_package_wrapper(ZLIB REQUIRED)
|
||||
find_package_wrapper(Freetype REQUIRED)
|
||||
|
||||
if(WITH_LZO AND WITH_SYSTEM_LZO)
|
||||
find_package_wrapper(LZO)
|
||||
if(NOT LZO_FOUND)
|
||||
message(FATAL_ERROR "Failed finding system LZO version!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_SYSTEM_EIGEN3)
|
||||
find_package_wrapper(Eigen3)
|
||||
if(NOT EIGEN3_FOUND)
|
||||
message(FATAL_ERROR "Failed finding system Eigen3 version!")
|
||||
endif()
|
||||
endif()
|
||||
# else values are set below for all platforms
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# No way to set py35, remove for now.
|
||||
# find_package(PythonLibs)
|
||||
|
||||
# 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)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package_wrapper(OpenEXR) # our own module
|
||||
if(NOT OPENEXR_FOUND)
|
||||
set(WITH_IMAGE_OPENEXR OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG)
|
||||
find_package_wrapper(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)
|
||||
if(NOT TIFF_FOUND)
|
||||
set(WITH_IMAGE_TIFF OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Audio IO
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
find_package_wrapper(Audaspace)
|
||||
if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
|
||||
message(FATAL_ERROR "Audaspace external library not found!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package_wrapper(OpenAL)
|
||||
if(NOT OPENAL_FOUND)
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
if(WITH_SDL_DYNLOAD)
|
||||
set(SDL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/sdlew/include/SDL2")
|
||||
set(SDL_LIBRARY)
|
||||
else()
|
||||
find_package_wrapper(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
# Use same names for both versions of SDL until we move to 2.x.
|
||||
set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
|
||||
set(SDL_LIBRARY "${SDL2_LIBRARY}")
|
||||
set(SDL_FOUND "${SDL2_FOUND}")
|
||||
else()
|
||||
find_package_wrapper(SDL)
|
||||
endif()
|
||||
mark_as_advanced(
|
||||
SDL_INCLUDE_DIR
|
||||
SDL_LIBRARY
|
||||
)
|
||||
# unset(SDLMAIN_LIBRARY CACHE)
|
||||
if(NOT SDL_FOUND)
|
||||
set(WITH_SDL OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
find_package_wrapper(Jack)
|
||||
if(NOT JACK_FOUND)
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Codecs
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
find_package_wrapper(SndFile)
|
||||
if(NOT SNDFILE_FOUND)
|
||||
set(WITH_CODEC_SNDFILE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
|
||||
set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
|
||||
|
||||
mark_as_advanced(FFMPEG)
|
||||
|
||||
# lame, but until we have proper find module for ffmpeg
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
|
||||
if(EXISTS "${FFMPEG}/include/ffmpeg/")
|
||||
list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg")
|
||||
endif()
|
||||
# end lameness
|
||||
|
||||
mark_as_advanced(FFMPEG_LIBRARIES)
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
find_package_wrapper(Fftw3)
|
||||
if(NOT FFTW3_FOUND)
|
||||
set(WITH_FFTW3 OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
find_package_wrapper(OpenCOLLADA)
|
||||
if(OPENCOLLADA_FOUND)
|
||||
find_package_wrapper(XML2)
|
||||
find_package_wrapper(PCRE)
|
||||
else()
|
||||
set(WITH_OPENCOLLADA OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
find_package_wrapper(JeMalloc)
|
||||
if(NOT JEMALLOC_FOUND)
|
||||
set(WITH_MEM_JEMALLOC OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_INPUT_NDOF)
|
||||
find_package_wrapper(Spacenav)
|
||||
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()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
if(NOT OSL_ROOT)
|
||||
set(OSL_ROOT ${CYCLES_OSL})
|
||||
endif()
|
||||
find_package_wrapper(OpenShadingLanguage)
|
||||
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,
|
||||
# otherwise LLVM is missing the osl_allocate_closure_component function
|
||||
set(OSL_LIBRARIES
|
||||
${OSL_OSLCOMP_LIBRARY}
|
||||
-Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY}
|
||||
-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_OPENVDB)
|
||||
find_package_wrapper(OpenVDB)
|
||||
find_package_wrapper(TBB)
|
||||
if(NOT OPENVDB_FOUND OR NOT TBB_FOUND)
|
||||
set(WITH_OPENVDB OFF)
|
||||
set(WITH_OPENVDB_BLOSC OFF)
|
||||
message(STATUS "OpenVDB not found, disabling it")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
find_package_wrapper(Alembic)
|
||||
|
||||
if(WITH_ALEMBIC_HDF5)
|
||||
set(HDF5_ROOT_DIR ${LIBDIR}/hdf5)
|
||||
find_package_wrapper(HDF5)
|
||||
endif()
|
||||
|
||||
if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND))
|
||||
set(WITH_ALEMBIC OFF)
|
||||
set(WITH_ALEMBIC_HDF5 OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
# uses in build instructions to override include and library variables
|
||||
if(NOT BOOST_CUSTOM)
|
||||
if(WITH_STATIC_LIBS)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
endif()
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
set(__boost_packages filesystem regex thread date_time)
|
||||
if(WITH_CYCLES_OSL)
|
||||
if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6"))
|
||||
list(APPEND __boost_packages wave)
|
||||
else()
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND __boost_packages locale)
|
||||
endif()
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
list(APPEND __boost_packages serialization)
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND __boost_packages iostreams)
|
||||
endif()
|
||||
list(APPEND __boost_packages system)
|
||||
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
|
||||
if(NOT Boost_FOUND)
|
||||
# try to find non-multithreaded if -mt not found, this flag
|
||||
# doesn't matter for us, it has nothing to do with thread
|
||||
# safety, but keep it to not disturb build setups
|
||||
set(Boost_USE_MULTITHREADED OFF)
|
||||
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
|
||||
endif()
|
||||
unset(__boost_packages)
|
||||
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
|
||||
find_package(IcuLinux)
|
||||
endif()
|
||||
mark_as_advanced(Boost_DIR) # why doesnt boost do this?
|
||||
endif()
|
||||
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
find_package_wrapper(OpenImageIO)
|
||||
if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE)
|
||||
find_package_wrapper(PugiXML)
|
||||
else()
|
||||
set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}")
|
||||
set(PUGIXML_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
set(OPENIMAGEIO_LIBRARIES
|
||||
${OPENIMAGEIO_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${BOOST_LIBRARIES}
|
||||
)
|
||||
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
set(OPENIMAGEIO_DEFINITIONS "")
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES "${OPENEXR_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if(NOT OPENIMAGEIO_FOUND)
|
||||
set(WITH_OPENIMAGEIO OFF)
|
||||
message(STATUS "OpenImageIO not found, disabling WITH_CYCLES")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package_wrapper(OpenColorIO)
|
||||
|
||||
set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES})
|
||||
set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
|
||||
if(NOT OPENCOLORIO_FOUND)
|
||||
set(WITH_OPENCOLORIO OFF)
|
||||
message(STATUS "OpenColorIO not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
find_package_wrapper(LLVM)
|
||||
|
||||
if(NOT LLVM_FOUND)
|
||||
set(WITH_LLVM OFF)
|
||||
message(STATUS "LLVM not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM OR WITH_SDL_DYNLOAD)
|
||||
# Fix for conflict with Mesa llvmpipe
|
||||
set(PLATFORM_LINKFLAGS
|
||||
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
find_package_wrapper(OpenSubdiv)
|
||||
|
||||
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
|
||||
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
|
||||
if(NOT OPENSUBDIV_FOUND)
|
||||
set(WITH_OPENSUBDIV OFF)
|
||||
set(WITH_CYCLES_OPENSUBDIV OFF)
|
||||
message(STATUS "OpenSubdiv not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
|
||||
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
# used by other platforms
|
||||
set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(CMAKE_DL_LIBS)
|
||||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if(NOT WITH_PYTHON_MODULE)
|
||||
# binreloc is linux only
|
||||
set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
|
||||
set(WITH_BINRELOC ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# lfs on glibc, all compilers should use
|
||||
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
|
||||
|
||||
# GNU Compiler
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
|
||||
if(WITH_LINKER_GOLD)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
|
||||
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
||||
if("${LD_VERSION}" MATCHES "GNU gold")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
|
||||
else()
|
||||
message(STATUS "GNU gold linker isn't available, using the default system linker.")
|
||||
endif()
|
||||
unset(LD_VERSION)
|
||||
endif()
|
||||
|
||||
# CLang is the same as GCC for now.
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
# Solaris CC
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||
set(PLATFORM_CFLAGS "-pipe -features=extensions -fPIC -D__FUNCTION__=__func__")
|
||||
|
||||
# Intel C++ Compiler
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
# think these next two are broken
|
||||
find_program(XIAR xiar)
|
||||
if(XIAR)
|
||||
set(CMAKE_AR "${XIAR}")
|
||||
endif()
|
||||
mark_as_advanced(XIAR)
|
||||
|
||||
find_program(XILD xild)
|
||||
if(XILD)
|
||||
set(CMAKE_LINKER "${XILD}")
|
||||
endif()
|
||||
mark_as_advanced(XILD)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
|
||||
|
||||
# set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
|
||||
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
|
||||
endif()
|
@@ -1,87 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows.
|
||||
|
||||
add_definitions(-DWIN32)
|
||||
|
||||
if(MSVC)
|
||||
include(platform_win32_msvc)
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||
include(platform_win32_mingw)
|
||||
endif()
|
||||
|
||||
# Things common to both mingw and MSVC should go here
|
||||
|
||||
set(WINTAB_INC ${LIBDIR}/wintab/include)
|
||||
|
||||
if(WITH_OPENAL)
|
||||
set(OPENAL ${LIBDIR}/openal)
|
||||
set(OPENALDIR ${LIBDIR}/openal)
|
||||
set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
|
||||
if(MSVC)
|
||||
set(OPENAL_LIBRARY openal32)
|
||||
else()
|
||||
set(OPENAL_LIBRARY wrap_oal)
|
||||
endif()
|
||||
set(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBRARIES libsndfile-1)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
|
||||
endif()
|
||||
|
||||
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
|
||||
add_definitions(-D__SSE__ -D__MMX__)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
|
||||
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_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)
|
||||
list(APPEND OSL_LIBRARIES
|
||||
optimized ${OSL_LIB_COMP}
|
||||
optimized ${OSL_LIB_EXEC}
|
||||
optimized ${OSL_LIB_QUERY}
|
||||
debug ${OSL_LIB_EXEC_DEBUG}
|
||||
debug ${OSL_LIB_COMP_DEBUG}
|
||||
debug ${OSL_LIB_QUERY_DEBUG}
|
||||
)
|
||||
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
|
||||
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
|
||||
|
||||
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()
|
@@ -1,302 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows when compiling with MinGW.
|
||||
|
||||
# keep GCC specific stuff here
|
||||
include(CheckCSourceCompiles)
|
||||
# Setup 64bit and 64bit windows systems
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#ifndef __MINGW64__
|
||||
#error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
"
|
||||
WITH_MINGW64
|
||||
)
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
if(WITH_MINGW64)
|
||||
message(STATUS "Compiling for 64 bit with MinGW-w64.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
|
||||
else()
|
||||
message(STATUS "Compiling for 32 bit with MinGW-w32.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
|
||||
|
||||
if(WITH_RAYOPTIMIZATION)
|
||||
message(WARNING "MinGW-w32 is known to be unstable with 'WITH_RAYOPTIMIZATION' option enabled.")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32
|
||||
-lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
list(APPEND PLATFORM_LINKLIBS -limm32)
|
||||
endif()
|
||||
|
||||
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
|
||||
|
||||
if(WITH_MINGW64)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
|
||||
list(APPEND PLATFORM_LINKLIBS -lpthread)
|
||||
|
||||
add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
|
||||
endif()
|
||||
|
||||
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
|
||||
|
||||
add_definitions(-DFREE_WINDOWS)
|
||||
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
|
||||
|
||||
if(WITH_MINGW64)
|
||||
set(JPEG_LIBRARIES jpeg)
|
||||
else()
|
||||
set(JPEG_LIBRARIES libjpeg)
|
||||
endif()
|
||||
set(PNG_LIBRARIES png)
|
||||
|
||||
set(ZLIB ${LIBDIR}/zlib)
|
||||
set(ZLIB_INCLUDE_DIRS ${ZLIB}/include)
|
||||
set(ZLIB_LIBPATH ${ZLIB}/lib)
|
||||
set(ZLIB_LIBRARIES z)
|
||||
|
||||
set(JPEG "${LIBDIR}/jpeg")
|
||||
set(JPEG_INCLUDE_DIR "${JPEG}/include")
|
||||
set(JPEG_LIBPATH ${JPEG}/lib) # not cmake defined
|
||||
|
||||
# comes with own pthread library
|
||||
if(NOT WITH_MINGW64)
|
||||
set(PTHREADS ${LIBDIR}/pthreads)
|
||||
#set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
|
||||
set(PTHREADS_LIBPATH ${PTHREADS}/lib)
|
||||
set(PTHREADS_LIBRARIES pthreadGC2)
|
||||
endif()
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
set(FREETYPE_LIBRARY freetype)
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_LIBRARIES fftw3)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAStreamWriter
|
||||
${OPENCOLLADA}/include/opencollada/COLLADABaseUtils
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAFramework
|
||||
${OPENCOLLADA}/include/opencollada/COLLADASaxFrameworkLoader
|
||||
${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
|
||||
)
|
||||
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada)
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
OpenCOLLADAStreamWriter
|
||||
OpenCOLLADASaxFrameworkLoader
|
||||
OpenCOLLADAFramework
|
||||
OpenCOLLADABaseUtils
|
||||
GeneratedSaxParser
|
||||
UTF MathMLSolver buffer ftoa xml
|
||||
)
|
||||
set(PCRE_LIBRARIES pcre)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
|
||||
if(WITH_MINGW64)
|
||||
set(FFMPEG_LIBRARIES avcodec.dll avformat.dll avdevice.dll avutil.dll swscale.dll swresample.dll)
|
||||
else()
|
||||
set(FFMPEG_LIBRARIES avcodec-55 avformat-55 avdevice-55 avutil-52 swscale-2)
|
||||
endif()
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
set(TIFF ${LIBDIR}/tiff)
|
||||
set(TIFF_LIBRARY tiff)
|
||||
set(TIFF_INCLUDE_DIR ${TIFF}/include)
|
||||
set(TIFF_LIBPATH ${TIFF}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(JACK ${LIBDIR}/jack)
|
||||
set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
|
||||
set(JACK_LIBRARIES jack)
|
||||
set(JACK_LIBPATH ${JACK}/lib)
|
||||
|
||||
# TODO, gives linking errors, force off
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# normally cached but not since we include them with blender
|
||||
set(PYTHON_VERSION 3.5) # CACHE STRING)
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}") # CACHE PATH)
|
||||
set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}mw.lib") # CACHE FILEPATH)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(WITH_MINGW64)
|
||||
set(BOOST_POSTFIX "mgw47-mt-s-1_49")
|
||||
set(BOOST_DEBUG_POSTFIX "mgw47-mt-sd-1_49")
|
||||
else()
|
||||
set(BOOST_POSTFIX "mgw46-mt-s-1_49")
|
||||
set(BOOST_DEBUG_POSTFIX "mgw46-mt-sd-1_49")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized boost_date_time-${BOOST_POSTFIX} boost_filesystem-${BOOST_POSTFIX}
|
||||
boost_regex-${BOOST_POSTFIX}
|
||||
boost_system-${BOOST_POSTFIX} boost_thread-${BOOST_POSTFIX}
|
||||
debug boost_date_time-${BOOST_DEBUG_POSTFIX} boost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
boost_regex-${BOOST_DEBUG_POSTFIX}
|
||||
boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX})
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized boost_locale-${BOOST_POSTFIX}
|
||||
debug boost_locale-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized boost_wave-${BOOST_POSTFIX}
|
||||
debug boost_wave-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
endif()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OPENIMAGEIO_LIBRARIES OpenImageIO)
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_DEFINITIONS "")
|
||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
set(LLVM_LIBPATH ${LLVM_ROOT_DIR}/lib)
|
||||
# Explicitly set llvm lib order.
|
||||
#---- WARNING ON GCC ORDER OF LIBS IS IMPORTANT, DO NOT CHANGE! ---------
|
||||
set(LLVM_LIBRARY LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMAnalysis LLVMArchive
|
||||
LLVMAsmParser LLVMAsmPrinter
|
||||
LLVMBitReader LLVMBitWriter
|
||||
LLVMDebugInfo LLVMExecutionEngine
|
||||
LLVMInstCombine LLVMInstrumentation
|
||||
LLVMInterpreter LLVMJIT
|
||||
LLVMLinker LLVMMC
|
||||
LLVMMCDisassembler LLVMMCJIT
|
||||
LLVMMCParser LLVMObject
|
||||
LLVMRuntimeDyld
|
||||
LLVMSupport
|
||||
LLVMTableGen LLVMTarget
|
||||
LLVMTransformUtils LLVMVectorize
|
||||
LLVMX86AsmParser LLVMX86AsmPrinter
|
||||
LLVMX86CodeGen LLVMX86Desc
|
||||
LLVMX86Disassembler LLVMX86Info
|
||||
LLVMX86Utils LLVMipa
|
||||
LLVMipo LLVMCore)
|
||||
# imagehelp is needed by LLVM 3.1 on MinGW, check lib\Support\Windows\Signals.inc
|
||||
list(APPEND PLATFORM_LINKLIBS -limagehlp)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO)
|
||||
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBRARY SDL)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
|
||||
set(OPENVDB_LIBRARIES openvdb ${TBB_LIBRARIES})
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
# TODO(sergey): For until someone drops by and compiles libraries for
|
||||
# MinGW we allow users to compile their own Alembic library and use
|
||||
# that via find_package(),
|
||||
#
|
||||
# Once precompiled libraries are there we'll use hardcoded locations.
|
||||
find_package_wrapper(Alembic)
|
||||
if(WITH_ALEMBIC_HDF5)
|
||||
set(HDF5_ROOT_DIR ${LIBDIR}/hdf5)
|
||||
find_package_wrapper(HDF5)
|
||||
endif()
|
||||
if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND))
|
||||
set(WITH_ALEMBIC OFF)
|
||||
set(WITH_ALEMBIC_HDF5 OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152")
|
||||
|
||||
## DISABLE - causes linking errors
|
||||
## for re-distribution, so users dont need mingw installed
|
||||
# set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-libgcc -static-libstdc++")
|
@@ -1,500 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows when compiling with MSVC.
|
||||
|
||||
macro(warn_hardcoded_paths package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
message(WARNING "Using HARDCODED ${package_name} locations")
|
||||
endif(WITH_WINDOWS_FIND_MODULES)
|
||||
endmacro()
|
||||
|
||||
macro(windows_find_package package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(${package_name})
|
||||
endif(WITH_WINDOWS_FIND_MODULES)
|
||||
endmacro()
|
||||
|
||||
add_definitions(-DWIN32)
|
||||
# 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
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32
|
||||
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
list(APPEND PLATFORM_LINKLIBS imm32)
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_SCL_SECURE_NO_DEPRECATE
|
||||
-D_CONSOLE
|
||||
-D_LIB
|
||||
)
|
||||
|
||||
# MSVC11 needs _ALLOW_KEYWORD_MACROS to build
|
||||
add_definitions(-D_ALLOW_KEYWORD_MACROS)
|
||||
|
||||
# We want to support Vista level ABI
|
||||
add_definitions(-D_WIN32_WINNT=0x600)
|
||||
|
||||
# Make cmake find the msvc redistributables
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
|
||||
|
||||
set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib ")
|
||||
|
||||
# Ignore meaningless for us linker warnings.
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
|
||||
|
||||
# MSVC only, Mingw doesnt need
|
||||
if(CMAKE_CL_64)
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:X64 ${PLATFORM_LINKFLAGS}")
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
|
||||
endif()
|
||||
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
|
||||
# Setup 64bit and 64bit windows systems
|
||||
if(CMAKE_CL_64)
|
||||
message(STATUS "64 bit compiler detected.")
|
||||
set(LIBDIR_BASE "win64")
|
||||
else()
|
||||
message(STATUS "32 bit compiler detected.")
|
||||
set(LIBDIR_BASE "windows")
|
||||
endif()
|
||||
if(MSVC_VERSION EQUAL 1910)
|
||||
message(STATUS "Visual Studio 2017 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
elseif(MSVC_VERSION EQUAL 1900)
|
||||
message(STATUS "Visual Studio 2015 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
else()
|
||||
message(STATUS "Visual Studio 2013 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc12)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
# Add each of our libraries to our cmake_prefix_path so find_package() could work
|
||||
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${LIBDIR}/${child})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${LIBDIR}/${child})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARY ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_DIR ${LIBDIR}/zlib)
|
||||
|
||||
windows_find_package(zlib) # we want to find before finding things that depend on it like png
|
||||
windows_find_package(png)
|
||||
|
||||
if(NOT PNG_FOUND)
|
||||
warn_hardcoded_paths(libpng)
|
||||
set(PNG_PNG_INCLUDE_DIR ${LIBDIR}/png/include)
|
||||
set(PNG_LIBRARIES libpng)
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
|
||||
endif()
|
||||
|
||||
set(JPEG_NAMES ${JPEG_NAMES} libjpeg)
|
||||
windows_find_package(jpeg REQUIRED)
|
||||
if(NOT JPEG_FOUND)
|
||||
warn_hardcoded_paths(jpeg)
|
||||
set(JPEG_INCLUDE_DIR ${LIBDIR}/jpeg/include)
|
||||
set(JPEG_LIBRARIES ${LIBDIR}/jpeg/lib/libjpeg.lib)
|
||||
endif()
|
||||
|
||||
set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
|
||||
set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${LIBDIR}/freetype/include
|
||||
${LIBDIR}/freetype/include/freetype2
|
||||
)
|
||||
set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
|
||||
windows_find_package(freetype REQUIRED)
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_LIBRARIES libfftw)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAStreamWriter
|
||||
${OPENCOLLADA}/include/opencollada/COLLADABaseUtils
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAFramework
|
||||
${OPENCOLLADA}/include/opencollada/COLLADASaxFrameworkLoader
|
||||
${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
|
||||
)
|
||||
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAFramework.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADABaseUtils.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAStreamWriter.lib
|
||||
${OPENCOLLADA}/lib/opencollada/MathMLSolver.lib
|
||||
${OPENCOLLADA}/lib/opencollada/GeneratedSaxParser.lib
|
||||
${OPENCOLLADA}/lib/opencollada/xml.lib
|
||||
${OPENCOLLADA}/lib/opencollada/buffer.lib
|
||||
${OPENCOLLADA}/lib/opencollada/ftoa.lib
|
||||
)
|
||||
|
||||
if(NOT WITH_LLVM)
|
||||
list(APPEND OPENCOLLADA_LIBRARIES ${OPENCOLLADA}/lib/opencollada/UTF.lib)
|
||||
endif()
|
||||
|
||||
set(PCRE_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/pcre.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_INCLUDE_DIRS
|
||||
${LIBDIR}/ffmpeg/include
|
||||
${LIBDIR}/ffmpeg/include/msvc
|
||||
)
|
||||
windows_find_package(FFMPEG)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
warn_hardcoded_paths(ffmpeg)
|
||||
set(FFMPEG_LIBRARY_VERSION 57)
|
||||
set(FFMPEG_LIBRARY_VERSION_AVU 55)
|
||||
set(FFMPEG_LIBRARIES
|
||||
${LIBDIR}/ffmpeg/lib/avcodec.lib
|
||||
${LIBDIR}/ffmpeg/lib/avformat.lib
|
||||
${LIBDIR}/ffmpeg/lib/avdevice.lib
|
||||
${LIBDIR}/ffmpeg/lib/avutil.lib
|
||||
${LIBDIR}/ffmpeg/lib/swscale.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_VERSION "2.1")
|
||||
windows_find_package(OPENEXR REQUIRED)
|
||||
if(NOT OPENEXR_FOUND)
|
||||
warn_hardcoded_paths(OpenEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
set(OPENEXR_LIBRARIES
|
||||
optimized ${OPENEXR_LIBPATH}/Iex-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Half.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmImf-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Imath-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmThread-2_2.lib
|
||||
debug ${OPENEXR_LIBPATH}/Iex-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Half_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmImf-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Imath-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmThread-2_2_d.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
# Try to find tiff first then complain and set static and maybe wrong paths
|
||||
windows_find_package(TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
warn_hardcoded_paths(libtiff)
|
||||
set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
|
||||
set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(JACK_INCLUDE_DIRS
|
||||
${LIBDIR}/jack/include/jack
|
||||
${LIBDIR}/jack/include
|
||||
)
|
||||
set(JACK_LIBRARIES optimized ${LIBDIR}/jack/lib/libjack.lib debug ${LIBDIR}/jack/lib/libjack_d.lib)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
set(PYTHON_VERSION 3.5) # CACHE STRING)
|
||||
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# Shared includes for both vc2008 and vc2010
|
||||
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/include/python${PYTHON_VERSION})
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(boost_extra_libs wave)
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND boost_extra_libs locale)
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND boost_extra_libs iostreams)
|
||||
endif()
|
||||
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
|
||||
set(Boost_USE_MULTITHREADED ON) # suffix -mt
|
||||
set(Boost_USE_STATIC_LIBS ON) # suffix -s
|
||||
if (WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(Boost COMPONENTS date_time filesystem thread regex system ${boost_extra_libs})
|
||||
endif (WITH_WINDOWS_FIND_MODULES)
|
||||
if(NOT Boost_FOUND)
|
||||
warn_hardcoded_paths(BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(MSVC12)
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc120-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc120-mt-sgd-1_60.lib")
|
||||
else()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc140-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc140-mt-sgd-1_60.lib")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized libboost_date_time-${BOOST_POSTFIX}
|
||||
optimized libboost_filesystem-${BOOST_POSTFIX}
|
||||
optimized libboost_regex-${BOOST_POSTFIX}
|
||||
optimized libboost_system-${BOOST_POSTFIX}
|
||||
optimized libboost_thread-${BOOST_POSTFIX}
|
||||
debug libboost_date_time-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_regex-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_system-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_thread-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized libboost_wave-${BOOST_POSTFIX}
|
||||
debug libboost_wave-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized libboost_locale-${BOOST_POSTFIX}
|
||||
debug libboost_locale-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
else() # we found boost using find_package
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
|
||||
endif()
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
windows_find_package(OpenImageIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OIIO_OPTIMIZED optimized OpenImageIO optimized OpenImageIO_Util)
|
||||
set(OIIO_DEBUG debug OpenImageIO_d debug OpenImageIO_Util_d)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
|
||||
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||
add_definitions(-DOIIO_STATIC_BUILD)
|
||||
add_definitions(-DOIIO_NO_SSE=1)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_ROOT_DIR}/lib/*.lib)
|
||||
|
||||
if(EXISTS ${LLVM_ROOT_DIR}/debug/lib)
|
||||
foreach(LLVM_OPTIMIZED_LIB ${LLVM_LIBRARY_OPTIMIZED})
|
||||
get_filename_component(LIBNAME ${LLVM_OPTIMIZED_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS optimized ${LIBNAME})
|
||||
endforeach(LLVM_OPTIMIZED_LIB)
|
||||
|
||||
file(GLOB LLVM_LIBRARY_DEBUG ${LLVM_ROOT_DIR}/debug/lib/*.lib)
|
||||
|
||||
foreach(LLVM_DEBUG_LIB ${LLVM_LIBRARY_DEBUG})
|
||||
get_filename_component(LIBNAME ${LLVM_DEBUG_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS debug ${LIBNAME})
|
||||
endforeach(LLVM_DEBUG_LIB)
|
||||
|
||||
set(LLVM_LIBRARY ${LLVM_LIBS})
|
||||
else()
|
||||
message(WARNING "LLVM debug libs not present on this system. Using release libs for debug builds.")
|
||||
set(LLVM_LIBRARY ${LLVM_LIBRARY_OPTIMIZED})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO)
|
||||
set(OPENCOLORIO_LIBPATH ${LIBDIR}/opencolorio/lib)
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(BLOSC_LIBRARIES optimized ${LIBDIR}/blosc/lib/libblosc.lib debug ${LIBDIR}/blosc/lib/libblosc_d.lib)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include ${TBB_INCLUDE_DIR})
|
||||
set(OPENVDB_LIBRARIES optimized openvdb debug openvdb_d ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES optimized alembic debug alembic_d)
|
||||
endif()
|
||||
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
set(LAPACK ${LIBDIR}/lapack)
|
||||
# set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
|
||||
set(LAPACK_LIBPATH ${LAPACK}/lib)
|
||||
set(LAPACK_LIBRARIES
|
||||
${LIBDIR}/lapack/lib/libf2c.lib
|
||||
${LIBDIR}/lapack/lib/clapack_nowrap.lib
|
||||
${LIBDIR}/lapack/lib/BLAS_nowrap.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
set(OPENSUBDIV_INCLUDE_DIR ${LIBDIR}/opensubdiv/include)
|
||||
set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib)
|
||||
set(OPENSUBDIV_LIBRARIES optimized ${OPENSUBDIV_LIBPATH}/osdCPU.lib
|
||||
optimized ${OPENSUBDIV_LIBPATH}/osdGPU.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdCPU_d.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdGPU_d.lib
|
||||
)
|
||||
set(OPENSUBDIV_HAS_OPENMP TRUE)
|
||||
set(OPENSUBDIV_HAS_TBB FALSE)
|
||||
set(OPENSUBDIV_HAS_OPENCL TRUE)
|
||||
set(OPENSUBDIV_HAS_CUDA FALSE)
|
||||
set(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK TRUE)
|
||||
set(OPENSUBDIV_HAS_GLSL_COMPUTE TRUE)
|
||||
windows_find_package(OpenSubdiv)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
# MinGW TODO: Update MinGW to SDL2
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
set(SDL_LIBRARY SDL2)
|
||||
else()
|
||||
set(SDL_LIBRARY SDL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Audio IO
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace.lib)
|
||||
set(AUDASPACE_C_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_C_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-c.lib)
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
|
||||
endif()
|
||||
|
||||
# used in many places so include globally, like OpenGL
|
||||
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
|
||||
|
||||
#find signtool
|
||||
SET(ProgramFilesX86_NAME "ProgramFiles(x86)") #env dislikes the ( )
|
||||
find_program(SIGNTOOL_EXE signtool
|
||||
HINTS
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.0/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86/"
|
||||
)
|
@@ -23,9 +23,11 @@
|
||||
# <pep8 compliant>
|
||||
|
||||
"""
|
||||
Module for accessing project file data for Blender.
|
||||
Example Win32 usage:
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
|
||||
|
||||
Before use, call init(cmake_build_dir).
|
||||
Example Linux usage:
|
||||
python ~/blenderSVN/blender/build_files/cmake/cmake_qtcreator_project.py ~/blenderSVN/cmake
|
||||
"""
|
||||
|
||||
__all__ = (
|
||||
@@ -39,8 +41,7 @@ __all__ = (
|
||||
"is_py",
|
||||
"cmake_advanced_info",
|
||||
"cmake_compiler_defines",
|
||||
"project_name_get",
|
||||
"init",
|
||||
"project_name_get"
|
||||
)
|
||||
|
||||
|
||||
@@ -60,26 +61,19 @@ SOURCE_DIR = abspath(SOURCE_DIR)
|
||||
|
||||
SIMPLE_PROJECTFILE = False
|
||||
|
||||
# must initialize from 'init'
|
||||
CMAKE_DIR = None
|
||||
# get cmake path
|
||||
CMAKE_DIR = sys.argv[-1]
|
||||
|
||||
if not exists(join(CMAKE_DIR, "CMakeCache.txt")):
|
||||
CMAKE_DIR = os.getcwd()
|
||||
if not exists(join(CMAKE_DIR, "CMakeCache.txt")):
|
||||
print("CMakeCache.txt not found in %r or %r\n Pass CMake build dir as an argument, or run from that dir, aborting" % (CMAKE_DIR, os.getcwd()))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def init(cmake_path):
|
||||
global CMAKE_DIR, PROJECT_DIR
|
||||
|
||||
# get cmake path
|
||||
cmake_path = cmake_path or ""
|
||||
|
||||
if (not cmake_path) or (not exists(join(cmake_path, "CMakeCache.txt"))):
|
||||
cmake_path = os.getcwd()
|
||||
if not exists(join(cmake_path, "CMakeCache.txt")):
|
||||
print("CMakeCache.txt not found in %r or %r\n"
|
||||
" Pass CMake build dir as an argument, or run from that dir, aborting" %
|
||||
(cmake_path, os.getcwd()))
|
||||
return False
|
||||
|
||||
PROJECT_DIR = CMAKE_DIR = cmake_path
|
||||
return True
|
||||
# could be either.
|
||||
# PROJECT_DIR = SOURCE_DIR
|
||||
PROJECT_DIR = CMAKE_DIR
|
||||
|
||||
|
||||
def source_list(path, filename_check=None):
|
||||
@@ -214,12 +208,7 @@ def cmake_advanced_info():
|
||||
|
||||
def cmake_cache_var(var):
|
||||
cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"), encoding='utf-8')
|
||||
lines = [
|
||||
l_strip for l in cache_file
|
||||
for l_strip in (l.strip(),)
|
||||
if l_strip
|
||||
if not l_strip.startswith(("//", "#"))
|
||||
]
|
||||
lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
|
||||
cache_file.close()
|
||||
|
||||
for l in lines:
|
||||
|
@@ -23,7 +23,7 @@
|
||||
__all__ = (
|
||||
"build_info",
|
||||
"SOURCE_DIR",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
import sys
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
@@ -2,9 +2,11 @@
|
||||
|
||||
# custom blender vars
|
||||
blender_srcdir=$(dirname $startdir)"/../.."
|
||||
blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender_version.h | awk '{print $3}')
|
||||
# value may be formatted: 35042:35051M
|
||||
blender_revision=$(svnversion $blender_srcdir | cut -d: -f2 | awk '{print $3}')
|
||||
blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
blender_version=$(expr $blender_version / 100).$(expr $blender_version % 100) # 256 -> 2.56
|
||||
blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blender_srcdir/source/blender/blenkernel/BKE_blender_version.h)
|
||||
blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blender_srcdir/source/blender/blenkernel/BKE_blender.h)
|
||||
# blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
|
||||
# map the version a -> 1
|
||||
@@ -25,9 +27,7 @@ arch=('i686' 'x86_64')
|
||||
url="www.blender.org"
|
||||
license=('GPL')
|
||||
groups=()
|
||||
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.5'
|
||||
'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl'
|
||||
'libsndfile' 'ffmpeg')
|
||||
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.4' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
|
||||
makedepends=('cmake' 'git')
|
||||
optdepends=()
|
||||
provides=()
|
||||
|
50
build_files/scons/Modules/FindPython.py
Normal file
50
build_files/scons/Modules/FindPython.py
Normal file
@@ -0,0 +1,50 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
def FindPython():
|
||||
all_abi_flags = ['m', 'mu', '']
|
||||
|
||||
python = "/usr"
|
||||
abi_flags = "m" # Most common for linux distros
|
||||
version = "3.4"
|
||||
|
||||
_arch = platform.uname()[4] + "-linux-gnu"
|
||||
|
||||
# Determine ABI flags used on this system
|
||||
include = os.path.join(python, "include")
|
||||
for cur_flags in all_abi_flags:
|
||||
inc = os.path.join(include, "python" + version + cur_flags, "Python.h")
|
||||
if os.path.exists(inc):
|
||||
abi_flags = cur_flags
|
||||
break
|
||||
|
||||
# Find config.h. In some distros, such as ubuntu 12.10 they are not in standard include dir.
|
||||
incconf = os.path.join(include, _arch, "python" + version + cur_flags)
|
||||
if not os.path.exists(os.path.join(incconf, "pyconfig.h")):
|
||||
incconf = ''
|
||||
|
||||
# Determine whether python is in /usr/lib or /usr/lib64
|
||||
lib32 = os.path.join(python, "lib", "python" + version, "sysconfig.py")
|
||||
lib64 = os.path.join(python, "lib64", "python" + version, "sysconfig.py")
|
||||
if os.path.exists(lib32):
|
||||
libpath = "${BF_PYTHON}/lib"
|
||||
elif os.path.exists(lib64):
|
||||
libpath = "${BF_PYTHON}/lib64"
|
||||
else:
|
||||
# roll back to default value
|
||||
libpath = "${BF_PYTHON}/lib"
|
||||
|
||||
libpath_arch = libpath
|
||||
_libpath_arch = os.path.join(python, "lib", _arch) # No lib64 stuff with recent deb-like distro afaik...
|
||||
_libs = ["libpython" + version + abi_flags + ext for ext in (".so", ".a")]
|
||||
for l in _libs:
|
||||
if not os.path.exists(os.path.join(libpath, l)) and os.path.exists(os.path.join(_libpath_arch, l)):
|
||||
libpath_arch = os.path.join(libpath, _arch)
|
||||
break
|
||||
|
||||
return {"PYTHON": python,
|
||||
"VERSION": version,
|
||||
"LIBPATH": libpath,
|
||||
"LIBPATH_ARCH": libpath_arch,
|
||||
"ABI_FLAGS": abi_flags,
|
||||
"CONFIG": incconf}
|
42
build_files/scons/Modules/FindSharedPtr.py
Normal file
42
build_files/scons/Modules/FindSharedPtr.py
Normal file
@@ -0,0 +1,42 @@
|
||||
def FindSharedPtr(conf):
|
||||
"""
|
||||
Detect shared_ptr availability
|
||||
"""
|
||||
|
||||
found = False
|
||||
namespace = None
|
||||
header = None
|
||||
|
||||
if conf.CheckCXXHeader("memory"):
|
||||
# Finding the memory header doesn't mean that shared_ptr is in std
|
||||
# namespace.
|
||||
#
|
||||
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
|
||||
# order to support this, we do an extra check to see which namespace
|
||||
# should be used.
|
||||
|
||||
if conf.CheckType('std::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
|
||||
print("-- Found shared_ptr in std namespace using <memory> header.")
|
||||
namespace = 'std'
|
||||
header = 'memory'
|
||||
elif conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
|
||||
print("-- Found shared_ptr in std::tr1 namespace using <memory> header..")
|
||||
namespace = 'std::tr1'
|
||||
header = 'memory'
|
||||
|
||||
if not namespace and conf.CheckCXXHeader("tr1/memory"):
|
||||
# Further, gcc defines shared_ptr in std::tr1 namespace and
|
||||
# <tr1/memory> is to be included for this. And what makes things
|
||||
# even more tricky is that gcc does have <memory> header, so
|
||||
# all the checks above wouldn't find shared_ptr.
|
||||
if conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <tr1/memory>"):
|
||||
print("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header..")
|
||||
namespace = 'std::tr1'
|
||||
header = 'tr1/memory'
|
||||
|
||||
if not namespace:
|
||||
print("-- Unable to find shared_ptrred_map>.")
|
||||
|
||||
conf.env['WITH_SHARED_PTR_SUPPORT'] = namespace and header
|
||||
conf.env['SHARED_PTR_NAMESPACE'] = namespace
|
||||
conf.env['SHARED_PTR_HEADER'] = header
|
38
build_files/scons/Modules/FindUnorderedMap.py
Normal file
38
build_files/scons/Modules/FindUnorderedMap.py
Normal file
@@ -0,0 +1,38 @@
|
||||
def FindUnorderedMap(conf):
|
||||
"""
|
||||
Detect unordered_map availability
|
||||
"""
|
||||
|
||||
namespace = None
|
||||
header = None
|
||||
|
||||
if conf.CheckCXXHeader("unordered_map"):
|
||||
# Even so we've found unordered_map header file it doesn't
|
||||
# mean unordered_map and unordered_set will be declared in
|
||||
# std namespace.
|
||||
#
|
||||
# Namely, MSVC 2008 have unordered_map header which declares
|
||||
# unordered_map class in std::tr1 namespace. In order to support
|
||||
# this, we do extra check to see which exactly namespace is
|
||||
# to be used.
|
||||
|
||||
if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
|
||||
print("-- Found unordered_map/set in std namespace.")
|
||||
namespace = 'std'
|
||||
header = 'unordered_map'
|
||||
elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
|
||||
print("-- Found unordered_map/set in std::tr1 namespace.")
|
||||
namespace = 'std::tr1'
|
||||
header = 'unordered_map'
|
||||
else:
|
||||
print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
|
||||
elif conf.CheckCXXHeader("tr1/unordered_map"):
|
||||
print("-- Found unordered_map/set in std::tr1 namespace.")
|
||||
namespace = 'std::tr1'
|
||||
header = 'tr1/unordered_map'
|
||||
else:
|
||||
print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
|
||||
|
||||
conf.env['WITH_UNORDERED_MAP_SUPPORT'] = namespace and header
|
||||
conf.env['UNORDERED_MAP_NAMESPACE'] = namespace
|
||||
conf.env['UNORDERED_MAP_HEADER'] = header
|
271
build_files/scons/config/darwin-config.py
Normal file
271
build_files/scons/config/darwin-config.py
Normal file
@@ -0,0 +1,271 @@
|
||||
import commands
|
||||
|
||||
#############################################################################
|
||||
################### Compiler & architecture settings ##################
|
||||
#############################################################################
|
||||
|
||||
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
|
||||
MACOSX_SDK='' # set an sdk name like '10.7' or leave empty for automatic choosing highest available
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
|
||||
# gcc always defaults to the system standard compiler linked by a shim or symlink
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
#############################################################################
|
||||
################### Dependency settings ##################
|
||||
#############################################################################
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR + '/ffmpeg'
|
||||
BF_FFMPEG_INC = "${BF_FFMPEG}/include"
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
|
||||
#bz2 is a standard osx dynlib
|
||||
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_OSX_STATICPYTHON = True
|
||||
|
||||
# python 3.4 uses precompiled libraries in bf svn /lib by default
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
|
||||
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
|
||||
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include' # only headers from libdir needed for proper use of framework !!!!
|
||||
#BF_OPENAL_LIB = 'openal'
|
||||
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
# we use simply jack framework
|
||||
WITH_BF_JACK = True
|
||||
BF_JACK = '/Library/Frameworks/Jackmp.framework'
|
||||
BF_JACK_INC = '${BF_JACK}/headers'
|
||||
#BF_JACK_LIB = 'jack' # not used due framework
|
||||
BF_JACK_LIBPATH = '${BF_JACK}'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'sndfile FLAC ogg vorbis vorbisenc'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored in ffmpeg dir
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL2' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '${LCGDIR}/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
#BF_ZLIB_INC = '${BF_ZLIB}/include' # don't use this, it breaks -isysroot ${MACOSX_SDK}
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = True
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = '/usr'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = True
|
||||
BF_OPENGL_LIB = 'GL GLU'
|
||||
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
|
||||
BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
|
||||
|
||||
#OpenCollada flags
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
|
||||
BF_PCRE = LIBDIR + '/opencollada'
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
|
||||
#BF_EXPAT = '/usr'
|
||||
#BF_EXPAT_LIB = 'expat'
|
||||
#BF_EXPAT_LIBPATH = '/usr/lib'
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
#OSL
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
BF_OSL = LIBDIR + '/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
#BF_OSL_LIB = 'oslcomp oslquery'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMObject'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = LIBDIR + '/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB = 'OpenImageIO'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO tinyxml yaml-cpp'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mt'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
#OpenMP ( will be checked for compiler support and turned off eventually )
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = []
|
||||
|
||||
# SpaceNavigator and related 3D mice, driver must be 3DxWare 10 Beta 4 (Mac OS X) or later !
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
#############################################################################
|
||||
################### various compile settings and flags ##################
|
||||
#############################################################################
|
||||
|
||||
BF_QUIET = '1' # suppress verbose output
|
||||
|
||||
CFLAGS = []
|
||||
CXXFLAGS = []
|
||||
CCFLAGS = ['-pipe','-funsigned-char']
|
||||
CPPFLAGS = []
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']
|
||||
|
||||
LLIBS = ['stdc++']
|
||||
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
|
||||
#############################################################################
|
||||
################### Output directories ##################
|
||||
#############################################################################
|
||||
|
||||
BF_BUILDDIR='../build/darwin'
|
||||
BF_INSTALLDIR='../install/darwin'
|
278
build_files/scons/config/linux-config.py
Normal file
278
build_files/scons/config/linux-config.py
Normal file
@@ -0,0 +1,278 @@
|
||||
from FindPython import FindPython
|
||||
|
||||
py = FindPython()
|
||||
|
||||
BF_PYTHON_ABI_FLAGS = py['ABI_FLAGS']
|
||||
BF_PYTHON = py['PYTHON']
|
||||
BF_PYTHON_LIBPATH = py['LIBPATH']
|
||||
BF_PYTHON_LIBPATH_ARCH = py['LIBPATH_ARCH']
|
||||
BF_PYTHON_CONFIG = py['CONFIG']
|
||||
BF_PYTHON_VERSION = py['VERSION']
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS} ' + BF_PYTHON_CONFIG
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}' # BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
|
||||
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON_LIBPATH_ARCH}/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = '/usr'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = '/usr'
|
||||
BF_JACK_INC = '${BF_JACK}/include/jack'
|
||||
BF_JACK_LIB = 'jack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
WITH_BF_STATICSNDFILE = False
|
||||
BF_SNDFILE = '/usr'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
|
||||
BF_SNDFILE_LIB = 'sndfile'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
BF_SNDFILE_LIB_STATIC = '${BF_SNDFILE}/lib/libsndfile.a ${BF_OGG}/lib/libvorbis.a ${BF_OGG}/lib/libFLAC.a ${BF_OGG}/lib/libvorbisenc.a ${BF_OGG}/lib/libogg.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '/usr'
|
||||
# when compiling with your own openexr lib you might need to set...
|
||||
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = '/usr'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = '/usr'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = '/usr'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_ELTOPO = False
|
||||
BF_LAPACK = '/usr'
|
||||
BF_LAPACK_LIB = 'lapack3gf blas clapack'
|
||||
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
|
||||
|
||||
BF_FREETYPE = '/usr'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
#BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = "/usr"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_BINRELOC = True
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = '/usr'
|
||||
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
#WITH_BF_STATICFFMPEG = True
|
||||
#BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH/libavcodec.a ${BF_FFMPEG_LIBPATH}/libswscale.a ${BF_FFMPEG_LIBPATH}/libavutil.a ${BF_FFMPEG_LIBPATH}/libavdevice.a'
|
||||
|
||||
# enable ogg, vorbis and theora in ffmpeg
|
||||
WITH_BF_OGG = False
|
||||
BF_OGG = '/usr'
|
||||
BF_OGG_INC = '${BF_OGG}/include'
|
||||
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = False
|
||||
WITH_BF_STATICFFTW3 = False
|
||||
BF_FFTW3 = '/usr'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
BF_FFTW3_LIB_STATIC = '${BF_FFTW3_LIBPATH}/libfftw3.a'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE = '#extern/libredcode'
|
||||
BF_REDCODE_LIB = ''
|
||||
# BF_REDCODE_INC = '${BF_REDCODE}/include'
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if you're using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
|
||||
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
|
||||
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
|
||||
|
||||
WITH_BF_COLLADA = False
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = '/usr'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
BF_PCRE = ''
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '/usr/lib'
|
||||
BF_EXPAT = '/usr'
|
||||
BF_EXPAT_LIB = 'expat'
|
||||
BF_EXPAT_LIBPATH = '/usr/lib'
|
||||
|
||||
WITH_BF_JEMALLOC = False
|
||||
WITH_BF_STATICJEMALLOC = False
|
||||
BF_JEMALLOC = '/usr'
|
||||
BF_JEMALLOC_INC = '${BF_JEMALLOC}/include'
|
||||
BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
|
||||
BF_JEMALLOC_LIB = 'jemalloc'
|
||||
BF_JEMALLOC_LIB_STATIC = '${BF_JEMALLOC_LIBPATH}/libjemalloc.a'
|
||||
|
||||
WITH_BF_OIIO = False
|
||||
WITH_BF_STATICOIIO = False
|
||||
BF_OIIO = '/usr'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB = 'OpenImageIO'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
WITH_BF_OCIO = False
|
||||
WITH_BF_STATICOCIO = False
|
||||
BF_OCIO = '/usr'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO yaml-cpp tinyxml'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/libOpenColorIO.a ${BF_OCIO_LIBPATH}/libtinyxml.a ${BF_OCIO_LIBPATH}/libyaml-cpp.a'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
WITH_BF_STATICBOOST = False
|
||||
BF_BOOST = '/usr'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_filesystem boost_regex boost_system boost_thread boost_date_time'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
|
||||
|
||||
#SpaceNavigator and friends
|
||||
WITH_BF_3DMOUSE = True
|
||||
WITH_BF_STATIC3DMOUSE = False
|
||||
BF_3DMOUSE = '/usr'
|
||||
BF_3DMOUSE_INC = '${BF_3DMOUSE}/include'
|
||||
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib'
|
||||
BF_3DMOUSE_LIB = 'spnav'
|
||||
BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
WITH_BF_STATICOPENSUBDIV = False
|
||||
BF_OPENSUBDIV = '/usr'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV_LIBPATH}/libosdGPU.a ${BF_OPENSUBDIV_LIBPATH}/libosdCPU.a'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
|
||||
CFLAGS = ['-std=gnu89']
|
||||
CXXFLAGS = []
|
||||
|
||||
CPPFLAGS = []
|
||||
# g++ 4.6, only needed for bullet
|
||||
CXXFLAGS += ['-fpermissive']
|
||||
if WITH_BF_FFMPEG:
|
||||
# libavutil needs UINT64_C()
|
||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
LLIBS = ['util', 'c', 'm', 'dl', 'pthread']
|
||||
|
||||
BF_PROFILE = False
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
|
||||
BF_BUILDDIR = '../build/linux'
|
||||
BF_INSTALLDIR='../install/linux'
|
||||
|
||||
#Link against pthread
|
||||
PLATFORM_LINKFLAGS = ['-pthread']
|
||||
|
||||
#Fix for LLVM conflict with Mesa llvmpipe, SDL dynload also requires symbols to be hidden.
|
||||
# TODO(sergey): Move this to SConstruct, so we can have this line depended on user config.
|
||||
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
|
229
build_files/scons/config/win32-mingw-config.py
Normal file
229
build_files/scons/config/win32-mingw-config.py
Normal file
@@ -0,0 +1,229 @@
|
||||
LCGDIR = '#../lib/mingw32'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG_LIB = 'avformat-55 avcodec-55 avdevice-55 avutil-52 swscale-2'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadGC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'liblibjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = 'C:\\MingW'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = LIBDIR + '/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB = 'OpenImageIO'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_49 boost_filesystem-mgw46-mt-s-1_49 boost_regex-mgw46-mt-s-1_49 boost_system-mgw46-mt-s-1_49 boost_thread-mgw46-mt-s-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mgw46-mt-s-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
CXXFLAGS = []
|
||||
|
||||
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
## DISABLED, causes linking errors!
|
||||
## for re-distribution, so users dont need mingw installed
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_BUILDDIR = '..\\build\\win32-mingw'
|
||||
BF_INSTALLDIR='..\\install\\win32-mingw'
|
264
build_files/scons/config/win32-vc-config.py
Normal file
264
build_files/scons/config/win32-vc-config.py
Normal file
@@ -0,0 +1,264 @@
|
||||
import subprocess
|
||||
|
||||
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/windows_vc12'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
sys.exit(1)
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + '/iconv'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadVC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'libjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'libpng'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'libtiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'libz_st'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_ELTOPO = False
|
||||
BF_LAPACK = LIBDIR + '/lapack'
|
||||
BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
|
||||
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
WITH_BF_BINRELOC = False
|
||||
|
||||
BF_WITH_FREETYPE = True
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype2ST'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = True
|
||||
BF_OSL = '${LIBDIR}/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL_LIBPATH}/oslcomp.lib ${BF_OSL_LIBPATH}/oslexec.lib ${BF_OSL_LIBPATH}/oslquery.lib '
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMObject LLVMRuntimeDyld LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = '${LIBDIR}/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib'
|
||||
WITH_BF_STATICOIIO = True
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = '${LIBDIR}/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/OpenColorIO.lib'
|
||||
WITH_BF_STATICOCIO = True
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
|
||||
CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
|
||||
|
||||
if VC_VERSION == '12.0':
|
||||
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/Ob0', '/Od', '/FR${TARGET}.sbr']
|
||||
|
||||
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
# # Todo
|
||||
# BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
# BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
# BF_PROFILE = False
|
||||
|
||||
BF_BSC=False
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc'
|
224
build_files/scons/config/win64-mingw-config.py
Normal file
224
build_files/scons/config/win64-mingw-config.py
Normal file
@@ -0,0 +1,224 @@
|
||||
LCGDIR = '#../lib/mingw64'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG_LIB = 'avformat.dll avcodec.dll avdevice.dll avutil.dll swscale.dll swresample.dll'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include'
|
||||
BF_JACK_LIB = 'libjack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = '' # Part of MinGW-w64
|
||||
BF_PTHREADS_INC = ''
|
||||
BF_PTHREADS_LIB = ''
|
||||
BF_PTHREADS_LIBPATH = ''
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_LIBMV = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = 'C:\\MingW'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = LIBDIR + '/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB = 'OpenImageIO'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
CXXFLAGS = [ '-fpermissive' ]
|
||||
|
||||
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
|
||||
|
||||
# NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work!
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall', '-Wno-char-subscripts' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
## DISABLED, causes linking errors!
|
||||
## for re-distribution, so users dont need mingw installed
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_BUILDDIR = '..\\build\\win64-mingw'
|
||||
BF_INSTALLDIR='..\\install\\win64-mingw'
|
264
build_files/scons/config/win64-vc-config.py
Normal file
264
build_files/scons/config/win64-vc-config.py
Normal file
@@ -0,0 +1,264 @@
|
||||
import subprocess
|
||||
|
||||
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/win64_vc12'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
sys.exit(1)
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'libsndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + '/iconv'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadVC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'libjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'libpng'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'libtiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'libz_st'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_ELTOPO = False
|
||||
BF_LAPACK = LIBDIR + '/lapack'
|
||||
BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
|
||||
BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
WITH_BF_BINRELOC = False
|
||||
|
||||
BF_WITH_FREETYPE = True
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype2ST'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = LIBDIR + '/QTDevWin'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
|
||||
BF_QUICKTIME_LIB = 'qtmlClient'
|
||||
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = True
|
||||
BF_OSL = '${LIBDIR}/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL_LIBPATH}/oslcomp.lib ${BF_OSL_LIBPATH}/oslexec.lib ${BF_OSL_LIBPATH}/oslquery.lib '
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMObject LLVMRuntimeDyld LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = '${LIBDIR}/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib ${BF_OIIO_LIBPATH}/OpenImageIO_Util.lib'
|
||||
WITH_BF_STATICOIIO = True
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = '${LIBDIR}/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
BF_OCIO_LIB_STATIC = '${BF_OCIO_LIBPATH}/OpenColorIO.lib'
|
||||
WITH_BF_STATICOCIO = True
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
# No need to manually specify SSE/SSE2 on x64 systems.
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
|
||||
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
|
||||
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
|
||||
CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CFLAGS = []
|
||||
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
|
||||
|
||||
# We want to support Vista level ABI for x64
|
||||
if VC_VERSION == '12.0':
|
||||
CCFLAGS.append('/D_WIN32_WINNT=0x600')
|
||||
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
|
||||
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0']
|
||||
|
||||
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win64-vc'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc'
|
1146
build_files/scons/tools/Blender.py
Normal file
1146
build_files/scons/tools/Blender.py
Normal file
File diff suppressed because it is too large
Load Diff
16
build_files/scons/tools/bcolors.py
Normal file
16
build_files/scons/tools/bcolors.py
Normal file
@@ -0,0 +1,16 @@
|
||||
class bcolors:
|
||||
HEADER = '\033[95m'
|
||||
OKBLUE = '\033[94m'
|
||||
OKGREEN = '\033[92m'
|
||||
WARNING = '\033[93m'
|
||||
FAIL = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
def disable(self):
|
||||
self.HEADER = ''
|
||||
self.OKBLUE = ''
|
||||
self.OKGREEN = ''
|
||||
self.WARNING = ''
|
||||
self.FAIL = ''
|
||||
self.ENDC = ''
|
||||
|
918
build_files/scons/tools/btools.py
Normal file
918
build_files/scons/tools/btools.py
Normal file
@@ -0,0 +1,918 @@
|
||||
import os
|
||||
import os.path
|
||||
import SCons.Options
|
||||
|
||||
import SCons.Variables
|
||||
try:
|
||||
import subprocess
|
||||
except ImportError:
|
||||
pass
|
||||
import string
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
Variables = SCons.Variables
|
||||
BoolVariable = SCons.Variables.BoolVariable
|
||||
|
||||
def get_command_output(*popenargs, **kwargs):
|
||||
if hasattr(subprocess, "check_output"):
|
||||
return subprocess.check_output(*popenargs, **kwargs)
|
||||
if 'stdout' in kwargs:
|
||||
raise ValueError('stdout argument not allowed, it will be overridden.')
|
||||
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
|
||||
output, unused_err = process.communicate()
|
||||
retcode = process.poll()
|
||||
if retcode:
|
||||
cmd = kwargs.get("args")
|
||||
if cmd is None:
|
||||
cmd = popenargs[0]
|
||||
raise subprocess.CalledProcessError(retcode, cmd)
|
||||
return output
|
||||
|
||||
def get_version():
|
||||
import re
|
||||
|
||||
fname = os.path.join(os.path.dirname(__file__), "..", "..", "..", "source", "blender", "blenkernel", "BKE_blender.h")
|
||||
ver_base = None
|
||||
ver_char = None
|
||||
ver_cycle = None
|
||||
|
||||
re_ver = re.compile("^#\s*define\s+BLENDER_VERSION\s+([0-9]+)")
|
||||
re_ver_char = re.compile("^#\s*define\s+BLENDER_VERSION_CHAR\s*(\S*)") # optional arg
|
||||
re_ver_cycle = re.compile("^#\s*define\s+BLENDER_VERSION_CYCLE\s*(\S*)") # optional arg
|
||||
|
||||
for l in open(fname, "r"):
|
||||
match = re_ver.match(l)
|
||||
if match:
|
||||
ver = int(match.group(1))
|
||||
ver_base = "%d.%d" % (ver / 100, ver % 100)
|
||||
|
||||
match = re_ver_char.match(l)
|
||||
if match:
|
||||
ver_char = match.group(1)
|
||||
if ver_char == "BLENDER_CHAR_VERSION":
|
||||
ver_char = ""
|
||||
|
||||
match = re_ver_cycle.match(l)
|
||||
if match:
|
||||
ver_cycle = match.group(1)
|
||||
if ver_cycle == "BLENDER_CYCLE_VERSION":
|
||||
ver_cycle = ""
|
||||
|
||||
if (ver_base is not None) and (ver_char is not None) and (ver_cycle is not None):
|
||||
# eg '2.56a-beta'
|
||||
if ver_cycle != "release":
|
||||
ver_display = "%s%s-%s" % (ver_base, ver_char, ver_cycle)
|
||||
else:
|
||||
ver_display = "%s%s" % (ver_base, ver_char)
|
||||
|
||||
return ver_base, ver_display, ver_cycle
|
||||
|
||||
raise Exception("%s: missing version string" % fname)
|
||||
|
||||
def get_hash():
|
||||
try:
|
||||
build_hash = get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
|
||||
except OSError:
|
||||
build_hash = None
|
||||
print("WARNING: could not use git to retrieve current Blender repository hash...")
|
||||
except subprocess.CalledProcessError as e:
|
||||
build_hash = None
|
||||
print("WARNING: git errored while retrieving current Blender repository hash (%d)..." % e.returncode)
|
||||
if build_hash == '' or build_hash == None:
|
||||
build_hash = 'UNKNOWN'
|
||||
|
||||
return build_hash
|
||||
|
||||
|
||||
def checkEndian():
|
||||
return sys.byteorder
|
||||
|
||||
|
||||
# This is used in creating the local config directories
|
||||
VERSION, VERSION_DISPLAY, VERSION_RELEASE_CYCLE = get_version()
|
||||
HASH = get_hash()
|
||||
ENDIAN = checkEndian()
|
||||
|
||||
|
||||
def print_arguments(args, bc):
|
||||
if len(args):
|
||||
for k,v in args.iteritems():
|
||||
if type(v)==list:
|
||||
v = ' '.join(v)
|
||||
print '\t'+bc.OKBLUE+k+bc.ENDC+' = '+bc.OKGREEN + v + bc.ENDC
|
||||
else:
|
||||
print '\t'+bc.WARNING+'No command-line arguments given'+bc.ENDC
|
||||
|
||||
def validate_arguments(args, bc):
|
||||
opts_list = [
|
||||
'WITH_BF_FREESTYLE', 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'WITH_BF_PYTHON_SECURITY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LIBPATH_ARCH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
|
||||
'WITH_BF_AUDASPACE', 'BF_AUDASPACE_C_INC', 'BF_AUDASPACE_PY_INC', 'BF_AUDASPACE_DEF',
|
||||
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
|
||||
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'WITH_BF_SDL_DYNLOAD',
|
||||
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_JACK_DYNLOAD',
|
||||
'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_STATICSNDFILE', 'BF_SNDFILE_LIB_STATIC',
|
||||
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
|
||||
'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
|
||||
'WITH_BF_DDS', 'WITH_BF_CINEON', 'WITH_BF_HDR',
|
||||
'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC', 'BF_FFMPEG_DLL',
|
||||
'WITH_BF_STATICFFMPEG', 'BF_FFMPEG_LIB_STATIC',
|
||||
'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB',
|
||||
'WITH_BF_FRAMESERVER',
|
||||
'WITH_BF_COMPOSITOR',
|
||||
'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH', 'WITH_BF_STATICJPEG', 'BF_JPEG_LIB_STATIC',
|
||||
'WITH_BF_OPENJPEG', 'BF_OPENJPEG', 'BF_OPENJPEG_INC', 'BF_OPENJPEG_LIB', 'BF_OPENJPEG_LIBPATH',
|
||||
'WITH_BF_REDCODE', 'BF_REDCODE', 'BF_REDCODE_INC', 'BF_REDCODE_LIB', 'BF_REDCODE_LIBPATH',
|
||||
'WITH_BF_PNG', 'BF_PNG', 'BF_PNG_INC', 'BF_PNG_LIB', 'BF_PNG_LIBPATH', 'WITH_BF_STATICPNG', 'BF_PNG_LIB_STATIC',
|
||||
'WITH_BF_TIFF', 'BF_TIFF', 'BF_TIFF_INC', 'BF_TIFF_LIB', 'BF_TIFF_LIBPATH', 'WITH_BF_STATICTIFF', 'BF_TIFF_LIB_STATIC',
|
||||
'WITH_BF_ZLIB', 'BF_ZLIB', 'BF_ZLIB_INC', 'BF_ZLIB_LIB', 'BF_ZLIB_LIBPATH', 'WITH_BF_STATICZLIB', 'BF_ZLIB_LIB_STATIC',
|
||||
'WITH_BF_INTERNATIONAL',
|
||||
'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
|
||||
'WITH_BF_GAMEENGINE',
|
||||
'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
|
||||
# 'WITH_BF_ELTOPO', # now only available in a branch
|
||||
'BF_LAPACK', 'BF_LAPACK_LIB', 'BF_LAPACK_LIBPATH', 'BF_LAPACK_LIB_STATIC',
|
||||
'BF_WINTAB', 'BF_WINTAB_INC',
|
||||
'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH', 'BF_FREETYPE_LIB_STATIC', 'WITH_BF_FREETYPE_STATIC',
|
||||
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
|
||||
'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
|
||||
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
|
||||
'WITH_BF_EGL', 'WITH_BF_GLEW_ES', 'BF_GLEW_INC', 'WITH_BF_GL_PROFILE_CORE', 'WITH_BF_GL_PROFILE_COMPAT', 'WITH_BF_GL_PROFILE_ES20',
|
||||
'WITH_BF_GLEW_MX', 'WITH_BF_GL_EGL', 'WITH_BF_GL_ANGLE',
|
||||
|
||||
'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH',
|
||||
'WITH_BF_STATICOPENCOLLADA', 'BF_OPENCOLLADA_LIB_STATIC',
|
||||
'WITH_BF_PLAYER',
|
||||
'WITH_BF_NOBLENDER',
|
||||
'WITH_BF_BINRELOC',
|
||||
'WITH_BF_LZO', 'WITH_BF_LZMA',
|
||||
'LCGDIR',
|
||||
'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC',
|
||||
'BF_TWEAK_MODE', 'BF_SPLIT_SRC',
|
||||
'WITHOUT_BF_INSTALL',
|
||||
'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK',
|
||||
'WITH_BF_PYTHON_INSTALL_NUMPY', 'WITH_BF_PYTHON_INSTALL_REQUESTS',
|
||||
'WITHOUT_BF_OVERWRITE_INSTALL',
|
||||
'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_BF_STATICOPENMP', 'BF_OPENMP_STATIC_STATIC',
|
||||
'WITH_GHOST_SDL',
|
||||
'WITH_GHOST_XDND',
|
||||
'WITH_X11_XINPUT',
|
||||
'WITH_X11_XF86VMODE',
|
||||
'BF_GHOST_DEBUG',
|
||||
'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
|
||||
'BF_X264_CONFIG',
|
||||
'BF_XVIDCORE_CONFIG',
|
||||
'WITH_BF_DOCS',
|
||||
'BF_NUMJOBS',
|
||||
'BF_MSVS',
|
||||
'WITH_BF_RAYOPTIMIZATION',
|
||||
'BF_RAYOPTIMIZATION_SSE_FLAGS',
|
||||
'WITH_BF_FLUID',
|
||||
'WITH_BF_BOOLEAN',
|
||||
'WITH_BF_REMESH',
|
||||
'WITH_BF_OCEANSIM',
|
||||
'WITH_BF_SMOKE',
|
||||
'WITH_BF_CXX_GUARDEDALLOC',
|
||||
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
|
||||
'BUILDBOT_BRANCH',
|
||||
'WITH_BF_IME',
|
||||
'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
|
||||
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'BF_CYCLES_CUDA_ENV',
|
||||
'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
|
||||
'WITH_BF_OCIO', 'WITH_BF_STATICOCIO', 'BF_OCIO', 'BF_OCIO_INC', 'BF_OCIO_LIB', 'BF_OCIO_LIB_STATIC', 'BF_OCIO_LIBPATH',
|
||||
'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_INTERNATIONAL', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
|
||||
'WITH_BF_LIBMV', 'WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS',
|
||||
'WITH_BF_CYCLES_OSL', 'WITH_BF_STATICOSL', 'BF_OSL', 'BF_OSL_INC', 'BF_OSL_LIB', 'BF_OSL_LIBPATH', 'BF_OSL_LIB_STATIC', 'BF_OSL_COMPILER',
|
||||
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS',
|
||||
'WITH_BF_OPENSUBDIV', 'WITH_BF_STATICOPENSUBDIV', 'BF_OPENSUBDIV', 'BF_OPENSUBDIV_INC', 'BF_OPENSUBDIV_LIB', 'BF_OPENSUBDIV_LIBPATH', 'BF_OPENSUBDIV_LIB_STATIC'
|
||||
]
|
||||
|
||||
# Have options here that scons expects to be lists
|
||||
opts_list_split = [
|
||||
'BF_PYTHON_LINKFLAGS',
|
||||
'BF_OPENGL_LINKFLAGS',
|
||||
'BF_GL_DEFINITIONS',
|
||||
'CFLAGS', 'CCFLAGS', 'CXXFLAGS', 'CPPFLAGS',
|
||||
'REL_CFLAGS', 'REL_CCFLAGS', 'REL_CXXFLAGS',
|
||||
'BGE_CXXFLAGS',
|
||||
'BF_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS',
|
||||
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
|
||||
'C_WARN', 'CC_WARN', 'CXX_WARN',
|
||||
'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', 'C_COMPILER_ID',
|
||||
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET',
|
||||
'WITH_BF_CYCLES_DEBUG', 'WITH_BF_CYCLES_LOGGING',
|
||||
'WITH_BF_CPP11', 'WITH_BF_LEGACY_DEPSGRAPH',
|
||||
]
|
||||
|
||||
|
||||
arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
|
||||
'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME',
|
||||
'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE', 'BF_LINE_OVERWRITE',
|
||||
'BF_BSC', 'BF_CONFIG',
|
||||
'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
|
||||
'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG',
|
||||
'BF_UNIT_TEST', 'BF_BITNESS', 'MSVS_VERSION']
|
||||
|
||||
okdict = {}
|
||||
|
||||
for k,v in args.iteritems():
|
||||
if (k in opts_list) or (k in arg_list):
|
||||
okdict[k] = v
|
||||
elif k in opts_list_split:
|
||||
okdict[k] = v.split() # "" have already been stripped
|
||||
else:
|
||||
print '\t'+bc.WARNING+'Invalid argument: '+bc.ENDC+k+'='+v
|
||||
|
||||
return okdict
|
||||
|
||||
def print_targets(targs, bc):
|
||||
if len(targs)>0:
|
||||
for t in targs:
|
||||
print '\t'+bc.OKBLUE+t+bc.ENDC
|
||||
else:
|
||||
print '\t'+bc.WARNING+'No targets given, using '+bc.ENDC+bc.OKGREEN+'default'+bc.ENDC
|
||||
|
||||
def validate_targets(targs, bc):
|
||||
valid_list = ['.', 'blender', 'blenderstatic', 'blenderplayer', 'webplugin',
|
||||
'blendernogame', 'blenderstaticnogame', 'blenderlite', 'release',
|
||||
'everything', 'clean', 'install-bin', 'install', 'nsis','buildslave',
|
||||
'cudakernels']
|
||||
oklist = []
|
||||
for t in targs:
|
||||
if t in valid_list:
|
||||
oklist.append(t)
|
||||
else:
|
||||
print '\t'+bc.WARNING+'Invalid target: '+bc.ENDC+t
|
||||
return oklist
|
||||
|
||||
class OurSpawn:
|
||||
def ourspawn(self, sh, escape, cmd, args, env):
|
||||
newargs = " ".join(args[1:])
|
||||
cmdline = cmd + " " + newargs
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env=env)
|
||||
data, err = proc.communicate()
|
||||
rv = proc.wait()
|
||||
if err:
|
||||
print(err)
|
||||
return rv
|
||||
|
||||
def SetupSpawn( env ):
|
||||
buf = OurSpawn()
|
||||
env['SPAWN'] = buf.ourspawn
|
||||
|
||||
|
||||
def read_opts(env, cfg, args):
|
||||
localopts = Variables.Variables(cfg, args)
|
||||
localopts.AddVariables(
|
||||
('LCGDIR', 'Location of SVN lib dir'),
|
||||
('LIBDIR', 'Root dir of libs'),
|
||||
(BoolVariable('WITH_BF_PYTHON', 'Compile with python', True)),
|
||||
(BoolVariable('WITH_BF_PYTHON_SAFETY', 'Internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency)', False)),
|
||||
(BoolVariable('WITH_BF_PYTHON_SECURITY', 'Disables execution of scripts within blend files by default', True)),
|
||||
('BF_PYTHON', 'Base path for python', ''),
|
||||
('BF_PYTHON_VERSION', 'Python version to use', ''),
|
||||
('BF_PYTHON_INC', 'Include path for Python headers', ''),
|
||||
('BF_PYTHON_BINARY', 'Path to the Python interpreter', ''),
|
||||
('BF_PYTHON_LIB', 'Python library', ''),
|
||||
('BF_PYTHON_LIBPATH_ARCH', 'Additional Python library under some linux flavors (arch-dependent)', ''),
|
||||
('BF_PYTHON_DLL', 'Python dll - used on Windows only', ''),
|
||||
('BF_PYTHON_LIB_STATIC', 'Python static libraries', ''),
|
||||
('BF_PYTHON_LIBPATH', 'Library path', ''),
|
||||
('BF_PYTHON_LINKFLAGS', 'Python link flags', ''),
|
||||
(BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)),
|
||||
(BoolVariable('WITH_OSX_STATICPYTHON', 'Staticly link to python', True)),
|
||||
('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_FLUID', 'Build with Fluid simulation (Elbeem)', True)),
|
||||
(BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)),
|
||||
(BoolVariable('WITH_BF_REMESH', 'Build with remesh modifier', True)),
|
||||
(BoolVariable('WITH_BF_OCEANSIM', 'Build with ocean simulation', False)),
|
||||
(BoolVariable('WITH_BF_SMOKE', 'Build with smoke simulation', True)),
|
||||
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
|
||||
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
|
||||
('BF_OPENAL', 'Base path for OpenAL', ''),
|
||||
('BF_OPENAL_INC', 'Include path for python headers', ''),
|
||||
('BF_OPENAL_LIB', 'Path to OpenAL library', ''),
|
||||
('BF_OPENAL_LIB_STATIC', 'Path to OpenAL static library', ''),
|
||||
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
|
||||
(BoolVariable('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_AUDASPACE', 'Build with audaspace if true', True)),
|
||||
('BF_AUDASPACE_C_INC', 'audaspace-c include path', ''),
|
||||
('BF_AUDASPACE_PY_INC', 'audaspace-py include path', ''),
|
||||
('BF_AUDASPACE_DEF', 'audaspace defines', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
|
||||
('BF_SDL', 'SDL base path', ''),
|
||||
('BF_SDL_INC', 'SDL include path', ''),
|
||||
('BF_SDL_LIB', 'SDL library', ''),
|
||||
('BF_SDL_LIBPATH', 'SDL library path', ''),
|
||||
(BoolVariable('WITH_BF_SDL_DYNLOAD', 'Enable runtime dynamic SDL libraries loading (works only on Linux)', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)),
|
||||
('BF_JACK', 'jack base path', ''),
|
||||
('BF_JACK_INC', 'jack include path', ''),
|
||||
('BF_JACK_LIB', 'jack library', ''),
|
||||
('BF_JACK_LIBPATH', 'jack library path', ''),
|
||||
(BoolVariable('WITH_BF_JACK_DYNLOAD', 'Enable runtime dynamic Jack libraries loading (works only on Linux)', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_SNDFILE', 'Enable sndfile support if true', True)),
|
||||
('BF_SNDFILE', 'sndfile base path', ''),
|
||||
('BF_SNDFILE_INC', 'sndfile include path', ''),
|
||||
('BF_SNDFILE_LIB', 'sndfile library', ''),
|
||||
('BF_SNDFILE_LIB_STATIC', 'Path to sndfile static library', ''),
|
||||
('BF_SNDFILE_LIBPATH', 'sndfile library path', ''),
|
||||
(BoolVariable('WITH_BF_STATICSNDFILE', 'Staticly link to sndfile', False)),
|
||||
|
||||
('BF_PTHREADS', 'Pthreads base path', ''),
|
||||
('BF_PTHREADS_INC', 'Pthreads include path', ''),
|
||||
('BF_PTHREADS_LIB', 'Pthreads library', ''),
|
||||
('BF_PTHREADS_LIBPATH', 'Pthreads library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OPENEXR', 'Use OPENEXR if true', True)),
|
||||
(BoolVariable('WITH_BF_STATICOPENEXR', 'Staticly link to OpenEXR', False)),
|
||||
('BF_OPENEXR', 'OPENEXR base path', ''),
|
||||
('BF_OPENEXR_INC', 'OPENEXR include path', ''),
|
||||
('BF_OPENEXR_LIB', 'OPENEXR library', ''),
|
||||
('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
|
||||
('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_DDS', 'Support DDS image format if true', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_CINEON', 'Support CINEON and DPX image formats if true', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_HDR', 'Support HDR image formats if true', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_FRAMESERVER', 'Support export to a frameserver', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
|
||||
('BF_FFMPEG', 'FFMPEG base path', ''),
|
||||
('BF_FFMPEG_LIB', 'FFMPEG library', ''),
|
||||
('BF_FFMPEG_DLL', 'FFMPEG dll libraries to be installed', ''),
|
||||
('BF_FFMPEG_EXTRA', 'FFMPEG flags that must be preserved', ''),
|
||||
|
||||
('BF_FFMPEG_INC', 'FFMPEG includes', ''),
|
||||
('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),
|
||||
(BoolVariable('WITH_BF_STATICFFMPEG', 'Use static FFMPEG if true', False)),
|
||||
('BF_FFMPEG_LIB_STATIC', 'Static FFMPEG libraries', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OGG', 'Link OGG, THEORA, VORBIS with FFMPEG if true',
|
||||
False)),
|
||||
('BF_OGG', 'OGG base path', ''),
|
||||
('BF_OGG_LIB', 'OGG library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_JPEG', 'Use JPEG if true', True)),
|
||||
(BoolVariable('WITH_BF_STATICJPEG', 'Staticly link to JPEG', False)),
|
||||
('BF_JPEG', 'JPEG base path', ''),
|
||||
('BF_JPEG_INC', 'JPEG include path', ''),
|
||||
('BF_JPEG_LIB', 'JPEG library', ''),
|
||||
('BF_JPEG_LIBPATH', 'JPEG library path', ''),
|
||||
('BF_JPEG_LIB_STATIC', 'JPEG static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', False)),
|
||||
('BF_OPENJPEG', 'OPENJPEG base path', ''),
|
||||
('BF_OPENJPEG_INC', 'OPENJPEG include path', ''),
|
||||
('BF_OPENJPEG_LIB', 'OPENJPEG library', ''),
|
||||
('BF_OPENJPEG_LIBPATH', 'OPENJPEG library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_REDCODE', 'Use REDCODE if true', False)),
|
||||
('BF_REDCODE', 'REDCODE base path', ''),
|
||||
('BF_REDCODE_INC', 'REDCODE include path', ''),
|
||||
('BF_REDCODE_LIB', 'REDCODE library', ''),
|
||||
('BF_REDCODE_LIBPATH', 'REDCODE library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_PNG', 'Use PNG if true', True)),
|
||||
(BoolVariable('WITH_BF_STATICPNG', 'Staticly link to PNG', False)),
|
||||
('BF_PNG', 'PNG base path', ''),
|
||||
('BF_PNG_INC', 'PNG include path', ''),
|
||||
('BF_PNG_LIB', 'PNG library', ''),
|
||||
('BF_PNG_LIBPATH', 'PNG library path', ''),
|
||||
('BF_PNG_LIB_STATIC', 'PNG static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_TIFF', 'Use TIFF if true', True)),
|
||||
(BoolVariable('WITH_BF_STATICTIFF', 'Staticly link to TIFF', False)),
|
||||
('BF_TIFF', 'TIFF base path', ''),
|
||||
('BF_TIFF_INC', 'TIFF include path', ''),
|
||||
('BF_TIFF_LIB', 'TIFF library', ''),
|
||||
('BF_TIFF_LIBPATH', 'TIFF library path', ''),
|
||||
('BF_TIFF_LIB_STATIC', 'TIFF static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_ZLIB', 'Use ZLib if true', True)),
|
||||
(BoolVariable('WITH_BF_STATICZLIB', 'Staticly link to ZLib', False)),
|
||||
('BF_ZLIB', 'ZLib base path', ''),
|
||||
('BF_ZLIB_INC', 'ZLib include path', ''),
|
||||
('BF_ZLIB_LIB', 'ZLib library', ''),
|
||||
('BF_ZLIB_LIBPATH', 'ZLib library path', ''),
|
||||
('BF_ZLIB_LIB_STATIC', 'ZLib static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_INTERNATIONAL', 'Use Boost::locale if true', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_ICONV', 'Use iconv if true', True)),
|
||||
('BF_ICONV', 'iconv base path', ''),
|
||||
('BF_ICONV_INC', 'iconv include path', ''),
|
||||
('BF_ICONV_LIB', 'iconv library', ''),
|
||||
('BF_ICONV_LIBPATH', 'iconv library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_FREESTYLE', 'Compile with freestyle', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_GAMEENGINE', 'Build with gameengine' , False)),
|
||||
|
||||
(BoolVariable('WITH_BF_BULLET', 'Use Bullet if true', True)),
|
||||
# (BoolVariable('WITH_BF_ELTOPO', 'Use Eltopo collision library if true', False)), # this is now only available in a branch
|
||||
('BF_LAPACK', 'LAPACK base path', ''),
|
||||
('BF_LAPACK_LIB', 'LAPACK library', ''),
|
||||
('BF_LAPACK_LIB_STATIC', 'LAPACK library', ''),
|
||||
('BF_LAPACK_LIBPATH', 'LAPACK library path', ''),
|
||||
(BoolVariable('WITH_BF_STATICLAPACK', 'Staticly link to LAPACK', False)),
|
||||
|
||||
('BF_BULLET', 'Bullet base dir', ''),
|
||||
('BF_BULLET_INC', 'Bullet include path', ''),
|
||||
('BF_BULLET_LIB', 'Bullet library', ''),
|
||||
|
||||
('BF_WINTAB', 'WinTab base dir', ''),
|
||||
('BF_WINTAB_INC', 'WinTab include dir', ''),
|
||||
('BF_CXX', 'c++ base path for libstdc++, only used when static linking', ''),
|
||||
(BoolVariable('WITH_BF_STATICCXX', 'static link to stdc++', False)),
|
||||
('BF_CXX_LIB_STATIC', 'static library path for stdc++', ''),
|
||||
|
||||
('BF_FREETYPE', 'Freetype base path', ''),
|
||||
('BF_FREETYPE_INC', 'Freetype include path', ''),
|
||||
('BF_FREETYPE_LIB', 'Freetype library', ''),
|
||||
('BF_FREETYPE_LIBPATH', 'Freetype library path', ''),
|
||||
(BoolVariable('WITH_BF_FREETYPE_STATIC', 'Use Static Freetype if true', False)),
|
||||
('BF_FREETYPE_LIB_STATIC', 'Static Freetype library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OPENMP', 'Use OpenMP if true', False)),
|
||||
(BoolVariable('WITH_BF_STATICOPENMP', 'Staticly link to OpenMP', False)),
|
||||
('BF_OPENMP', 'Base path to OpenMP (used when cross-compiling with older versions of WinGW)', ''),
|
||||
('BF_OPENMP_INC', 'Path to OpenMP includes (used when cross-compiling with older versions of WinGW)', ''),
|
||||
('BF_OPENMP_LIBPATH', 'Path to OpenMP libraries (used when cross-compiling with older versions of WinGW)', ''),
|
||||
(BoolVariable('WITH_GHOST_SDL', 'Enable building blender against SDL for windowing rather then the native APIs', False)),
|
||||
(BoolVariable('WITH_X11_XINPUT', 'Enable X11 Xinput (tablet support and unicode input)', True)),
|
||||
(BoolVariable('WITH_X11_XF86VMODE', 'Enable X11 video mode switching', True)),
|
||||
('BF_OPENMP_LIB_STATIC', 'OpenMP static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
|
||||
('BF_QUICKTIME', 'QuickTime base path', ''),
|
||||
('BF_QUICKTIME_INC', 'QuickTime include path', ''),
|
||||
('BF_QUICKTIME_LIB', 'QuickTime library', ''),
|
||||
('BF_QUICKTIME_LIBPATH', 'QuickTime library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_FFTW3', 'Use FFTW3 if true', False)),
|
||||
('BF_FFTW3', 'FFTW3 base path', ''),
|
||||
('BF_FFTW3_INC', 'FFTW3 include path', ''),
|
||||
('BF_FFTW3_LIB', 'FFTW3 library', ''),
|
||||
('BF_FFTW3_LIB_STATIC', 'FFTW3 static libraries', ''),
|
||||
('BF_FFTW3_LIBPATH', 'FFTW3 library path', ''),
|
||||
(BoolVariable('WITH_BF_STATICFFTW3', 'Staticly link to FFTW3', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_STATICOPENGL', 'Use MESA if true', True)),
|
||||
('BF_OPENGL', 'OpenGL base path', ''),
|
||||
('BF_OPENGL_INC', 'OpenGL include path', ''),
|
||||
('BF_OPENGL_LIB', 'OpenGL libraries', ''),
|
||||
('BF_OPENGL_LIBPATH', 'OpenGL library path', ''),
|
||||
('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
|
||||
('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_GLEW_MX', '', False)),
|
||||
(BoolVariable('WITH_BF_GLEW_ES', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_EGL', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_COMPAT', '', True)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_CORE', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_ES20', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_ANGLE', '', False)),
|
||||
('BF_GL_DEFINITIONS', '', []),
|
||||
('BF_GLEW_INC', '', ''),
|
||||
) # end of opts.AddVariables()
|
||||
|
||||
localopts.AddVariables(
|
||||
(BoolVariable('WITH_BF_COLLADA', 'Build COLLADA import/export module if true', False)),
|
||||
(BoolVariable('WITH_BF_STATICOPENCOLLADA', 'Staticly link to OpenCollada', False)),
|
||||
('BF_COLLADA', 'COLLADA base path', ''),
|
||||
('BF_COLLADA_INC', 'COLLADA include path', ''),
|
||||
('BF_COLLADA_LIB', 'COLLADA library', ''),
|
||||
('BF_OPENCOLLADA', 'OpenCollada base path', ''),
|
||||
('BF_OPENCOLLADA_INC', 'OpenCollada base include path', ''),
|
||||
('BF_OPENCOLLADA_LIB', 'OpenCollada library', ''),
|
||||
('BF_OPENCOLLADA_LIBPATH', 'OpenCollada library path', ''),
|
||||
('BF_PCRE', 'PCRE base path', ''),
|
||||
('BF_PCRE_LIB', 'PCRE library', ''),
|
||||
('BF_PCRE_LIBPATH', 'PCRE library path', ''),
|
||||
('BF_EXPAT', 'Expat base path', ''),
|
||||
('BF_EXPAT_LIB', 'Expat library', ''),
|
||||
('BF_EXPAT_LIBPATH', 'Expat library path', ''),
|
||||
('BF_OPENCOLLADA_LIB_STATIC', 'OpenCollada static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_JEMALLOC', 'Use jemalloc if true', False)),
|
||||
(BoolVariable('WITH_BF_STATICJEMALLOC', 'Staticly link to jemalloc', False)),
|
||||
('BF_JEMALLOC', 'jemalloc base path', ''),
|
||||
('BF_JEMALLOC_INC', 'jemalloc include path', ''),
|
||||
('BF_JEMALLOC_LIB', 'jemalloc library', ''),
|
||||
('BF_JEMALLOC_LIBPATH', 'jemalloc library path', ''),
|
||||
('BF_JEMALLOC_LIB_STATIC', 'jemalloc static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
|
||||
(BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_IME', 'Enable Input Method Editor (IME) for complex Asian character input', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
|
||||
(BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
|
||||
('BF_3DMOUSE', '3d mouse library base path', ''),
|
||||
('BF_3DMOUSE_INC', '3d mouse library include path', ''),
|
||||
('BF_3DMOUSE_LIB', '3d mouse library', ''),
|
||||
('BF_3DMOUSE_LIBPATH', '3d mouse library path', ''),
|
||||
('BF_3DMOUSE_LIB_STATIC', '3d mouse static library', ''),
|
||||
|
||||
('CFLAGS', 'C only flags', []),
|
||||
('CCFLAGS', 'Generic C and C++ flags', []),
|
||||
('CXXFLAGS', 'C++ only flags', []),
|
||||
('BGE_CXXFLAGS', 'C++ only flags for BGE', []),
|
||||
('CPPFLAGS', 'Defines', []),
|
||||
('REL_CFLAGS', 'C only release flags', []),
|
||||
('REL_CCFLAGS', 'Generic C and C++ release flags', []),
|
||||
('REL_CXXFLAGS', 'C++ only release flags', []),
|
||||
|
||||
('C_WARN', 'C warning flags', []),
|
||||
('CC_WARN', 'Generic C and C++ warning flags', []),
|
||||
('CXX_WARN', 'C++ only warning flags', []),
|
||||
|
||||
('LLIBS', 'Platform libs', []),
|
||||
('PLATFORM_LINKFLAGS', 'Platform linkflags', []),
|
||||
('MACOSX_ARCHITECTURE', 'python_arch.zip select', ''),
|
||||
('MACOSX_SDK', 'Set OS X SDK', ''),
|
||||
('XCODE_CUR_VER', 'Detect XCode version', ''),
|
||||
('MACOSX_DEPLOYMENT_TARGET', 'Detect OS X target version', ''),
|
||||
('C_COMPILER_ID', 'Detect the resolved compiler', ''),
|
||||
|
||||
(BoolVariable('BF_PROFILE', 'Add profiling information if true', False)),
|
||||
('BF_PROFILE_CFLAGS', 'C only profiling flags', []),
|
||||
('BF_PROFILE_CCFLAGS', 'C and C++ profiling flags', []),
|
||||
('BF_PROFILE_CXXFLAGS', 'C++ only profiling flags', []),
|
||||
('BF_PROFILE_LINKFLAGS', 'Profile linkflags', []),
|
||||
|
||||
(BoolVariable('BF_DEBUG', 'Add debug flags if true', False)),
|
||||
('BF_DEBUG_CFLAGS', 'C only debug flags', []),
|
||||
('BF_DEBUG_CCFLAGS', 'C and C++ debug flags', []),
|
||||
('BF_DEBUG_CXXFLAGS', 'C++ only debug flags', []),
|
||||
|
||||
(BoolVariable('BF_BSC', 'Create .bsc files (msvc only)', False)),
|
||||
|
||||
('BF_BUILDDIR', 'Build dir', ''),
|
||||
('BF_INSTALLDIR', 'Installation dir', ''),
|
||||
|
||||
('CC', 'C compiler to use', env['CC']),
|
||||
('CXX', 'C++ compiler to use', env['CXX']),
|
||||
|
||||
(BoolVariable('BF_BUILDINFO', 'Buildtime in splash if true', True)),
|
||||
|
||||
(BoolVariable('BF_TWEAK_MODE', 'Enable tweak mode if true', False)),
|
||||
(BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
|
||||
(BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)),
|
||||
(BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)),
|
||||
(BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python numpy module', False)),
|
||||
(BoolVariable('WITH_BF_PYTHON_INSTALL_REQUESTS', 'install Python requests module', False)),
|
||||
(BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)),
|
||||
(BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)),
|
||||
(BoolVariable('BF_FANCY', 'Enable fancy output if true', True)),
|
||||
(BoolVariable('BF_QUIET', 'Enable silent output if true', True)),
|
||||
(BoolVariable('BF_LINE_OVERWRITE', 'Enable overwriting of compile line in BF_QUIET mode if true', False)),
|
||||
(BoolVariable('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_LZO', 'Enable fast LZO pointcache compression', True)),
|
||||
(BoolVariable('WITH_BF_LZMA', 'Enable best LZMA pointcache compression', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_LIBMV', 'Enable libmv structure from motion library', True)),
|
||||
(BoolVariable('WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS', 'Enable fixed-size schur specializations', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_COMPOSITOR', 'Enable the tile based nodal compositor', True)),
|
||||
) # end of opts.AddOptions()
|
||||
|
||||
localopts.AddVariables(
|
||||
('BF_X264_CONFIG', 'configuration flags for x264', ''),
|
||||
('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
|
||||
# (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
|
||||
|
||||
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
|
||||
('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
|
||||
('BF_MSVS', 'Generate MSVS project files and solution', False),
|
||||
|
||||
(BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)),
|
||||
|
||||
(BoolVariable('BF_GHOST_DEBUG', 'Make GHOST print events and info to stdout. (very verbose)', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_RAYOPTIMIZATION', 'Enable raytracer SSE/SIMD optimization.', False)),
|
||||
('BF_RAYOPTIMIZATION_SSE_FLAGS', 'SSE flags', ''),
|
||||
(BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)),
|
||||
|
||||
('BUILDBOT_BRANCH', 'Buildbot branch name', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_CYCLES', 'Build with the Cycles engine', True)),
|
||||
(BoolVariable('WITH_BF_CYCLES_CUDA_BINARIES', 'Build with precompiled CUDA binaries', False)),
|
||||
(BoolVariable('WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'Build several render kernels at once (using BF_NUMJOBS)', False)),
|
||||
('BF_CYCLES_CUDA_NVCC', 'CUDA nvcc compiler path', ''),
|
||||
('BF_CYCLES_CUDA_ENV', 'preset environement nvcc will execute in', ''),
|
||||
('BF_CYCLES_CUDA_BINARIES_ARCH', 'CUDA architectures to compile binaries for', []),
|
||||
(BoolVariable('WITH_BF_CYCLES_DEBUG', 'Build Cycles engine with extra debugging capabilities', False)),
|
||||
(BoolVariable('WITH_BF_CYCLES_LOGGING', 'Build Cycles engine with logging support', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
|
||||
(BoolVariable('WITH_BF_STATICOIIO', 'Statically link to OpenImageIO', False)),
|
||||
('BF_OIIO', 'OIIO root path', ''),
|
||||
('BF_OIIO_INC', 'OIIO include path', ''),
|
||||
('BF_OIIO_LIB', 'OIIO library', ''),
|
||||
('BF_OIIO_LIBPATH', 'OIIO library path', ''),
|
||||
('BF_OIIO_LIB_STATIC', 'OIIO static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OCIO', 'Build with OpenColorIO', False)),
|
||||
(BoolVariable('WITH_BF_STATICOCIO', 'Staticly link to OpenColorIO', False)),
|
||||
('BF_OCIO', 'OCIO root path', ''),
|
||||
('BF_OCIO_INC', 'OCIO include path', ''),
|
||||
('BF_OCIO_LIB', 'OCIO library', ''),
|
||||
('BF_OCIO_LIBPATH', 'OCIO library path', ''),
|
||||
('BF_OCIO_LIB_STATIC', 'OCIO static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_BOOST', 'Build with Boost', False)),
|
||||
(BoolVariable('WITH_BF_STATICBOOST', 'Staticly link to boost', False)),
|
||||
('BF_BOOST', 'Boost root path', ''),
|
||||
('BF_BOOST_INC', 'Boost include path', ''),
|
||||
('BF_BOOST_LIB', 'Boost library', ''),
|
||||
('BF_BOOST_LIB_INTERNATIONAL', 'Boost library', ''),
|
||||
('BF_BOOST_LIBPATH', 'Boost library path', ''),
|
||||
('BF_BOOST_LIB_STATIC', 'Boost static library', ''),
|
||||
|
||||
(BoolVariable('WITH_GHOST_XDND', 'Build with drag-n-drop support on Linux platforms using XDND protocol', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_CYCLES_OSL', 'Build with OSL sypport in Cycles', False)),
|
||||
(BoolVariable('WITH_BF_STATICOSL', 'Staticly link to OSL', False)),
|
||||
('BF_OSL', 'OSL root path', ''),
|
||||
('BF_OSL_INC', 'OSL include path', ''),
|
||||
('BF_OSL_LIB', 'OSL library', ''),
|
||||
('BF_OSL_LIBPATH', 'OSL library path', ''),
|
||||
('BF_OSL_LIB_STATIC', 'OSL static library', ''),
|
||||
('BF_OSL_COMPILER', 'OSL compiler', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_LLVM', 'Build with LLVM sypport (required for OSL)', False)),
|
||||
(BoolVariable('WITH_BF_STATICLLVM', 'Staticly link to LLVM', False)),
|
||||
('BF_LLVM', 'LLVM root path', ''),
|
||||
('BF_LLVM_LIB', 'LLVM library', ''),
|
||||
('BF_LLVM_LIBPATH', 'LLVM library path', ''),
|
||||
('BF_LLVM_LIB_STATIC', 'LLVM static library', ''),
|
||||
|
||||
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OPENSUBDIV', 'Build with OpenSubdiv library', False)),
|
||||
(BoolVariable('WITH_BF_STATICOPENSUBDIV', 'Staticly link to OpenColorIO', False)),
|
||||
('BF_OPENSUBDIV', 'OpenSubdiv root path', ''),
|
||||
('BF_OPENSUBDIV_INC', 'OpenSubdiv include path', ''),
|
||||
('BF_OPENSUBDIV_LIB', 'OpenSubdiv library', ''),
|
||||
('BF_OPENSUBDIV_LIBPATH', 'OpenSubdiv library path', ''),
|
||||
('BF_OPENSUBDIV_LIB_STATIC', 'OpenSubdiv static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_CPP11', '"Build with C++11 standard enabled, for development use only!', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_LEGACY_DEPSGRAPH', 'Build Blender with legacy dependency graph', True)),
|
||||
) # end of opts.AddOptions()
|
||||
|
||||
return localopts
|
||||
|
||||
def buildbot_zip(src, dest, package_name, extension):
|
||||
import zipfile
|
||||
ln = len(src)+1 # one extra to remove leading os.sep when cleaning root for package_root
|
||||
flist = list()
|
||||
|
||||
# create list of tuples containing file and archive name
|
||||
for root, dirs, files in os.walk(src):
|
||||
package_root = os.path.join(package_name, root[ln:])
|
||||
flist.extend([(os.path.join(root, file), os.path.join(package_root, file)) for file in files])
|
||||
|
||||
if extension == '.zip':
|
||||
package = zipfile.ZipFile(dest, 'w', zipfile.ZIP_DEFLATED)
|
||||
package.comment = package_name + ' is a zip-file containing the Blender software. Visit http://www.blender.org for more information.'
|
||||
for entry in flist:
|
||||
package.write(entry[0], entry[1])
|
||||
package.close()
|
||||
else:
|
||||
import tarfile
|
||||
package = tarfile.open(dest, 'w:bz2')
|
||||
for entry in flist:
|
||||
package.add(entry[0], entry[1], recursive=False)
|
||||
package.close()
|
||||
bb_zip_name = os.path.normpath(src + os.sep + '..' + os.sep + 'buildbot_upload.zip')
|
||||
print("creating %s" % (bb_zip_name))
|
||||
bb_zip = zipfile.ZipFile(bb_zip_name, 'w', zipfile.ZIP_DEFLATED)
|
||||
print("writing %s to %s" % (dest, bb_zip_name))
|
||||
bb_zip.write(dest, os.path.split(dest)[1])
|
||||
bb_zip.close()
|
||||
print("removing unneeded packed file %s (to keep install directory clean)" % (dest))
|
||||
os.remove(dest)
|
||||
print("done.")
|
||||
|
||||
def buildslave_print(target, source, env):
|
||||
return "Running buildslave target"
|
||||
|
||||
def buildslave(target=None, source=None, env=None):
|
||||
"""
|
||||
Builder for buildbot integration. Used by buildslaves of http://builder.blender.org only.
|
||||
"""
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'darwin', 'win64-mingw'):
|
||||
extension = '.zip'
|
||||
else:
|
||||
extension = '.tar.bz2'
|
||||
|
||||
if env['OURPLATFORM'] == 'win32-mingw':
|
||||
platform = 'mingw32'
|
||||
elif env['OURPLATFORM'] == 'win64-mingw':
|
||||
platform = 'mingw64'
|
||||
else:
|
||||
platform = env['OURPLATFORM'].split('-')[0]
|
||||
|
||||
if platform == 'linux':
|
||||
import platform
|
||||
|
||||
if "glibc27" in env['BF_INSTALLDIR']:
|
||||
glibc = "glibc27"
|
||||
elif "glibc211" in env['BF_INSTALLDIR']:
|
||||
glibc = "glibc211"
|
||||
|
||||
bitness = platform.architecture()[0]
|
||||
if bitness == '64bit':
|
||||
platform = 'linux-' + glibc + '-x86_64'
|
||||
elif bitness == '32bit':
|
||||
platform = 'linux-' + glibc + '-i686'
|
||||
if platform == 'darwin':
|
||||
platform = 'OSX-' + env['MACOSX_DEPLOYMENT_TARGET'] + '-' + env['MACOSX_ARCHITECTURE']
|
||||
|
||||
|
||||
branch = env['BUILDBOT_BRANCH']
|
||||
|
||||
outdir = os.path.abspath(env['BF_INSTALLDIR'])
|
||||
package_name = 'blender-' + VERSION+'-'+HASH + '-' + platform
|
||||
if branch != '':
|
||||
package_name = branch + '-' + package_name
|
||||
package_dir = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name)
|
||||
package_archive = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name + extension)
|
||||
|
||||
try:
|
||||
if os.path.exists(package_archive):
|
||||
os.remove(package_archive)
|
||||
if os.path.exists(package_dir):
|
||||
shutil.rmtree(package_dir)
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to clean up old package files: ' + str(ex) + '\n')
|
||||
return 1
|
||||
|
||||
buildbot_zip(outdir, package_archive, package_name, extension)
|
||||
|
||||
return 0
|
||||
|
||||
def NSIS_print(target, source, env):
|
||||
return "Creating NSIS installer for Blender"
|
||||
|
||||
def NSIS_Installer(target=None, source=None, env=None):
|
||||
print "="*35
|
||||
|
||||
if env['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
|
||||
print "NSIS installer is only available on Windows."
|
||||
exit()
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
|
||||
bitness = '32'
|
||||
elif env['OURPLATFORM'] in ('win64-vc', 'win64-mingw'):
|
||||
bitness = '64'
|
||||
|
||||
start_dir = os.getcwd()
|
||||
rel_dir = os.path.join(start_dir,'release','windows','installer')
|
||||
install_base_dir = start_dir + os.sep
|
||||
|
||||
bf_installdir = os.path.join(os.getcwd(),env['BF_INSTALLDIR'])
|
||||
bf_installdir = os.path.normpath(bf_installdir)
|
||||
|
||||
doneroot = False
|
||||
rootdirconts = []
|
||||
datafiles = ''
|
||||
deldatafiles = ''
|
||||
deldatadirs = ''
|
||||
l = len(bf_installdir)
|
||||
|
||||
for dp,dn,df in os.walk(bf_installdir):
|
||||
# install
|
||||
if not doneroot:
|
||||
for f in df:
|
||||
rootdirconts.append(os.path.join(dp,f))
|
||||
doneroot = True
|
||||
else:
|
||||
if len(df)>0:
|
||||
datafiles += "\n" +r'SetOutPath $INSTDIR'+dp[l:]+"\n\n"
|
||||
|
||||
for f in df:
|
||||
outfile = os.path.join(dp,f)
|
||||
datafiles += ' File '+outfile + "\n"
|
||||
|
||||
# uninstall
|
||||
deldir = dp[l+1:]
|
||||
|
||||
if len(deldir)>0:
|
||||
deldatadirs = "RMDir $INSTDIR\\" + deldir + "\n" + deldatadirs
|
||||
deldatadirs = "RMDir /r $INSTDIR\\" + deldir + "\\__pycache__\n" + deldatadirs
|
||||
|
||||
for f in df:
|
||||
deldatafiles += 'Delete \"$INSTDIR\\' + os.path.join(deldir, f) + "\"\n"
|
||||
|
||||
#### change to suit install dir ####
|
||||
inst_dir = install_base_dir + env['BF_INSTALLDIR']
|
||||
|
||||
os.chdir(rel_dir)
|
||||
|
||||
ns = open("00.sconsblender.nsi","r")
|
||||
|
||||
ns_cnt = str(ns.read())
|
||||
ns.close()
|
||||
|
||||
# var replacements
|
||||
ns_cnt = string.replace(ns_cnt, "[DISTDIR]", os.path.normpath(inst_dir+os.sep))
|
||||
ns_cnt = string.replace(ns_cnt, "[VERSION]", VERSION_DISPLAY)
|
||||
ns_cnt = string.replace(ns_cnt, "[SHORTVERSION]", VERSION)
|
||||
ns_cnt = string.replace(ns_cnt, "[RELDIR]", os.path.normpath(rel_dir))
|
||||
ns_cnt = string.replace(ns_cnt, "[BITNESS]", bitness)
|
||||
|
||||
# do root
|
||||
rootlist = []
|
||||
for rootitem in rootdirconts:
|
||||
rootlist.append("File \"" + rootitem + "\"")
|
||||
rootstring = string.join(rootlist, "\n ")
|
||||
rootstring = rootstring
|
||||
rootstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[ROOTDIRCONTS]", rootstring)
|
||||
|
||||
|
||||
# do delete items
|
||||
delrootlist = []
|
||||
for rootitem in rootdirconts:
|
||||
delrootlist.append("Delete $INSTDIR\\" + rootitem[l+1:])
|
||||
delrootstring = string.join(delrootlist, "\n ")
|
||||
delrootstring += "\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[DELROOTDIRCONTS]", delrootstring)
|
||||
|
||||
ns_cnt = string.replace(ns_cnt, "[DODATAFILES]", datafiles)
|
||||
ns_cnt = string.replace(ns_cnt, "[DELDATAFILES]", deldatafiles)
|
||||
ns_cnt = string.replace(ns_cnt, "[DELDATADIRS]", deldatadirs)
|
||||
|
||||
tmpnsi = os.path.normpath(install_base_dir+os.sep+env['BF_BUILDDIR']+os.sep+"00.blender_tmp.nsi")
|
||||
new_nsis = open(tmpnsi, 'w')
|
||||
new_nsis.write(ns_cnt)
|
||||
new_nsis.close()
|
||||
print "NSIS Installer script created"
|
||||
|
||||
os.chdir(start_dir)
|
||||
print "Launching 'makensis'"
|
||||
|
||||
cmdline = "makensis " + "\""+tmpnsi+"\""
|
||||
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
#startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = True)
|
||||
data, err = proc.communicate()
|
||||
rv = proc.wait()
|
||||
|
||||
if rv != 0:
|
||||
print
|
||||
print data.strip().split("\n")[-1]
|
||||
return rv
|
||||
|
||||
def cudakernels_print(target, source, env):
|
||||
return "Running cudakernels target"
|
||||
|
||||
def cudakernels(target=None, source=None, env=None):
|
||||
"""
|
||||
Builder for cuda kernels compilation. Used by release build environment only
|
||||
"""
|
||||
|
||||
# Currently nothing to do, everything is handled by a dependency resolver
|
||||
|
||||
pass
|
||||
|
||||
def check_environ():
|
||||
problematic_envvars = ""
|
||||
for i in os.environ:
|
||||
try:
|
||||
os.environ[i].decode('ascii')
|
||||
except UnicodeDecodeError:
|
||||
problematic_envvars = problematic_envvars + "%s = %s\n" % (i, os.environ[i])
|
||||
if len(problematic_envvars)>0:
|
||||
print("================\n\n")
|
||||
print("@@ ABORTING BUILD @@\n")
|
||||
print("PROBLEM DETECTED WITH ENVIRONMENT")
|
||||
print("---------------------------------\n\n")
|
||||
print("A problem with one or more environment variable was found")
|
||||
print("Their value contain non-ascii characters. Check the below")
|
||||
print("list and override them locally to be ASCII-clean by doing")
|
||||
print("'set VARNAME=cleanvalue' on the command-line prior to")
|
||||
print("starting the build process:\n")
|
||||
print(problematic_envvars)
|
||||
return False
|
||||
else:
|
||||
return True
|
184
build_files/scons/tools/crossmingw.py
Normal file
184
build_files/scons/tools/crossmingw.py
Normal file
@@ -0,0 +1,184 @@
|
||||
"""SCons.Tool.gcc
|
||||
|
||||
Tool-specific initialization for MinGW (http://www.mingw.org/)
|
||||
|
||||
There normally shouldn't be any need to import this module directly.
|
||||
It will usually be imported through the generic SCons.Tool.Tool()
|
||||
selection method.
|
||||
|
||||
"""
|
||||
|
||||
#
|
||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
|
||||
#
|
||||
# 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
__revision__ = "src/engine/SCons/Tool/mingw.py 4043 2009/02/23 09:06:45 scons"
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import string
|
||||
|
||||
import SCons.Action
|
||||
import SCons.Builder
|
||||
import SCons.Defaults
|
||||
import SCons.Tool
|
||||
import SCons.Util
|
||||
|
||||
# This is what we search for to find mingw:
|
||||
prefixes = SCons.Util.Split("""
|
||||
mingw32-
|
||||
i386-mingw32msvc-
|
||||
i486-mingw32msvc-
|
||||
i586-mingw32msvc-
|
||||
i686-mingw32msvc-
|
||||
i686-pc-mingw32-
|
||||
""")
|
||||
|
||||
def find(env):
|
||||
for prefix in prefixes:
|
||||
# First search in the SCons path and then the OS path:
|
||||
if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
|
||||
return prefix
|
||||
|
||||
return ''
|
||||
|
||||
def shlib_generator(target, source, env, for_signature):
|
||||
cmd = SCons.Util.CLVar(['$SHLINK'])
|
||||
|
||||
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
|
||||
if dll: cmd.extend(['-o', dll])
|
||||
|
||||
cmd.extend(['$SOURCES', '$SHLINKFLAGS', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
|
||||
|
||||
implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
|
||||
if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
|
||||
|
||||
def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
|
||||
insert_def = env.subst("$WINDOWS_INSERT_DEF")
|
||||
if not insert_def in ['', '0', 0] and def_target: \
|
||||
cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
|
||||
|
||||
return [cmd]
|
||||
|
||||
def shlib_emitter(target, source, env):
|
||||
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
|
||||
no_import_lib = env.get('no_import_lib', 0)
|
||||
|
||||
if not dll:
|
||||
raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
|
||||
|
||||
if not no_import_lib and \
|
||||
not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
|
||||
|
||||
# Append an import library to the list of targets.
|
||||
target.append(env.ReplaceIxes(dll,
|
||||
'SHLIBPREFIX', 'SHLIBSUFFIX',
|
||||
'LIBPREFIX', 'LIBSUFFIX'))
|
||||
|
||||
# Append a def file target if there isn't already a def file target
|
||||
# or a def file source. There is no option to disable def file
|
||||
# target emitting, because I can't figure out why someone would ever
|
||||
# want to turn it off.
|
||||
def_source = env.FindIxes(source, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
|
||||
def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
|
||||
if not def_source and not def_target:
|
||||
target.append(env.ReplaceIxes(dll,
|
||||
'SHLIBPREFIX', 'SHLIBSUFFIX',
|
||||
'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX'))
|
||||
|
||||
return (target, source)
|
||||
|
||||
|
||||
shlib_action = SCons.Action.Action(shlib_generator, generator=1)
|
||||
|
||||
res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
|
||||
|
||||
res_builder = SCons.Builder.Builder(action=res_action, suffix='.o',
|
||||
source_scanner=SCons.Tool.SourceFileScanner)
|
||||
SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
|
||||
|
||||
def generate(env):
|
||||
mingw = find(env)
|
||||
if mingw:
|
||||
dir = os.path.dirname(mingw)
|
||||
env.PrependENVPath('PATH', dir )
|
||||
|
||||
|
||||
# Most of mingw is the same as gcc and friends...
|
||||
gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas', 'm4']
|
||||
for tool in gnu_tools:
|
||||
SCons.Tool.Tool(tool)(env)
|
||||
|
||||
#... but a few things differ:
|
||||
env['CC'] = mingw + 'gcc'
|
||||
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
|
||||
env['CXX'] = mingw + 'g++'
|
||||
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
|
||||
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
|
||||
env['SHLINKCOM'] = shlib_action
|
||||
env['LDMODULECOM'] = shlib_action
|
||||
env.Append(SHLIBEMITTER = [shlib_emitter])
|
||||
env['RANLIB'] = mingw + 'ranlib'
|
||||
env['LINK'] = mingw + 'gcc'
|
||||
env['AS'] = mingw + 'as'
|
||||
env['AR'] = mingw + 'ar'
|
||||
|
||||
env['WIN32DEFPREFIX'] = ''
|
||||
env['WIN32DEFSUFFIX'] = '.def'
|
||||
env['WINDOWSDEFPREFIX'] = '${WIN32DEFPREFIX}'
|
||||
env['WINDOWSDEFSUFFIX'] = '${WIN32DEFSUFFIX}'
|
||||
|
||||
env['SHOBJSUFFIX'] = '.o'
|
||||
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
|
||||
|
||||
env['RC'] = mingw + 'windres'
|
||||
env['RCFLAGS'] = SCons.Util.CLVar('')
|
||||
env['RCINCFLAGS'] = '$( ${_concat(RCINCPREFIX, CPPPATH, RCINCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
|
||||
env['RCINCPREFIX'] = '--include-dir '
|
||||
env['RCINCSUFFIX'] = ''
|
||||
env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
|
||||
env['BUILDERS']['RES'] = res_builder
|
||||
|
||||
# Some setting from the platform also have to be overridden:
|
||||
env['OBJPREFIX'] = ''
|
||||
env['OBJSUFFIX'] = '.o'
|
||||
env['LIBPREFIX'] = 'lib'
|
||||
env['LIBSUFFIX'] = '.a'
|
||||
env['SHOBJPREFIX'] = '$OBJPREFIX'
|
||||
env['SHOBJSUFFIX'] = '$OBJSUFFIX'
|
||||
env['PROGPREFIX'] = ''
|
||||
env['PROGSUFFIX'] = '.exe'
|
||||
env['LIBPREFIX'] = ''
|
||||
env['LIBSUFFIX'] = '.lib'
|
||||
env['SHLIBPREFIX'] = ''
|
||||
env['SHLIBSUFFIX'] = '.dll'
|
||||
env['LIBPREFIXES'] = [ '$LIBPREFIX' ]
|
||||
env['LIBSUFFIXES'] = [ '$LIBSUFFIX' ]
|
||||
|
||||
def exists(env):
|
||||
return find(env)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width:4
|
||||
# indent-tabs-mode:nil
|
||||
# End:
|
||||
# vim: set expandtab tabstop=4 shiftwidth=4:
|
353
build_files/scons/tools/mstoolkit.py
Normal file
353
build_files/scons/tools/mstoolkit.py
Normal file
@@ -0,0 +1,353 @@
|
||||
"""tools.mstoolkit
|
||||
|
||||
Tool-specific initialization for Microsoft Visual C/C++ Toolkit Commandline
|
||||
|
||||
There normally shouldn't be any need to import this module directly.
|
||||
It will usually be imported through the generic SCons.Tool.Tool()
|
||||
selection method.
|
||||
|
||||
"""
|
||||
|
||||
#
|
||||
# Copyright (c) 2004 John Connors
|
||||
#
|
||||
# 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
import re
|
||||
import string
|
||||
import types
|
||||
|
||||
import SCons.Action
|
||||
import SCons.Builder
|
||||
import SCons.Errors
|
||||
import SCons.Platform.win32
|
||||
import SCons.Tool
|
||||
import SCons.Util
|
||||
import SCons.Warnings
|
||||
|
||||
CSuffixes = ['.c', '.C']
|
||||
CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
|
||||
|
||||
def get_msvctoolkit_paths():
|
||||
"""Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those
|
||||
three environment variables that should be set in order to execute
|
||||
the MSVC .NET tools properly, if the information wasn't available
|
||||
from the registry."""
|
||||
|
||||
MSToolkitDir = None
|
||||
paths = {}
|
||||
exe_path = ''
|
||||
lib_path = ''
|
||||
include_path = ''
|
||||
|
||||
# First, we get the shell folder for this user:
|
||||
if not SCons.Util.can_read_reg:
|
||||
raise SCons.Errors.InternalError, "No Windows registry module was found"
|
||||
|
||||
# look for toolkit
|
||||
if os.environ.has_key('VCToolkitInstallDir'):
|
||||
MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir'])
|
||||
else:
|
||||
# last resort -- default install location
|
||||
MSToolkitDir = r'C:\Program Files\Microsoft Visual C++ Toolkit 2003'
|
||||
|
||||
# look for platform sdk
|
||||
if os.environ.has_key('MSSdk'):
|
||||
PlatformSDKDir = os.path.normpath(os.environ['MSSdk'])
|
||||
else:
|
||||
try:
|
||||
PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0]
|
||||
PlatformSDKDir = str(PlatformSDKDir)
|
||||
except SCons.Util.RegError:
|
||||
raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable."
|
||||
|
||||
# look for DX Sdk (expecting DX9)
|
||||
# dxsdk docs have a directory key, look for it, extract path
|
||||
#dxsdkdocs = ""
|
||||
DXsdkDir = ""
|
||||
#try:
|
||||
# dxsdkdocs = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\DirectX SDK\DX9SDK Doc Path')
|
||||
#except SCons.Util.RegError:
|
||||
# raise SCons.Errors.InternalError, "The DXSDK directory was not found in the registry."
|
||||
if os.environ.has_key('DXSDK_DIR'):
|
||||
DXsdkDir = os.path.normpath(os.environ['DXSDK_DIR'])
|
||||
|
||||
#DXsdkDir = os.path.split(dxsdkdocs[0])[0]
|
||||
DXsdkDir = os.path.split(DXsdkDir)[0]
|
||||
|
||||
include_path = r'%s\include;%s\include;%s\include' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
|
||||
lib_path = r'%s\lib;%s\lib;%s\lib' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
|
||||
exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir)
|
||||
return (include_path, lib_path, exe_path, PlatformSDKDir)
|
||||
|
||||
def validate_vars(env):
|
||||
"""Validate the PDB, PCH, and PCHSTOP construction variables."""
|
||||
if env.has_key('PCH') and env['PCH']:
|
||||
if not env.has_key('PCHSTOP'):
|
||||
raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined."
|
||||
if not SCons.Util.is_String(env['PCHSTOP']):
|
||||
raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']
|
||||
|
||||
def pch_emitter(target, source, env):
|
||||
"""Sets up the PDB dependencies for a pch file, and adds the object
|
||||
file target."""
|
||||
|
||||
validate_vars(env)
|
||||
|
||||
pch = None
|
||||
obj = None
|
||||
|
||||
for t in target:
|
||||
if SCons.Util.splitext(str(t))[1] == '.pch':
|
||||
pch = t
|
||||
if SCons.Util.splitext(str(t))[1] == '.obj':
|
||||
obj = t
|
||||
|
||||
if not obj:
|
||||
obj = SCons.Util.splitext(str(pch))[0]+'.obj'
|
||||
|
||||
target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work
|
||||
|
||||
if env.has_key('PDB') and env['PDB']:
|
||||
env.SideEffect(env['PDB'], target)
|
||||
env.Precious(env['PDB'])
|
||||
|
||||
return (target, source)
|
||||
|
||||
def object_emitter(target, source, env, parent_emitter):
|
||||
"""Sets up the PDB and PCH dependencies for an object file."""
|
||||
|
||||
validate_vars(env)
|
||||
|
||||
parent_emitter(target, source, env)
|
||||
|
||||
if env.has_key('PDB') and env['PDB']:
|
||||
env.SideEffect(env['PDB'], target)
|
||||
env.Precious(env['PDB'])
|
||||
|
||||
if env.has_key('PCH') and env['PCH']:
|
||||
env.Depends(target, env['PCH'])
|
||||
|
||||
return (target, source)
|
||||
|
||||
def static_object_emitter(target, source, env):
|
||||
return object_emitter(target, source, env,
|
||||
SCons.Defaults.StaticObjectEmitter)
|
||||
|
||||
def shared_object_emitter(target, source, env):
|
||||
return object_emitter(target, source, env,
|
||||
SCons.Defaults.SharedObjectEmitter)
|
||||
|
||||
pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
|
||||
res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res')
|
||||
|
||||
def pdbGenerator(env, target, source, for_signature):
|
||||
if target and env.has_key('PDB') and env['PDB']:
|
||||
return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
|
||||
'/DEBUG']
|
||||
|
||||
def win32ShlinkTargets(target, source, env, for_signature):
|
||||
listCmd = []
|
||||
dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
|
||||
if dll: listCmd.append("/out:%s"%dll.get_string(for_signature))
|
||||
|
||||
implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
|
||||
if implib: listCmd.append("/implib:%s"%implib.get_string(for_signature))
|
||||
|
||||
return listCmd
|
||||
|
||||
def win32ShlinkSources(target, source, env, for_signature):
|
||||
listCmd = []
|
||||
|
||||
deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX")
|
||||
for src in source:
|
||||
if src == deffile:
|
||||
# Treat this source as a .def file.
|
||||
listCmd.append("/def:%s" % src.get_string(for_signature))
|
||||
else:
|
||||
# Just treat it as a generic source file.
|
||||
listCmd.append(src)
|
||||
return listCmd
|
||||
|
||||
def win32LibEmitter(target, source, env):
|
||||
# SCons.Tool.msvc.validate_vars(env)
|
||||
|
||||
dll = env.FindIxes(target, "SHLIBPREFIX", "SHLIBSUFFIX")
|
||||
no_import_lib = env.get('no_import_lib', 0)
|
||||
|
||||
if not dll:
|
||||
raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
|
||||
|
||||
if env.get("WIN32_INSERT_DEF", 0) and \
|
||||
not env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX"):
|
||||
|
||||
# append a def file to the list of sources
|
||||
source.append(env.ReplaceIxes(dll,
|
||||
"SHLIBPREFIX", "SHLIBSUFFIX",
|
||||
"WIN32DEFPREFIX", "WIN32DEFSUFFIX"))
|
||||
|
||||
if env.has_key('PDB') and env['PDB']:
|
||||
env.SideEffect(env['PDB'], target)
|
||||
env.Precious(env['PDB'])
|
||||
|
||||
if not no_import_lib and \
|
||||
not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"):
|
||||
# Append an import library to the list of targets.
|
||||
target.append(env.ReplaceIxes(dll,
|
||||
"SHLIBPREFIX", "SHLIBSUFFIX",
|
||||
"LIBPREFIX", "LIBSUFFIX"))
|
||||
# and .exp file is created if there are exports from a DLL
|
||||
target.append(env.ReplaceIxes(dll,
|
||||
"SHLIBPREFIX", "SHLIBSUFFIX",
|
||||
"WIN32EXPPREFIX", "WIN32EXPSUFFIX"))
|
||||
|
||||
return (target, source)
|
||||
|
||||
def prog_emitter(target, source, env):
|
||||
#SCons.Tool.msvc.validate_vars(env)
|
||||
|
||||
if env.has_key('PDB') and env['PDB']:
|
||||
env.SideEffect(env['PDB'], target)
|
||||
env.Precious(env['PDB'])
|
||||
|
||||
return (target,source)
|
||||
|
||||
def RegServerFunc(target, source, env):
|
||||
if env.has_key('register') and env['register']:
|
||||
ret = regServerAction([target[0]], [source[0]], env)
|
||||
if ret:
|
||||
raise SCons.Errors.UserError, "Unable to register %s" % target[0]
|
||||
else:
|
||||
print "Registered %s sucessfully" % target[0]
|
||||
return ret
|
||||
return 0
|
||||
|
||||
regServerAction = SCons.Action.Action("$REGSVRCOM")
|
||||
regServerCheck = SCons.Action.Action(RegServerFunc, None)
|
||||
shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}')
|
||||
compositeLinkAction = shlibLinkAction + regServerCheck
|
||||
|
||||
def generate(env):
|
||||
"""Add Builders and construction variables for MSVC++ to an Environment."""
|
||||
static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
|
||||
|
||||
for suffix in CSuffixes:
|
||||
static_obj.add_action(suffix, SCons.Defaults.CAction)
|
||||
shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
|
||||
|
||||
for suffix in CXXSuffixes:
|
||||
static_obj.add_action(suffix, SCons.Defaults.CXXAction)
|
||||
shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction)
|
||||
|
||||
SCons.Tool.createStaticLibBuilder(env)
|
||||
SCons.Tool.createSharedLibBuilder(env)
|
||||
SCons.Tool.createProgBuilder(env)
|
||||
|
||||
env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s"%File(PDB)) or ""}'])
|
||||
env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'])
|
||||
env['CCCOMFLAGS'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo$TARGET $CCPCHFLAGS $CCPDBFLAGS'
|
||||
env['CC'] = 'cl'
|
||||
env['CCFLAGS'] = SCons.Util.CLVar('/nologo')
|
||||
env['CCCOM'] = '$CC $CCFLAGS $CCCOMFLAGS'
|
||||
env['SHCC'] = '$CC'
|
||||
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
|
||||
env['SHCCCOM'] = '$SHCC $SHCCFLAGS $CCCOMFLAGS'
|
||||
env['CXX'] = '$CC'
|
||||
env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS $( /TP $)')
|
||||
env['CXXCOM'] = '$CXX $CXXFLAGS $CCCOMFLAGS'
|
||||
env['SHCXX'] = '$CXX'
|
||||
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
|
||||
env['SHCXXCOM'] = '$SHCXX $SHCXXFLAGS $CCCOMFLAGS'
|
||||
env['CPPDEFPREFIX'] = '/D'
|
||||
env['CPPDEFSUFFIX'] = ''
|
||||
env['INCPREFIX'] = '/I'
|
||||
env['INCSUFFIX'] = ''
|
||||
env['OBJEMITTER'] = static_object_emitter
|
||||
env['SHOBJEMITTER'] = shared_object_emitter
|
||||
env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
|
||||
|
||||
env['RC'] = 'rc'
|
||||
env['RCFLAGS'] = SCons.Util.CLVar('')
|
||||
env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
|
||||
CScan = env.get_scanner('.c')
|
||||
if CScan:
|
||||
CScan.add_skey('.rc')
|
||||
env['BUILDERS']['RES'] = res_builder
|
||||
|
||||
include_path, lib_path, exe_path, sdk_path = get_msvctoolkit_paths()
|
||||
env.PrependENVPath('INCLUDE', include_path)
|
||||
env.PrependENVPath('LIB', lib_path)
|
||||
env.PrependENVPath('PATH', exe_path)
|
||||
|
||||
env['ENV']['CPU'] = 'i386'
|
||||
env['ENV']['MSSDK'] = sdk_path
|
||||
env['ENV']['BkOffice'] = sdk_path
|
||||
env['ENV']['Basemake'] = sdk_path + "\\Include\\BKOffice.Mak"
|
||||
env['ENV']['INETSDK'] = sdk_path
|
||||
env['ENV']['MSSDK'] = sdk_path
|
||||
env['ENV']['MSTOOLS'] = sdk_path
|
||||
env['ENV']['TARGETOS'] = 'WINNT'
|
||||
env['ENV']['APPVER'] = '5.0'
|
||||
|
||||
env['CFILESUFFIX'] = '.c'
|
||||
env['CXXFILESUFFIX'] = '.cc'
|
||||
|
||||
env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS'
|
||||
env['BUILDERS']['PCH'] = pch_builder
|
||||
|
||||
env['AR'] = 'lib.exe' #'"' +sdk_path + '\\bin\\Win64\\lib.exe"'
|
||||
env['ARFLAGS'] = SCons.Util.CLVar('/nologo')
|
||||
env['ARCOM'] = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}"
|
||||
|
||||
env['SHLINK'] = '$LINK'
|
||||
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS /dll')
|
||||
env['_SHLINK_TARGETS'] = win32ShlinkTargets
|
||||
env['_SHLINK_SOURCES'] = win32ShlinkSources
|
||||
env['SHLINKCOM'] = compositeLinkAction
|
||||
env['SHLIBEMITTER']= win32LibEmitter
|
||||
env['LINK'] = 'link.exe' #'"' +sdk_path + '\\bin\\Win64\\' + 'link.exe"'
|
||||
env['LINKFLAGS'] = SCons.Util.CLVar('/nologo')
|
||||
env['_PDB'] = pdbGenerator
|
||||
env["TEMPFILE"] = SCons.Platform.win32.TempFileMunge
|
||||
env['LINKCOM'] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $SOURCES")}'
|
||||
env['PROGEMITTER'] = prog_emitter
|
||||
env['LIBDIRPREFIX']='/LIBPATH:'
|
||||
env['LIBDIRSUFFIX']=''
|
||||
env['LIBLINKPREFIX']=''
|
||||
env['LIBLINKSUFFIX']='$LIBSUFFIX'
|
||||
|
||||
env['WIN32DEFPREFIX'] = ''
|
||||
env['WIN32DEFSUFFIX'] = '.def'
|
||||
env['WIN32_INSERT_DEF'] = 0
|
||||
|
||||
env['WIN32EXPPREFIX'] = ''
|
||||
env['WIN32EXPSUFFIX'] = '.exp'
|
||||
|
||||
env['REGSVRACTION'] = regServerCheck
|
||||
env['REGSVR'] = os.path.join(SCons.Platform.win32.get_system_root(),'System32','regsvr32')
|
||||
env['REGSVRFLAGS'] = '/s '
|
||||
env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS $TARGET'
|
||||
|
||||
|
||||
def exists(env):
|
||||
return env.Detect('cl')
|
@@ -6,10 +6,10 @@
|
||||
BASE_DIR="$PWD"
|
||||
|
||||
blender_srcdir=$(dirname -- $0)/../..
|
||||
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
|
||||
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
|
||||
if [ "$blender_version_cycle" = "release" ] ; then
|
||||
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
|
||||
|
@@ -187,7 +187,7 @@ The next table describes the information in the file-header.
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<a href="https://en.wikipedia.org/wiki/Endianness">Endianness</a> addresses the way values are ordered in a sequence of bytes(see the <a href="#example-endianess">example</a> below):
|
||||
<a href="http://en.wikipedia.org/wiki/Endianness">Endianness</a> addresses the way values are ordered in a sequence of bytes(see the <a href="#example-endianess">example</a> below):
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
193
doc/build_systems/scons-dev.txt
Normal file
193
doc/build_systems/scons-dev.txt
Normal file
@@ -0,0 +1,193 @@
|
||||
|
||||
Internals of Blenders SCons scripts
|
||||
===================================
|
||||
|
||||
Scope
|
||||
------
|
||||
This document describes the architecture of the SCons scripts for
|
||||
Blender. An overview of available functionality and how to modify,
|
||||
extend and maintain the system.
|
||||
|
||||
Audience
|
||||
--------
|
||||
This document is for developers who need to modify the system,
|
||||
ie. add or remove new libraries, add new arguments for SCons, etc.
|
||||
|
||||
Files and their meaning
|
||||
-----------------------
|
||||
|
||||
The main entry point for the build system is the SConstruct-file in
|
||||
$BLENDERHOME. This file creates the first BlenderEnvironment to work
|
||||
with, reads in options, and sets up some directory structures. Further
|
||||
it defines some targets.
|
||||
|
||||
Platform-specific configurations are in $BLENDERHOME/config. The
|
||||
filenames have the form (platform)-config.py, where platform one of:
|
||||
|
||||
* darwin
|
||||
* linux
|
||||
* win32-mingw
|
||||
* win32-vc
|
||||
|
||||
The user can override options by creating a file
|
||||
$BLENDERHOME/user-config.py. It can have any option from
|
||||
(platform)-config.py. Options in this file will override the platform
|
||||
defaults.
|
||||
|
||||
Much of the actual functionality can be found in the python scripts
|
||||
in the directory $BLENDERHOME/build_files/scons/tools, with
|
||||
Blender.py defining the bulk of the functionality. btools.py has some
|
||||
helper functions, and bcolors.py is for the terminal
|
||||
colors. mstoolkit.py and crossmingw.py are modules which set up SCons
|
||||
for the MS VC++ 2003 toolkit and the cross-compile toolset for
|
||||
compiling Windows binaries on Linux respectively. Note: the
|
||||
cross-compile doesn't work yet for Blender, but is added in
|
||||
preparation for having it work in the distant future.
|
||||
|
||||
BlenderEnvironment
|
||||
------------------
|
||||
|
||||
The module Blender.py implements a BlenderEnvironment class, derived
|
||||
from the SConsEnvironment of SCons. This is done to wrap some often
|
||||
used functionality. The BlenderEnvironment offers two important
|
||||
wrappers: BlenderProg() and BlenderLib(). The first one is used to
|
||||
specify a binary to be built, the second one is used to specify what
|
||||
static library is built from given sources.
|
||||
|
||||
Build a static library called "somelib". The system handles library
|
||||
pre- and suffixes automatically, you don't need to bother yourself
|
||||
with these details:
|
||||
|
||||
env = BlenderEnvironment(ENV = os.environ) # create an environment
|
||||
env.BlenderLib(libname="somelib", sources=['list.c','with.c','sources.c'],
|
||||
includes=['/list/with/include/paths', '.', '..'],
|
||||
defines=['LIST_WITH', 'CPP_DEFINES', 'TO_USE'],
|
||||
libtype=['blender', 'common'] # this is a list with libtypes. Normally you don't
|
||||
# need to specify this, but if you encounter linking
|
||||
# problems you may need this
|
||||
priority=[10, 20] # Priorities, list as long as libtype, priority per type
|
||||
compileflags=['/O2'] # List of compile flags needed for this particular library.
|
||||
# used only in rare cases, like SOLID, qhull and Bullet
|
||||
)
|
||||
|
||||
There should be no need to ever add an extra BlenderProg to the
|
||||
existing ones in SConstruct, see that file for its use, and Blender.py
|
||||
for its implementation.
|
||||
|
||||
The new system works so that using these wrappers, has all libraries
|
||||
(and programs) register with a central repository. This means that
|
||||
adding a new library is as easy as just creating the new SConscript
|
||||
and making sure that it gets called properly. Linking and such will
|
||||
then be handled automatically.
|
||||
|
||||
If you want that adding new source files for a certain library
|
||||
is handled automatically, you can use the Glob() function from
|
||||
the BlenderEnvironment to create lists of needed files. See
|
||||
$BLENDERHOME/source/blender/src/SConscript for an example. Keep in
|
||||
mind that this will add any new file that complies to the rule given
|
||||
to the Glob() function. There are a few (external) libraries with
|
||||
which this can't be used, because it'd take files that shouldn't be
|
||||
compiled, and create subsequentially problems during the linking stage
|
||||
(like SOLID, qhull, Bullet).
|
||||
|
||||
Linking order and priorities
|
||||
----------------------------
|
||||
|
||||
As shown above, you can give a library a priority in a certain
|
||||
group. If you need to make sure that a Blender library is linked
|
||||
before or after another one, you can give it a priority. To debug
|
||||
the priorities us BF_PRIORITYLIST=1 on the command-line while running
|
||||
a build.
|
||||
|
||||
% scons BF_PRIORITYLIST=1
|
||||
|
||||
This will give a list with values suggested by the system. Make
|
||||
changes to all SConscripts in question to reflect or change the
|
||||
values given by this command. ALWAYS check this after adding a new
|
||||
internal, external library or core library, and make sure there are
|
||||
sane values. You can use large and negative numbers to test with,
|
||||
but after you've got a working linking order, do change the system
|
||||
to reflect BF_PRIORITYLIST values.
|
||||
|
||||
Also, if you find that a library needs to be given multiple times to
|
||||
the linker, you can do that by giving a python list with the names
|
||||
of the available library types. They are currently:
|
||||
|
||||
B.possible_types = ['core', 'common', 'blender', 'intern',
|
||||
'international', 'game', 'game2',
|
||||
'player', 'player2', 'system']
|
||||
|
||||
More groups can be added, but that should be carefully considered,
|
||||
as it may lead to large-scale changes. The current amount of libraries
|
||||
should suffice.
|
||||
|
||||
The central repository is utilised in the SConstruct in two
|
||||
ways. Firstly, it is used to determine the order of all static
|
||||
libraries to link into the main Blender executable. Secondly, it
|
||||
is used to keep track of all built binaries and their location,
|
||||
so that they can be properly copied to BF_INSTALLDIR.
|
||||
|
||||
The libraries can be fetched in their priority order with
|
||||
create_blender_liblist from Blender.py, see the SConstruct on how
|
||||
it is used.
|
||||
|
||||
The program repository is the global list program_list from
|
||||
Blender.py. See SConstruct for its usage.
|
||||
|
||||
|
||||
Adding a new option and libraries
|
||||
---------------------------------
|
||||
|
||||
Lets say we want to add WITH_BF_NEWLIB, which will
|
||||
enable or disable a new feature library with sources in
|
||||
$BLENDERHOME/source/blender/newlib. This 'newlib' needs external
|
||||
headers from a 3rd party library '3rdparty'. For this we want to
|
||||
add a set of options BF_3RDPARTY, BF_3RDPARTY_INC, BF_3RDPARTY_LIB,
|
||||
BF_3RDPARTY_LIBPATH:
|
||||
|
||||
1) Add all mentiond options to all (platform)-config.py
|
||||
files. WITH_BF_NEWLIB is a boolean option ('true', 'false'),
|
||||
the rest are strings with paths and library names. See the
|
||||
OpenEXR options for example.
|
||||
|
||||
2) Add all options to the argument checking function
|
||||
validate_arguments() in btools.py. See again OpenEXR options
|
||||
for example.
|
||||
|
||||
3) Add all options to the option reading function read_opts()
|
||||
in btools.py. See again OpenEXR options for example. All default
|
||||
values can be empty, as the actual default values are in the
|
||||
(platform)-config.py files.
|
||||
|
||||
4) Add BF_3RDPARTY_LIB to the function setup_syslibs()
|
||||
and BF_3RDPARTY_LIBPATH to the function setup_staticlibs()
|
||||
in Blender.py
|
||||
|
||||
At this stage we have prepared all option setting and linking needs,
|
||||
but we still need to add in the compiling of the 'newlib'.
|
||||
|
||||
5) Create a SConscript in $BLENDERHOME/source/blender/newlib. Look
|
||||
at ie. $BLENDERHOME/source/blender/src/SConscript for
|
||||
template. The new SConscript will register the new library
|
||||
like so:
|
||||
|
||||
env.BlenderLib(libname='newlib', sources=sourcefiles, includes=incs) # the rest of the arguments get defaults = empty lists and values
|
||||
|
||||
6) Edit $BLENDERHOME/source/blender/SConscript with the following
|
||||
addition:
|
||||
|
||||
if env['WITH_BF_NEWLIB'] == 1:
|
||||
SConscript(['newlib/SConscript'])
|
||||
|
||||
After this you can see if this works by trying to build:
|
||||
|
||||
% scons WITH_BF_NEWLIB=1 # build with newlib
|
||||
% scons WITH_BF_NEWLIB=0 # disable newlib
|
||||
|
||||
This is all what should be needed. Changing the library name doesn't
|
||||
need changes elsewhere in the system, as it is handled automatically
|
||||
with the central library repository.
|
||||
|
||||
Enjoy the new system!!
|
||||
|
||||
/Nathan Letwory (jesterKing)
|
227
doc/build_systems/scons.txt
Normal file
227
doc/build_systems/scons.txt
Normal file
@@ -0,0 +1,227 @@
|
||||
|
||||
Blenders SCons build scripts
|
||||
============================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Since the beginning of 2004 Blender has had the SCons system as a
|
||||
build option. SCons is a Python-based, accurate build system. The
|
||||
scripts that were implemented in the first iteration worked, but
|
||||
the system grew quickly into such a state that maintaining it became
|
||||
a nightmare, and adding new features was just horrible, leading to
|
||||
many hacks without much sense in the overall structure.
|
||||
|
||||
The rewrite has been waiting for a long time. Jonathan Jacobs provided
|
||||
a first overhaul of the scripts, which I used in the first phase of
|
||||
the rewrite. To make the system as maintainable as possible I made
|
||||
some radical changes, but thanks go to Jonathan for providing me
|
||||
with the patch to get started.
|
||||
|
||||
This document describes the usage of the new SCons scripts. The
|
||||
inner workings are described in scons-dev.txt.
|
||||
|
||||
Building Blender
|
||||
----------------
|
||||
|
||||
To build Blender with the SCons scripts you need a full Python
|
||||
install, version 2.4 or later (http://www.python.org). We already provide
|
||||
a scons-local installation, which can be found in the scons/ subdirectory.
|
||||
This document uses the scons-local installation for its examples.
|
||||
|
||||
For build instructions, including dependencies, consult the appropriate
|
||||
section for your platform at
|
||||
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender. Note that for
|
||||
windows many of these dependencies already come in the lib/windows module
|
||||
from CVS.
|
||||
|
||||
In the base directory of the sources (from now on called $BLENDERHOME)
|
||||
you'll see a file named SConstruct. This is the entry point for the
|
||||
SCons build system. In a terminal, change to this directory. To just
|
||||
build, start the SCons entry script on Windows (will be used for the remainder
|
||||
of this document):
|
||||
|
||||
% python scons\scons.py
|
||||
|
||||
On a Unix-compatible system it would be
|
||||
|
||||
% python ./scons/scons.py
|
||||
|
||||
This will start the build process with default values. Depending
|
||||
on your platform you may see color in your output (non-Windows
|
||||
machines). In the the beginning an overview of targets and arguments
|
||||
from the command-line is given, then all libraries and binaries to
|
||||
build are configured.
|
||||
|
||||
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to finally copy
|
||||
all needed files to get a proper setup. The BF_DOCDIR is used to generate
|
||||
Blender Python documentation files to. These variables have default values
|
||||
for every platform in
|
||||
$BLENDERHOME/build_files/scons/config/(platform)-config.py. See the next
|
||||
section of this document for how to customize these paths. After the build
|
||||
successfully completes, you can find everything you need in BF_INSTALLDIR.
|
||||
|
||||
If you want to create the installer package of Blender on Windows you'll
|
||||
need to install nullsoft scriptable install system from http://nsis.sf.net.
|
||||
As an extra dependency, you need the MoreInfo plugin too. The creation of
|
||||
the installer is tied into the build process and can be triggered with:
|
||||
|
||||
% python scons\scons.py nsis
|
||||
|
||||
|
||||
Configuring the build
|
||||
---------------------
|
||||
|
||||
The default values for your platform can be found in the directory
|
||||
$BLENDERHOME/build_files/scons/config. Your platform specific defaults are
|
||||
in (platform)-config.py, where platform is one of:
|
||||
|
||||
- linux, for machines running Linux
|
||||
- win32-vc, for Windows machines, compiling with a Microsoft compiler
|
||||
- win32-mingw, for Windows machines, compiling with the MingW compiler
|
||||
- darwin, for OS X machines
|
||||
(TBD: add cygwin, solaris and freebsd support)
|
||||
|
||||
These files you will normally not change. If you need to override a
|
||||
default value, make a file called $BLENDERHOME/user-config.py, and copy
|
||||
settings from the build_files/scons/config/(platform)-config.py that you
|
||||
want to change. Don't copy the entire file (unless explicitly stated in
|
||||
the configuration file), because you may not get updated options you don't
|
||||
change yourself, which may result in build errors. You should NEVER have
|
||||
to modify $BLENDERHOME/build_files/scons/config/(platform)-config.py.
|
||||
|
||||
You can use BF_CONFIG argument to override the default user-config.py
|
||||
check. This is just like the user-config.py, but just with another name:
|
||||
|
||||
% python scons\scons.py BF_CONFIG=myownsettings
|
||||
|
||||
If you want to quickly test a new setting, you can give the option
|
||||
also on the command-line:
|
||||
|
||||
% python scons\scons.py BF_BUILDDIR=../mybuilddir WITH_BF_OPENEXR=0
|
||||
|
||||
This command sets the build directory to BF_BUILDDIR and disables
|
||||
OpenEXR support.
|
||||
|
||||
If you need to know what can be set through the command-line, run
|
||||
scons with -h:
|
||||
|
||||
% python scons\scons.py -h
|
||||
|
||||
This command will print a long list with settable options and what
|
||||
every option means. Many of the default values will be empty, and
|
||||
from a fresh checkout without a user-config.py the actual values
|
||||
are the defaults as per $BLENDERHOME/config/(platform)-config.py
|
||||
(unless you have overridden any of them in your
|
||||
$BLENDERHOME/user-config.py).
|
||||
|
||||
Configuring the output
|
||||
----------------------
|
||||
|
||||
This rewrite features a cleaner output during the build process. If
|
||||
you need to see the full command-line for compiles, then you can
|
||||
change that behaviour. Also the use of colors can be changed:
|
||||
|
||||
% python scons\scons.py BF_FANCY=0
|
||||
|
||||
This will disable the use of colors.
|
||||
|
||||
% python scons\scons.py BF_QUIET=0
|
||||
|
||||
This will give the old, noisy output. Every command-line per
|
||||
compile is printed out in its full glory. This is very useful when
|
||||
debugging problems with compiling, because you can see what the
|
||||
included paths are, what defines are given on the command-line,
|
||||
what compiler switches are used, etc.
|
||||
|
||||
Compiling Only Some Libraries
|
||||
-----------------------------
|
||||
|
||||
Our implementation now has support for specifying a list of libraries that are
|
||||
exclusively compiled, ignoring all other libraries. This is invoked
|
||||
with the BF_QUICK arguments; for example:
|
||||
|
||||
% python scons\scons.py BF_QUICK=src,bf_blenkernel
|
||||
|
||||
Note that this not the same as passing a list of folders as in the
|
||||
makefile's "quicky" command. In Scons, all of Blender's code modules
|
||||
are in their own static library; this corresponds to one-lib-per-folder
|
||||
in some cases (especially in blender/source/blender).
|
||||
|
||||
To obtain a list of the libraries, simple fire up scons and CTRL-C out once
|
||||
it finishes configuring (and printing to the console) the library list.
|
||||
|
||||
Compiling Libraries With Debug Profiling
|
||||
----------------------------------------
|
||||
|
||||
Scons has support for specifying a list of libraries that are compiled
|
||||
with debug profiling enabled. This is implemented in two commands:
|
||||
BF_QUICKDEBUG which is a command-line argument and BF_DEBUG_LIBS, which goes
|
||||
in your user-config.py
|
||||
|
||||
BF_QUICKDEBUG is similar to BF_QUICK:
|
||||
|
||||
% python scons\scons.py BF_QUICKDEBUG=src,bf_blenkernel,some-other-lib
|
||||
|
||||
To use BF_DEBUG_LIBS, put something like the following in you user-config.py:
|
||||
|
||||
BF_DEBUG_LIBS = ['bf_blenlib', 'src', 'some_lib']
|
||||
|
||||
For instructions on how to find the names of the libraries (folders) you
|
||||
wish to use, see the above section. Note that the command BF_DEBUG
|
||||
(see below) will override these settings and compile ALL of Blender with
|
||||
debug symbols. Also note that BF_QUICKDEBUG and BF_DEBUG_LIBS are combined;
|
||||
for example, setting BF_QUICKDEBUG won't overwrite the contents of BF_DEBUG_LIBS.
|
||||
|
||||
Supported toolset
|
||||
-----------------
|
||||
|
||||
WINDOWS
|
||||
|
||||
* msvc, this is a full install of Microsoft Visual C++. You'll
|
||||
likely have the .NET Framework SDK, Platform SDK and DX9 SDK
|
||||
installed * mstoolkit, this is the free MS VC++ 2003 Toolkit. You
|
||||
need to verify you have also the SDKs installed as mentioned
|
||||
for msvc. * mingw, this is a minimal MingW install. TBD: write
|
||||
proper instructions on getting needed packages.
|
||||
|
||||
On Windows with all of the three toolset installed you need to
|
||||
specify what toolset to use
|
||||
|
||||
% python scons\scons.py BF_TOOLSET=msvc
|
||||
% python scons\scons.py BF_TOOLSET=mingw
|
||||
|
||||
LINUX and OS X
|
||||
|
||||
Currently only the default toolsets are supported for these platforms,
|
||||
so nothing special needs to be told to SCons when building. The
|
||||
defaults should work fine in most cases.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Build Blender with the defaults:
|
||||
|
||||
% python scons\scons.py
|
||||
|
||||
Build Blender, but disable OpenEXR support:
|
||||
|
||||
% python scons\scons.py WITH_BF_OPENEXR=0
|
||||
|
||||
Build Blender, enable debug symbols:
|
||||
|
||||
% python scons\scons.py BF_DEBUG=1
|
||||
|
||||
Build Blender, install to different directory:
|
||||
|
||||
% python scons\scons.py BF_INSTALLDIR=../myown/installdir
|
||||
|
||||
Build Blender in ../myown/builddir and install to ../myown/installdir:
|
||||
|
||||
% python scons\scons.py BF_BUILDDIR=../myown/builddir BF_INSTALLDIR=../myown/installdir
|
||||
|
||||
Clean BF_BUILDDIR:
|
||||
|
||||
% python scons\scons.py clean
|
||||
|
||||
/Nathan Letwory (jesterKing)
|
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.8.11
|
||||
# Doxyfile 1.8.9.1
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@@ -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 = "V2.8x"
|
||||
PROJECT_NUMBER = "V2.7x"
|
||||
|
||||
# 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
|
||||
@@ -351,14 +351,7 @@ IDL_PROPERTY_SUPPORT = YES
|
||||
# all members of a group must be documented explicitly.
|
||||
# The default value is: NO.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# If one adds a struct or class to a group and this option is enabled, then also
|
||||
# any nested class or struct is added to the same group. By default this option
|
||||
# is disabled and one has to add nested compounds explicitly via \ingroup.
|
||||
# The default value is: NO.
|
||||
|
||||
GROUP_NESTED_COMPOUNDS = NO
|
||||
DISTRIBUTE_GROUP_DOC = YES
|
||||
|
||||
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
|
||||
# (for instance a group of public functions) to be put as a subgroup of that
|
||||
@@ -699,7 +692,7 @@ LAYOUT_FILE =
|
||||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. See also \cite for info how to create references.
|
||||
@@ -749,12 +742,6 @@ WARN_IF_DOC_ERROR = YES
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = NO
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
|
||||
# can produce. The string should contain the $file, $line, and $text tags, which
|
||||
# will be replaced by the file and line number from which the warning originated
|
||||
@@ -778,7 +765,7 @@ WARN_LOGFILE =
|
||||
# The INPUT tag is used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like myfile.cpp or
|
||||
# directories like /usr/src/myproject. Separate the files or directories with
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# spaces.
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = doxygen.main.h \
|
||||
@@ -800,17 +787,12 @@ INPUT_ENCODING = UTF-8
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# read by doxygen.
|
||||
#
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
|
||||
# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
|
||||
# *.h) to filter out the source-files in the directories. If left blank the
|
||||
# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
|
||||
# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
|
||||
# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
|
||||
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
|
||||
# *.qsf, *.as and *.js.
|
||||
|
||||
FILE_PATTERNS =
|
||||
|
||||
@@ -899,10 +881,6 @@ IMAGE_PATH =
|
||||
# Note that the filter must not add or remove lines; it is applied before the
|
||||
# code is scanned, but not when the output code is generated. If lines are added
|
||||
# or removed, the anchors will not be placed correctly.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# properly processed by doxygen.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
@@ -912,10 +890,6 @@ INPUT_FILTER =
|
||||
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
|
||||
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
|
||||
# patterns match the file name, INPUT_FILTER is applied.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# properly processed by doxygen.
|
||||
|
||||
FILTER_PATTERNS =
|
||||
|
||||
@@ -939,7 +913,7 @@ FILTER_SOURCE_PATTERNS =
|
||||
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||
# and want to reuse the introduction page also for the doxygen output.
|
||||
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
# USE_MDFILE_AS_MAINPAGE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
@@ -1145,7 +1119,7 @@ HTML_EXTRA_FILES =
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
@@ -1174,9 +1148,8 @@ HTML_COLORSTYLE_GAMMA = 79
|
||||
|
||||
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
|
||||
# page will contain the date and time when the page was generated. Setting this
|
||||
# to YES can help to show when doxygen was last run and thus if the
|
||||
# documentation is up to date.
|
||||
# The default value is: NO.
|
||||
# to NO can help when comparing the output of multiple runs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_TIMESTAMP = YES
|
||||
@@ -1650,12 +1623,9 @@ COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
|
||||
# that should be included in the LaTeX output. The package can be specified just
|
||||
# by its name or with the correct syntax as to be used with the LaTeX
|
||||
# \usepackage command. To get the times font for instance you can specify :
|
||||
# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
|
||||
# To use the option intlimits with the amsmath package you can specify:
|
||||
# EXTRA_PACKAGES=[intlimits]{amsmath}
|
||||
# that should be included in the LaTeX output. To get the times font for
|
||||
# instance you can specify
|
||||
# EXTRA_PACKAGES=times
|
||||
# If left blank no extra packages will be included.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
@@ -1752,20 +1722,12 @@ LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_BIB_STYLE = plain
|
||||
|
||||
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
|
||||
# page will contain the date and time when the page was generated. Setting this
|
||||
# to NO can help when comparing the output of multiple runs.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_TIMESTAMP = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2265,8 +2227,7 @@ INCLUDED_BY_GRAPH = NO
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable call graphs for selected
|
||||
# functions only using the \callgraph command. Disabling a call graph can be
|
||||
# accomplished by means of the command \hidecallgraph.
|
||||
# functions only using the \callgraph command.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
@@ -2277,8 +2238,7 @@ CALL_GRAPH = NO
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable caller graphs for selected
|
||||
# functions only using the \callergraph command. Disabling a caller graph can be
|
||||
# accomplished by means of the command \hidecallergraph.
|
||||
# functions only using the \callergraph command.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
@@ -2301,15 +2261,11 @@ GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot. For an explanation of the image formats see the section
|
||||
# output formats in the documentation of the dot tool (Graphviz (see:
|
||||
# http://www.graphviz.org/)).
|
||||
# generated by dot.
|
||||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
|
||||
# png:gdiplus:gdiplus.
|
||||
# Possible values are: png, jpg, gif and svg.
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
|
@@ -11,10 +11,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** \defgroup curve_fit Curve Fitting Library
|
||||
* \ingroup extern
|
||||
*/
|
||||
|
||||
/** \defgroup bullet Bullet Physics Library
|
||||
* \ingroup extern
|
||||
* \see \ref bulletdoc
|
||||
|
@@ -38,7 +38,7 @@
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
/** \defgroup eigen eigen
|
||||
/** \defgroup opennl opennl
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
|
132
doc/python_api/epy/IDProp.py
Normal file
132
doc/python_api/epy/IDProp.py
Normal file
@@ -0,0 +1,132 @@
|
||||
class IDGroup:
|
||||
"""
|
||||
The IDGroup Type
|
||||
================
|
||||
This type supports both iteration and the []
|
||||
operator to get child ID properties.
|
||||
|
||||
You can also add new properties using the [] operator.
|
||||
For example::
|
||||
|
||||
group['a float!'] = 0.0
|
||||
group['an int!'] = 0
|
||||
group['a string!'] = "hi!"
|
||||
group['an array!'] = [0, 0, 1.0, 0]
|
||||
|
||||
group['a subgroup!] = {"float": 0.0, "an int": 1.0, "an array": [1, 2],
|
||||
"another subgroup": {"a": 0.0, "str": "bleh"}}
|
||||
|
||||
Note that for arrays, the array type defaults to int unless a float is found
|
||||
while scanning the template list; if any floats are found, then the whole
|
||||
array is float. Note that double-precision floating point numbers are used for
|
||||
python-created float ID properties and arrays (though the internal C api does
|
||||
support single-precision floats, and the python code will read them).
|
||||
|
||||
You can also delete properties with the del operator. For example:
|
||||
|
||||
del group['property']
|
||||
|
||||
To get the type of a property, use the type() operator, for example::
|
||||
|
||||
if type(group['bleh']) == str: pass
|
||||
|
||||
To tell if the property is a group or array type, import the Blender.Types module and test
|
||||
against IDGroupType and IDArrayType, like so::
|
||||
|
||||
from Blender.Types import IDGroupType, IDArrayType.
|
||||
|
||||
if type(group['bleghr']) == IDGroupType:
|
||||
(do something)
|
||||
|
||||
@ivar name: The name of the property
|
||||
@type name: string
|
||||
"""
|
||||
|
||||
def pop(item):
|
||||
"""
|
||||
Pop an item from the group property.
|
||||
@type item: string
|
||||
@param item: The item name.
|
||||
@rtype: can be dict, list, int, float or string.
|
||||
@return: The removed property.
|
||||
"""
|
||||
|
||||
def update(updatedict):
|
||||
"""
|
||||
Updates items in the dict, similar to normal python
|
||||
dictionary method .update().
|
||||
@type updatedict: dict
|
||||
@param updatedict: A dict of simple types to derive updated/new IDProperties from.
|
||||
@rtype: None
|
||||
@return: None
|
||||
"""
|
||||
|
||||
def keys():
|
||||
"""
|
||||
Returns a list of the keys in this property group.
|
||||
@rtype: list of strings.
|
||||
@return: a list of the keys in this property group.
|
||||
"""
|
||||
|
||||
def values():
|
||||
"""
|
||||
Returns a list of the values in this property group.
|
||||
|
||||
Note that unless a value is itself a property group or an array, you
|
||||
cannot change it by changing the values in this list, you must change them
|
||||
in the parent property group.
|
||||
|
||||
For example,
|
||||
|
||||
group['some_property'] = new_value
|
||||
|
||||
. . .is correct, while,
|
||||
|
||||
values = group.values()
|
||||
values[0] = new_value
|
||||
|
||||
. . .is wrong.
|
||||
|
||||
@rtype: list of strings.
|
||||
@return: a list of the values in this property group.
|
||||
"""
|
||||
|
||||
def iteritems():
|
||||
"""
|
||||
Implements the python dictionary iteritmes method.
|
||||
|
||||
For example::
|
||||
|
||||
for k, v in group.iteritems():
|
||||
print "Property name: " + k
|
||||
print "Property value: " + str(v)
|
||||
|
||||
@rtype: an iterator that spits out items of the form [key, value]
|
||||
@return: an iterator.
|
||||
"""
|
||||
|
||||
def convert_to_pyobject():
|
||||
"""
|
||||
Converts the entire property group to a purely python form.
|
||||
|
||||
@rtype: dict
|
||||
@return: A python dictionary representing the property group
|
||||
"""
|
||||
|
||||
class IDArray:
|
||||
"""
|
||||
The IDArray Type
|
||||
================
|
||||
|
||||
@ivar type: returns the type of the array, can be either IDP_Int or IDP_Float
|
||||
"""
|
||||
|
||||
def __getitem__(index):
|
||||
pass
|
||||
|
||||
def __setitem__(index, value):
|
||||
pass
|
||||
|
||||
def __len__():
|
||||
pass
|
||||
|
@@ -1,237 +0,0 @@
|
||||
"""
|
||||
Video Capture with DeckLink
|
||||
+++++++++++++++++++++++++++
|
||||
Video frames captured with DeckLink cards have pixel formats that are generally not directly
|
||||
usable by OpenGL, they must be processed by a shader. The three shaders presented here should
|
||||
cover all common video capture cases.
|
||||
|
||||
This file reflects the current video transfer method implemented in the Decklink module:
|
||||
whenever possible the video images are transferred as float texture because this is more
|
||||
compatible with GPUs. Of course, only the pixel formats that have a correspondant GL format
|
||||
can be transferred as float. Look for fg_shaders in this file for an exhaustive list.
|
||||
|
||||
Other pixel formats will be transferred as 32 bits integer red-channel texture but this
|
||||
won't work with certain GPU (Intel GMA); the corresponding shaders are not shown here.
|
||||
However, it should not be necessary to use any of them as the list below covers all practical
|
||||
cases of video capture with all types of Decklink product.
|
||||
|
||||
In other words, only use one of the pixel format below and you will be fine. Note that depending
|
||||
on the video stream, only certain pixel formats will be allowed (others will throw an exception).
|
||||
For example, to capture a PAL video stream, you must use one of the YUV formats.
|
||||
|
||||
To find which pixel format is suitable for a particular video stream, use the 'Media Express'
|
||||
utility that comes with the Decklink software : if you see the video in the 'Log and Capture'
|
||||
Window, you have selected the right pixel format and you can use the same in Blender.
|
||||
|
||||
Notes: * these shaders only decode the RGB channel and set the alpha channel to a fixed
|
||||
value (look for color.a = ). It's up to you to add postprocessing to the color.
|
||||
* these shaders are compatible with 2D and 3D video stream
|
||||
"""
|
||||
import bge
|
||||
from bge import logic
|
||||
from bge import texture as vt
|
||||
|
||||
# The default vertex shader, because we need one
|
||||
#
|
||||
VertexShader = """
|
||||
#version 130
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
# For use with RGB video stream: the pixel is directly usable
|
||||
#
|
||||
FragmentShader_R10l = """
|
||||
#version 130
|
||||
uniform sampler2D tex;
|
||||
// stereo = 1.0 if 2D image, =0.5 if 3D (left eye below, right eye above)
|
||||
uniform float stereo;
|
||||
// eye = 0.0 for the left eye, 0.5 for the right eye
|
||||
uniform float eye;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color;
|
||||
float tx, ty;
|
||||
tx = gl_TexCoord[0].x;
|
||||
ty = eye+gl_TexCoord[0].y*stereo;
|
||||
color = texture(tex, vec2(tx,ty));
|
||||
color.a = 0.7;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
"""
|
||||
|
||||
# For use with YUV video stream
|
||||
#
|
||||
FragmentShader_2vuy = """
|
||||
#version 130
|
||||
uniform sampler2D tex;
|
||||
// stereo = 1.0 if 2D image, =0.5 if 3D (left eye below, right eye above)
|
||||
uniform float stereo;
|
||||
// eye = 0.0 for the left eye, 0.5 for the right eye
|
||||
uniform float eye;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color;
|
||||
float tx, ty, width, Y, Cb, Cr;
|
||||
int px;
|
||||
tx = gl_TexCoord[0].x;
|
||||
ty = eye+gl_TexCoord[0].y*stereo;
|
||||
width = float(textureSize(tex, 0).x);
|
||||
color = texture(tex, vec2(tx, ty));
|
||||
px = int(floor(fract(tx*width)*2.0));
|
||||
switch (px) {
|
||||
case 0:
|
||||
Y = color.g;
|
||||
break;
|
||||
case 1:
|
||||
Y = color.a;
|
||||
break;
|
||||
}
|
||||
Y = (Y - 0.0625) * 1.168949772;
|
||||
Cb = (color.b - 0.0625) * 1.142857143 - 0.5;
|
||||
Cr = (color.r - 0.0625) * 1.142857143 - 0.5;
|
||||
color.r = Y + 1.5748 * Cr;
|
||||
color.g = Y - 0.1873 * Cb - 0.4681 * Cr;
|
||||
color.b = Y + 1.8556 * Cb;
|
||||
color.a = 0.7;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
"""
|
||||
|
||||
# For use with high resolution YUV
|
||||
#
|
||||
FragmentShader_v210 = """
|
||||
#version 130
|
||||
uniform sampler2D tex;
|
||||
// stereo = 1.0 if 2D image, =0.5 if 3D (left eye below, right eye above)
|
||||
uniform float stereo;
|
||||
// eye = 0.0 for the left eye, 0.5 for the right eye
|
||||
uniform float eye;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color, color1, color2, color3;
|
||||
int px;
|
||||
float tx, ty, width, sx, dx, bx, Y, Cb, Cr;
|
||||
tx = gl_TexCoord[0].x;
|
||||
ty = eye+gl_TexCoord[0].y*stereo;
|
||||
width = float(textureSize(tex, 0).x);
|
||||
// to sample macro pixels (6 pixels in 4 words)
|
||||
sx = tx*width*0.25+0.01;
|
||||
// index of display pixel in the macro pixel 0..5
|
||||
px = int(floor(fract(sx)*6.0));
|
||||
// increment as we sample the macro pixel
|
||||
dx = 1.0/width;
|
||||
// base x coord of macro pixel
|
||||
bx = (floor(sx)+0.01)*dx*4.0;
|
||||
color = texture(tex, vec2(bx, ty));
|
||||
color1 = texture(tex, vec2(bx+dx, ty));
|
||||
color2 = texture(tex, vec2(bx+dx*2.0, ty));
|
||||
color3 = texture(tex, vec2(bx+dx*3.0, ty));
|
||||
switch (px) {
|
||||
case 0:
|
||||
case 1:
|
||||
Cb = color.b;
|
||||
Cr = color.r;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
Cb = color1.g;
|
||||
Cr = color2.b;
|
||||
break;
|
||||
default:
|
||||
Cb = color2.r;
|
||||
Cr = color3.g;
|
||||
break;
|
||||
}
|
||||
switch (px) {
|
||||
case 0:
|
||||
Y = color.g;
|
||||
break;
|
||||
case 1:
|
||||
Y = color1.b;
|
||||
break;
|
||||
case 2:
|
||||
Y = color1.r;
|
||||
break;
|
||||
case 3:
|
||||
Y = color2.g;
|
||||
break;
|
||||
case 4:
|
||||
Y = color3.b;
|
||||
break;
|
||||
default:
|
||||
Y = color3.r;
|
||||
break;
|
||||
}
|
||||
Y = (Y - 0.0625) * 1.168949772;
|
||||
Cb = (Cb - 0.0625) * 1.142857143 - 0.5;
|
||||
Cr = (Cr - 0.0625) * 1.142857143 - 0.5;
|
||||
color.r = Y + 1.5748 * Cr;
|
||||
color.g = Y - 0.1873 * Cb - 0.4681 * Cr;
|
||||
color.b = Y + 1.8556 * Cb;
|
||||
color.a = 0.7;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
"""
|
||||
|
||||
# The exhausitve list of pixel formats that are transferred as float texture
|
||||
# Only use those for greater efficiency and compatiblity.
|
||||
#
|
||||
fg_shaders = {
|
||||
'2vuy' :FragmentShader_2vuy,
|
||||
'8BitYUV' :FragmentShader_2vuy,
|
||||
'v210' :FragmentShader_v210,
|
||||
'10BitYUV' :FragmentShader_v210,
|
||||
'8BitBGRA' :FragmentShader_R10l,
|
||||
'BGRA' :FragmentShader_R10l,
|
||||
'8BitARGB' :FragmentShader_R10l,
|
||||
'10BitRGBXLE':FragmentShader_R10l,
|
||||
'R10l' :FragmentShader_R10l
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Helper function to attach a pixel shader to the material that receives the video frame.
|
||||
#
|
||||
|
||||
def config_video(obj, format, pixel, is3D=False, mat=0, card=0):
|
||||
if pixel not in fg_shaders:
|
||||
raise('Unsuported shader')
|
||||
shader = obj.meshes[0].materials[mat].getShader()
|
||||
if shader is not None and not shader.isValid():
|
||||
shader.setSource(VertexShader, fg_shaders[pixel], True)
|
||||
shader.setSampler('tex', 0)
|
||||
shader.setUniformEyef("eye")
|
||||
shader.setUniform1f("stereo", 0.5 if is3D else 1.0)
|
||||
tex = vt.Texture(obj, mat)
|
||||
tex.source = vt.VideoDeckLink(format + "/" + pixel + ("/3D" if is3D else ""), card)
|
||||
print("frame rate: ", tex.source.framerate)
|
||||
tex.source.play()
|
||||
obj["video"] = tex
|
||||
|
||||
#
|
||||
# Attach this function to an object that has a material with texture
|
||||
# and call it once to initialize the object
|
||||
#
|
||||
def init(cont):
|
||||
# config_video(cont.owner, 'HD720p5994', '8BitBGRA')
|
||||
# config_video(cont.owner, 'HD720p5994', '8BitYUV')
|
||||
# config_video(cont.owner, 'pal ', '10BitYUV')
|
||||
config_video(cont.owner, 'pal ', '8BitYUV')
|
||||
|
||||
|
||||
#
|
||||
# To be called on every frame
|
||||
#
|
||||
def play(cont):
|
||||
obj = cont.owner
|
||||
video = obj.get("video")
|
||||
if video is not None:
|
||||
video.refresh(True)
|
@@ -4,7 +4,7 @@ Persistent Handler Example
|
||||
|
||||
By default handlers are freed when loading new files, in some cases you may
|
||||
wan't the handler stay running across multiple files (when the handler is
|
||||
part of an add-on for example).
|
||||
part of an addon for example).
|
||||
|
||||
For this the :data:`bpy.app.handlers.persistent` decorator needs to be used.
|
||||
"""
|
||||
|
@@ -3,9 +3,8 @@ Intro
|
||||
-----
|
||||
|
||||
.. warning::
|
||||
|
||||
Most of this object should only be useful if you actually manipulate i18n stuff from Python.
|
||||
If you are a regular add-on, you should only bother about :const:`contexts` member,
|
||||
If you are a regular addon, you should only bother about :const:`contexts` member,
|
||||
and the :func:`register`/:func:`unregister` functions! The :func:`pgettext` family of functions
|
||||
should only be used in rare, specific cases (like e.g. complex "composited" UI strings...).
|
||||
|
||||
@@ -13,19 +12,19 @@ Intro
|
||||
| ``{locale: {msg_key: msg_translation, ...}, ...}``
|
||||
| where:
|
||||
|
||||
- locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``),
|
||||
* locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``),
|
||||
a lang+variant code (e.g. ``sr@latin``), or a full code (e.g. ``uz_UZ@cyrilic``).
|
||||
- msg_key is a tuple (context, org message) - use, as much as possible, the predefined :const:`contexts`.
|
||||
- msg_translation is the translated message in given language!
|
||||
* msg_key is a tuple (context, org message) - use, as much as possible, the predefined :const:`contexts`.
|
||||
* msg_translation is the translated message in given language!
|
||||
|
||||
Then, call ``bpy.app.translations.register(__name__, your_dict)`` in your ``register()`` function, and
|
||||
Then, call ``bpy.app.translations.register(__name__, your_dict)`` in your ``register()`` function, and \n"
|
||||
``bpy.app.translations.unregister(__name__)`` in your ``unregister()`` one.
|
||||
|
||||
The ``Manage UI translations`` add-on has several functions to help you collect strings to translate, and
|
||||
The ``Manage UI translations`` addon has several functions to help you collect strings to translate, and
|
||||
generate the needed python code (the translation dictionary), as well as optional intermediary po files
|
||||
if you want some... See
|
||||
`How to Translate Blender <https://wiki.blender.org/index.php/Dev:Doc/Process/Translate_Blender>`_ and
|
||||
`Using i18n in Blender Code <https://wiki.blender.org/index.php/Dev:Source/Interface/Internationalization>`_
|
||||
`How to Translate Blender <http://wiki.blender.org/index.php/Dev:Doc/Process/Translate_Blender>`_ and
|
||||
`Using i18n in Blender Code <http://wiki.blender.org/index.php/Dev:Source/Interface/Internationalization>`_
|
||||
for more info.
|
||||
|
||||
Module References
|
||||
|
@@ -10,15 +10,9 @@ The context overrides are passed as a dictionary, with keys matching the context
|
||||
member names in bpy.context.
|
||||
For example to override ``bpy.context.active_object``,
|
||||
you would pass ``{'active_object': object}``.
|
||||
|
||||
.. note::
|
||||
|
||||
You will nearly always want to use a copy of the actual current context as basis
|
||||
(otherwise, you'll have to find and gather all needed data yourself).
|
||||
"""
|
||||
|
||||
# remove all objects in scene rather than the selected ones
|
||||
import bpy
|
||||
override = bpy.context.copy()
|
||||
override['selected_bases'] = list(bpy.context.scene.object_bases)
|
||||
override = {'selected_bases': list(bpy.context.scene.object_bases)}
|
||||
bpy.ops.object.delete(override)
|
||||
|
@@ -20,7 +20,7 @@ bpy.types.Scene.my_settings = \
|
||||
bpy.props.CollectionProperty(type=SceneSettingItem)
|
||||
|
||||
# Assume an armature object selected
|
||||
print("Adding 2 values!")
|
||||
print("Adding 3 values!")
|
||||
|
||||
my_item = bpy.context.scene.my_settings.add()
|
||||
my_item.name = "Spam"
|
||||
|
@@ -48,9 +48,9 @@ bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array,
|
||||
# Note: the getter/setter callback must use integer identifiers!
|
||||
test_items = [
|
||||
("RED", "Red", "", 1),
|
||||
("GREEN", "Green", "", 2),
|
||||
("BLUE", "Blue", "", 3),
|
||||
("YELLOW", "Yellow", "", 4),
|
||||
("GREEN", "Red", "", 2),
|
||||
("BLUE", "Red", "", 3),
|
||||
("YELLOW", "Red", "", 4),
|
||||
]
|
||||
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
bl_info = {
|
||||
"name": "Example Add-on Preferences",
|
||||
"name": "Example Addon Preferences",
|
||||
"author": "Your Name Here",
|
||||
"version": (1, 0),
|
||||
"blender": (2, 65, 0),
|
||||
"location": "SpaceBar Search -> Add-on Preferences Example",
|
||||
"description": "Example Add-on",
|
||||
"location": "SpaceBar Search -> Addon Preferences Example",
|
||||
"description": "Example Addon",
|
||||
"warning": "",
|
||||
"wiki_url": "",
|
||||
"tracker_url": "",
|
||||
@@ -18,7 +18,7 @@ from bpy.props import StringProperty, IntProperty, BoolProperty
|
||||
|
||||
|
||||
class ExampleAddonPreferences(AddonPreferences):
|
||||
# this must match the add-on name, use '__package__'
|
||||
# this must match the addon name, use '__package__'
|
||||
# when defining this in a submodule of a python package.
|
||||
bl_idname = __name__
|
||||
|
||||
@@ -37,7 +37,7 @@ class ExampleAddonPreferences(AddonPreferences):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.label(text="This is a preferences view for our add-on")
|
||||
layout.label(text="This is a preferences view for our addon")
|
||||
layout.prop(self, "filepath")
|
||||
layout.prop(self, "number")
|
||||
layout.prop(self, "boolean")
|
||||
@@ -46,7 +46,7 @@ class ExampleAddonPreferences(AddonPreferences):
|
||||
class OBJECT_OT_addon_prefs_example(Operator):
|
||||
"""Display example preferences"""
|
||||
bl_idname = "object.addon_prefs_example"
|
||||
bl_label = "Add-on Preferences Example"
|
||||
bl_label = "Addon Preferences Example"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
|
@@ -1,18 +0,0 @@
|
||||
import bpy
|
||||
|
||||
filepath = "//new_library.blend"
|
||||
|
||||
# write selected objects and their data to a blend file
|
||||
data_blocks = set(bpy.context.selected_objects)
|
||||
bpy.data.libraries.write(filepath, data_blocks)
|
||||
|
||||
|
||||
# write all meshes starting with a capital letter and
|
||||
# set them with fake-user enabled so they aren't lost on re-saving
|
||||
data_blocks = {mesh for mesh in bpy.data.meshes if mesh.name[:1].isupper()}
|
||||
bpy.data.libraries.write(filepath, data_blocks, fake_user=True)
|
||||
|
||||
|
||||
# write all materials, textures and node groups to a library
|
||||
data_blocks = {*bpy.data.materials, *bpy.data.textures, *bpy.data.node_groups}
|
||||
bpy.data.libraries.write(filepath, data_blocks)
|
@@ -2,9 +2,9 @@
|
||||
Extending Menus
|
||||
+++++++++++++++
|
||||
|
||||
When creating menus for add-ons you can't reference menus
|
||||
in Blender's default scripts.
|
||||
Instead, the add-on can add menu items to existing menus.
|
||||
When creating menus for addons you can't reference menus in Blender's default
|
||||
scripts.
|
||||
Instead, the addon can add menu items to existing menus.
|
||||
|
||||
The function menu_draw acts like :class:`Menu.draw`.
|
||||
"""
|
||||
|
@@ -1,80 +0,0 @@
|
||||
"""
|
||||
Preset Menus
|
||||
++++++++++++
|
||||
|
||||
Preset menus are simply a convention that uses a menu sub-class
|
||||
to perform the common task of managing presets.
|
||||
|
||||
This example shows how you can add a preset menu.
|
||||
|
||||
This example uses the object draw options,
|
||||
however you can use properties defined by your own scripts too.
|
||||
"""
|
||||
|
||||
import bpy
|
||||
from bpy.types import Operator, Menu
|
||||
from bl_operators.presets import AddPresetBase
|
||||
|
||||
|
||||
class OBJECT_MT_draw_presets(Menu):
|
||||
bl_label = "Object Draw Presets"
|
||||
preset_subdir = "object/draw"
|
||||
preset_operator = "script.execute_preset"
|
||||
draw = Menu.draw_preset
|
||||
|
||||
|
||||
class AddPresetObjectDraw(AddPresetBase, Operator):
|
||||
'''Add a Object Draw Preset'''
|
||||
bl_idname = "camera.object_draw_preset_add"
|
||||
bl_label = "Add Object Draw Preset"
|
||||
preset_menu = "OBJECT_MT_draw_presets"
|
||||
|
||||
# variable used for all preset values
|
||||
preset_defines = [
|
||||
"obj = bpy.context.object"
|
||||
]
|
||||
|
||||
# properties to store in the preset
|
||||
preset_values = [
|
||||
"obj.draw_type",
|
||||
"obj.show_bounds",
|
||||
"obj.draw_bounds_type",
|
||||
"obj.show_name",
|
||||
"obj.show_axis",
|
||||
"obj.show_wire",
|
||||
]
|
||||
|
||||
# where to store the preset
|
||||
preset_subdir = "object/draw"
|
||||
|
||||
|
||||
# Draw into an existing panel
|
||||
def panel_func(self, context):
|
||||
layout = self.layout
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.menu(OBJECT_MT_draw_presets.__name__, text=OBJECT_MT_draw_presets.bl_label)
|
||||
row.operator(AddPresetObjectDraw.bl_idname, text="", icon='ZOOMIN')
|
||||
row.operator(AddPresetObjectDraw.bl_idname, text="", icon='ZOOMOUT').remove_active = True
|
||||
|
||||
|
||||
classes = (
|
||||
OBJECT_MT_draw_presets,
|
||||
AddPresetObjectDraw,
|
||||
)
|
||||
|
||||
|
||||
def register():
|
||||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
bpy.types.OBJECT_PT_display.prepend(panel_func)
|
||||
|
||||
|
||||
def unregister():
|
||||
for cls in classes:
|
||||
bpy.utils.unregister_class(cls)
|
||||
bpy.types.OBJECT_PT_display.remove(panel_func)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
@@ -9,11 +9,9 @@ Notice the 'CATEGORY_MT_name' in :class:`Menu.bl_idname`, this is a naming
|
||||
convention for menus.
|
||||
|
||||
.. note::
|
||||
|
||||
Menu subclasses must be registered before referencing them from blender.
|
||||
|
||||
.. note::
|
||||
|
||||
Menus have their :class:`Layout.operator_context` initialized as
|
||||
'EXEC_REGION_WIN' rather than 'INVOKE_DEFAULT' (see :ref:`Execution Context <operator-execution_context>`).
|
||||
If the operator context needs to initialize inputs from the
|
||||
|
@@ -13,7 +13,7 @@ be animated, accessed from the user interface and from python.
|
||||
definitions are not, this means whenever you load blender the class needs
|
||||
to be registered too.
|
||||
|
||||
This is best done by creating an add-on which loads on startup and registers
|
||||
This is best done by creating an addon which loads on startup and registers
|
||||
your properties.
|
||||
|
||||
.. note::
|
||||
|
@@ -9,8 +9,8 @@ import bpy
|
||||
class CustomRenderEngine(bpy.types.RenderEngine):
|
||||
# These three members are used by blender to set up the
|
||||
# RenderEngine; define its internal name, visible name and capabilities.
|
||||
bl_idname = "custom_renderer"
|
||||
bl_label = "Flat Color Renderer"
|
||||
bl_idname = 'custom_renderer'
|
||||
bl_label = 'Flat Color Renderer'
|
||||
bl_use_preview = True
|
||||
|
||||
# This is the only method called by blender, in this example
|
||||
@@ -21,7 +21,7 @@ class CustomRenderEngine(bpy.types.RenderEngine):
|
||||
self.size_x = int(scene.render.resolution_x * scale)
|
||||
self.size_y = int(scene.render.resolution_y * scale)
|
||||
|
||||
if self.is_preview:
|
||||
if scene.name == 'preview':
|
||||
self.render_preview(scene)
|
||||
else:
|
||||
self.render_scene(scene)
|
||||
@@ -36,7 +36,7 @@ class CustomRenderEngine(bpy.types.RenderEngine):
|
||||
|
||||
# Here we write the pixel values to the RenderResult
|
||||
result = self.begin_result(0, 0, self.size_x, self.size_y)
|
||||
layer = result.layers[0].passes["Combined"]
|
||||
layer = result.layers[0]
|
||||
layer.rect = green_rect
|
||||
self.end_result(result)
|
||||
|
||||
@@ -50,37 +50,21 @@ class CustomRenderEngine(bpy.types.RenderEngine):
|
||||
|
||||
# Here we write the pixel values to the RenderResult
|
||||
result = self.begin_result(0, 0, self.size_x, self.size_y)
|
||||
layer = result.layers[0].passes["Combined"]
|
||||
layer = result.layers[0]
|
||||
layer.rect = blue_rect
|
||||
self.end_result(result)
|
||||
|
||||
# Register the RenderEngine
|
||||
bpy.utils.register_class(CustomRenderEngine)
|
||||
|
||||
def register():
|
||||
# Register the RenderEngine
|
||||
bpy.utils.register_class(CustomRenderEngine)
|
||||
# RenderEngines also need to tell UI Panels that they are compatible
|
||||
# Otherwise most of the UI will be empty when the engine is selected.
|
||||
# In this example, we need to see the main render image button and
|
||||
# the material preview panel.
|
||||
from bl_ui import properties_render
|
||||
properties_render.RENDER_PT_render.COMPAT_ENGINES.add('custom_renderer')
|
||||
del properties_render
|
||||
|
||||
# RenderEngines also need to tell UI Panels that they are compatible
|
||||
# Otherwise most of the UI will be empty when the engine is selected.
|
||||
# In this example, we need to see the main render image button and
|
||||
# the material preview panel.
|
||||
from bl_ui import (
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render.RENDER_PT_render.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
|
||||
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(CustomRenderEngine)
|
||||
|
||||
from bl_ui import (
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render.RENDER_PT_render.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
|
||||
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
from bl_ui import properties_material
|
||||
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add('custom_renderer')
|
||||
del properties_material
|
||||
|
@@ -52,7 +52,6 @@ class OffScreenDraw(bpy.types.Operator):
|
||||
@staticmethod
|
||||
def _update_offscreen(context, offscreen):
|
||||
scene = context.scene
|
||||
render_layer = context.render_layer
|
||||
render = scene.render
|
||||
camera = scene.camera
|
||||
|
||||
@@ -64,9 +63,9 @@ class OffScreenDraw(bpy.types.Operator):
|
||||
render.pixel_aspect_y,
|
||||
)
|
||||
|
||||
|
||||
offscreen.draw_view3d(
|
||||
scene,
|
||||
render_layer,
|
||||
context.space_data,
|
||||
context.region,
|
||||
projection_matrix,
|
||||
|
@@ -49,7 +49,7 @@ vec2d[:] = vec3d[:2]
|
||||
|
||||
|
||||
# Vectors support 'swizzle' operations
|
||||
# See https://en.wikipedia.org/wiki/Swizzling_(computer_graphics)
|
||||
# See http://en.wikipedia.org/wiki/Swizzling_(computer_graphics)
|
||||
vec.xyz = vec.zyx
|
||||
vec.xy = vec4d.zw
|
||||
vec.xyz = vec4d.wzz
|
||||
|
@@ -10,41 +10,38 @@ Module to access application values that remain unchanged during runtime.
|
||||
|
||||
The Blender/BGE version as a tuple of 3 ints, eg. (2, 75, 1).
|
||||
|
||||
.. note::
|
||||
|
||||
Version tuples can be compared simply with (in)equality symbols;
|
||||
for example, ``(2, 74, 5) <= (2, 75, 0)`` returns True (lexical order).
|
||||
|
||||
.. note:: Version tuples can be compared simply with (in)equality symbols;
|
||||
for example, ``(2, 74, 5) <= (2, 75, 0)`` returns True (lexical order).
|
||||
|
||||
:type: tuple of three ints
|
||||
|
||||
.. data:: version_string
|
||||
|
||||
The Blender/BGE version formatted as a string, eg. "2.75 (sub 1)".
|
||||
|
||||
|
||||
:type: str
|
||||
|
||||
.. data:: version_char
|
||||
|
||||
The Blender/BGE version character (for minor releases).
|
||||
|
||||
|
||||
:type: str
|
||||
|
||||
.. data:: has_texture_ffmpeg
|
||||
|
||||
True if the BGE has been built with FFmpeg support,
|
||||
enabling use of :class:`~bge.texture.ImageFFmpeg` and :class:`~bge.texture.VideoFFmpeg`.
|
||||
|
||||
True if the BGE has been built with FFmpeg support, enabling use of :class:`~bge.texture.ImageFFmpeg` and :class:`~bge.texture.VideoFFmpeg`.
|
||||
|
||||
:type: bool
|
||||
|
||||
.. data:: has_joystick
|
||||
|
||||
True if the BGE has been built with joystick support.
|
||||
|
||||
|
||||
:type: bool
|
||||
|
||||
.. data:: has_physics
|
||||
|
||||
True if the BGE has been built with physics support.
|
||||
|
||||
|
||||
:type: bool
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user