Compare commits
123 Commits
tmp-overla
...
collada2.8
Author | SHA1 | Date | |
---|---|---|---|
cd1319d095 | |||
c5f14a3eec | |||
7bd7848374 | |||
5df55e184e | |||
76a18d555c | |||
06862486d4 | |||
6a311402db | |||
445b60270f | |||
0833084fd6 | |||
14d4c5477d | |||
5fa08d1ff0 | |||
cf43f4ed2f | |||
7d908f87b4 | |||
8073d672ab | |||
2e16905480 | |||
2aab0e85cf | |||
7d2bb2c9d9 | |||
4290c938e5 | |||
3749eac075 | |||
7254e92ba2 | |||
f0759a413e | |||
199017ac14 | |||
fd31a63a5c | |||
6e5f271a00 | |||
af6585cc9c | |||
d3ca5f8395 | |||
569ad49a01 | |||
58dfe293cb | |||
9f2b380b41 | |||
eac9021c62 | |||
c1b507f733 | |||
087e086ef9 | |||
9dcd4f9fcd | |||
9f298e2c81 | |||
e7e5930efb | |||
c437c017e3 | |||
14bb6a964a | |||
c103a3903f | |||
2271b79114 | |||
30dc14875f | |||
5b845ea104 | |||
d79c5ec2e2 | |||
a0350c0cb1 | |||
8daa543a2a | |||
d0a9b0c9dd | |||
aca6f9e0c4 | |||
3927aef22e | |||
5b9d70a85a | |||
756ef553d8 | |||
0698c194d2 | |||
eac73e504c | |||
ce3942a5b0 | |||
1e8dca814b | |||
281df836b0 | |||
ae3e320438 | |||
4d554543c2 | |||
5b63d4c1f6 | |||
b156b8b022 | |||
7793d5daec | |||
3c68ed62aa | |||
82e143cdb2 | |||
ca20df51dc | |||
bfc34b2248 | |||
a906c74f73 | |||
86c205ef00 | |||
d5455e4232 | |||
22d6cb36b4 | |||
ee67f50f25 | |||
fb8ea90a46 | |||
b32de8880e | |||
327f79cfb4 | |||
cfbebe7aaa | |||
51103eeebe | |||
16141f43bc | |||
3d6c191191 | |||
ceb4a44d0b | |||
f0d2dc61d9 | |||
9bd7d7027d | |||
635eff37de | |||
3df470fc62 | |||
3c0a7cca00 | |||
74e94a7ed4 | |||
7ca84b6418 | |||
4573540929 | |||
e77a3c2f27 | |||
51a76657de | |||
fda3a09f11 | |||
5d4c1f0242 | |||
e04a73c993 | |||
b773c5ce52 | |||
d0055996a7 | |||
30127c406a | |||
237da1869a | |||
ec1ed2a9f9 | |||
3ce6ff90b7 | |||
4c3a6fb3f9 | |||
d299f9d423 | |||
279e517770 | |||
bcbcc292f3 | |||
26f6e3a977 | |||
02f0b09329 | |||
9e4929b72d | |||
9dab15d3a1 | |||
b6ecf66894 | |||
f9bca158bb | |||
2183879216 | |||
839702080e | |||
12e28b4930 | |||
9a2771c1fa | |||
8cbfe8785e | |||
c2e1bfa3af | |||
90349bec6a | |||
1bf404dbd3 | |||
2e8391ee09 | |||
7ed18dc511 | |||
4dd14b7f38 | |||
6cae345de8 | |||
18bab65abb | |||
7bdde043a8 | |||
0fa59db066 | |||
83c3359100 | |||
2e82cdf318 | |||
ffd1893ba9 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"project_id" : "Blender",
|
||||
"conduit_uri" : "https://developer.blender.org/",
|
||||
"git.default-relative-commit" : "origin/master",
|
||||
"git.default-relative-commit" : "origin/blender2.8",
|
||||
"arc.land.update.default" : "rebase",
|
||||
"arc.land.onto.default" : "master"
|
||||
"arc.land.onto.default" : "blender2.8"
|
||||
}
|
||||
|
261
.clang-format
261
.clang-format
@@ -1,261 +0,0 @@
|
||||
|
||||
# Configuration of clang-format
|
||||
# =============================
|
||||
#
|
||||
# Tested to work with versions: 6 to 8.
|
||||
|
||||
# This causes parameters on continuations to align to the opening brace.
|
||||
#
|
||||
# like_this_long_name(parameter_one,
|
||||
# parameter_two,
|
||||
# parameter_three);
|
||||
#
|
||||
AlignAfterOpenBracket: 'Align'
|
||||
|
||||
# Disallow short functions on one line; break them up.
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
|
||||
# These two settings trigger stacking of parameters in most cases; this is
|
||||
# easier to read and also makes diffs easier to read (since an added or removed
|
||||
# parameter is obvious). For example, function calls will look like this:
|
||||
#
|
||||
# like_this_long_name(parameter_one,
|
||||
# parameter_two,
|
||||
# parameter_three,
|
||||
# parameter_four,
|
||||
# parameter_five,
|
||||
# parameter_six);
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# like_this_long_name(parameter_one, parameter_two, parameter_three, parameter_four,
|
||||
# parameter_five, parameter_six);
|
||||
#
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
|
||||
# Line width (don't exceed 100).
|
||||
ColumnLimit: 99
|
||||
|
||||
# Cause initializer lists to have one member initialized per line, in the case
|
||||
# that all initializers can't fit on a single line.
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
|
||||
# Indent the : after a constructor. For example:
|
||||
#
|
||||
# explicit foo_class ()
|
||||
# : member1_(5)
|
||||
# {
|
||||
# }
|
||||
#
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
|
||||
# Make access modifier slightly more visible.
|
||||
AccessModifierOffset: -1
|
||||
|
||||
# This will unfortunately use spaces in some cases where it's not desired (like
|
||||
# function calls) but the overall result is better since it will allow
|
||||
# alignment to work properly with different tab width settings.
|
||||
ContinuationIndentWidth: 4
|
||||
|
||||
# This tries to match Blender's style as much as possible. One
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping: {
|
||||
AfterClass: 'false'
|
||||
AfterControlStatement: 'false'
|
||||
AfterEnum : 'false'
|
||||
AfterFunction : 'true'
|
||||
AfterNamespace : 'false'
|
||||
AfterStruct : 'false'
|
||||
AfterUnion : 'false'
|
||||
BeforeCatch : 'true'
|
||||
BeforeElse : 'true'
|
||||
IndentBraces : 'false'
|
||||
AfterObjCDeclaration: 'true'
|
||||
}
|
||||
|
||||
# For switch statements, indent the cases.
|
||||
IndentCaseLabels: true
|
||||
|
||||
# Indent after the hash inside preprocessor directives
|
||||
IndentPPDirectives: AfterHash
|
||||
|
||||
BreakBeforeTernaryOperators: false
|
||||
|
||||
SpaceAfterTemplateKeyword: false
|
||||
|
||||
# Handy comment at the end of each C++ name space.
|
||||
FixNamespaceComments: true
|
||||
|
||||
# Use "if (...)" instead of "if(...)", but have function calls like foo().
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
|
||||
# Use two spaces before trailing comments, for example
|
||||
#
|
||||
# foo = bar; // comment
|
||||
#
|
||||
# Note that this doesn't work for C-style comments.
|
||||
SpacesBeforeTrailingComments: 2
|
||||
|
||||
# Reflow comments, developers must disable formatting as with code to override this.
|
||||
ReflowComments: true
|
||||
|
||||
# Never use tabs for indentation.
|
||||
# Note: TabWidth and IndentWidth must be the same, or strange things happen.
|
||||
UseTab: Never
|
||||
TabWidth: 2
|
||||
IndentWidth: 2
|
||||
|
||||
# Add a big penalty on breaking after the return type of functions. For example,
|
||||
#
|
||||
# static void foo(...)
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# static void
|
||||
# foo(very long content here that maybe could be stacked)
|
||||
#
|
||||
PenaltyReturnTypeOnItsOwnLine: 10000
|
||||
|
||||
# Avoid having function calls broken onto a new line:
|
||||
#
|
||||
# int a = foo(
|
||||
# long, list, of, many, params);
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# int a =
|
||||
# foo(long, list, of, many, params);
|
||||
#
|
||||
PenaltyBreakAssignment: 100
|
||||
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
|
||||
# Disable for now since it complicates initial migration tests,
|
||||
# TODO: look into enabling this in the future.
|
||||
SortIncludes: false
|
||||
|
||||
# Don't right align escaped newlines to the right because we have a wide default
|
||||
AlignEscapedNewlines: DontAlign
|
||||
|
||||
# Always break:
|
||||
#
|
||||
# const char *foo =
|
||||
# "multi"
|
||||
# "line";
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# const char *foo = "multi"
|
||||
# "line";
|
||||
#
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
|
||||
# We don't want literal strings to break,
|
||||
# however clang-format seems to ignore this (sigh).
|
||||
PenaltyBreakString: 1000000
|
||||
|
||||
# There are macros in Blender for custom for loops; tell Clang to treat them
|
||||
# like loops rather than an expression, and so put the { on the same line.
|
||||
#
|
||||
# To find these use multi-line regex search:
|
||||
# "^\s+[A-Z][A-Z0-9_]+\s*\([^\n]*\)\n\s*\{"
|
||||
ForEachMacros:
|
||||
- BEGIN_ANIMFILTER_SUBCHANNELS
|
||||
- BLI_FOREACH_SPARSE_RANGE
|
||||
- BLI_SMALLSTACK_ITER_BEGIN
|
||||
- BMO_ITER
|
||||
- BMO_ITER_INDEX
|
||||
- BMW_ITER
|
||||
- BM_FACES_OF_VERT_ITER_BEGIN
|
||||
- BM_ITER_BPY_BM_SEQ
|
||||
- BM_ITER_ELEM
|
||||
- BM_ITER_ELEM_INDEX
|
||||
- BM_ITER_MESH
|
||||
- BM_ITER_MESH_INDEX
|
||||
- BM_ITER_MESH_MUTABLE
|
||||
- BM_LOOPS_OF_VERT_ITER_BEGIN
|
||||
- BOOST_FOREACH
|
||||
- CTX_DATA_BEGIN
|
||||
- CTX_DATA_BEGIN_WITH_ID
|
||||
- DEG_OBJECT_ITER_BEGIN
|
||||
- DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN
|
||||
- DRIVER_TARGETS_LOOPER_BEGIN
|
||||
- DRIVER_TARGETS_USED_LOOPER_BEGIN
|
||||
- FOREACH_BASE_IN_EDIT_MODE_BEGIN
|
||||
- FOREACH_BASE_IN_MODE_BEGIN
|
||||
- FOREACH_BEGIN
|
||||
- FOREACH_COLLECTION_BEGIN
|
||||
- FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN
|
||||
- FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN
|
||||
- FOREACH_EDIT_OBJECT_BEGIN
|
||||
- FOREACH_MAIN_ID_BEGIN
|
||||
- FOREACH_MAIN_LISTBASE_BEGIN
|
||||
- FOREACH_MAIN_LISTBASE_ID_BEGIN
|
||||
- FOREACH_NODETREE_BEGIN
|
||||
- FOREACH_OBJECT_BEGIN
|
||||
- FOREACH_OBJECT_FLAG_BEGIN
|
||||
- FOREACH_OBJECT_IN_EDIT_MODE_BEGIN
|
||||
- FOREACH_OBJECT_IN_MODE_BEGIN
|
||||
- FOREACH_OBJECT_RENDERABLE_BEGIN
|
||||
- FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN
|
||||
- FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN
|
||||
- FOREACH_SCENE_COLLECTION_BEGIN
|
||||
- FOREACH_SCENE_OBJECT_BEGIN
|
||||
- FOREACH_SELECTED_BASE_BEGIN
|
||||
- FOREACH_SELECTED_EDITABLE_OBJECT_BEGIN
|
||||
- FOREACH_SELECTED_OBJECT_BEGIN
|
||||
- FOREACH_TRANS_DATA_CONTAINER
|
||||
- FOREACH_VIEW_LAYER_TO_RENDER_BEGIN
|
||||
- FOREACH_VISIBLE_BASE_BEGIN
|
||||
- FOREACH_VISIBLE_OBJECT_BEGIN
|
||||
- GHASH_FOREACH_BEGIN
|
||||
- GHASH_ITER
|
||||
- GHASH_ITER_INDEX
|
||||
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
|
||||
- GP_EDITABLE_STROKES_BEGIN
|
||||
- GSET_FOREACH_BEGIN
|
||||
- GSET_ITER
|
||||
- GSET_ITER_INDEX
|
||||
- ITER_BEGIN
|
||||
- ITER_PIXELS
|
||||
- ITER_SLOTS
|
||||
- ITER_SLOTS_BEGIN
|
||||
- LOOP_EDITED_POINTS
|
||||
- LOOP_KEYS
|
||||
- LOOP_POINTS
|
||||
- LOOP_SELECTED_KEYS
|
||||
- LOOP_SELECTED_POINTS
|
||||
- LOOP_TAGGED_KEYS
|
||||
- LOOP_TAGGED_POINTS
|
||||
- LOOP_UNSELECTED_POINTS
|
||||
- LOOP_VISIBLE_KEYS
|
||||
- LOOP_VISIBLE_POINTS
|
||||
- LISTBASE_CIRCULAR_BACKWARD_BEGIN
|
||||
- LISTBASE_CIRCULAR_FORWARD_BEGIN
|
||||
- LISTBASE_FOREACH
|
||||
- LISTBASE_FOREACH_BACKWARD
|
||||
- LISTBASE_FOREACH_MUTABLE
|
||||
- LISTBASE_FOREACH_BACKWARD_MUTABLE
|
||||
- MAN2D_ITER_AXES_BEGIN
|
||||
- MAN_ITER_AXES_BEGIN
|
||||
- NODE_INSTANCE_HASH_ITER
|
||||
- NODE_SOCKET_TYPES_BEGIN
|
||||
- NODE_TREE_TYPES_BEGIN
|
||||
- NODE_TYPES_BEGIN
|
||||
- PIXEL_LOOPER_BEGIN
|
||||
- PIXEL_LOOPER_BEGIN_CHANNELS
|
||||
- RNA_BEGIN
|
||||
- RNA_PROP_BEGIN
|
||||
- RNA_STRUCT_BEGIN
|
||||
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
|
||||
- SEQP_BEGIN
|
||||
- SEQ_BEGIN
|
||||
- foreach
|
||||
|
||||
# Use once we bump the minimum version to version 8.
|
||||
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
|
||||
# StatementMacros:
|
||||
# - PyObject_VAR_HEAD
|
||||
# - STRINGIFY
|
@@ -3,18 +3,18 @@
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# CMake & Text
|
||||
[*.{cmake,txt}]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# Python
|
||||
[*.py]
|
||||
@@ -30,9 +30,9 @@ max_line_length = 120
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# reStructuredText
|
||||
[*.rst]
|
||||
|
22
.github/stale.yml
vendored
22
.github/stale.yml
vendored
@@ -1,22 +0,0 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
# This file is used on Blender's GitHub mirror to automatically close any pull request
|
||||
# and invite contributors to join the official development platform on blender.org
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 1
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 1
|
||||
|
||||
# Label to use when marking as stale
|
||||
staleLabel: stale
|
||||
|
||||
# Comment to post when closing a stale Issue or Pull Request.
|
||||
closeComment: >
|
||||
This issue has been automatically closed, because this repository is only
|
||||
used as a mirror of git.blender.org. Blender development happens on
|
||||
developer.blender.org.
|
||||
|
||||
To get started contributing code, please read:
|
||||
https://wiki.blender.org/wiki/Process/Contributing_Code
|
7
.gitignore
vendored
7
.gitignore
vendored
@@ -11,10 +11,6 @@ __pycache__/
|
||||
*.swo
|
||||
*#
|
||||
|
||||
# Indexes for emacs, vi & others
|
||||
TAGS
|
||||
tags
|
||||
|
||||
# QtCreator
|
||||
CMakeLists.txt.user
|
||||
|
||||
@@ -40,6 +36,3 @@ Desktop.ini
|
||||
|
||||
# in-source lib downloads
|
||||
/build_files/build_environment/downloads
|
||||
|
||||
# in-source buildbot signing configuration
|
||||
/build_files/buildbot/codesign/config_server.py
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,12 +1,12 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
branch = master
|
||||
branch = blender2.8
|
||||
ignore = all
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
branch = master
|
||||
branch = blender2.8
|
||||
ignore = all
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
|
330
CMakeLists.txt
330
CMakeLists.txt
@@ -17,6 +17,10 @@
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -43,13 +47,6 @@ endif()
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# Prever LEGACY OpenGL to eb compatible with all the existing releases and
|
||||
# platforms which don't hare GLVND yet. Only do it if preference was not set
|
||||
# externally.
|
||||
if(NOT DEFINED OpenGL_GL_PREFERENCE)
|
||||
set(OpenGL_GL_PREFERENCE "LEGACY")
|
||||
endif()
|
||||
|
||||
if(NOT EXECUTABLE_OUTPUT_PATH)
|
||||
set(FIRST_RUN TRUE)
|
||||
else()
|
||||
@@ -130,6 +127,69 @@ endif()
|
||||
get_blender_version()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Platform Specific Defaults
|
||||
|
||||
# list of var-names
|
||||
set(_init_vars)
|
||||
|
||||
# initialize to ON
|
||||
macro(option_defaults_init)
|
||||
foreach(_var ${ARGV})
|
||||
set(${_var} ON)
|
||||
list(APPEND _init_vars "${_var}")
|
||||
endforeach()
|
||||
unset(_var)
|
||||
endmacro()
|
||||
|
||||
# remove from namespace
|
||||
macro(option_defaults_clear)
|
||||
foreach(_var ${_init_vars})
|
||||
unset(${_var})
|
||||
endforeach()
|
||||
unset(_var)
|
||||
unset(_init_vars)
|
||||
endmacro()
|
||||
|
||||
|
||||
# values to initialize WITH_****
|
||||
option_defaults_init(
|
||||
_init_BUILDINFO
|
||||
_init_CODEC_FFMPEG
|
||||
_init_CYCLES_OSL
|
||||
_init_CYCLES_OPENSUBDIV
|
||||
_init_IMAGE_OPENEXR
|
||||
_init_INPUT_NDOF
|
||||
_init_JACK
|
||||
_init_OPENCOLLADA
|
||||
_init_OPENCOLORIO
|
||||
_init_SDL
|
||||
_init_FFTW3
|
||||
_init_OPENSUBDIV
|
||||
)
|
||||
|
||||
# customize...
|
||||
if(UNIX AND NOT APPLE)
|
||||
# some of these libraries are problematic on Linux
|
||||
# disable less important dependencies by default
|
||||
set(_init_CODEC_FFMPEG OFF)
|
||||
set(_init_CYCLES_OSL OFF)
|
||||
set(_init_CYCLES_OPENSUBDIV OFF)
|
||||
set(_init_IMAGE_OPENEXR OFF)
|
||||
set(_init_JACK OFF)
|
||||
set(_init_OPENCOLLADA OFF)
|
||||
set(_init_OPENCOLORIO OFF)
|
||||
set(_init_SDL OFF)
|
||||
set(_init_FFTW3 OFF)
|
||||
set(_init_OPENSUBDIV OFF)
|
||||
elseif(WIN32)
|
||||
set(_init_JACK OFF)
|
||||
elseif(APPLE)
|
||||
set(_init_JACK OFF)
|
||||
set(_init_OPENSUBDIV OFF)
|
||||
endif()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Options
|
||||
|
||||
@@ -156,7 +216,7 @@ if(APPLE)
|
||||
option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF)
|
||||
endif()
|
||||
|
||||
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON)
|
||||
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ${_init_BUILDINFO})
|
||||
if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
|
||||
# add_library OBJECT arg unsupported
|
||||
set(WITH_BUILDINFO OFF)
|
||||
@@ -170,20 +230,22 @@ mark_as_advanced(BUILDINFO_OVERRIDE_TIME)
|
||||
|
||||
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
|
||||
option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
|
||||
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON)
|
||||
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ${_init_FFTW3})
|
||||
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
|
||||
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
|
||||
mark_as_advanced(WITH_SYSTEM_BULLET)
|
||||
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ON)
|
||||
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
|
||||
|
||||
# Compositor
|
||||
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
|
||||
option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ON)
|
||||
|
||||
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ON)
|
||||
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPENSUBDIV)
|
||||
|
||||
option(WITH_OPENVDB "Enable features relying on OpenVDB" ON)
|
||||
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON)
|
||||
option(WITH_OPENSUBDIV_MODIFIER "Use OpenSubdiv for CPU side of Subsurf/Multires modifiers" OFF)
|
||||
mark_as_advanced(WITH_OPENSUBDIV_MODIFIER)
|
||||
|
||||
option(WITH_OPENVDB "Enable features relying on OpenVDB" OFF)
|
||||
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
|
||||
option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF)
|
||||
mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE)
|
||||
|
||||
@@ -202,8 +264,6 @@ endif()
|
||||
option(WITH_HEADLESS "Build without graphical support (renderfarm, server mode only)" OFF)
|
||||
mark_as_advanced(WITH_HEADLESS)
|
||||
|
||||
option(WITH_QUADRIFLOW "Build with quadriflow remesher support" ON)
|
||||
|
||||
option(WITH_AUDASPACE "Build with blenders audio library (only disable if you know what you're doing!)" ON)
|
||||
option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on the system (only enable if you know what you're doing!)" OFF)
|
||||
mark_as_advanced(WITH_AUDASPACE)
|
||||
@@ -245,11 +305,13 @@ endif()
|
||||
option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON)
|
||||
option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
|
||||
option(WITH_MOD_REMESH "Enable Remesh Modifier" ON)
|
||||
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" ON)
|
||||
# option(WITH_MOD_CLOTH_ELTOPO "Enable Experimental cloth solver" OFF) # this is now only available in a branch
|
||||
# mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
|
||||
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF)
|
||||
|
||||
# Image format support
|
||||
option(WITH_OPENIMAGEIO "Enable OpenImageIO Support (http://www.openimageio.org)" ON)
|
||||
option(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
|
||||
option(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ${_init_IMAGE_OPENEXR})
|
||||
option(WITH_IMAGE_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org)" ON)
|
||||
option(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON)
|
||||
option(WITH_IMAGE_DDS "Enable DDS Image Support" ON)
|
||||
@@ -258,26 +320,24 @@ option(WITH_IMAGE_HDR "Enable HDR Image Support" ON)
|
||||
|
||||
# Audio/Video format support
|
||||
option(WITH_CODEC_AVI "Enable Blenders own AVI file support (raw/jpeg)" ON)
|
||||
option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.org)" ON)
|
||||
option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" ON)
|
||||
option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.org)" ${_init_CODEC_FFMPEG})
|
||||
option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
|
||||
|
||||
# Alembic support
|
||||
option(WITH_ALEMBIC "Enable Alembic Support" ON)
|
||||
option(WITH_ALEMBIC "Enable Alembic Support" OFF)
|
||||
option(WITH_ALEMBIC_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF)
|
||||
|
||||
# 3D format support
|
||||
# Disable opencollada when we don't have precompiled libs
|
||||
option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" ON)
|
||||
option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" ${_init_OPENCOLLADA})
|
||||
|
||||
# Sound output
|
||||
option(WITH_SDL "Enable SDL for sound and joystick support" ON)
|
||||
option(WITH_SDL "Enable SDL for sound and joystick support" ${_init_SDL})
|
||||
option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
|
||||
if(NOT WIN32)
|
||||
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" ON)
|
||||
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" ${_init_JACK})
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_JACK_DYNLOAD "Enable runtime dynamic JACK libraries loading" OFF)
|
||||
endif()
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_SDL_DYNLOAD "Enable runtime dynamic SDL libraries loading" OFF)
|
||||
endif()
|
||||
@@ -288,11 +348,10 @@ option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)"
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_SYSTEM_LZO "Use the system LZO library" OFF)
|
||||
endif()
|
||||
option(WITH_DRACO "Enable Draco mesh compression Python module (used for glTF)" ON)
|
||||
|
||||
# Camera/motion tracking
|
||||
option(WITH_LIBMV "Enable Libmv structure from motion library" ON)
|
||||
option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." ON)
|
||||
option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." OFF)
|
||||
mark_as_advanced(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
|
||||
|
||||
# Logging/unbit test libraries.
|
||||
@@ -308,7 +367,8 @@ option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
|
||||
if(WIN32)
|
||||
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
|
||||
endif()
|
||||
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
|
||||
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ${_init_INPUT_NDOF})
|
||||
option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
|
||||
option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
|
||||
@@ -344,27 +404,25 @@ mark_as_advanced(WITH_CPU_SSE)
|
||||
option(WITH_CYCLES "Enable Cycles Render Engine" ON)
|
||||
option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)
|
||||
option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF)
|
||||
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ON)
|
||||
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL})
|
||||
option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" OFF)
|
||||
option(WITH_CYCLES_OPENSUBDIV "Build Cycles with OpenSubdiv support" ${_init_CYCLES_OPENSUBDIV})
|
||||
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
|
||||
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
|
||||
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
|
||||
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 CACHE STRING "CUDA architectures to build binaries for")
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 CACHE STRING "CUDA architectures to build binaries for")
|
||||
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
|
||||
unset(PLATFORM_DEFAULT)
|
||||
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
|
||||
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
|
||||
option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
|
||||
option(WITH_CYCLES_KERNEL_ASAN "Build Cycles kernels with address sanitizer when WITH_COMPILER_ASAN is on, even if it's very slow" OFF)
|
||||
mark_as_advanced(WITH_CYCLES_KERNEL_ASAN)
|
||||
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
|
||||
mark_as_advanced(WITH_CYCLES_LOGGING)
|
||||
mark_as_advanced(WITH_CYCLES_DEBUG)
|
||||
mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
|
||||
|
||||
option(WITH_CYCLES_DEVICE_CUDA "Enable Cycles CUDA compute support" ON)
|
||||
option(WITH_CYCLES_DEVICE_OPTIX "Enable Cycles OptiX support" OFF)
|
||||
option(WITH_CYCLES_DEVICE_OPENCL "Enable Cycles OpenCL compute support" ON)
|
||||
option(WITH_CYCLES_NETWORK "Enable Cycles compute over network support (EXPERIMENTAL and unfinished)" OFF)
|
||||
mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
|
||||
@@ -399,18 +457,13 @@ option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_ass
|
||||
mark_as_advanced(WITH_ASSERT_ABORT)
|
||||
|
||||
option(WITH_BOOST "Enable features depending on boost" ON)
|
||||
option(WITH_TBB "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)" ON)
|
||||
|
||||
# TBB malloc is only supported on for windows currently
|
||||
if(WIN32)
|
||||
option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ON)
|
||||
endif()
|
||||
|
||||
# Unit testsing
|
||||
option(WITH_GTESTS "Enable GTest unit testing" OFF)
|
||||
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
|
||||
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
|
||||
|
||||
|
||||
# Documentation
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_DOC_MANPAGE "Create a manual page (Unix manpage)" OFF)
|
||||
@@ -422,7 +475,7 @@ endif()
|
||||
option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
|
||||
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
|
||||
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
|
||||
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (through either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
||||
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
||||
|
||||
mark_as_advanced(
|
||||
WITH_OPENGL
|
||||
@@ -495,37 +548,33 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Dependency graph
|
||||
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
|
||||
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
|
||||
|
||||
if(WIN32)
|
||||
# Use hardcoded paths or find_package to find externals
|
||||
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
|
||||
mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
|
||||
|
||||
option(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS "Organize the visual studio projects according to source folder structure." ON)
|
||||
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
|
||||
option(WITH_WINDOWS_CODESIGN "Use signtool to sign the final binary." OFF)
|
||||
mark_as_advanced(WITH_WINDOWS_CODESIGN)
|
||||
|
||||
option(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS "Organize the source files in filters matching the source folders." ON)
|
||||
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
|
||||
set(WINDOWS_CODESIGN_PFX CACHE FILEPATH "Path to pfx file to use for codesigning.")
|
||||
mark_as_advanced(WINDOWS_CODESIGN_PFX)
|
||||
|
||||
set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING "password for pfx file used for codesigning.")
|
||||
mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
|
||||
|
||||
option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
|
||||
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
||||
|
||||
option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
|
||||
mark_as_advanced(WINDOWS_PYTHON_DEBUG)
|
||||
endif()
|
||||
|
||||
# The following only works with the Ninja generator in CMake >= 3.0.
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
||||
option(WITH_NINJA_POOL_JOBS
|
||||
"Enable Ninja pools of jobs, to try to ease building on machines with 16GB of RAM or less (if not yet defined, will try to set best values based on detected machine specifications)."
|
||||
OFF)
|
||||
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_CXX11_ABI "Use native C++11 ABI of compiler" ON)
|
||||
mark_as_advanced(WITH_CXX11_ABI)
|
||||
endif()
|
||||
|
||||
# Installation process.
|
||||
option(POSTINSTALL_SCRIPT "Run given CMake script after installation process" OFF)
|
||||
mark_as_advanced(POSTINSTALL_SCRIPT)
|
||||
# avoid using again
|
||||
option_defaults_clear()
|
||||
|
||||
# end option(...)
|
||||
|
||||
@@ -592,12 +641,6 @@ endif()
|
||||
|
||||
if(NOT WITH_PYTHON)
|
||||
set(WITH_CYCLES OFF)
|
||||
set(WITH_DRACO OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_DRACO AND NOT WITH_PYTHON_INSTALL)
|
||||
message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now")
|
||||
set(WITH_DRACO OFF)
|
||||
endif()
|
||||
|
||||
# enable boost for cycles, audaspace or i18n
|
||||
@@ -616,7 +659,6 @@ if(NOT WITH_BOOST)
|
||||
set_and_warn(WITH_INTERNATIONAL OFF)
|
||||
set_and_warn(WITH_OPENVDB OFF)
|
||||
set_and_warn(WITH_OPENCOLORIO OFF)
|
||||
set_and_warn(WITH_QUADRIFLOW OFF)
|
||||
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
||||
WITH_OPENVDB OR WITH_OPENCOLORIO)
|
||||
# Keep enabled
|
||||
@@ -696,12 +738,14 @@ if(NOT WITH_CUDA_DYNLOAD)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check check if submodules are cloned
|
||||
# Check for valid directories
|
||||
# ... a partial checkout may cause this.
|
||||
#
|
||||
# note: we need to check for a known subdir in both cases.
|
||||
# since uninitialized git submodules will give blank dirs
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/datafiles/locale")
|
||||
list(LENGTH RESULT DIR_LEN)
|
||||
if(DIR_LEN EQUAL 0)
|
||||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale/languages")
|
||||
message(WARNING
|
||||
"Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
|
||||
"This is a 'git submodule', which are known not to work with bridges to other version "
|
||||
@@ -719,13 +763,11 @@ if(WITH_PYTHON)
|
||||
# Do this before main 'platform_*' checks,
|
||||
# because UNIX will search for the old Python paths which may not exist.
|
||||
# giving errors about missing paths before this case is met.
|
||||
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.7")
|
||||
message(FATAL_ERROR "At least Python 3.7 is required to build")
|
||||
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.6")
|
||||
message(FATAL_ERROR "At least Python 3.6 is required to build")
|
||||
endif()
|
||||
|
||||
file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/scripts/addons")
|
||||
list(LENGTH RESULT DIR_LEN)
|
||||
if(DIR_LEN EQUAL 0)
|
||||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
|
||||
message(WARNING
|
||||
"Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
|
||||
"This is a 'git submodule', which are known not to work with bridges to other version "
|
||||
@@ -795,8 +837,7 @@ if(WITH_X11)
|
||||
if(X11_Xinput_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "LibXi not found. Disable WITH_X11_XINPUT if you
|
||||
want to build without tablet support")
|
||||
set(WITH_X11_XINPUT OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -807,8 +848,7 @@ if(WITH_X11)
|
||||
if(X11_Xxf86vmode_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXxf86vm not found. Disable WITH_X11_XF86VMODE if you
|
||||
want to build without")
|
||||
set(WITH_X11_XF86VMODE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -816,8 +856,7 @@ if(WITH_X11)
|
||||
if(X11_Xfixes_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXfixes not found. Disable WITH_X11_XFIXES if you
|
||||
want to build without")
|
||||
set(WITH_X11_XFIXES OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -827,8 +866,7 @@ if(WITH_X11)
|
||||
if(X11_Xrender_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you
|
||||
want to build without")
|
||||
set(WITH_X11_ALPHA OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1019,11 +1057,8 @@ if(WITH_GL_PROFILE_ES20)
|
||||
endif()
|
||||
|
||||
else()
|
||||
if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY)
|
||||
list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||
else()
|
||||
list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY})
|
||||
endif()
|
||||
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_GL_EGL)
|
||||
@@ -1084,10 +1119,7 @@ endif()
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure OpenMP.
|
||||
if(WITH_OPENMP)
|
||||
if(NOT OPENMP_CUSTOM)
|
||||
find_package(OpenMP)
|
||||
endif()
|
||||
|
||||
if(OPENMP_FOUND)
|
||||
if(NOT WITH_OPENMP_STATIC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
@@ -1123,7 +1155,6 @@ if(WITH_SYSTEM_GLEW)
|
||||
message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
|
||||
endif()
|
||||
|
||||
set(GLEW_INCLUDE_PATH "${GLEW_INCLUDE_DIR}")
|
||||
set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
|
||||
else()
|
||||
if(WITH_GLEW_ES)
|
||||
@@ -1245,76 +1276,6 @@ if(WITH_LIBMV)
|
||||
set(CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Extra limits to number of jobs running in parallel for some kind os tasks.
|
||||
# Only supported by Ninja build system currently.
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Ninja" AND WITH_NINJA_POOL_JOBS)
|
||||
if(NOT NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS AND
|
||||
NOT NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS AND
|
||||
NOT NINJA_MAX_NUM_PARALLEL_LINK_JOBS)
|
||||
# Try to define good default values.
|
||||
# Max mem of heavy cpp files compilation: about 2.5GB
|
||||
# Max mem during linking: about 3.3GB
|
||||
cmake_host_system_information(RESULT _NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
||||
# Note: this gives mem in MB.
|
||||
cmake_host_system_information(RESULT _TOT_MEM QUERY TOTAL_PHYSICAL_MEMORY)
|
||||
|
||||
# Heuristics... the more cores we have, the more free mem we have to keep for the non-heavy tasks too.
|
||||
if(${_TOT_MEM} LESS 8000 AND ${_NUM_CORES} GREATER 2)
|
||||
set(_compile_heavy_jobs "1")
|
||||
elseif(${_TOT_MEM} LESS 16000 AND ${_NUM_CORES} GREATER 4)
|
||||
set(_compile_heavy_jobs "2")
|
||||
elseif(${_TOT_MEM} LESS 24000 AND ${_NUM_CORES} GREATER 8)
|
||||
set(_compile_heavy_jobs "3")
|
||||
elseif(${_TOT_MEM} LESS 32000 AND ${_NUM_CORES} GREATER 16)
|
||||
set(_compile_heavy_jobs "4")
|
||||
elseif(${_TOT_MEM} LESS 64000 AND ${_NUM_CORES} GREATER 32)
|
||||
set(_compile_heavy_jobs "8")
|
||||
else()
|
||||
set(_compile_heavy_jobs "")
|
||||
endif()
|
||||
|
||||
set(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS "${_compile_heavy_jobs}" CACHE STRING
|
||||
"Define the maximum number of concurrent heavy compilation jobs, for ninja build system (used for some targets which cpp files can take several GB each during compilation)." FORCE)
|
||||
mark_as_advanced(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
set(_compile_heavy_jobs)
|
||||
|
||||
# Only set regular compile jobs if we set heavy jobs, otherwise default (using all cores) if fine.
|
||||
if(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
math(EXPR _compile_jobs "${_NUM_CORES} - 1")
|
||||
else()
|
||||
set(_compile_jobs "")
|
||||
endif()
|
||||
set(NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS "${_compile_jobs}" CACHE STRING
|
||||
"Define the maximum number of concurrent compilation jobs, for ninja build system." FORCE)
|
||||
mark_as_advanced(NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS)
|
||||
set(_compile_jobs)
|
||||
|
||||
# In practice, even when there is RAM available, this proves to be quicker than running in parallel
|
||||
# (due to slow disks accesses).
|
||||
set(NINJA_MAX_NUM_PARALLEL_LINK_JOBS "1" CACHE STRING
|
||||
"Define the maximum number of concurrent link jobs, for ninja build system." FORCE)
|
||||
mark_as_advanced(NINJA_MAX_NUM_PARALLEL_LINK_JOBS)
|
||||
|
||||
set(_NUM_CORES)
|
||||
set(_TOT_MEM)
|
||||
endif()
|
||||
|
||||
if(NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS})
|
||||
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
|
||||
endif()
|
||||
|
||||
if(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_heavy_job_pool=${NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS})
|
||||
endif()
|
||||
|
||||
if(NINJA_MAX_NUM_PARALLEL_LINK_JOBS)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${NINJA_MAX_NUM_PARALLEL_LINK_JOBS})
|
||||
set(CMAKE_JOB_POOL_LINK link_job_pool)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Extra compile flags
|
||||
|
||||
@@ -1336,16 +1297,13 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_LOGICAL_OP -Wlogical-op)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEF -Wundef)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_INIT_SELF -Winit-self) # needs -Wuninitialized
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull) # C only
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_RESTRICT -Wrestrict)
|
||||
|
||||
# C-only.
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ABSOLUTE_VALUE -Wabsolute-value)
|
||||
|
||||
# gcc 4.2 gives annoying warnings on every file with this
|
||||
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
|
||||
@@ -1378,6 +1336,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_TYPE_LIMITS -Wtype-limits)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_RETURN_TYPE -Werror=return-type)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_POINTER_ARITH -Wpointer-arith)
|
||||
@@ -1414,8 +1373,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch)
|
||||
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
|
||||
@@ -1468,8 +1425,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
|
||||
@@ -1490,7 +1445,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
# warning level:
|
||||
"/W3"
|
||||
"/w34062" # switch statement contains 'default' but no 'case' labels
|
||||
"/w34115" # 'type' : named type definition in parentheses
|
||||
"/w34189" # local variable is initialized but not referenced
|
||||
# disable:
|
||||
"/wd4018" # signed/unsigned mismatch
|
||||
@@ -1505,18 +1459,12 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
"/wd4800" # forcing value to bool 'true' or 'false'
|
||||
"/wd4828" # The file contains a character that is illegal
|
||||
"/wd4996" # identifier was declared deprecated
|
||||
"/wd4661" # no suitable definition provided for explicit template instantiation request
|
||||
# errors:
|
||||
"/we4013" # 'function' undefined; assuming extern returning int
|
||||
"/we4133" # incompatible pointer types
|
||||
"/we4431" # missing type specifier - int assumed
|
||||
)
|
||||
|
||||
if(MSVC_VERSION GREATER_EQUAL 1911)
|
||||
# see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
|
||||
set(_WARNINGS "${_WARNINGS} /w35038") # order of initialization in c++ constructors
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
|
||||
set(C_WARNINGS "${_WARNINGS}")
|
||||
set(CXX_WARNINGS "${_WARNINGS}")
|
||||
@@ -1554,19 +1502,15 @@ if(WITH_PYTHON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# MSVC needs to be tested first, since clang on windows will
|
||||
# match the compiler test below but clang-cl does not accept -std=c++11
|
||||
# since it is on by default and cannot be turned off.
|
||||
#
|
||||
# Nothing special is needed, C++11 features are available by default.
|
||||
elseif(
|
||||
if(
|
||||
CMAKE_COMPILER_IS_GNUCC OR
|
||||
CMAKE_C_COMPILER_ID MATCHES "Clang" OR
|
||||
CMAKE_C_COMPILER_ID MATCHES "Intel"
|
||||
)
|
||||
# TODO(sergey): Do we want c++11 or gnu-c++11 here?
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
elseif(MSVC)
|
||||
# Nothing special is needed, C++11 features are available by default.
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build")
|
||||
endif()
|
||||
@@ -1582,12 +1526,6 @@ if(
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(NOT WITH_CXX11_ABI)
|
||||
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Include warnings first, so its possible to disable them with user defined flags
|
||||
# eg: -Wno-uninitialized
|
||||
set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
|
||||
@@ -1663,11 +1601,6 @@ endif()
|
||||
add_subdirectory(tests)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define 'heavy' submodules (for Ninja builder when using pools).
|
||||
setup_heavy_lib_pool()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# CPack for generating packages
|
||||
include(build_files/cmake/packaging.cmake)
|
||||
@@ -1720,14 +1653,13 @@ if(FIRST_RUN)
|
||||
info_cfg_option(WITH_CYCLES)
|
||||
info_cfg_option(WITH_FREESTYLE)
|
||||
info_cfg_option(WITH_OPENCOLORIO)
|
||||
info_cfg_option(WITH_OPENIMAGEDENOISE)
|
||||
info_cfg_option(WITH_OPENVDB)
|
||||
info_cfg_option(WITH_ALEMBIC)
|
||||
info_cfg_option(WITH_QUADRIFLOW)
|
||||
|
||||
info_cfg_text("Compiler Options:")
|
||||
info_cfg_option(WITH_BUILDINFO)
|
||||
info_cfg_option(WITH_OPENMP)
|
||||
info_cfg_option(WITH_RAYOPTIMIZATION)
|
||||
|
||||
info_cfg_text("System Options:")
|
||||
info_cfg_option(WITH_INSTALL_PORTABLE)
|
||||
|
312
GNUmakefile
312
GNUmakefile
@@ -24,147 +24,20 @@
|
||||
# ../build_linux_i386
|
||||
# This is for users who like to configure & build blender with a single command.
|
||||
|
||||
define HELP_TEXT
|
||||
|
||||
Convenience Targets
|
||||
Provided for building Blender, (multiple at once can be used).
|
||||
|
||||
* debug: Build a debug binary.
|
||||
* full: Enable all supported dependencies & options.
|
||||
* lite: Disable non essential features for a smaller binary and faster build.
|
||||
* headless: Build without an interface (renderfarm or server automation).
|
||||
* cycles: Build Cycles standalone only, without Blender.
|
||||
* bpy: Build as a python module which can be loaded from python directly.
|
||||
* deps: Build library dependencies (intended only for platform maintainers).
|
||||
|
||||
* developer: Enable faster builds, error checking and tests, recommended for developers.
|
||||
* config: Run cmake configuration tool to set build options.
|
||||
* ninja: Use ninja build tool for faster builds.
|
||||
|
||||
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
|
||||
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
|
||||
|
||||
|
||||
Project Files
|
||||
Generate project files for development environments.
|
||||
|
||||
* project_qtcreator: QtCreator Project Files.
|
||||
* project_netbeans: NetBeans Project Files.
|
||||
* project_eclipse: Eclipse CDT4 Project Files.
|
||||
|
||||
Package Targets
|
||||
|
||||
* package_debian: Build a debian package.
|
||||
* package_pacman: Build an arch linux pacman package.
|
||||
* package_archive: Build an archive package.
|
||||
|
||||
Testing Targets
|
||||
Not associated with building Blender.
|
||||
|
||||
* test:
|
||||
Run automated tests with ctest.
|
||||
* test_cmake:
|
||||
Runs our own cmake file checker
|
||||
which detects errors in the cmake file list definitions
|
||||
* test_pep8:
|
||||
Checks all python script are pep8
|
||||
which are tagged to use the stricter formatting
|
||||
* test_deprecated:
|
||||
Checks for deprecation tags in our code which may need to be removed
|
||||
* test_style_c:
|
||||
Checks C/C++ conforms with blenders style guide:
|
||||
https://wiki.blender.org/wiki/Source/Code_Style
|
||||
* test_style_c_qtc:
|
||||
Same as test_style but outputs QtCreator tasks format
|
||||
* test_style_osl:
|
||||
Checks OpenShadingLanguage conforms with blenders style guide:
|
||||
https://wiki.blender.org/wiki/Source/Code_Style
|
||||
* test_style_osl_qtc:
|
||||
Checks OpenShadingLanguage conforms with blenders style guide:
|
||||
https://wiki.blender.org/wiki/Source/Code_Style
|
||||
|
||||
Static Source Code Checking
|
||||
Not associated with building Blender.
|
||||
|
||||
* check_cppcheck: Run blender source through cppcheck (C & C++).
|
||||
* check_clang_array: Run blender source through clang array checking script (C & C++).
|
||||
* check_splint: Run blenders source through splint (C only).
|
||||
* check_sparse: Run blenders source through sparse (C only).
|
||||
* check_smatch: Run blenders source through smatch (C only).
|
||||
* check_spelling_c: Check for spelling errors (C/C++ only).
|
||||
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
|
||||
* check_spelling_osl: Check for spelling errors (OSL only).
|
||||
* check_spelling_py: Check for spelling errors (Python only).
|
||||
* check_descriptions: Check for duplicate/invalid descriptions.
|
||||
|
||||
Utilities
|
||||
Not associated with building Blender.
|
||||
|
||||
* icons:
|
||||
Updates PNG icons from SVG files.
|
||||
|
||||
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
|
||||
otherwise default paths are used.
|
||||
|
||||
Example
|
||||
make icons INKSCAPE_BIN=/path/to/inkscape
|
||||
|
||||
* icons_geom:
|
||||
Updates Geometry icons from BLEND file.
|
||||
|
||||
Optionally pass in variable: 'BLENDER_BIN'
|
||||
otherwise default paths are used.
|
||||
|
||||
Example
|
||||
make icons_geom BLENDER_BIN=/path/to/blender
|
||||
|
||||
* source_archive:
|
||||
Create a compressed archive of the source code.
|
||||
|
||||
* update:
|
||||
updates git and all submodules
|
||||
|
||||
* format
|
||||
Format source code using clang (uses PATHS if passed in). For example::
|
||||
|
||||
make format PATHS="source/blender/blenlib source/blender/blenkernel"
|
||||
|
||||
Environment Variables
|
||||
|
||||
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
|
||||
* BUILD_DIR: Override default build path.
|
||||
* PYTHON: Use this for the Python command (used for checking tools).
|
||||
* NPROCS: Number of processes to use building (auto-detect when omitted).
|
||||
|
||||
Documentation Targets
|
||||
Not associated with building Blender.
|
||||
|
||||
* doc_py: Generate sphinx python api docs.
|
||||
* doc_doxy: Generate doxygen C/C++ docs.
|
||||
* doc_dna: Generate blender file format reference.
|
||||
* doc_man: Generate manpage.
|
||||
|
||||
Information
|
||||
|
||||
* help: This help message.
|
||||
* help_features: Show a list of optional features when building.
|
||||
|
||||
endef
|
||||
# HELP_TEXT (end)
|
||||
|
||||
|
||||
# System Vars
|
||||
OS:=$(shell uname -s)
|
||||
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
|
||||
CPU:=$(shell uname -m)
|
||||
# CPU:=$(shell uname -m) # UNUSED
|
||||
|
||||
|
||||
# Source and Build DIR's
|
||||
BLENDER_DIR:=$(shell pwd -P)
|
||||
BUILD_TYPE:=Release
|
||||
|
||||
# CMake arguments, assigned to local variable to make it mutable.
|
||||
CMAKE_CONFIG_ARGS := $(BUILD_CMAKE_ARGS)
|
||||
ifndef BUILD_CMAKE_ARGS
|
||||
BUILD_CMAKE_ARGS:=
|
||||
endif
|
||||
|
||||
ifndef BUILD_DIR
|
||||
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
|
||||
@@ -182,7 +55,7 @@ ifndef DEPS_INSTALL_DIR
|
||||
|
||||
ifneq ($(OS_NCASE),darwin)
|
||||
# Add processor type to directory name
|
||||
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
|
||||
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(shell uname -p)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -191,16 +64,6 @@ ifndef PYTHON
|
||||
PYTHON:=python3
|
||||
endif
|
||||
|
||||
# For macOS python3 is not installed by default, so fallback to python binary
|
||||
# in libraries, or python 2 for running make update to get it.
|
||||
ifeq ($(OS_NCASE),darwin)
|
||||
ifeq (, $(shell command -v $(PYTHON)))
|
||||
PYTHON:=../lib/darwin/python/bin/python3.7m
|
||||
ifeq (, $(shell command -v $(PYTHON)))
|
||||
PYTHON:=python
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# additional targets for the build configuration
|
||||
@@ -212,59 +75,33 @@ ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
||||
endif
|
||||
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_full
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
|
||||
endif
|
||||
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_lite
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
|
||||
endif
|
||||
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_cycles
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
|
||||
endif
|
||||
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_headless
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
|
||||
endif
|
||||
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
|
||||
endif
|
||||
|
||||
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# build tool
|
||||
|
||||
ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
|
||||
CMAKE_CONFIG_ARGS:=$(CMAKE_CONFIG_ARGS) -G Ninja
|
||||
BUILD_COMMAND:=ninja
|
||||
DEPS_BUILD_COMMAND:=ninja
|
||||
else
|
||||
ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
|
||||
BUILD_COMMAND:=ninja
|
||||
else
|
||||
BUILD_COMMAND:=make -s
|
||||
endif
|
||||
|
||||
ifneq ("$(wildcard $(DEPS_BUILD_DIR)/build.ninja)","")
|
||||
DEPS_BUILD_COMMAND:=ninja
|
||||
else
|
||||
DEPS_BUILD_COMMAND:=make -s
|
||||
endif
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Blender binary path
|
||||
|
||||
# Allow passing in own BLENDER_BIN so developers who don't
|
||||
# use the default build path can still use utility helpers.
|
||||
ifeq ($(OS), Darwin)
|
||||
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
|
||||
BLENDER_BIN="$(BUILD_DIR)/bin/blender.app/Contents/MacOS/blender"
|
||||
else
|
||||
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
|
||||
BLENDER_BIN="$(BUILD_DIR)/bin/blender"
|
||||
endif
|
||||
|
||||
|
||||
@@ -275,10 +112,7 @@ ifndef NPROCS
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell nproc)
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
|
||||
endif
|
||||
ifneq (,$(filter $(OS),Darwin FreeBSD))
|
||||
ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
endif
|
||||
endif
|
||||
@@ -287,7 +121,7 @@ endif
|
||||
# -----------------------------------------------------------------------------
|
||||
# Macro for configuring cmake
|
||||
|
||||
CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
|
||||
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
|
||||
-H"$(BLENDER_DIR)" \
|
||||
-B"$(BUILD_DIR)" \
|
||||
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
|
||||
@@ -319,7 +153,7 @@ all: .FORCE
|
||||
|
||||
@echo
|
||||
@echo Building Blender ...
|
||||
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
|
||||
$(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: $(BLENDER_BIN)
|
||||
@@ -331,8 +165,6 @@ lite: all
|
||||
cycles: all
|
||||
headless: all
|
||||
bpy: all
|
||||
developer: all
|
||||
ninja: all
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build dependencies
|
||||
@@ -351,7 +183,7 @@ deps: .FORCE
|
||||
|
||||
@echo
|
||||
@echo Building dependencies ...
|
||||
$(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
|
||||
$(MAKE) -C "$(DEPS_BUILD_DIR)" -s -j $(NPROCS) $(DEPS_TARGET)
|
||||
@echo
|
||||
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
|
||||
@echo
|
||||
@@ -364,9 +196,87 @@ config: .FORCE
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Help for build targets
|
||||
export HELP_TEXT
|
||||
help: .FORCE
|
||||
@echo "$$HELP_TEXT"
|
||||
@echo ""
|
||||
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
|
||||
@echo " * debug - build a debug binary"
|
||||
@echo " * full - enable all supported dependencies & options"
|
||||
@echo " * lite - disable non essential features for a smaller binary and faster build"
|
||||
@echo " * headless - build without an interface (renderfarm or server automation)"
|
||||
@echo " * cycles - build Cycles standalone only, without Blender"
|
||||
@echo " * bpy - build as a python module which can be loaded from python directly"
|
||||
@echo " * deps - build library dependencies (intended only for platform maintainers)"
|
||||
@echo ""
|
||||
@echo " * config - run cmake configuration tool to set build options"
|
||||
@echo ""
|
||||
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
|
||||
@echo " Note, passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments."
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Project Files for IDE's"
|
||||
@echo " * project_qtcreator - QtCreator Project Files"
|
||||
@echo " * project_netbeans - NetBeans Project Files"
|
||||
@echo " * project_eclipse - Eclipse CDT4 Project Files"
|
||||
@echo ""
|
||||
@echo "Package Targets"
|
||||
@echo " * package_debian - build a debian package"
|
||||
@echo " * package_pacman - build an arch linux pacman package"
|
||||
@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_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 " https://wiki.blender.org/wiki/Source/Code_Style"
|
||||
@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 " https://wiki.blender.org/wiki/Source/Code_Style"
|
||||
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
|
||||
@echo " https://wiki.blender.org/wiki/Source/Code_Style"
|
||||
@echo ""
|
||||
@echo "Static Source Code Checking (not associated with building blender)"
|
||||
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
|
||||
@echo " * check_clang_array - run blender source through clang array checking script (C & C++)"
|
||||
@echo " * check_splint - run blenders source through splint (C only)"
|
||||
@echo " * check_sparse - run blenders source through sparse (C only)"
|
||||
@echo " * check_smatch - run blenders source through smatch (C only)"
|
||||
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
|
||||
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
|
||||
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
|
||||
@echo " * check_spelling_py - check for spelling errors (Python only)"
|
||||
@echo " * check_descriptions - check for duplicate/invalid descriptions"
|
||||
@echo ""
|
||||
@echo "Utilities (not associated with building blender)"
|
||||
@echo " * icons - Updates PNG icons from SVG files."
|
||||
@echo " Set environment variables 'BLENDER_BIN' and 'INKSCAPE_BIN'"
|
||||
@echo " to define your own commands."
|
||||
@echo " * icons_geom - Updates Geometry icons from BLEND file."
|
||||
@echo " Set environment variable 'BLENDER_BIN'"
|
||||
@echo " to define your own command."
|
||||
@echo " * tgz - create a compressed archive of the source code."
|
||||
@echo " * update - updates git and all submodules"
|
||||
@echo ""
|
||||
@echo "Environment Variables"
|
||||
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
|
||||
@echo " * BUILD_DIR - override default build path."
|
||||
@echo " * PYTHON - use this for the Python command (used for checking tools)."
|
||||
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
|
||||
@echo ""
|
||||
@echo "Documentation Targets (not associated with building blender)"
|
||||
@echo " * doc_py - generate sphinx python api docs"
|
||||
@echo " * doc_doxy - generate doxygen C/C++ docs"
|
||||
@echo " * doc_dna - generate blender file format reference"
|
||||
@echo " * doc_man - generate manpage"
|
||||
@echo ""
|
||||
@echo "Information"
|
||||
@echo " * help - this help message"
|
||||
@echo " * help_features - show a list of optional features when building"
|
||||
@echo ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Packages
|
||||
@@ -386,7 +296,7 @@ package_archive: .FORCE
|
||||
# Tests
|
||||
#
|
||||
test: .FORCE
|
||||
$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
|
||||
cd $(BUILD_DIR) ; ctest . --output-on-failure
|
||||
|
||||
# run pep8 check check on scripts we distribute.
|
||||
test_pep8: .FORCE
|
||||
@@ -447,7 +357,7 @@ test_style_osl_qtc: .FORCE
|
||||
#
|
||||
|
||||
project_qtcreator: .FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_netbeans: .FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
||||
@@ -527,14 +437,11 @@ check_descriptions: .FORCE
|
||||
# Utilities
|
||||
#
|
||||
|
||||
source_archive: .FORCE
|
||||
./build_files/utils/make_source_archive.sh
|
||||
tgz: .FORCE
|
||||
./build_files/utils/build_tgz.sh
|
||||
|
||||
INKSCAPE_BIN?="inkscape"
|
||||
icons: .FORCE
|
||||
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
|
||||
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
|
||||
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
||||
|
||||
icons_geom: .FORCE
|
||||
@@ -542,11 +449,18 @@ icons_geom: .FORCE
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
|
||||
|
||||
update: .FORCE
|
||||
$(PYTHON) ./build_files/utils/make_update.py
|
||||
|
||||
format: .FORCE
|
||||
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
|
||||
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
|
||||
if [ "$(OS_NCASE)" = "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
|
||||
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
|
||||
fi
|
||||
if [ -d "../lib" ]; then \
|
||||
svn cleanup ../lib/* ; \
|
||||
svn update ../lib/* ; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git submodule update --init --recursive
|
||||
# Use blender2.8 branch for submodules that have it.
|
||||
git submodule foreach "git checkout blender2.8 || git checkout master"
|
||||
git submodule foreach git pull --rebase origin
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -577,7 +491,7 @@ help_features: .FORCE
|
||||
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
|
||||
|
||||
clean: .FORCE
|
||||
$(BUILD_COMMAND) -C "$(BUILD_DIR)" clean
|
||||
$(MAKE) -C "$(BUILD_DIR)" clean
|
||||
|
||||
.PHONY: all
|
||||
|
||||
|
@@ -30,11 +30,11 @@
|
||||
# build_deps 2015 x64 / build_deps 2015 x86
|
||||
#
|
||||
# MAC OS X USAGE:
|
||||
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
|
||||
# Install with homebrew: brew install autoconf automake libtool yasm nasm
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
# LINUX USAGE:
|
||||
# Install compiler cmake autoconf automake libtool yasm nasm tcl
|
||||
# Install compiler, cmake, autoconf, automake, libtool, yasm
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
####################################################################################################
|
||||
@@ -43,7 +43,6 @@ project("BlenderDependencies")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include(ExternalProject)
|
||||
include(cmake/check_software.cmake)
|
||||
include(cmake/options.cmake)
|
||||
include(cmake/versions.cmake)
|
||||
|
||||
@@ -58,6 +57,7 @@ else()
|
||||
endif()
|
||||
|
||||
include(cmake/zlib.cmake)
|
||||
include(cmake/blendthumb.cmake)
|
||||
include(cmake/openal.cmake)
|
||||
include(cmake/png.cmake)
|
||||
include(cmake/jpeg.cmake)
|
||||
@@ -90,14 +90,8 @@ include(cmake/tbb.cmake)
|
||||
include(cmake/openvdb.cmake)
|
||||
include(cmake/python.cmake)
|
||||
include(cmake/python_site_packages.cmake)
|
||||
include(cmake/package_python.cmake)
|
||||
include(cmake/numpy.cmake)
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Rely on PugiXML compiled with OpenImageIO
|
||||
else()
|
||||
include(cmake/pugixml.cmake)
|
||||
endif()
|
||||
include(cmake/openimagedenoise.cmake)
|
||||
|
||||
if(WITH_WEBP)
|
||||
include(cmake/webp.cmake)
|
||||
@@ -120,7 +114,7 @@ endif()
|
||||
|
||||
if(NOT WIN32 OR ENABLE_MINGW64)
|
||||
include(cmake/openjpeg.cmake)
|
||||
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
if(WIN32)
|
||||
include(cmake/zlib_mingw.cmake)
|
||||
endif()
|
||||
@@ -128,7 +122,6 @@ if(NOT WIN32 OR ENABLE_MINGW64)
|
||||
include(cmake/ogg.cmake)
|
||||
include(cmake/vorbis.cmake)
|
||||
include(cmake/theora.cmake)
|
||||
include(cmake/opus.cmake)
|
||||
include(cmake/vpx.cmake)
|
||||
include(cmake/x264.cmake)
|
||||
include(cmake/xvidcore.cmake)
|
||||
@@ -158,9 +151,4 @@ if(UNIX)
|
||||
include(cmake/sqlite.cmake)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
include(cmake/libglu.cmake)
|
||||
include(cmake/mesa.cmake)
|
||||
endif()
|
||||
|
||||
include(cmake/harvest.cmake)
|
||||
|
@@ -40,7 +40,7 @@ set(ALEMBIC_EXTRA_ARGS
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DUSE_STATIC_BOOST=On
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBoost_DEBUG=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
|
67
build_files/build_environment/cmake/blendthumb.cmake
Normal file
67
build_files/build_environment/cmake/blendthumb.cmake
Normal file
@@ -0,0 +1,67 @@
|
||||
# ***** 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.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
if(WIN32)
|
||||
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
|
||||
|
||||
ExternalProject_Add(external_zlib_32
|
||||
URL ${ZLIB_URI}
|
||||
CMAKE_GENERATOR ${GENERATOR_32}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib32
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/zlib32
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_zlib_64
|
||||
URL ${ZLIB_URI}
|
||||
CMAKE_GENERATOR ${GENERATOR_64}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib64
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/zlib64
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_blendthumb_32
|
||||
CMAKE_GENERATOR ${GENERATOR_32}
|
||||
SOURCE_DIR ${THUMB_DIR}
|
||||
PREFIX ${BUILD_DIR}/blendthumb32
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
|
||||
INSTALL_DIR ${LIBDIR}/blendthumb32
|
||||
)
|
||||
add_dependencies(
|
||||
external_blendthumb_32
|
||||
external_zlib_32
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_blendthumb_64
|
||||
CMAKE_GENERATOR ${GENERATOR_64}
|
||||
SOURCE_DIR ${THUMB_DIR}
|
||||
PREFIX ${BUILD_DIR}/blendthumb64
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
|
||||
INSTALL_DIR ${LIBDIR}/blendthumb64
|
||||
)
|
||||
add_dependencies(
|
||||
external_blendthumb_64
|
||||
external_zlib_64
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -23,15 +23,15 @@ set(BLOSC_EXTRA_ARGS
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-DThreads_FOUND=1
|
||||
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
|
||||
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC2.lib
|
||||
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
|
||||
-DDEACTIVATE_SNAPPY=ON
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# Prevent blosc from including it's own local copy of zlib in the object file
|
||||
# and cause linker errors with everybody else.
|
||||
#prevent blosc from including it's own local copy of zlib in the object file
|
||||
#and cause linker errors with everybody else
|
||||
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
|
||||
-DPREFER_EXTERNAL_ZLIB=ON
|
||||
)
|
||||
|
@@ -29,13 +29,23 @@ if(WIN32)
|
||||
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
|
||||
set(BOOST_ADDRESS_MODEL 32)
|
||||
endif()
|
||||
|
||||
set(BOOST_TOOLSET toolset=msvc-14.1)
|
||||
set(BOOST_COMPILER_STRING -vc141)
|
||||
|
||||
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
|
||||
if(MSVC14)
|
||||
set(BOOST_TOOLSET toolset=msvc-14.0)
|
||||
set(BOOST_COMPILER_STRING -vc140)
|
||||
endif()
|
||||
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
|
||||
set(semi_path "${PATCH_DIR}/semi.txt")
|
||||
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
|
||||
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
|
||||
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
|
||||
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
|
||||
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
|
||||
type ${semi_path} >> "${JAM_FILE}"
|
||||
)
|
||||
set(BOOST_BUILD_COMMAND bjam)
|
||||
set(BOOST_BUILD_OPTIONS runtime-link=shared )
|
||||
#--user-config=user-config.jam
|
||||
set(BOOST_BUILD_OPTIONS runtime-link=static )
|
||||
#set(BOOST_WITH_PYTHON --with-python)
|
||||
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
|
||||
@@ -72,6 +82,7 @@ set(BOOST_OPTIONS
|
||||
--with-serialization
|
||||
--with-program_options
|
||||
--with-iostreams
|
||||
${BOOST_WITH_PYTHON}
|
||||
${BOOST_TOOLSET}
|
||||
)
|
||||
|
||||
@@ -89,3 +100,10 @@ ExternalProject_Add(external_boost
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_boost
|
||||
Make_Python_Environment
|
||||
)
|
||||
endif()
|
||||
|
@@ -1,59 +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.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(UNIX)
|
||||
if(APPLE)
|
||||
set(_libtoolize_name glibtoolize)
|
||||
else()
|
||||
set(_libtoolize_name libtoolize)
|
||||
endif()
|
||||
|
||||
set(_required_software
|
||||
autoconf
|
||||
automake
|
||||
${_libtoolize_name}
|
||||
nasm
|
||||
yasm
|
||||
tclsh
|
||||
)
|
||||
|
||||
foreach(_software ${_required_software})
|
||||
find_program(_software_find NAMES ${_software})
|
||||
if(NOT _software_find)
|
||||
set(_software_missing "${_software_missing}${_software} ")
|
||||
endif()
|
||||
unset(_software_find CACHE)
|
||||
endforeach()
|
||||
|
||||
if(_software_missing)
|
||||
message(
|
||||
"\n"
|
||||
"Missing software for building Blender dependencies:\n"
|
||||
" ${_software_missing}\n"
|
||||
"\n"
|
||||
"On Debian and Ubuntu:\n"
|
||||
" apt install autoconf automake libtool yasm nasm tcl\n"
|
||||
"\n"
|
||||
"On macOS (with homebrew):\n"
|
||||
" brew install cmake autoconf automake libtool yasm nasm\n"
|
||||
"\n"
|
||||
"Other platforms:\n"
|
||||
" Install equivalent packages.\n")
|
||||
message(FATAL_ERROR "Install missing software before continuing")
|
||||
endif()
|
||||
endif()
|
@@ -19,8 +19,8 @@
|
||||
set(CLANG_EXTRA_ARGS
|
||||
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
|
||||
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
|
||||
-DLLVM_USE_CRT_RELEASE=MD
|
||||
-DLLVM_USE_CRT_DEBUG=MDd
|
||||
-DLLVM_USE_CRT_RELEASE=MT
|
||||
-DLLVM_USE_CRT_DEBUG=MTd
|
||||
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
|
||||
)
|
||||
|
||||
|
@@ -16,10 +16,10 @@
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
|
||||
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
|
||||
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
|
||||
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
|
||||
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
|
||||
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:)
|
||||
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
|
||||
|
||||
if(WIN32)
|
||||
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
||||
@@ -73,7 +73,6 @@ ExternalProject_Add(external_ffmpeg
|
||||
--disable-libgsm
|
||||
--disable-libspeex
|
||||
--enable-libvpx
|
||||
--enable-libopus
|
||||
--prefix=${LIBDIR}/ffmpeg
|
||||
--enable-libtheora
|
||||
--enable-libvorbis
|
||||
@@ -131,7 +130,6 @@ add_dependencies(
|
||||
external_openjpeg
|
||||
external_xvidcore
|
||||
external_x264
|
||||
external_opus
|
||||
external_vpx
|
||||
external_theora
|
||||
external_vorbis
|
||||
|
@@ -51,8 +51,13 @@ if(BUILD_MODE STREQUAL Release)
|
||||
# tiff
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
|
||||
# BlendThumb
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
|
||||
# hidapi
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
|
||||
# webp, straight up copy
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
|
||||
DEPENDS
|
||||
)
|
||||
endif()
|
||||
@@ -97,6 +102,7 @@ function(harvest from to)
|
||||
FILES_MATCHING PATTERN ${pattern}
|
||||
PATTERN "pkgconfig" EXCLUDE
|
||||
PATTERN "cmake" EXCLUDE
|
||||
PATTERN "clang" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE
|
||||
PATTERN "tests" EXCLUDE)
|
||||
endif()
|
||||
@@ -123,15 +129,8 @@ harvest(jemalloc/lib jemalloc/lib "*.a")
|
||||
harvest(jpg/include jpeg/include "*.h")
|
||||
harvest(jpg/lib jpeg/lib "libjpeg.a")
|
||||
harvest(lame/lib ffmpeg/lib "*.a")
|
||||
harvest(clang/bin llvm/bin "clang-format")
|
||||
harvest(clang/include llvm/include "*")
|
||||
harvest(llvm/include llvm/include "*")
|
||||
harvest(llvm/bin llvm/bin "llvm-config")
|
||||
harvest(llvm/lib llvm/lib "libLLVM*.a")
|
||||
if(APPLE)
|
||||
harvest(openmp/lib openmp/lib "*")
|
||||
harvest(openmp/include openmp/include "*.h")
|
||||
endif()
|
||||
harvest(ogg/lib ffmpeg/lib "*.a")
|
||||
harvest(openal/include openal/include "*.h")
|
||||
if(UNIX AND NOT APPLE)
|
||||
@@ -161,8 +160,6 @@ harvest(openimageio/bin openimageio/bin "maketx")
|
||||
harvest(openimageio/bin openimageio/bin "oiiotool")
|
||||
harvest(openimageio/include openimageio/include "*")
|
||||
harvest(openimageio/lib openimageio/lib "*.a")
|
||||
harvest(openimagedenoise/include openimagedenoise/include "*")
|
||||
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
||||
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
|
||||
harvest(openjpeg/lib openjpeg/lib "*.a")
|
||||
harvest(opensubdiv/include opensubdiv/include "*.h")
|
||||
@@ -190,7 +187,6 @@ harvest(theora/lib ffmpeg/lib "*.a")
|
||||
harvest(tiff/include tiff/include "*.h")
|
||||
harvest(tiff/lib tiff/lib "*.a")
|
||||
harvest(vorbis/lib ffmpeg/lib "*.a")
|
||||
harvest(opus/lib ffmpeg/lib "*.a")
|
||||
harvest(vpx/lib ffmpeg/lib "*.a")
|
||||
harvest(webp/lib ffmpeg/lib "*.a")
|
||||
harvest(x264/lib ffmpeg/lib "*.a")
|
||||
@@ -198,9 +194,4 @@ harvest(xvidcore/lib ffmpeg/lib "*.a")
|
||||
harvest(embree/include embree/include "*.h")
|
||||
harvest(embree/lib embree/lib "*.a")
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
harvest(libglu/lib mesa/lib "*.so*")
|
||||
harvest(mesa/lib mesa/lib "*.so*")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
@@ -24,7 +24,7 @@ ExternalProject_Add(external_lcms
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LCMS_HASH}
|
||||
PREFIX ${BUILD_DIR}/lcms
|
||||
# Patch taken from ocio.
|
||||
#patch taken from ocio
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/lcms
|
||||
|
@@ -1,40 +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.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(LIBGLU_CFLAGS "-static-libgcc")
|
||||
set(LIBGLU_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
|
||||
set(LIBGLU_LDFLAGS "-pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
|
||||
|
||||
set(LIBGLU_EXTRA_FLAGS
|
||||
CFLAGS=${LIBGLU_CFLAGS}
|
||||
CXXFLAGS=${LIBGLU_CXXFLAGS}
|
||||
LDFLAGS=${LIBGLU_LDFLAGS}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_libglu
|
||||
URL ${LIBGLU_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LIBGLU_HASH}
|
||||
PREFIX ${BUILD_DIR}/libglu
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/libglu/src/external_libglu/ &&
|
||||
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/libglu ${LIBGLU_EXTRA_FLAGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/libglu
|
||||
)
|
@@ -17,8 +17,8 @@
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(LLVM_EXTRA_ARGS
|
||||
-DLLVM_USE_CRT_RELEASE=MD
|
||||
-DLLVM_USE_CRT_DEBUG=MDd
|
||||
-DLLVM_USE_CRT_RELEASE=MT
|
||||
-DLLVM_USE_CRT_DEBUG=MTd
|
||||
-DLLVM_INCLUDE_TESTS=OFF
|
||||
-DLLVM_TARGETS_TO_BUILD=X86
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF
|
||||
@@ -47,8 +47,7 @@ if(MSVC)
|
||||
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
|
||||
else()
|
||||
set(LLVM_HARVEST_COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_Step(ll after_install
|
||||
|
@@ -1,54 +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.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(MESA_CFLAGS "-static-libgcc")
|
||||
set(MESA_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
|
||||
set(MESA_LDFLAGS "-L${LIBDIR}/zlib/lib -pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a -l:libz_pic.a")
|
||||
|
||||
set(MESA_EXTRA_FLAGS
|
||||
CFLAGS=${MESA_CFLAGS}
|
||||
CXXFLAGS=${MESA_CXXFLAGS}
|
||||
LDFLAGS=${MESA_LDFLAGS}
|
||||
--enable-glx=gallium-xlib
|
||||
--with-gallium-drivers=swrast
|
||||
--disable-dri
|
||||
--disable-gbm
|
||||
--disable-egl
|
||||
--disable-gles1
|
||||
--disable-gles2
|
||||
--disable-llvm-shared-libs
|
||||
--with-llvm-prefix=${LIBDIR}/llvm
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_mesa
|
||||
URL ${MESA_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${MESA_HASH}
|
||||
PREFIX ${BUILD_DIR}/mesa
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/mesa/src/external_mesa/ &&
|
||||
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/mesa
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_mesa
|
||||
ll
|
||||
)
|
@@ -17,7 +17,6 @@
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(MSVC)
|
||||
message("BIN >${PYTHON_BINARY}<")
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(NUMPY_DIR_POSTFIX -pydebug)
|
||||
set(NUMPY_ARCHIVE_POSTFIX d)
|
||||
@@ -31,6 +30,17 @@ endif()
|
||||
|
||||
set(NUMPY_POSTFIX)
|
||||
|
||||
if(WIN32)
|
||||
set(NUMPY_INSTALL
|
||||
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
|
||||
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
|
||||
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
|
||||
)
|
||||
else()
|
||||
set(NUMPY_INSTALL echo .)
|
||||
set(NUMPY_PATCH echo .)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_numpy
|
||||
URL ${NUMPY_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
@@ -40,10 +50,17 @@ ExternalProject_Add(external_numpy
|
||||
CONFIGURE_COMMAND ""
|
||||
LOG_BUILD 1
|
||||
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
|
||||
INSTALL_COMMAND ""
|
||||
INSTALL_COMMAND ${NUMPY_INSTALL}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
ExternalProject_Add_Step(external_numpy after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_numpy
|
||||
external_python
|
||||
Make_Python_Environment
|
||||
)
|
||||
|
@@ -18,31 +18,18 @@
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(OPENAL_EXTRA_ARGS
|
||||
-DALSOFT_UTILS=OFF
|
||||
-DALSOFT_NO_CONFIG_UTIL=ON
|
||||
-DALSOFT_EXAMPLES=OFF
|
||||
-DALSOFT_TESTS=OFF
|
||||
-DALSOFT_CONFIG=OFF
|
||||
-DALSOFT_HRTF_DEFS=OFF
|
||||
-DALSOFT_INSTALL=ON
|
||||
-DALSOFT_BACKEND_SNDIO=OFF
|
||||
-DALSOFT_UTILS=Off
|
||||
-DALSOFT_NO_CONFIG_UTIL=On
|
||||
-DALSOFT_EXAMPLES=Off
|
||||
-DALSOFT_TESTS=Off
|
||||
-DALSOFT_CONFIG=Off
|
||||
-DALSOFT_HRTF_DEFS=Off
|
||||
-DALSOFT_INSTALL=On
|
||||
-DALSOFT_BACKEND_SNDIO=Off
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
set(OPENAL_EXTRA_ARGS
|
||||
${OPENAL_EXTRA_ARGS}
|
||||
-DLIBTYPE=STATIC
|
||||
)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Ensure we have backends for playback.
|
||||
set(OPENAL_EXTRA_ARGS
|
||||
${OPENAL_EXTRA_ARGS}
|
||||
-DALSOFT_REQUIRE_ALSA=ON
|
||||
-DALSOFT_REQUIRE_OSS=ON
|
||||
-DALSOFT_REQUIRE_PULSEAUDIO=ON
|
||||
)
|
||||
set(OPENAL_EXTRA_ARGS ${OPENAL_EXTRA_ARGS} -DLIBTYPE=STATIC)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_openal
|
||||
|
@@ -50,7 +50,7 @@ if(WIN32)
|
||||
-DUSE_EXTERNAL_LCMS=ON
|
||||
-DINC_1=${LIBDIR}/tinyxml/include
|
||||
-DINC_2=${LIBDIR}/yamlcpp/include
|
||||
# Lie because ocio cmake is demanding boost even though it is not needed.
|
||||
#lie because ocio cmake is demanding boost even though it is not needed
|
||||
-DYAML_CPP_VERSION=0.5.0
|
||||
)
|
||||
else()
|
||||
@@ -95,7 +95,7 @@ if(WIN32)
|
||||
ExternalProject_Add_Step(external_opencolorio after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
@@ -103,7 +103,7 @@ if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_opencolorio after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmdd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
|
@@ -44,7 +44,7 @@ if(WIN32)
|
||||
|
||||
ExternalProject_Add_Step(external_openexr after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
|
||||
# Libs have moved between versions, just duplicate it for now.
|
||||
#libs have moved between versions, just duplicate it for now.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
|
||||
DEPENDEES install
|
||||
|
@@ -1,61 +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.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
|
||||
set(OIDN_EXTRA_ARGS
|
||||
-DWITH_EXAMPLE=OFF
|
||||
-DWITH_TEST=OFF
|
||||
-DTBB_ROOT=${LIBDIR}/tbb
|
||||
-DTBB_STATIC_LIB=ON
|
||||
-DOIDN_STATIC_LIB=ON
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openimagedenoise
|
||||
URL ${OIDN_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OIDN_HASH}
|
||||
PREFIX ${BUILD_DIR}/openimagedenoise
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise < ${PATCH_DIR}/openimagedenoise.diff
|
||||
INSTALL_DIR ${LIBDIR}/openimagedenoise
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openimagedenoise
|
||||
external_tbb
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openimagedenoise after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/include ${HARVEST_TARGET}/openimagedenoise/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_openimagedenoise after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -69,7 +69,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
|
@@ -38,7 +38,7 @@ ExternalProject_Add(external_openjpeg
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg
|
||||
)
|
||||
|
||||
# On windows ffmpeg wants a mingw build, while oiio needs a msvc build.
|
||||
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
|
||||
if(MSVC)
|
||||
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
|
||||
ExternalProject_Add(external_openjpeg_msvc
|
||||
|
@@ -23,8 +23,7 @@ ExternalProject_Add(external_openmp
|
||||
URL_HASH MD5=${OPENMP_HASH}
|
||||
PREFIX ${BUILD_DIR}/openmp
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
|
||||
INSTALL_DIR ${LIBDIR}/openmp
|
||||
INSTALL_DIR ${LIBDIR}/clang
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
|
@@ -41,6 +41,7 @@ if(WIN32)
|
||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
|
||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
|
||||
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
|
||||
)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
@@ -69,6 +70,7 @@ ExternalProject_Add(external_opensubdiv
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENSUBDIV_Hash}
|
||||
PREFIX ${BUILD_DIR}/opensubdiv
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opensubdiv
|
||||
)
|
||||
|
@@ -24,7 +24,7 @@ set(OPENVDB_EXTRA_ARGS
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
@@ -55,7 +55,7 @@ if(WIN32)
|
||||
# needs to link pthreads due to it being a blosc dependency
|
||||
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
|
||||
-DOPENEXR_NAMESPACE_VERSIONING=OFF
|
||||
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
|
||||
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC2.lib
|
||||
)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
|
||||
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
|
||||
|
@@ -62,22 +62,22 @@ if(WIN32)
|
||||
endif()
|
||||
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
else()
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MD ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
else()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MD /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
|
||||
set(PLATFORM_FLAGS)
|
||||
set(PLATFORM_CXX_FLAGS)
|
||||
@@ -97,8 +97,8 @@ if(WIN32)
|
||||
|
||||
set(CONFIGURE_ENV
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${PERL_SHELL} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
call ${PERL_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS=-g &&
|
||||
set LDFLAGS=-Wl,--as-needed -static-libgcc
|
||||
@@ -126,13 +126,14 @@ else()
|
||||
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(OSX_ARCHITECTURES x86_64)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.11)
|
||||
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.9)
|
||||
set(OSX_SDK_VERSION 10.13)
|
||||
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
|
||||
|
||||
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
|
||||
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin15.0.0) # OS X 10.11
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
|
||||
set(PLATFORM_CMAKE_FLAGS
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
|
||||
@@ -190,7 +191,7 @@ set(DEFAULT_CMAKE_FLAGS
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# We need both flavors to build the thumbnail dlls
|
||||
#we need both flavors to build the thumbnail dlls
|
||||
if(MSVC12)
|
||||
set(GENERATOR_32 "Visual Studio 12 2013")
|
||||
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
|
||||
|
@@ -1,35 +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.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
ExternalProject_Add(external_opus
|
||||
URL ${OPUS_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OPUS_HASH}
|
||||
PREFIX ${BUILD_DIR}/opus
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/opus
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_opus PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -40,7 +40,7 @@ set(OSL_EXTRA_ARGS
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBoost_USE_STATIC_RUNTIME=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
@@ -87,7 +87,6 @@ elseif(APPLE)
|
||||
set(OSL_EXTRA_ARGS
|
||||
${OSL_EXTRA_ARGS}
|
||||
-DHIDE_SYMBOLS=OFF
|
||||
-DPUGIXML_HOME=${LIBDIR}/pugixml
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -112,16 +111,8 @@ add_dependencies(
|
||||
external_zlib
|
||||
external_flexbison
|
||||
external_openimageio
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Rely on PugiXML compiled with OpenImageIO
|
||||
else()
|
||||
add_dependencies(
|
||||
external_osl
|
||||
external_pugixml
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
|
@@ -1,58 +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.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(MSVC)
|
||||
set(PYTARGET ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS})
|
||||
set(PYSRC ${LIBDIR}/python/)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
add_custom_command(
|
||||
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND echo packaging python
|
||||
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
|
||||
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
|
||||
)
|
||||
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS}/bin/python${PYTHON_POSTFIX}.exe)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
add_custom_command(
|
||||
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND echo packaging python
|
||||
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
|
||||
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
|
||||
)
|
||||
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe)
|
||||
endif()
|
||||
endif()
|
@@ -36,7 +36,7 @@ add_dependencies(
|
||||
external_zlib
|
||||
)
|
||||
|
||||
if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_png after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
|
||||
DEPENDEES install
|
||||
|
@@ -17,28 +17,30 @@
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(WIN32)
|
||||
set(PTHREAD_XCFLAGS /MD)
|
||||
|
||||
if(MSVC14) # vs2015 has timespec
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H /D_TIMESPEC_DEFINED ")
|
||||
else() # everything before doesn't
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H ")
|
||||
endif()
|
||||
|
||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
|
||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XCFLAGS=${PTHREAD_XCFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
|
||||
|
||||
ExternalProject_Add(external_pthreads
|
||||
URL ${PTHREADS_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PTHREADS_HASH}
|
||||
URL_HASH SHA512=${PTHREADS_SHA512}
|
||||
PREFIX ${BUILD_DIR}/pthreads
|
||||
CONFIGURE_COMMAND echo .
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
|
||||
BUILD_COMMAND ${PTHREADS_BUILD}
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h
|
||||
INSTALL_DIR ${LIBDIR}/pthreads
|
||||
)
|
||||
|
||||
|
@@ -19,13 +19,17 @@
|
||||
set(PYTHON_POSTFIX)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(PYTHON_POSTFIX _d)
|
||||
set(PYTHON_EXTRA_INSTLAL_FLAGS -d)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(SSL_POSTFIX -x64)
|
||||
else()
|
||||
set(SSL_POSTFIX)
|
||||
endif()
|
||||
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
|
||||
|
||||
macro(cmake_to_dos_path MsysPath ResultingPath)
|
||||
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
|
||||
endmacro()
|
||||
@@ -36,16 +40,31 @@ if(WIN32)
|
||||
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
|
||||
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
|
||||
|
||||
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
|
||||
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
|
||||
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
|
||||
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
|
||||
|
||||
ExternalProject_Add(external_python
|
||||
URL ${PYTHON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PYTHON_HASH}
|
||||
PREFIX ${BUILD_DIR}/python
|
||||
PATCH_COMMAND
|
||||
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
|
||||
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
|
||||
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
|
||||
)
|
||||
|
||||
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
|
||||
message("POutput = ${PYTHON_OUTPUTDIR}")
|
||||
else()
|
||||
if(APPLE)
|
||||
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
|
||||
@@ -88,6 +107,64 @@ else()
|
||||
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/python)
|
||||
|
||||
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_custom_command(
|
||||
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
|
||||
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
|
||||
#xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
|
||||
#leaving it commented out, so I won't get confused again with the next update.
|
||||
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
|
||||
)
|
||||
|
||||
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
|
||||
|
||||
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
|
||||
)
|
||||
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
|
@@ -15,16 +15,27 @@
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
if(WIN32)
|
||||
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
|
||||
)
|
||||
else()
|
||||
set(HARVEST_CMD echo .)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_python_site_packages
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
PREFIX ${BUILD_DIR}/site_packages
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_python_site_packages
|
||||
external_python
|
||||
Make_Python_Environment
|
||||
)
|
||||
|
@@ -21,7 +21,7 @@ set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR
|
||||
|
||||
if(WIN32)
|
||||
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||
#shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(SNDFILE_OPTIONS --disable-static --enable-shared )
|
||||
else()
|
||||
set(SNDFILE_OPTIONS --enable-static --disable-shared )
|
||||
|
@@ -15,21 +15,13 @@
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
if(WIN32)
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=On
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=On
|
||||
-DTBB_BUILD_STATIC=On
|
||||
)
|
||||
else()
|
||||
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=Off
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
-DTBB_BUILD_TBBMALLOC=Off
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=Off
|
||||
-DTBB_BUILD_STATIC=On
|
||||
)
|
||||
endif()
|
||||
|
||||
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
|
||||
ExternalProject_Add(external_tbb
|
||||
@@ -47,10 +39,6 @@ if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_tbb after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
@@ -58,9 +46,6 @@ if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_tbb after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -16,26 +16,20 @@
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(UNIX)
|
||||
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV} && export HAVE_PDFLATEX=no)
|
||||
else()
|
||||
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_theora
|
||||
URL ${THEORA_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${THEORA_HASH}
|
||||
PREFIX ${BUILD_DIR}/theora
|
||||
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
--with-vorbis=${LIBDIR}/vorbis
|
||||
--disable-examples
|
||||
BUILD_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
|
||||
|
@@ -39,7 +39,7 @@ add_dependencies(
|
||||
external_zlib
|
||||
)
|
||||
|
||||
if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_tiff after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
|
||||
DEPENDEES install
|
||||
|
@@ -41,9 +41,9 @@ set(BLOSC_VERSION 1.14.4)
|
||||
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
|
||||
set(BLOSC_HASH e80dfc71e4cba03b8d01ed0876547ffe)
|
||||
|
||||
set(PTHREADS_VERSION 3.0.0)
|
||||
set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
|
||||
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
|
||||
set(PTHREADS_VERSION 2-9-1)
|
||||
set(PTHREADS_URI ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PTHREADS_VERSION}-release.tar.gz)
|
||||
set(PTHREADS_SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551)
|
||||
|
||||
set(ILMBASE_VERSION 2.3.0)
|
||||
if (WIN32)
|
||||
@@ -71,7 +71,7 @@ else()
|
||||
endif()
|
||||
|
||||
set(FREETYPE_VERSION 2.9.1)
|
||||
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
|
||||
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
|
||||
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
|
||||
|
||||
set(GLEW_VERSION 1.13.0)
|
||||
@@ -86,11 +86,11 @@ set(HDF5_VERSION 1.8.17)
|
||||
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
|
||||
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
|
||||
|
||||
set(ALEMBIC_VERSION 1.7.12)
|
||||
set(ALEMBIC_VERSION 1.7.8)
|
||||
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
|
||||
set(ALEMBIC_MD5 e2b3777f23c5c09481a008cc6f0f8a40)
|
||||
set(ALEMBIC_MD5 d095c2feb5e183b824904db7b63c1d30)
|
||||
|
||||
# hash is for 3.1.2
|
||||
## hash is for 3.1.2
|
||||
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
|
||||
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
|
||||
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
|
||||
@@ -105,17 +105,17 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
|
||||
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
|
||||
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
|
||||
|
||||
set(OPENSUBDIV_VERSION v3_4_0_RC2)
|
||||
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
|
||||
set(OPENSUBDIV_VERSION v3_3_3)
|
||||
set(OPENSUBDIV_Hash 29c79dc01ef616aab02670bed5544ddd)
|
||||
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
|
||||
|
||||
set(SDL_VERSION 2.0.8)
|
||||
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
|
||||
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
|
||||
|
||||
set(OPENCOLLADA_VERSION v1.6.68)
|
||||
set(OPENCOLLADA_VERSION v1.6.63)
|
||||
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
|
||||
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
|
||||
set(OPENCOLLADA_HASH e937c3897b86fc0da53cde97257f5156)
|
||||
|
||||
set(OPENCOLORIO_VERSION 1.1.0)
|
||||
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
|
||||
@@ -143,30 +143,30 @@ set(OSL_VERSION 1.9.9)
|
||||
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 44ad511e424965a10fce051a053b0605)
|
||||
|
||||
set(PYTHON_VERSION 3.7.4)
|
||||
set(PYTHON_VERSION 3.7.0)
|
||||
set(PYTHON_SHORT_VERSION 3.7)
|
||||
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
|
||||
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
|
||||
set(PYTHON_HASH eb8c2a6b1447d50813c02714af4681f3)
|
||||
|
||||
set(TBB_VERSION 2019_U9)
|
||||
set(TBB_VERSION 2018_U5)
|
||||
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
|
||||
set(TBB_HASH 584edbec127c508f2cd5b6e79ad200fc)
|
||||
set(TBB_HASH ff3ae09f8c23892fbc3008c39f78288f)
|
||||
|
||||
set(OPENVDB_VERSION 5.1.0)
|
||||
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
||||
set(OPENVDB_HASH 5310101f874dcfd2165f9cee68c22624)
|
||||
|
||||
set(IDNA_VERSION 2.8)
|
||||
set(IDNA_VERSION 2.7)
|
||||
set(CHARDET_VERSION 3.0.4)
|
||||
set(URLLIB3_VERSION 1.25.3)
|
||||
set(CERTIFI_VERSION 2019.6.16)
|
||||
set(REQUESTS_VERSION 2.22.0)
|
||||
set(URLLIB3_VERSION 1.23)
|
||||
set(CERTIFI_VERSION 2018.8.13)
|
||||
set(REQUESTS_VERSION 2.19.1)
|
||||
|
||||
set(NUMPY_VERSION v1.17.0)
|
||||
set(NUMPY_SHORT_VERSION 1.17)
|
||||
set(NUMPY_URI https://files.pythonhosted.org/packages/da/32/1b8f2bb5fb50e4db68543eb85ce37b9fa6660cd05b58bddfafafa7ed62da/numpy-1.17.0.zip)
|
||||
set(NUMPY_HASH aed49b31bcb44ec73b8155be78566135)
|
||||
set(NUMPY_VERSION v1.15.0)
|
||||
set(NUMPY_SHORT_VERSION 1.15)
|
||||
set(NUMPY_URI https://files.pythonhosted.org/packages/3a/20/c81632328b1a4e1db65f45c0a1350a9c5341fd4bbb8ea66cdd98da56fe2e/numpy-1.15.0.zip)
|
||||
set(NUMPY_HASH 20e13185089011116a98e11c9bf8aa07)
|
||||
|
||||
set(LAME_VERSION 3.100)
|
||||
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
|
||||
@@ -192,10 +192,6 @@ set(VPX_VERSION 1.7.0)
|
||||
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
|
||||
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
|
||||
|
||||
set(OPUS_VERSION 1.3.1)
|
||||
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
|
||||
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
|
||||
|
||||
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
|
||||
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
|
||||
|
||||
@@ -203,7 +199,7 @@ set(XVIDCORE_VERSION 1.3.5)
|
||||
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
|
||||
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
|
||||
|
||||
# This has to be in sync with the version in blenders /extern folder.
|
||||
#this has to be in sync with the version in blenders /extern folder
|
||||
set(OPENJPEG_VERSION 2.3.0)
|
||||
set(OPENJPEG_SHORT_VERSION 2.3)
|
||||
# Use slightly newer commit after release which includes a cmake fix
|
||||
@@ -255,7 +251,7 @@ set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALL
|
||||
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
|
||||
|
||||
set(XML2_VERSION 2.9.4)
|
||||
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
|
||||
set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
|
||||
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
|
||||
|
||||
set(TINYXML_VERSION 2_6_2)
|
||||
@@ -263,9 +259,9 @@ set(TINYXML_VERSION_DOTS 2.6.2)
|
||||
set(TINYXML_URI https://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/${TINYXML_VERSION_DOTS}/tinyxml_${TINYXML_VERSION}.tar.gz)
|
||||
set(TINYXML_HASH c1b864c96804a10526540c664ade67f0)
|
||||
|
||||
set(YAMLCPP_VERSION 0.6.3)
|
||||
set(YAMLCPP_VERSION 0.6.2)
|
||||
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
|
||||
set(YAMLCPP_HASH b45bf1089a382e81f6b661062c10d0c2)
|
||||
set(YAMLCPP_HASH 5b943e9af0060d0811148b037449ef82)
|
||||
|
||||
set(LCMS_VERSION 2.9)
|
||||
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
|
||||
@@ -288,7 +284,7 @@ set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERS
|
||||
set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7)
|
||||
|
||||
set(FFI_VERSION 3.2.1)
|
||||
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
|
||||
set(FFI_URI ftp://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
|
||||
set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37)
|
||||
|
||||
set(LZMA_VERSION 5.2.4)
|
||||
@@ -306,15 +302,3 @@ set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
|
||||
set(EMBREE_VERSION 3.2.4)
|
||||
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
|
||||
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
|
||||
|
||||
set(OIDN_VERSION 1.0.0)
|
||||
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.zip)
|
||||
set(OIDN_HASH 19fe67b0164e8f020ac8a4f520defe60)
|
||||
|
||||
set(LIBGLU_VERSION 9.0.1)
|
||||
set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz)
|
||||
set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
|
||||
|
||||
set(MESA_VERSION 18.3.1)
|
||||
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa//mesa-${MESA_VERSION}.tar.xz)
|
||||
set(MESA_HASH d60828056d77bfdbae0970f9b15fb1be)
|
||||
|
@@ -49,8 +49,6 @@ ExternalProject_Add(external_vpx
|
||||
--disable-avx2
|
||||
--disable-unit-tests
|
||||
--disable-examples
|
||||
--enable-vp8
|
||||
--enable-vp9
|
||||
${VPX_EXTRA_FLAGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
|
||||
|
@@ -39,12 +39,3 @@ ExternalProject_Add(external_webp
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/webp
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_webp after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -21,7 +21,7 @@ set(YAMLCPP_EXTRA_ARGS
|
||||
-DYAML_CPP_BUILD_TESTS=OFF
|
||||
-DYAML_CPP_BUILD_TOOLS=OFF
|
||||
-DYAML_CPP_BUILD_CONTRIB=OFF
|
||||
-DYAML_MSVC_SHARED_RT=ON
|
||||
-DMSVC_SHARED_RT=OFF
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_yamlcpp
|
||||
|
@@ -40,8 +40,16 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_zlib after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if (UNIX)
|
||||
ExternalProject_Add_Step(external_zlib after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -26,17 +26,17 @@ ARGS=$( \
|
||||
getopt \
|
||||
-o s:i:t:h \
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
||||
with-all,with-opencollada,with-jack,with-embree,with-oidn,\
|
||||
with-all,with-opencollada,with-jack,with-embree,\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
|
||||
force-all,force-python,force-numpy,force-boost,\
|
||||
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,\
|
||||
build-all,build-python,build-numpy,build-boost,\
|
||||
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,\
|
||||
skip-python,skip-numpy,skip-boost,\
|
||||
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn \
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree \
|
||||
-- "$@" \
|
||||
)
|
||||
|
||||
@@ -57,7 +57,6 @@ WITH_ALL=false
|
||||
# Do not yet enable opencollada or embree, use --with-opencollada/--with-embree (or --with-all) option to try it.
|
||||
WITH_OPENCOLLADA=false
|
||||
WITH_EMBREE=false
|
||||
WITH_OIDN=false
|
||||
|
||||
THREADS=$(nproc)
|
||||
|
||||
@@ -70,7 +69,6 @@ Number of threads for building: \$THREADS (automatically detected, use --threads
|
||||
Full install: \$WITH_ALL (use --with-all option to enable it).
|
||||
Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
|
||||
Building Embree: \$WITH_EMBREE (use --with-embree option to enable it).
|
||||
Building OpenImageDenoise: \$WITH_OIDN (use --with-oidn option to enable it).
|
||||
|
||||
Example:
|
||||
Full install without OpenCOLLADA: --with-all --skip-opencollada
|
||||
@@ -120,9 +118,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--with-embree
|
||||
Build and install the Embree libraries.
|
||||
|
||||
--with-oidn
|
||||
Build and install the OpenImageDenoise libraries.
|
||||
|
||||
--with-jack
|
||||
Install the jack libraries.
|
||||
|
||||
@@ -190,9 +185,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--build-embree
|
||||
Force the build of Embree.
|
||||
|
||||
--build-oidn
|
||||
Force the build of OpenImageDenoise.
|
||||
|
||||
--build-ffmpeg
|
||||
Force the build of FFMpeg.
|
||||
|
||||
@@ -248,9 +240,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--force-embree
|
||||
Force the rebuild of Embree.
|
||||
|
||||
--force-oidn
|
||||
Force the rebuild of OpenImageDenoise.
|
||||
|
||||
--force-ffmpeg
|
||||
Force the rebuild of FFMpeg.
|
||||
|
||||
@@ -299,9 +288,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--skip-Embree
|
||||
Unconditionally skip Embree installation/building.
|
||||
|
||||
--skip-oidn
|
||||
Unconditionally skip OpenImageDenoise installation/building.
|
||||
|
||||
--skip-ffmpeg
|
||||
Unconditionally skip FFMpeg installation/building.\""
|
||||
|
||||
@@ -315,15 +301,13 @@ NO_BUILD=false
|
||||
NO_CONFIRM=false
|
||||
USE_CXX11=true
|
||||
|
||||
CLANG_FORMAT_VERSION_MIN="6.0"
|
||||
|
||||
PYTHON_VERSION="3.7.4"
|
||||
PYTHON_VERSION="3.7.0"
|
||||
PYTHON_VERSION_MIN="3.7"
|
||||
PYTHON_FORCE_BUILD=false
|
||||
PYTHON_FORCE_REBUILD=false
|
||||
PYTHON_SKIP=false
|
||||
|
||||
NUMPY_VERSION="1.17.0"
|
||||
NUMPY_VERSION="1.15.0"
|
||||
NUMPY_VERSION_MIN="1.8"
|
||||
NUMPY_FORCE_BUILD=false
|
||||
NUMPY_FORCE_REBUILD=false
|
||||
@@ -372,7 +356,7 @@ OSL_FORCE_REBUILD=false
|
||||
OSL_SKIP=false
|
||||
|
||||
# OpenSubdiv needs to be compiled for now
|
||||
OSD_VERSION="3.4.0_RC2"
|
||||
OSD_VERSION="3.3.3"
|
||||
OSD_VERSION_MIN=$OSD_VERSION
|
||||
OSD_FORCE_BUILD=false
|
||||
OSD_FORCE_REBUILD=false
|
||||
@@ -388,27 +372,23 @@ OPENVDB_FORCE_REBUILD=false
|
||||
OPENVDB_SKIP=false
|
||||
|
||||
# Alembic needs to be compiled for now
|
||||
ALEMBIC_VERSION="1.7.12"
|
||||
ALEMBIC_VERSION="1.7.8"
|
||||
ALEMBIC_VERSION_MIN=$ALEMBIC_VERSION
|
||||
ALEMBIC_FORCE_BUILD=false
|
||||
ALEMBIC_FORCE_REBUILD=false
|
||||
ALEMBIC_SKIP=false
|
||||
|
||||
OPENCOLLADA_VERSION="1.6.68"
|
||||
OPENCOLLADA_VERSION="1.6.63"
|
||||
OPENCOLLADA_FORCE_BUILD=false
|
||||
OPENCOLLADA_FORCE_REBUILD=false
|
||||
OPENCOLLADA_SKIP=false
|
||||
|
||||
|
||||
EMBREE_VERSION="3.2.4"
|
||||
EMBREE_FORCE_BUILD=false
|
||||
EMBREE_FORCE_REBUILD=false
|
||||
EMBREE_SKIP=false
|
||||
|
||||
OIDN_VERSION="1.0.0"
|
||||
OIDN_FORCE_BUILD=false
|
||||
OIDN_FORCE_REBUILD=false
|
||||
OIDN_SKIP=false
|
||||
|
||||
FFMPEG_VERSION="4.0.2"
|
||||
FFMPEG_VERSION_MIN="2.8.4"
|
||||
FFMPEG_FORCE_BUILD=false
|
||||
@@ -431,9 +411,6 @@ X264_VERSION_MIN=0.118
|
||||
VPX_USE=false
|
||||
VPX_VERSION_MIN=0.9.7
|
||||
VPX_DEV=""
|
||||
OPUS_USE=false
|
||||
OPUS_VERSION_MIN=1.1.1
|
||||
OPUS_DEV=""
|
||||
MP3LAME_USE=false
|
||||
MP3LAME_DEV=""
|
||||
OPENJPEG_USE=false
|
||||
@@ -548,9 +525,6 @@ while true; do
|
||||
--with-embree)
|
||||
WITH_EMBREE=true; shift; continue
|
||||
;;
|
||||
--with-oidn)
|
||||
WITH_OIDN=true; shift; continue
|
||||
;;
|
||||
--with-jack)
|
||||
WITH_JACK=true; shift; continue;
|
||||
;;
|
||||
@@ -597,7 +571,6 @@ while true; do
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
OPENCOLLADA_FORCE_BUILD=true
|
||||
EMBREE_FORCE_BUILD=true
|
||||
OIDN_FORCE_BUILD=true
|
||||
FFMPEG_FORCE_BUILD=true
|
||||
ALEMBIC_FORCE_BUILD=true
|
||||
shift; continue
|
||||
@@ -642,9 +615,6 @@ while true; do
|
||||
--build-embree)
|
||||
EMBREE_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-oidn)
|
||||
OIDN_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-ffmpeg)
|
||||
FFMPEG_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
@@ -664,7 +634,6 @@ while true; do
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
OPENCOLLADA_FORCE_REBUILD=true
|
||||
EMBREE_FORCE_REBUILD=true
|
||||
OIDN_FORCE_REBUILD=true
|
||||
FFMPEG_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
shift; continue
|
||||
@@ -707,9 +676,6 @@ while true; do
|
||||
--force-embree)
|
||||
EMBREE_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-oidn)
|
||||
OIDN_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-ffmpeg)
|
||||
FFMPEG_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
@@ -752,9 +718,6 @@ while true; do
|
||||
--skip-embree)
|
||||
EMBREE_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-oidn)
|
||||
OIDN_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-ffmpeg)
|
||||
FFMPEG_SKIP=true; shift; continue
|
||||
;;
|
||||
@@ -782,9 +745,6 @@ fi
|
||||
if [ "$WITH_ALL" = true -a "$EMBREE_SKIP" = false ]; then
|
||||
WITH_EMBREE=true
|
||||
fi
|
||||
if [ "$WITH_ALL" = true -a "$OIDN_SKIP" = false ]; then
|
||||
WITH_OIDN=true
|
||||
fi
|
||||
if [ "$WITH_ALL" = true ]; then
|
||||
WITH_JACK=true
|
||||
fi
|
||||
@@ -879,11 +839,6 @@ EMBREE_SOURCE=( "https://github.com/embree/embree/archive/v${EMBREE_VERSION}.tar
|
||||
#~ EMBREE_REPO_UID="4a12bfed63c90e85b6eab98b8cdd8dd2a3ba5809"
|
||||
#~ EMBREE_REPO_BRANCH="master"
|
||||
|
||||
OIDN_USE_REPO=false
|
||||
OIDN_SOURCE=( "https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz" )
|
||||
#~ OIDN_SOURCE_REPO=( "https://github.com/OpenImageDenoise/oidn.git" )
|
||||
#~ OIDN_REPO_UID="dabfd9c80101edae9d25a710160d12d6d963c591"
|
||||
#~ OIDN_REPO_BRANCH="master"
|
||||
|
||||
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
||||
|
||||
@@ -926,7 +881,6 @@ You may also want to build them yourself (optional ones are [between brackets]):
|
||||
* [OpenVDB $OPENVDB_VERSION_MIN] (from $OPENVDB_SOURCE), [Blosc $OPENVDB_BLOSC_VERSION] (from $OPENVDB_BLOSC_SOURCE).
|
||||
* [OpenCollada $OPENCOLLADA_VERSION] (from $OPENCOLLADA_SOURCE).
|
||||
* [Embree $EMBREE_VERSION] (from $EMBREE_SOURCE).
|
||||
* [OpenImageDenoise $OIDN_VERSION] (from $OIDN_SOURCE).
|
||||
* [Alembic $ALEMBIC_VERSION] (from $ALEMBIC_SOURCE).\""
|
||||
|
||||
if [ "$DO_SHOW_DEPS" = true ]; then
|
||||
@@ -1110,14 +1064,13 @@ _create_inst_shortcut() {
|
||||
# ldconfig
|
||||
run_ldconfig() {
|
||||
_lib_path="$INST/$1/lib"
|
||||
_lib64_path="$INST/$1/lib64"
|
||||
_ldconf_path="/etc/ld.so.conf.d/$1.conf"
|
||||
PRINT ""
|
||||
if [ ! $SUDO ]; then
|
||||
WARNING "--no-sudo enabled, impossible to run ldconfig for $1, you'll have to do it yourself..."
|
||||
else
|
||||
INFO "Running ldconfig for $1..."
|
||||
$SUDO sh -c "/bin/echo -e \"$_lib_path\n$_lib64_path\" > $_ldconf_path"
|
||||
$SUDO sh -c "echo \"$_lib_path\" > $_ldconf_path"
|
||||
$SUDO /sbin/ldconfig # XXX OpenSuse does not include sbin in command path with sudo!!!
|
||||
fi
|
||||
PRINT ""
|
||||
@@ -1978,8 +1931,7 @@ compile_OSL() {
|
||||
cmake_d="$cmake_d -D OSL_BUILD_PLUGINS=OFF"
|
||||
cmake_d="$cmake_d -D OSL_BUILD_TESTS=OFF"
|
||||
cmake_d="$cmake_d -D USE_SIMD=sse2"
|
||||
cmake_d="$cmake_d -D USE_LLVM_BITCODE=OFF"
|
||||
cmake_d="$cmake_d -D USE_PARTIO=OFF"
|
||||
cmake_d="$cmake_d -D OSL_BUILD_CPP11=1"
|
||||
|
||||
#~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
|
||||
|
||||
@@ -2599,98 +2551,6 @@ compile_Embree() {
|
||||
fi
|
||||
}
|
||||
|
||||
#### Build OpenImageDenoise ####
|
||||
_init_oidn() {
|
||||
_src=$SRC/oidn-$OIDN_VERSION
|
||||
_git=true
|
||||
_inst=$INST/oidn-$OIDN_VERSION
|
||||
_inst_shortcut=$INST/oidn
|
||||
}
|
||||
|
||||
clean_oidn() {
|
||||
_init_oidn
|
||||
_clean
|
||||
}
|
||||
|
||||
compile_OIDN() {
|
||||
if [ "$NO_BUILD" = true ]; then
|
||||
WARNING "--no-build enabled, OpenImageDenoise will not be compiled!"
|
||||
return
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled results!
|
||||
oidn_magic=9
|
||||
_init_oidn
|
||||
|
||||
# Clean install if needed!
|
||||
magic_compile_check oidn-$OIDN_VERSION $oidn_magic
|
||||
if [ $? -eq 1 -o "$OIDN_FORCE_REBUILD" = true ]; then
|
||||
clean_oidn
|
||||
fi
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
INFO "Building OpenImageDenoise-$OIDN_VERSION"
|
||||
|
||||
prepare_opt
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
if [ "OIDN_USE_REPO" = true ]; then
|
||||
git clone $OIDN_SOURCE_REPO $_src
|
||||
else
|
||||
download OIDN_SOURCE[@] "$_src.tar.gz"
|
||||
INFO "Unpacking OpenImageDenoise-$OIDN_VERSION"
|
||||
tar -C $SRC -xf $_src.tar.gz
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
if [ "$OIDN_USE_REPO" = true ]; then
|
||||
git pull origin $OIDN_REPO_BRANCH
|
||||
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OIDN_REPO_UID
|
||||
git reset --hard
|
||||
fi
|
||||
|
||||
# Always refresh the whole build!
|
||||
if [ -d build ]; then
|
||||
rm -rf build
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D WITH_EXAMPLE=OFF"
|
||||
cmake_d="$cmake_d -D WITH_TEST=OFF"
|
||||
cmake_d="$cmake_d -D OIDN_STATIC_LIB=ON"
|
||||
|
||||
cmake $cmake_d ../
|
||||
|
||||
make -j$THREADS && make install
|
||||
make clean
|
||||
|
||||
if [ -d $_inst ]; then
|
||||
_create_inst_shortcut
|
||||
else
|
||||
ERROR "OpenImageDenoise-$OIDN_VERSION failed to compile, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
magic_compile_set oidn-$OIDN_VERSION $oidn_magic
|
||||
|
||||
cd $CWD
|
||||
INFO "Done compiling OpenImageDenoise-$OIDN_VERSION!"
|
||||
else
|
||||
INFO "Own OpenImageDenoise-$OIDN_VERSION is up to date, nothing to do!"
|
||||
INFO "If you want to force rebuild of this lib, use the --force-oidn option."
|
||||
fi
|
||||
|
||||
run_ldconfig "oidn"
|
||||
}
|
||||
|
||||
#### Build FFMPEG ####
|
||||
_init_ffmpeg() {
|
||||
_src=$SRC/ffmpeg-$FFMPEG_VERSION
|
||||
@@ -2757,10 +2617,6 @@ compile_FFmpeg() {
|
||||
extra="$extra --enable-libvpx"
|
||||
fi
|
||||
|
||||
if [ "$OPUS_USE" = true ]; then
|
||||
extra="$extra --enable-libopus"
|
||||
fi
|
||||
|
||||
if [ "$MP3LAME_USE" = true ]; then
|
||||
extra="$extra --enable-libmp3lame"
|
||||
fi
|
||||
@@ -2772,7 +2628,7 @@ compile_FFmpeg() {
|
||||
./configure --cc="gcc -Wl,--as-needed" \
|
||||
--extra-ldflags="-pthread -static-libgcc" \
|
||||
--prefix=$_inst --enable-static \
|
||||
--disable-ffplay --disable-doc \
|
||||
--disable-ffplay --disable-ffserver --disable-doc \
|
||||
--enable-gray \
|
||||
--enable-avfilter --disable-vdpau \
|
||||
--disable-bzlib --disable-libgsm --disable-libspeex \
|
||||
@@ -2932,17 +2788,6 @@ install_DEB() {
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
CLANG_FORMAT="clang-format"
|
||||
check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
_packages="$_packages $CLANG_FORMAT"
|
||||
else
|
||||
PRINT ""
|
||||
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
if [ "$WITH_JACK" = true ]; then
|
||||
_packages="$_packages libspnav-dev"
|
||||
# Only install jack if jack2 is not already installed!
|
||||
@@ -2998,14 +2843,6 @@ install_DEB() {
|
||||
install_packages_DEB $VPX_DEV
|
||||
VPX_USE=true
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
OPUS_DEV="libopus-dev"
|
||||
check_package_version_ge_DEB $OPUS_DEV $OPUS_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_DEB $OPUS_DEV
|
||||
OPUS_USE=true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check cmake/glew versions and disable features for older distros.
|
||||
@@ -3299,24 +3136,6 @@ install_DEB() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -3469,7 +3288,7 @@ install_RPM() {
|
||||
$SUDO dnf -y update
|
||||
|
||||
elif [ "$RPM" = "RHEL" ]; then
|
||||
if [ "`grep '[^.]6\.' /etc/redhat-release`" ]; then
|
||||
if [ "`grep '6\.' /etc/redhat-release`" ]; then
|
||||
ERROR "Building with GCC 4.4 is not supported!"
|
||||
exit 1
|
||||
else
|
||||
@@ -3616,29 +3435,10 @@ install_RPM() {
|
||||
install_packages_RPM $VPX_DEV
|
||||
VPX_USE=true
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
install_packages_RPM libspnav-devel
|
||||
|
||||
PRINT ""
|
||||
OPUS_DEV="libopus-devel"
|
||||
check_package_version_ge_RPM $OPUS_DEV $OPUS_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_RPM $OPUS_DEV
|
||||
OPUS_USE=true
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
CLANG_FORMAT="clang" # Yeah, on fedora/suse clang-format is part of main clang package...
|
||||
check_package_version_ge_RPM $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_RPM $CLANG_FORMAT
|
||||
else
|
||||
PRINT ""
|
||||
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
_do_compile_python=false
|
||||
@@ -3900,24 +3700,6 @@ install_RPM() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -4101,26 +3883,6 @@ install_ARCH() {
|
||||
install_packages_ARCH $VPX_DEV
|
||||
VPX_USE=true
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
OPUS_DEV="opus"
|
||||
check_package_version_ge_ARCH $OPUS_DEV $OPUS_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_ARCH $OPUS_DEV
|
||||
OPUS_USE=true
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
PRINT ""
|
||||
CLANG_FORMAT="clang" # Yeah, on arch clang-format is part of main clang package...
|
||||
check_package_version_ge_ARCH $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_ARCH $CLANG_FORMAT
|
||||
else
|
||||
PRINT ""
|
||||
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
|
||||
@@ -4390,24 +4152,6 @@ install_ARCH() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -4594,24 +4338,6 @@ install_OTHER() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -4665,10 +4391,6 @@ print_info_ffmpeglink() {
|
||||
_packages="$_packages $VPX_DEV"
|
||||
fi
|
||||
|
||||
if [ "$OPUS_USE" = true ]; then
|
||||
_packages="$_packages $OPUS_DEV"
|
||||
fi
|
||||
|
||||
if [ "$MP3LAME_USE" = true ]; then
|
||||
_packages="$_packages $MP3LAME_DEV"
|
||||
fi
|
||||
@@ -4802,44 +4524,18 @@ print_info() {
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
if [ -d $INST/blosc ]; then
|
||||
_1="-D BLOSC_ROOT_DIR=$INST/blosc"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OPENCOLLADA" = true ]; then
|
||||
_1="-D WITH_OPENCOLLADA=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
if [ -d $INST/opencollada ]; then
|
||||
_1="-D OPENCOLLADA_ROOT_DIR=$INST/opencollada"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_EMBREE" = true ]; then
|
||||
_1="-D WITH_CYCLES_EMBREE=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
if [ -d $INST/embree ]; then
|
||||
_1="-D EMBREE_ROOT_DIR=$INST/embree"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_1="-D WITH_OPENIMAGEDENOISE=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
if [ -d $INST/oidn ]; then
|
||||
_1="-D OPENIMAGEDENOISE_ROOT_DIR=$INST/oidn"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_JACK" = true ]; then
|
||||
|
@@ -43,34 +43,3 @@ index 1f9a3ee..d151e9a 100644
|
||||
return isnan( value );
|
||||
#else
|
||||
return std::isnan(value);
|
||||
diff --git a/DAEValidator/CMakeLists.txt b/DAEValidator/CMakeLists.txt
|
||||
index 03ad540f..f7d05cfb 100644
|
||||
--- a/DAEValidator/CMakeLists.txt
|
||||
+++ b/DAEValidator/CMakeLists.txt
|
||||
@@ -98,7 +98,7 @@ if (WIN32)
|
||||
# C4710: 'function' : function not inlined
|
||||
# C4711: function 'function' selected for inline expansion
|
||||
# C4820: 'bytes' bytes padding added after construct 'member_name'
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Wall /WX /wd4505 /wd4514 /wd4592 /wd4710 /wd4711 /wd4820")
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Wall /wd4505 /wd4514 /wd4592 /wd4710 /wd4711 /wd4820")
|
||||
else ()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
|
||||
endif ()
|
||||
diff --git a/DAEValidator/library/src/ArgumentParser.cpp b/DAEValidator/library/src/ArgumentParser.cpp
|
||||
index 897e4dcf..98a69ff1 100644
|
||||
--- a/DAEValidator/library/src/ArgumentParser.cpp
|
||||
+++ b/DAEValidator/library/src/ArgumentParser.cpp
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
-#define NOEXCEPT _NOEXCEPT
|
||||
-#else
|
||||
+#ifndef _NOEXCEPT
|
||||
#define NOEXCEPT noexcept
|
||||
+#else
|
||||
+#define NOEXCEPT _NOEXCEPT
|
||||
#endif
|
||||
|
||||
namespace opencollada
|
||||
|
@@ -1,119 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 70ec895..e616b63 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -178,7 +178,9 @@ set_property(TARGET ${PROJECT_NAME} PROPERTY SOVERSION "0")
|
||||
## Open Image Denoise examples
|
||||
## ----------------------------------------------------------------------------
|
||||
|
||||
-add_subdirectory(examples)
|
||||
+if(WITH_EXAMPLE)
|
||||
+ add_subdirectory(examples)
|
||||
+endif()
|
||||
|
||||
## ----------------------------------------------------------------------------
|
||||
## Open Image Denoise install and packaging
|
||||
Submodule mkl-dnn contains modified content
|
||||
diff --git a/mkl-dnn/cmake/TBB.cmake b/mkl-dnn/cmake/TBB.cmake
|
||||
index 0711e699..c14210b6 100644
|
||||
--- a/mkl-dnn/cmake/TBB.cmake
|
||||
+++ b/mkl-dnn/cmake/TBB.cmake
|
||||
@@ -90,8 +90,8 @@ if(WIN32)
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
set(TBB_LIB_DIR ${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
|
||||
- find_library(TBB_LIBRARY tbb PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
else()
|
||||
@@ -138,13 +138,13 @@ else()
|
||||
set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
|
||||
if(APPLE)
|
||||
find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
|
||||
- find_library(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
|
||||
set(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
|
||||
- find_library(TBB_LIBRARY tbb ${TBB_HINTS})
|
||||
- find_library(TBB_LIBRARY_MALLOC tbbmalloc ${TBB_HINTS})
|
||||
+ find_library(TBB_LIBRARY tbb_static ${TBB_HINTS})
|
||||
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static ${TBB_HINTS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
|
||||
--- a/cmake/install.cmake 2019-08-12 18:02:20.794402575 +0200
|
||||
+++ b/cmake/install.cmake 2019-08-12 18:06:07.470045703 +0200
|
||||
@@ -18,6 +18,13 @@
|
||||
## Install library
|
||||
## ----------------------------------------------------------------------------
|
||||
|
||||
+if(UNIX)
|
||||
+install(FILES
|
||||
+ ${CMAKE_BINARY_DIR}/libOpenImageDenoise.a
|
||||
+ ${CMAKE_BINARY_DIR}/libmkldnn.a
|
||||
+ ${CMAKE_BINARY_DIR}/libcommon.a
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+else()
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
EXPORT
|
||||
${PROJECT_NAME}_Export
|
||||
@@ -38,6 +45,7 @@
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
|
||||
)
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
## ----------------------------------------------------------------------------
|
||||
## Install headers
|
||||
@@ -78,6 +86,7 @@
|
||||
## Install CMake configuration files
|
||||
## ----------------------------------------------------------------------------
|
||||
|
||||
+if(NOT UNIX)
|
||||
install(EXPORT ${PROJECT_NAME}_Export
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
#NAMESPACE ${PROJECT_NAME}::
|
||||
@@ -92,3 +101,4 @@
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
COMPONENT devel
|
||||
)
|
||||
+endif()
|
||||
diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
|
||||
--- a/CMakeLists.txt 2019-08-12 14:22:00.974078598 +0200
|
||||
+++ b/CMakeLists.txt 2019-08-12 18:05:05.949057375 +0200
|
||||
@@ -14,7 +14,11 @@
|
||||
## limitations under the License. ##
|
||||
## ======================================================================== ##
|
||||
|
||||
-cmake_minimum_required(VERSION 3.1)
|
||||
+if(UNIX)
|
||||
+ cmake_minimum_required(VERSION 3.1)
|
||||
+else()
|
||||
+ cmake_minimum_required(VERSION 3.13)
|
||||
+endif()
|
||||
|
||||
set(OIDN_VERSION_MAJOR 1)
|
||||
set(OIDN_VERSION_MINOR 0)
|
||||
@@ -32,13 +36,8 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
# Build as shared or static library
|
||||
-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
|
||||
- option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
|
||||
- mark_as_advanced(CLEAR OIDN_STATIC_LIB)
|
||||
-else()
|
||||
- set(OIDN_STATIC_LIB OFF CACHE BOOL "Build Open Image Denoise as a static library." FORCE)
|
||||
- mark_as_advanced(OIDN_STATIC_LIB)
|
||||
-endif()
|
||||
+option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
|
||||
+mark_as_advanced(CLEAR OIDN_STATIC_LIB)
|
||||
if(OIDN_STATIC_LIB)
|
||||
set(OIDN_LIB_TYPE STATIC)
|
||||
else()
|
13
build_files/build_environment/patches/opensubdiv.diff
Normal file
13
build_files/build_environment/patches/opensubdiv.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp
|
||||
index 3754b36e..7fe42bcc 100644
|
||||
--- a/opensubdiv/far/topologyRefiner.cpp
|
||||
+++ b/opensubdiv/far/topologyRefiner.cpp
|
||||
@@ -263,7 +263,7 @@ namespace internal {
|
||||
bool IsEmpty() const { return *((int_type*)this) == 0; }
|
||||
|
||||
FeatureMask() { Clear(); }
|
||||
- FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); }
|
||||
+ FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); }
|
||||
|
||||
// These are the two primary methods intended for use -- intialization via a set of Options
|
||||
// and reduction of the subsequent feature set (which presumes prior initialization with the
|
@@ -1,70 +0,0 @@
|
||||
Blender Buildbot
|
||||
================
|
||||
|
||||
Code signing
|
||||
------------
|
||||
|
||||
Code signing is done as part of INSTALL target, which makes it possible to sign
|
||||
files which are aimed into a bundle and coming from a non-signed source (such as
|
||||
libraries SVN).
|
||||
|
||||
This is achieved by specifying `slave_codesign.cmake` as a post-install script
|
||||
run by CMake. This CMake script simply involves an utility script written in
|
||||
Python which takes care of an actual signing.
|
||||
|
||||
### Configuration
|
||||
|
||||
Client configuration doesn't need anything special, other than variable
|
||||
`SHARED_STORAGE_DIR` pointing to a location which is watched by a server.
|
||||
This is done in `config_builder.py` file and is stored in Git (which makes it
|
||||
possible to have almost zero-configuration buildbot machines).
|
||||
|
||||
Server configuration requires copying `config_server_template.py` under the
|
||||
name of `config_server.py` and tweaking values, which are platform-specific.
|
||||
|
||||
#### Windows configuration
|
||||
|
||||
There are two things which are needed on Windows in order to have code signing
|
||||
to work:
|
||||
|
||||
- `TIMESTAMP_AUTHORITY_URL` which is most likely set http://timestamp.digicert.com
|
||||
- `CERTIFICATE_FILEPATH` which is a full file path to a PKCS #12 key (.pfx).
|
||||
|
||||
## Tips
|
||||
|
||||
### Self-signed certificate on Windows
|
||||
|
||||
It is easiest to test configuration using self-signed certificate.
|
||||
|
||||
The certificate manipulation utilities are coming with Windows SDK.
|
||||
Unfortunately, they are not added to PATH. Here is an example of how to make
|
||||
sure they are easily available:
|
||||
|
||||
```
|
||||
set PATH=C:\Program Files (x86)\Windows Kits\10\App Certification Kit;%PATH%
|
||||
set PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64;%PATH%
|
||||
```
|
||||
|
||||
Generate CA:
|
||||
|
||||
```
|
||||
makecert -r -pe -n "CN=Blender Test CA" -ss CA -sr CurrentUser -a sha256 ^
|
||||
-cy authority -sky signature -sv BlenderTestCA.pvk BlenderTestCA.cer
|
||||
```
|
||||
|
||||
Import the generated CA:
|
||||
|
||||
```
|
||||
certutil -user -addstore Root BlenderTestCA.cer
|
||||
```
|
||||
|
||||
Create self-signed certificate and pack it into PKCS #12:
|
||||
|
||||
```
|
||||
makecert -pe -n "CN=Blender Test SPC" -a sha256 -cy end ^
|
||||
-sky signature ^
|
||||
-ic BlenderTestCA.cer -iv BlenderTestCA.pvk ^
|
||||
-sv BlenderTestSPC.pvk BlenderTestSPC.cer
|
||||
|
||||
pvk2pfx -pvk BlenderTestSPC.pvk -spc BlenderTestSPC.cer -pfx BlenderTestSPC.pfx
|
||||
```
|
@@ -1,114 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
class Builder:
|
||||
def __init__(self, name, branch):
|
||||
self.name = name
|
||||
self.branch = branch
|
||||
self.is_release_branch = re.match("^blender-v(.*)-release$", branch) is not None
|
||||
|
||||
# Buildbot runs from build/ directory
|
||||
self.blender_dir = os.path.abspath(os.path.join('..', 'blender.git'))
|
||||
self.build_dir = os.path.abspath(os.path.join('..', 'build', name))
|
||||
self.install_dir = os.path.abspath(os.path.join('..', 'install', name))
|
||||
self.upload_dir = os.path.abspath(os.path.join('..', 'install'))
|
||||
|
||||
# Detect platform
|
||||
if name.startswith('mac'):
|
||||
self.platform = 'mac'
|
||||
self.command_prefix = []
|
||||
elif name.startswith('linux'):
|
||||
self.platform = 'linux'
|
||||
self.command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
|
||||
elif name.startswith('win'):
|
||||
self.platform = 'win'
|
||||
self.command_prefix = []
|
||||
else:
|
||||
raise ValueError('Unkonw platform for builder ' + self.platform)
|
||||
|
||||
# Always 64 bit now
|
||||
self.bits = 64
|
||||
|
||||
def create_builder_from_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('builder_name')
|
||||
parser.add_argument('branch', default='master', nargs='?')
|
||||
args = parser.parse_args()
|
||||
return Builder(args.builder_name, args.branch)
|
||||
|
||||
|
||||
class VersionInfo:
|
||||
def __init__(self, builder):
|
||||
# Get version information
|
||||
buildinfo_h = os.path.join(builder.build_dir, "source", "creator", "buildinfo.h")
|
||||
blender_h = os.path.join(builder.blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
|
||||
|
||||
version_number = int(self._parse_header_file(blender_h, 'BLENDER_VERSION'))
|
||||
self.version = "%d.%d" % (version_number // 100, version_number % 100)
|
||||
self.version_char = self._parse_header_file(blender_h, 'BLENDER_VERSION_CHAR')
|
||||
self.version_cycle = self._parse_header_file(blender_h, 'BLENDER_VERSION_CYCLE')
|
||||
self.version_cycle_number = self._parse_header_file(blender_h, 'BLENDER_VERSION_CYCLE_NUMBER')
|
||||
self.hash = self._parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1]
|
||||
|
||||
if self.version_cycle == "release":
|
||||
# Final release
|
||||
self.full_version = self.version + self.version_char
|
||||
self.is_development_build = False
|
||||
elif self.version_cycle == "rc":
|
||||
# Release candidate
|
||||
version_cycle = self.version_cycle + self.version_cycle_number
|
||||
if len(self.version_char) == 0:
|
||||
self.full_version = self.version + version_cycle
|
||||
else:
|
||||
self.full_version = self.version + self.version_char + '-' + version_cycle
|
||||
self.is_development_build = False
|
||||
else:
|
||||
# Development build
|
||||
self.full_version = self.version + '-' + self.hash
|
||||
self.is_development_build = True
|
||||
|
||||
def _parse_header_file(self, 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
|
||||
|
||||
|
||||
def call(cmd, env=None, exit_on_error=True):
|
||||
print(' '.join(cmd))
|
||||
|
||||
# Flush to ensure correct order output on Windows.
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
|
||||
retcode = subprocess.call(cmd, env=env)
|
||||
if exit_on_error and retcode != 0:
|
||||
sys.exit(retcode)
|
||||
return retcode
|
@@ -1,77 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
|
||||
@dataclass
|
||||
class AbsoluteAndRelativeFileName:
|
||||
"""
|
||||
Helper class which keeps track of absolute file path for a direct access and
|
||||
corresponding relative path against given base.
|
||||
|
||||
The relative part is used to construct a file name within an archive which
|
||||
contains files which are to be signed or which has been signed already
|
||||
(depending on whether the archive is addressed to signing server or back
|
||||
to the buildbot worker).
|
||||
"""
|
||||
|
||||
# Base directory which is where relative_filepath is relative to.
|
||||
base_dir: Path
|
||||
|
||||
# Full absolute path of the corresponding file.
|
||||
absolute_filepath: Path
|
||||
|
||||
# Derived from full file path, contains part of the path which is relative
|
||||
# to a desired base path.
|
||||
relative_filepath: Path
|
||||
|
||||
def __init__(self, base_dir: Path, filepath: Path):
|
||||
self.base_dir = base_dir
|
||||
self.absolute_filepath = filepath.resolve()
|
||||
self.relative_filepath = self.absolute_filepath.relative_to(
|
||||
self.base_dir)
|
||||
|
||||
@classmethod
|
||||
def from_path(cls, path: Path) -> 'AbsoluteAndRelativeFileName':
|
||||
assert path.is_absolute()
|
||||
assert path.is_file()
|
||||
|
||||
base_dir = path.parent
|
||||
return AbsoluteAndRelativeFileName(base_dir, path)
|
||||
|
||||
@classmethod
|
||||
def recursively_from_directory(cls, base_dir: Path) \
|
||||
-> List['AbsoluteAndRelativeFileName']:
|
||||
"""
|
||||
Create list of AbsoluteAndRelativeFileName for all the files in the
|
||||
given directory.
|
||||
"""
|
||||
assert base_dir.is_absolute()
|
||||
assert base_dir.is_dir()
|
||||
|
||||
result = []
|
||||
for filename in base_dir.glob('**/*'):
|
||||
if not filename.is_file():
|
||||
continue
|
||||
result.append(AbsoluteAndRelativeFileName(base_dir, filename))
|
||||
return result
|
@@ -1,101 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from codesign.util import ensure_file_does_not_exist_or_die
|
||||
|
||||
|
||||
class ArchiveWithIndicator:
|
||||
"""
|
||||
The idea of this class is to wrap around logic which takes care of keeping
|
||||
track of a name of an archive and synchronization routines between buildbot
|
||||
worker and signing server.
|
||||
|
||||
The synchronization is done based on creating a special file after the
|
||||
archive file is knowingly ready for access.
|
||||
"""
|
||||
|
||||
# Base directory where the archive is stored (basically, a basename() of
|
||||
# the absolute archive file name).
|
||||
#
|
||||
# For example, 'X:\\TEMP\\'.
|
||||
base_dir: Path
|
||||
|
||||
# Absolute file name of the archive.
|
||||
#
|
||||
# For example, 'X:\\TEMP\\FOO.ZIP'.
|
||||
archive_filepath: Path
|
||||
|
||||
# Absolute name of a file which acts as an indication of the fact that the
|
||||
# archive is ready and is available for access.
|
||||
#
|
||||
# This is how synchronization between buildbot worker and signing server is
|
||||
# done:
|
||||
# - First, the archive is created under archive_filepath name.
|
||||
# - Second, the indication file is created under ready_indicator_filepath
|
||||
# name.
|
||||
# - Third, the colleague of whoever created the indicator name watches for
|
||||
# the indication file to appear, and once it's there it access the
|
||||
# archive.
|
||||
ready_indicator_filepath: Path
|
||||
|
||||
def __init__(
|
||||
self, base_dir: Path, archive_name: str, ready_indicator_name: str):
|
||||
"""
|
||||
Construct the object from given base directory and name of the archive
|
||||
file:
|
||||
ArchiveWithIndicator(Path('X:\\TEMP'), 'FOO.ZIP', 'INPUT_READY')
|
||||
"""
|
||||
|
||||
self.base_dir = base_dir
|
||||
self.archive_filepath = self.base_dir / archive_name
|
||||
self.ready_indicator_filepath = self.base_dir / ready_indicator_name
|
||||
|
||||
def is_ready(self) -> bool:
|
||||
"""Check whether the archive is ready for access."""
|
||||
return self.ready_indicator_filepath.exists()
|
||||
|
||||
def tag_ready(self) -> None:
|
||||
"""
|
||||
Tag the archive as ready by creating the corresponding indication file.
|
||||
|
||||
NOTE: It is expected that the archive was never tagged as ready before
|
||||
and that there are no subsequent tags of the same archive.
|
||||
If it is violated, an assert will fail.
|
||||
"""
|
||||
assert not self.is_ready()
|
||||
self.ready_indicator_filepath.touch()
|
||||
|
||||
def clean(self) -> None:
|
||||
"""
|
||||
Remove both archive and the ready indication file.
|
||||
"""
|
||||
ensure_file_does_not_exist_or_die(self.ready_indicator_filepath)
|
||||
ensure_file_does_not_exist_or_die(self.archive_filepath)
|
||||
|
||||
def is_fully_absent(self) -> bool:
|
||||
"""
|
||||
Check whether both archive and its ready indicator are absent.
|
||||
Is used for a sanity check during code signing process by both
|
||||
buildbot worker and signing server.
|
||||
"""
|
||||
return (not self.archive_filepath.exists() and
|
||||
not self.ready_indicator_filepath.exists())
|
@@ -1,385 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# Signing process overview.
|
||||
#
|
||||
# From buildbot worker side:
|
||||
# - Files which needs to be signed are collected from either a directory to
|
||||
# sign all signable files in there, or by filename of a single file to sign.
|
||||
# - Those files gets packed into an archive and stored in a location location
|
||||
# which is watched by the signing server.
|
||||
# - A marker READY file is created which indicates the archive is ready for
|
||||
# access.
|
||||
# - Wait for the server to provide an archive with signed files.
|
||||
# This is done by watching for the READY file which corresponds to an archive
|
||||
# coming from the signing server.
|
||||
# - Unpack the signed signed files from the archives and replace original ones.
|
||||
#
|
||||
# From code sign server:
|
||||
# - Watch special location for a READY file which indicates the there is an
|
||||
# archive with files which are to be signed.
|
||||
# - Unpack the archive to a temporary location.
|
||||
# - Run codesign tool and make sure all the files are signed.
|
||||
# - Pack the signed files and store them in a location which is watched by
|
||||
# the buildbot worker.
|
||||
# - Create a READY file which indicates that the archive with signed files is
|
||||
# ready.
|
||||
|
||||
import abc
|
||||
import logging
|
||||
import shutil
|
||||
import time
|
||||
import zipfile
|
||||
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
from typing import Iterable, List
|
||||
|
||||
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
|
||||
from codesign.archive_with_indicator import ArchiveWithIndicator
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger_builder = logger.getChild('builder')
|
||||
logger_server = logger.getChild('server')
|
||||
|
||||
|
||||
def pack_files(files: Iterable[AbsoluteAndRelativeFileName],
|
||||
archive_filepath: Path) -> None:
|
||||
"""
|
||||
Create zip archive from given files for the signing pipeline.
|
||||
Is used by buildbot worker to create an archive of files which are to be
|
||||
signed, and by signing server to send signed files back to the worker.
|
||||
"""
|
||||
with zipfile.ZipFile(archive_filepath, 'w') as zip_file_handle:
|
||||
for file_info in files:
|
||||
zip_file_handle.write(file_info.absolute_filepath,
|
||||
arcname=file_info.relative_filepath)
|
||||
|
||||
|
||||
def extract_files(archive_filepath: Path,
|
||||
extraction_dir: Path) -> None:
|
||||
"""
|
||||
Extract all files form the given archive into the given direcotry.
|
||||
"""
|
||||
|
||||
# TODO(sergey): Verify files in the archive have relative path.
|
||||
|
||||
with zipfile.ZipFile(archive_filepath, mode='r') as zip_file_handle:
|
||||
zip_file_handle.extractall(path=extraction_dir)
|
||||
|
||||
|
||||
class BaseCodeSigner(metaclass=abc.ABCMeta):
|
||||
"""
|
||||
Base class for a platform-specific signer of binaries.
|
||||
|
||||
Contains all the logic shared across platform-specific implementations, such
|
||||
as synchronization and notification logic.
|
||||
|
||||
Platform specific bits (such as actual command for signing the binary) are
|
||||
to be implemented as a subclass.
|
||||
|
||||
Provides utilities code signing as a whole, including functionality needed
|
||||
by a signing server and a buildbot worker.
|
||||
|
||||
The signer and builder may run on separate machines, the only requirement is
|
||||
that they have access to a directory which is shared between them. For the
|
||||
security concerns this is to be done as a separate machine (or as a Shared
|
||||
Folder configuration in VirtualBox configuration). This directory might be
|
||||
mounted under different base paths, but its underlying storage is to be
|
||||
the same.
|
||||
|
||||
The code signer is short-lived on a buildbot worker side, and is living
|
||||
forever on a code signing server side.
|
||||
"""
|
||||
|
||||
# TODO(sergey): Find a neat way to have config annotated.
|
||||
# config: Config
|
||||
|
||||
# Storage directory where builder puts files which are requested to be
|
||||
# signed.
|
||||
# Consider this an input of the code signing server.
|
||||
unsigned_storage_dir: Path
|
||||
|
||||
# Information about archive which contains files which are to be signed.
|
||||
#
|
||||
# This archive is created by the buildbot worked and acts as an input for
|
||||
# the code signing server.
|
||||
unsigned_archive_info: ArchiveWithIndicator
|
||||
|
||||
# Storage where signed files are stored.
|
||||
# Consider this an output of the code signer server.
|
||||
signed_storage_dir: Path
|
||||
|
||||
# Information about archive which contains signed files.
|
||||
#
|
||||
# This archive is created by the code signing server.
|
||||
signed_archive_info: ArchiveWithIndicator
|
||||
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
|
||||
absolute_shared_storage_dir = config.SHARED_STORAGE_DIR.resolve()
|
||||
|
||||
# Unsigned (signing server input) configuration.
|
||||
self.unsigned_storage_dir = absolute_shared_storage_dir / 'unsigned'
|
||||
self.unsigned_archive_info = ArchiveWithIndicator(
|
||||
self.unsigned_storage_dir, 'unsigned_files.zip', 'ready.stamp')
|
||||
|
||||
# Signed (signing server output) configuration.
|
||||
self.signed_storage_dir = absolute_shared_storage_dir / 'signed'
|
||||
self.signed_archive_info = ArchiveWithIndicator(
|
||||
self.signed_storage_dir, 'signed_files.zip', 'ready.stamp')
|
||||
|
||||
"""
|
||||
General note on cleanup environment functions.
|
||||
|
||||
It is expected that there is only one instance of the code signer server
|
||||
running for a given input/output directory, and that it serves a single
|
||||
buildbot worker.
|
||||
By its nature, a buildbot worker only produces one build at a time and
|
||||
never performs concurrent builds.
|
||||
This leads to a conclusion that when starting in a clean environment
|
||||
there shouldn't be any archives remaining from a previous build.
|
||||
|
||||
However, it is possible to have various failure scenarios which might
|
||||
leave the environment in a non-clean state:
|
||||
|
||||
- Network hiccup which makes buildbot worker to stop current build
|
||||
and re-start it after connection to server is re-established.
|
||||
|
||||
Note, this could also happen during buildbot server maintenance.
|
||||
|
||||
- Signing server might get restarted due to updates or other reasons.
|
||||
|
||||
Requiring manual interaction in such cases is not something good to
|
||||
require, so here we simply assume that the system is used the way it is
|
||||
intended to and restore environment to a prestine clean state.
|
||||
"""
|
||||
|
||||
def cleanup_environment_for_builder(self) -> None:
|
||||
self.unsigned_archive_info.clean()
|
||||
self.signed_archive_info.clean()
|
||||
|
||||
def cleanup_environment_for_signing_server(self) -> None:
|
||||
# Don't clear the requested to-be-signed archive since we might be
|
||||
# restarting signing machine while the buildbot is busy.
|
||||
self.signed_archive_info.clean()
|
||||
|
||||
############################################################################
|
||||
# Buildbot worker side helpers.
|
||||
|
||||
@abc.abstractmethod
|
||||
def check_file_is_to_be_signed(
|
||||
self, file: AbsoluteAndRelativeFileName) -> bool:
|
||||
"""
|
||||
Check whether file is to be signed.
|
||||
|
||||
Is used by both single file signing pipeline and recursive directory
|
||||
signing pipeline.
|
||||
|
||||
This is where code signer is to check whether file is to be signed or
|
||||
not. This check might be based on a simple extension test or on actual
|
||||
test whether file have a digital signature already or not.
|
||||
"""
|
||||
|
||||
def collect_files_to_sign(self, path: Path) \
|
||||
-> List[AbsoluteAndRelativeFileName]:
|
||||
"""
|
||||
Get all files which need to be signed from the given path.
|
||||
|
||||
NOTE: The path might either be a file or directory.
|
||||
|
||||
This function is run from the buildbot worker side.
|
||||
"""
|
||||
|
||||
# If there is a single file provided trust the buildbot worker that it
|
||||
# is eligible for signing.
|
||||
if path.is_file():
|
||||
file = AbsoluteAndRelativeFileName.from_path(path)
|
||||
if not self.check_file_is_to_be_signed(file):
|
||||
return []
|
||||
return [file]
|
||||
|
||||
all_files = AbsoluteAndRelativeFileName.recursively_from_directory(
|
||||
path)
|
||||
files_to_be_signed = [file for file in all_files
|
||||
if self.check_file_is_to_be_signed(file)]
|
||||
return files_to_be_signed
|
||||
|
||||
def wait_for_signed_archive_or_die(self) -> None:
|
||||
"""
|
||||
Wait until archive with signed files is available.
|
||||
|
||||
Will only wait for the configured time. If that time exceeds and there
|
||||
is still no responce from the signing server the application will exit
|
||||
with a non-zero exit code.
|
||||
"""
|
||||
timeout_in_seconds = self.config.TIMEOUT_IN_SECONDS
|
||||
time_start = time.monotonic()
|
||||
while not self.signed_archive_info.is_ready():
|
||||
time.sleep(1)
|
||||
time_slept_in_seconds = time.monotonic() - time_start
|
||||
if time_slept_in_seconds > timeout_in_seconds:
|
||||
self.unsigned_archive_info.clean()
|
||||
raise SystemExit("Signing server didn't finish signing in "
|
||||
f"{timeout_in_seconds} seconds, dying :(")
|
||||
|
||||
def copy_signed_files_to_directory(
|
||||
self, signed_dir: Path, destination_dir: Path) -> None:
|
||||
"""
|
||||
Copy all files from signed_dir to destination_dir.
|
||||
|
||||
This function will overwrite any existing file. Permissions are copied
|
||||
from the source files, but other metadata, such as timestamps, are not.
|
||||
"""
|
||||
for signed_filepath in signed_dir.glob('**/*'):
|
||||
if not signed_filepath.is_file():
|
||||
continue
|
||||
|
||||
relative_filepath = signed_filepath.relative_to(signed_dir)
|
||||
destination_filepath = destination_dir / relative_filepath
|
||||
destination_filepath.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
shutil.copy(signed_filepath, destination_filepath)
|
||||
|
||||
def run_buildbot_path_sign_pipeline(self, path: Path) -> None:
|
||||
"""
|
||||
Run all steps needed to make given path signed.
|
||||
|
||||
Path points to an unsigned file or a directory which contains unsigned
|
||||
files.
|
||||
|
||||
If the path points to a single file then this file will be signed.
|
||||
This is used to sign a final bundle such as .msi on Windows or .dmg on
|
||||
macOS.
|
||||
|
||||
NOTE: The code signed implementation might actually reject signing the
|
||||
file, in which case the file will be left unsigned. This isn't anything
|
||||
to be considered a failure situation, just might happen when buildbot
|
||||
worker can not detect whether signing is really required in a specific
|
||||
case or not.
|
||||
|
||||
If the path points to a directory then code signer will sign all
|
||||
signable files from it (finding them recursively).
|
||||
"""
|
||||
|
||||
self.cleanup_environment_for_builder()
|
||||
|
||||
# Make sure storage directory exists.
|
||||
self.unsigned_storage_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Collect all files which needs to be signed and pack them into a single
|
||||
# archive which will be sent to the signing server.
|
||||
logger_builder.info('Collecting files which are to be signed...')
|
||||
files = self.collect_files_to_sign(path)
|
||||
if not files:
|
||||
logger_builder.info('No files to be signed, ignoring.')
|
||||
return
|
||||
logger_builder.info('Found %d files to sign.', len(files))
|
||||
|
||||
pack_files(files=files,
|
||||
archive_filepath=self.unsigned_archive_info.archive_filepath)
|
||||
self.unsigned_archive_info.tag_ready()
|
||||
|
||||
# Wait for the signing server to finish signing.
|
||||
logger_builder.info('Waiting signing server to sign the files...')
|
||||
self.wait_for_signed_archive_or_die()
|
||||
|
||||
# Extract signed files from archive and move files to final location.
|
||||
with TemporaryDirectory(prefix='blender-buildbot-') as temp_dir_str:
|
||||
unpacked_signed_files_dir = Path(temp_dir_str)
|
||||
|
||||
logger_builder.info('Extracting signed files from archive...')
|
||||
extract_files(
|
||||
archive_filepath=self.signed_archive_info.archive_filepath,
|
||||
extraction_dir=unpacked_signed_files_dir)
|
||||
|
||||
destination_dir = path
|
||||
if destination_dir.is_file():
|
||||
destination_dir = destination_dir.parent
|
||||
self.copy_signed_files_to_directory(
|
||||
unpacked_signed_files_dir, destination_dir)
|
||||
|
||||
############################################################################
|
||||
# Signing server side helpers.
|
||||
|
||||
def wait_for_sign_request(self) -> None:
|
||||
"""
|
||||
Wait for the buildbot to request signing of an archive.
|
||||
"""
|
||||
# TOOD(sergey): Support graceful shutdown on Ctrl-C.
|
||||
while not self.unsigned_archive_info.is_ready():
|
||||
time.sleep(1)
|
||||
|
||||
@abc.abstractmethod
|
||||
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
|
||||
"""
|
||||
Sign all files in the given directory.
|
||||
|
||||
NOTE: Signing should happen in-place.
|
||||
"""
|
||||
|
||||
def run_signing_pipeline(self):
|
||||
"""
|
||||
Run the full signing pipeline starting from the point when buildbot
|
||||
worker have requested signing.
|
||||
"""
|
||||
|
||||
# Make sure storage directory exists.
|
||||
self.signed_storage_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
with TemporaryDirectory(prefix='blender-codesign-') as temp_dir_str:
|
||||
temp_dir = Path(temp_dir_str)
|
||||
|
||||
logger_server.info('Extracting unsigned files from archive...')
|
||||
extract_files(
|
||||
archive_filepath=self.unsigned_archive_info.archive_filepath,
|
||||
extraction_dir=temp_dir)
|
||||
|
||||
logger_server.info('Collecting all files which needs signing...')
|
||||
files = AbsoluteAndRelativeFileName.recursively_from_directory(
|
||||
temp_dir)
|
||||
|
||||
logger_server.info('Signing all requested files...')
|
||||
self.sign_all_files(files)
|
||||
|
||||
logger_server.info('Packing signed files...')
|
||||
pack_files(files=files,
|
||||
archive_filepath=self.signed_archive_info.archive_filepath)
|
||||
self.signed_archive_info.tag_ready()
|
||||
|
||||
logger_server.info('Removing signing request...')
|
||||
self.unsigned_archive_info.clean()
|
||||
|
||||
logger_server.info('Signing is complete.')
|
||||
|
||||
def run_signing_server(self):
|
||||
logger_server.info('Starting new code signing server...')
|
||||
self.cleanup_environment_for_signing_server()
|
||||
logger_server.info('Code signing server is ready')
|
||||
while True:
|
||||
logger_server.info('Waiting for the signing request in %s...',
|
||||
self.unsigned_storage_dir)
|
||||
self.wait_for_sign_request()
|
||||
|
||||
logger_server.info(
|
||||
'Got signing request, beging signign procedure.')
|
||||
self.run_signing_pipeline()
|
@@ -1,57 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# Configuration of a code signer which is specific to the code running from
|
||||
# buildbot's worker.
|
||||
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from codesign.config_common import *
|
||||
|
||||
if sys.platform == 'linux':
|
||||
SHARED_STORAGE_DIR = Path('/data/codesign')
|
||||
elif sys.platform == 'win32':
|
||||
SHARED_STORAGE_DIR = Path('Z:\\codesign')
|
||||
|
||||
# https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'formatters': {
|
||||
'default': {'format': '%(asctime)-15s %(levelname)8s %(name)s %(message)s'}
|
||||
},
|
||||
'handlers': {
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'default',
|
||||
'stream': 'ext://sys.stderr',
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'codesign': {'level': 'INFO'},
|
||||
},
|
||||
'root': {
|
||||
'level': 'WARNING',
|
||||
'handlers': [
|
||||
'console',
|
||||
],
|
||||
}
|
||||
}
|
@@ -1,33 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
# Timeout in seconds for the signing process.
|
||||
#
|
||||
# This is how long buildbot packing step will wait signing server to
|
||||
# perform signing.
|
||||
TIMEOUT_IN_SECONDS = 240
|
||||
|
||||
# Directory which is shared across buildbot worker and signing server.
|
||||
#
|
||||
# This is where worker puts files requested for signing as well as where
|
||||
# server puts signed files.
|
||||
SHARED_STORAGE_DIR: Path
|
@@ -1,63 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# Configuration of a code signer which is specific to the code signing server.
|
||||
#
|
||||
# NOTE: DO NOT put any sensitive information here, put it in an actual
|
||||
# configuration on the signing machine.
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from codesign.config_common import *
|
||||
|
||||
# URL to the timestamping authority.
|
||||
TIMESTAMP_AUTHORITY_URL = 'http://timestamp.digicert.com'
|
||||
|
||||
# Full path to the certificate used for signing.
|
||||
#
|
||||
# The path and expected file format might vary depending on a platform.
|
||||
#
|
||||
# On Windows it is usually is a PKCS #12 key (.pfx), so the path will look
|
||||
# like Path('C:\\Secret\\Blender.pfx').
|
||||
CERTIFICATE_FILEPATH: Path
|
||||
|
||||
# https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'formatters': {
|
||||
'default': {'format': '%(asctime)-15s %(levelname)8s %(name)s %(message)s'}
|
||||
},
|
||||
'handlers': {
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'default',
|
||||
'stream': 'ext://sys.stderr',
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'codesign': {'level': 'INFO'},
|
||||
},
|
||||
'root': {
|
||||
'level': 'WARNING',
|
||||
'handlers': [
|
||||
'console',
|
||||
],
|
||||
}
|
||||
}
|
@@ -1,72 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# NOTE: This is a no-op signer (since there isn't really a procedure to sign
|
||||
# Linux binaries yet). Used to debug and verify the code signing routines on
|
||||
# a Linux environment.
|
||||
|
||||
import logging
|
||||
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
|
||||
from codesign.base_code_signer import BaseCodeSigner
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger_server = logger.getChild('server')
|
||||
|
||||
|
||||
class LinuxCodeSigner(BaseCodeSigner):
|
||||
def is_active(self) -> bool:
|
||||
"""
|
||||
Check whether this signer is active.
|
||||
|
||||
if it is inactive, no files will be signed.
|
||||
|
||||
Is used to be able to debug code signing pipeline on Linux, where there
|
||||
is no code signing happening in the actual buildbot and release
|
||||
environment.
|
||||
"""
|
||||
return False
|
||||
|
||||
def check_file_is_to_be_signed(
|
||||
self, file: AbsoluteAndRelativeFileName) -> bool:
|
||||
if file.relative_filepath == Path('blender'):
|
||||
return True
|
||||
if (file.relative_filepath.parts()[-3:-1] == ('python', 'bin') and
|
||||
file.relative_filepath.name.startwith('python')):
|
||||
return True
|
||||
if file.relative_filepath.suffix == '.so':
|
||||
return True
|
||||
return False
|
||||
|
||||
def collect_files_to_sign(self, path: Path) \
|
||||
-> List[AbsoluteAndRelativeFileName]:
|
||||
if not self.is_active():
|
||||
return []
|
||||
|
||||
return super().collect_files_to_sign(path)
|
||||
|
||||
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
|
||||
num_files = len(files)
|
||||
for file_index, file in enumerate(files):
|
||||
logger.info('Server: Signed file [%d/%d] %s',
|
||||
file_index + 1, num_files, file.relative_filepath)
|
@@ -1,47 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
||||
import logging.config
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
import codesign.config_builder
|
||||
from codesign.base_code_signer import BaseCodeSigner
|
||||
|
||||
|
||||
class SimpleCodeSigner:
|
||||
code_signer: Optional[BaseCodeSigner]
|
||||
|
||||
def __init__(self):
|
||||
if sys.platform == 'linux':
|
||||
from codesign.linux_code_signer import LinuxCodeSigner
|
||||
self.code_signer = LinuxCodeSigner(codesign.config_builder)
|
||||
elif sys.platform == 'win32':
|
||||
from codesign.windows_code_signer import WindowsCodeSigner
|
||||
self.code_signer = WindowsCodeSigner(codesign.config_builder)
|
||||
else:
|
||||
self.code_signer = None
|
||||
|
||||
def sign_file_or_directory(self, path: Path) -> None:
|
||||
logging.config.dictConfig(codesign.config_builder.LOGGING)
|
||||
self.code_signer.run_buildbot_path_sign_pipeline(path)
|
@@ -1,35 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def ensure_file_does_not_exist_or_die(filepath: Path) -> None:
|
||||
"""
|
||||
If the file exists, unlink it.
|
||||
If the file path exists and is not a file an assert will trigger.
|
||||
If the file path does not exists nothing happens.
|
||||
"""
|
||||
if not filepath.exists():
|
||||
return
|
||||
if not filepath.is_file():
|
||||
# TODO(sergey): Provide information about what the filepath actually is.
|
||||
raise SystemExit(f'{filepath} is expected to be a file, but is not')
|
||||
filepath.unlink()
|
@@ -1,75 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from buildbot_utils import Builder
|
||||
|
||||
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
|
||||
from codesign.base_code_signer import BaseCodeSigner
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger_server = logger.getChild('server')
|
||||
|
||||
# NOTE: Check is done as filename.endswith(), so keep the dot
|
||||
EXTENSIONS_TO_BE_SIGNED = {'.exe', '.dll', '.pyd', '.msi'}
|
||||
|
||||
BLACKLIST_FILE_PREFIXES = (
|
||||
'api-ms-', 'concrt', 'msvcp', 'ucrtbase', 'vcomp', 'vcruntime')
|
||||
|
||||
|
||||
class WindowsCodeSigner(BaseCodeSigner):
|
||||
def check_file_is_to_be_signed(
|
||||
self, file: AbsoluteAndRelativeFileName) -> bool:
|
||||
base_name = file.relative_filepath.name
|
||||
if any(base_name.startswith(prefix)
|
||||
for prefix in BLACKLIST_FILE_PREFIXES):
|
||||
return False
|
||||
|
||||
return file.relative_filepath.suffix in EXTENSIONS_TO_BE_SIGNED
|
||||
|
||||
def get_sign_command_prefix(self) -> List[str]:
|
||||
return [
|
||||
'signtool', 'sign', '/v',
|
||||
'/f', self.config.CERTIFICATE_FILEPATH,
|
||||
'/t', self.config.TIMESTAMP_AUTHORITY_URL]
|
||||
|
||||
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
|
||||
# NOTE: Sign files one by one to avoid possible command line length
|
||||
# overflow (which could happen if we ever decide to sign every binary
|
||||
# in the install folder, for example).
|
||||
#
|
||||
# TODO(sergey): Consider doing batched signing of handful of files in
|
||||
# one go (but only if this actually known to be much faster).
|
||||
num_files = len(files)
|
||||
for file_index, file in enumerate(files):
|
||||
command = self.get_sign_command_prefix()
|
||||
command.append(file.absolute_filepath)
|
||||
logger_server.info(
|
||||
'Running signtool command for file [%d/%d] %s...',
|
||||
file_index + 1, num_files, file.relative_filepath)
|
||||
# TODO(sergey): Check the status somehow. With a missing certificate
|
||||
# the command still exists with a zero code.
|
||||
subprocess.run(command)
|
||||
# TODO(sergey): Report number of signed and ignored files.
|
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ##### 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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# NOTE: This is a no-op signer (since there isn't really a procedure to sign
|
||||
# Linux binaries yet). Used to debug and verify the code signing routines on
|
||||
# a Linux environment.
|
||||
|
||||
import logging.config
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from codesign.linux_code_signer import LinuxCodeSigner
|
||||
import codesign.config_server
|
||||
|
||||
if __name__ == "__main__":
|
||||
logging.config.dictConfig(codesign.config_server.LOGGING)
|
||||
code_signer = LinuxCodeSigner(codesign.config_server)
|
||||
code_signer.run_signing_server()
|
@@ -1,11 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem This is an entry point of the codesign server for Windows.
|
||||
rem It makes sure that signtool.exe is within the current PATH and can be
|
||||
rem used by the Python script.
|
||||
|
||||
SETLOCAL
|
||||
|
||||
set PATH=C:\Program Files (x86)\Windows Kits\10\App Certification Kit;%PATH%
|
||||
|
||||
codesign_server_windows.py
|
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ##### 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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# Implementation of codesign server for Windows.
|
||||
#
|
||||
# NOTE: If signtool.exe is not in the PATH use codesign_server_windows.bat
|
||||
|
||||
import logging.config
|
||||
import shutil
|
||||
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from codesign.windows_code_signer import WindowsCodeSigner
|
||||
import codesign.config_server
|
||||
|
||||
if __name__ == "__main__":
|
||||
# TODO(sergey): Consider moving such sanity checks into
|
||||
# CodeSigner.check_environment_or_die().
|
||||
if not shutil.which('signtool.exe'):
|
||||
raise SystemExit("signtool.exe is not found in %PATH%")
|
||||
|
||||
logging.config.dictConfig(codesign.config_server.LOGGING)
|
||||
code_signer = WindowsCodeSigner(codesign.config_server)
|
||||
code_signer.run_signing_server()
|
@@ -2,22 +2,44 @@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
|
||||
|
||||
message(STATUS "Building in CentOS 7 64bit environment")
|
||||
# Detect which libc we'll be linking against.
|
||||
# Some of the paths will depend on this
|
||||
|
||||
set(LIBDIR_NAME "linux_centos7_x86_64")
|
||||
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
|
||||
if(EXISTS "/lib/x86_64-linux-gnu/libc-2.24.so")
|
||||
message(STATUS "Building in GLibc-2.24 environment")
|
||||
set(GLIBC "2.24")
|
||||
set(MULTILIB "/x86_64-linux-gnu")
|
||||
set(LIBDIR_NAME "linux_x86_64")
|
||||
elseif(EXISTS "/lib/i386-linux-gnu//libc-2.24.so")
|
||||
message(STATUS "Building in GLibc-2.24 environment")
|
||||
set(GLIBC "2.24")
|
||||
set(MULTILIB "/i386-linux-gnu")
|
||||
set(LIBDIR_NAME "linux_i686")
|
||||
elseif(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
|
||||
set(WITH_BLENDER ON 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)
|
||||
@@ -29,7 +51,121 @@ set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Release environment specific settings ########
|
||||
|
||||
set(LIBDIR "${CMAKE_CURRENT_LIST_DIR}/../../../../lib/${LIBDIR_NAME}" CACHE STRING "" FORCE)
|
||||
if (NOT ${GLIBC} STREQUAL "2.24")
|
||||
|
||||
# All the hardcoded library 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${MULTILIB}/libsndfile.a;/usr/lib${MULTILIB}/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/AL" 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)
|
||||
|
||||
# Freetype
|
||||
set(FREETYPE_INCLUDE_DIRS "/usr/include/freetype2" CACHE STRING "" FORCE)
|
||||
set(FREETYPE_LIBRARY "/usr/lib${MULTILIB}/libfreetype.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
|
||||
${FREETYPE_LIBRARY}
|
||||
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
|
||||
CACHE BOOL "" FORCE
|
||||
)
|
||||
|
||||
set(BLOSC_LIBRARY
|
||||
/opt/lib/blosc/lib/libblosc.a
|
||||
CACHE BOOL "" FORCE
|
||||
)
|
||||
|
||||
else()
|
||||
|
||||
set(LIBDIR "/opt/blender-deps/${LIBDIR_NAME}" CACHE BOOL "" FORCE)
|
||||
|
||||
# TODO(sergey): Remove once Python is oficially bumped to 3.7.
|
||||
set(PYTHON_VERSION 3.7 CACHE BOOL "" FORCE)
|
||||
|
||||
# Platform specific configuration, to ensure static linking against everything.
|
||||
|
||||
@@ -41,5 +177,7 @@ set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
|
||||
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
|
||||
set(PCRE_LIBRARY "${LIBDIR}/opencollada/lib/libpcre.a" CACHE STRING "" FORCE)
|
||||
|
||||
endif()
|
||||
|
||||
# Additional linking libraries
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++ -no-pie" CACHE STRING "" FORCE)
|
||||
|
@@ -1,44 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# This is a script which is used as POST-INSTALL one for regular CMake's
|
||||
# INSTALL target.
|
||||
# It is used by buildbot workers to sign every binary which is going into
|
||||
# the final buundle.
|
||||
|
||||
# On Windows Python 3 there only is python.exe, no python3.exe.
|
||||
#
|
||||
# On other platforms it is possible to have python2 and python3, and a
|
||||
# symbolic link to python to either of them. So on those platforms use
|
||||
# an explicit Python version.
|
||||
if(WIN32)
|
||||
set(PYTHON_EXECUTABLE python)
|
||||
else()
|
||||
set(PYTHON_EXECUTABLE python3)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/slave_codesign.py"
|
||||
"${CMAKE_INSTALL_PREFIX}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
RESULT_VARIABLE exit_code
|
||||
)
|
||||
|
||||
if(NOT exit_code EQUAL "0")
|
||||
message( FATAL_ERROR "Non-zero exit code of codesign tool")
|
||||
endif()
|
@@ -1,74 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ##### 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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# Helper script which takes care of signing provided location.
|
||||
#
|
||||
# The location can either be a directory (in which case all eligible binaries
|
||||
# will be signed) or a single file (in which case a single file will be signed).
|
||||
#
|
||||
# This script takes care of all the complexity of communicating between process
|
||||
# which requests file to be signed and the code signing server.
|
||||
#
|
||||
# NOTE: Signing happens in-place.
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from codesign.simple_code_signer import SimpleCodeSigner
|
||||
|
||||
|
||||
def create_argument_parser():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('path_to_sign', type=Path)
|
||||
return parser
|
||||
|
||||
|
||||
def main():
|
||||
parser = create_argument_parser()
|
||||
args = parser.parse_args()
|
||||
path_to_sign = args.path_to_sign
|
||||
|
||||
if sys.platform == 'win32':
|
||||
# When WIX packed is used to generate .msi on Windows the CPack will
|
||||
# install two different projects and install them to different
|
||||
# installation prefix:
|
||||
#
|
||||
# - C:\b\build\_CPack_Packages\WIX\Blender
|
||||
# - C:\b\build\_CPack_Packages\WIX\Unspecified
|
||||
#
|
||||
# Annoying part is: CMake's post-install script will only be run
|
||||
# once, with the install prefix which corresponds to a project which
|
||||
# was installed last. But we want to sign binaries from all projects.
|
||||
# So in order to do so we detect that we are running for a CPack's
|
||||
# project used for WIX and force parent directory (which includes both
|
||||
# projects) to be signed.
|
||||
#
|
||||
# Here we force both projects to be signed.
|
||||
if path_to_sign.name == 'Unspecified' and 'WIX' in str(path_to_sign):
|
||||
path_to_sign = path_to_sign.parent
|
||||
|
||||
code_signer = SimpleCodeSigner()
|
||||
code_signer.sign_file_or_directory(path_to_sign)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -19,98 +19,203 @@
|
||||
# <pep8 compliant>
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
import buildbot_utils
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
def get_cmake_options(builder):
|
||||
post_install_script = os.path.join(
|
||||
builder.blender_dir, 'build_files', 'buildbot', 'slave_codesign.cmake')
|
||||
builder = sys.argv[1]
|
||||
|
||||
config_file = "build_files/cmake/config/blender_release.cmake"
|
||||
options = ['-DCMAKE_BUILD_TYPE:STRING=Release',
|
||||
'-DWITH_GTESTS=ON']
|
||||
# we run from build/ directory
|
||||
blender_dir = os.path.join('..', 'blender.git')
|
||||
|
||||
if builder.platform == 'mac':
|
||||
options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
|
||||
options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
|
||||
elif builder.platform == 'win':
|
||||
options.extend(['-G', 'Visual Studio 15 2017 Win64'])
|
||||
options.extend(['-DPOSTINSTALL_SCRIPT:PATH=' + post_install_script])
|
||||
elif builder.platform == 'linux':
|
||||
config_file = "build_files/buildbot/config/blender_linux.cmake"
|
||||
|
||||
optix_sdk_dir = os.path.join(builder.blender_dir, '..', '..', 'NVIDIA-Optix-SDK')
|
||||
options.append('-DOPTIX_ROOT_DIR:PATH=' + optix_sdk_dir)
|
||||
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
|
||||
|
||||
options.append("-C" + os.path.join(builder.blender_dir, config_file))
|
||||
options.append("-DCMAKE_INSTALL_PREFIX=%s" % (builder.install_dir))
|
||||
if 'cmake' in builder:
|
||||
# cmake
|
||||
|
||||
return options
|
||||
# Some fine-tuning configuration
|
||||
blender_dir = os.path.abspath(blender_dir)
|
||||
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
|
||||
install_dir = os.path.abspath(os.path.join('..', 'install', builder))
|
||||
targets = ['blender']
|
||||
|
||||
def update_git(builder):
|
||||
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
|
||||
|
||||
# Config file to be used (relative to blender's sources root)
|
||||
cmake_config_file = "build_files/cmake/config/blender_release.cmake"
|
||||
cmake_cuda_config_file = None
|
||||
|
||||
# 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_9_cmake'):
|
||||
cmake_extra_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
|
||||
cmake_extra_options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
|
||||
# Used to trick CUDFA to see CLang as an older version.
|
||||
# cmake_extra_options.append('-DCUDA_HOST_COMPILER=/usr/local/cuda-hack/clang')
|
||||
# cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-hack/nvcc')
|
||||
|
||||
elif builder.startswith('win'):
|
||||
if builder.endswith('_vs2017'):
|
||||
if builder.startswith('win64'):
|
||||
cmake_options.extend(['-G', 'Visual Studio 15 2017 Win64'])
|
||||
elif builder.startswith('win32'):
|
||||
bits = 32
|
||||
cmake_options.extend(['-G', 'Visual Studio 15 2017'])
|
||||
elif 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 == 'glibc224':
|
||||
deb_name = "stretch"
|
||||
elif glibc == 'glibc219':
|
||||
deb_name = "jessie"
|
||||
elif glibc == 'glibc211':
|
||||
deb_name = "squeeze"
|
||||
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_' + deb_name + '_x86_64'
|
||||
targets = ['blender']
|
||||
elif builder.endswith('i686_cmake'):
|
||||
bits = 32
|
||||
chroot_name = 'buildbot_' + deb_name + '_i686'
|
||||
targets = ['blender']
|
||||
if deb_name != "stretch":
|
||||
cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7",
|
||||
"-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"])
|
||||
|
||||
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
|
||||
|
||||
# Prepare CMake options needed to configure cuda binaries compilation, 64bit only.
|
||||
if bits == 64:
|
||||
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=%s" % ('ON' if build_cubins else 'OFF'))
|
||||
cuda_cmake_options.append("-DCYCLES_CUDA_BINARIES_ARCH=sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70")
|
||||
if build_cubins or 'cuda' in targets:
|
||||
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
|
||||
else:
|
||||
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
|
||||
|
||||
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, '--']
|
||||
else:
|
||||
chroot_prefix = []
|
||||
if cuda_chroot_name:
|
||||
cuda_chroot_prefix = ['schroot', '-c', cuda_chroot_name, '--']
|
||||
else:
|
||||
cuda_chroot_prefix = chroot_prefix[:]
|
||||
|
||||
# Make sure no garbage remained from the previous run
|
||||
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'
|
||||
# Tweaking CMake options to respect the target
|
||||
target_cmake_options = cmake_options[:]
|
||||
if 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")
|
||||
# Do extra git fetch because not all platform/git/buildbot combinations
|
||||
# update the origin remote, causing buildinfo to detect local changes.
|
||||
os.chdir(builder.blender_dir)
|
||||
|
||||
os.chdir(blender_dir)
|
||||
print("Fetching remotes")
|
||||
command = ['git', 'fetch', '--all']
|
||||
buildbot_utils.call(builder.command_prefix + command)
|
||||
|
||||
def clean_directories(builder):
|
||||
# Make sure no garbage remained from the previous run
|
||||
if os.path.isdir(builder.install_dir):
|
||||
shutil.rmtree(builder.install_dir)
|
||||
|
||||
print(command)
|
||||
retcode = subprocess.call(target_chroot_prefix + command)
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
# Make sure build directory exists and enter it
|
||||
os.makedirs(builder.build_dir, exist_ok=True)
|
||||
|
||||
# Remove buildinfo files to force buildbot to re-generate them.
|
||||
for buildinfo in ('buildinfo.h', 'buildinfo.h.txt', ):
|
||||
full_path = os.path.join(builder.build_dir, 'source', 'creator', buildinfo)
|
||||
if os.path.exists(full_path):
|
||||
print("Removing {}" . format(buildinfo))
|
||||
os.remove(full_path)
|
||||
|
||||
def cmake_configure(builder):
|
||||
# CMake configuration
|
||||
os.chdir(builder.build_dir)
|
||||
|
||||
cmake_cache = os.path.join(builder.build_dir, 'CMakeCache.txt')
|
||||
if os.path.exists(cmake_cache):
|
||||
if not os.path.isdir(target_build_dir):
|
||||
os.mkdir(target_build_dir)
|
||||
os.chdir(target_build_dir)
|
||||
# Configure the build
|
||||
print("CMake options:")
|
||||
print(target_cmake_options)
|
||||
if os.path.exists('CMakeCache.txt'):
|
||||
print("Removing CMake cache")
|
||||
os.remove(cmake_cache)
|
||||
os.remove('CMakeCache.txt')
|
||||
retcode = subprocess.call(target_chroot_prefix + ['cmake', blender_dir] + target_cmake_options)
|
||||
if retcode != 0:
|
||||
print('Configuration FAILED!')
|
||||
sys.exit(retcode)
|
||||
|
||||
print("CMake configure:")
|
||||
cmake_options = get_cmake_options(builder)
|
||||
command = ['cmake', builder.blender_dir] + cmake_options
|
||||
buildbot_utils.call(builder.command_prefix + command)
|
||||
|
||||
def cmake_build(builder):
|
||||
# CMake build
|
||||
os.chdir(builder.build_dir)
|
||||
|
||||
# NOTE: CPack will build an INSTALL target, which would mean that code
|
||||
# signing will happen twice when using `make install` and CPack.
|
||||
# The tricky bit here is that it is not possible to know whether INSTALL
|
||||
# target is used by CPack or by a buildbot itaself. Extra level on top of
|
||||
# this is that on Windows it is required to build INSTALL target in order
|
||||
# to have unit test binaries to run.
|
||||
# So on the one hand we do an extra unneeded code sign on Windows, but on
|
||||
# a positive side we don't add complexity and don't make build process more
|
||||
# fragile trying to avoid this. The signing process is way faster than just
|
||||
# a clean build of buildbot, especially with regression tests enabled.
|
||||
if builder.platform == 'win':
|
||||
command = ['cmake', '--build', '.', '--target', 'install', '--config', 'Release']
|
||||
if 'win32' in builder or 'win64' in builder:
|
||||
command = ['cmake', '--build', '.', '--target', target_name, '--config', 'Release']
|
||||
else:
|
||||
command = ['make', '-s', '-j2', 'install']
|
||||
command = ['make', '-s', '-j2', target_name]
|
||||
|
||||
print("CMake build:")
|
||||
buildbot_utils.call(builder.command_prefix + command)
|
||||
print("Executing command:")
|
||||
print(command)
|
||||
retcode = subprocess.call(target_chroot_prefix + command)
|
||||
|
||||
if __name__ == "__main__":
|
||||
builder = buildbot_utils.create_builder_from_arguments()
|
||||
update_git(builder)
|
||||
clean_directories(builder)
|
||||
cmake_configure(builder)
|
||||
cmake_build(builder)
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
|
||||
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))
|
||||
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
||||
|
@@ -23,48 +23,48 @@
|
||||
# to the master in the next buildbot step.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import buildbot_utils
|
||||
|
||||
def get_package_name(builder, platform=None):
|
||||
info = buildbot_utils.VersionInfo(builder)
|
||||
|
||||
package_name = 'blender-' + info.full_version
|
||||
if platform:
|
||||
package_name += '-' + platform
|
||||
if not (builder.branch == 'master' or builder.is_release_branch):
|
||||
if info.is_development_build:
|
||||
package_name = builder.branch + "-" + package_name
|
||||
|
||||
return package_name
|
||||
|
||||
def sign_file_or_directory(path):
|
||||
from codesign.simple_code_signer import SimpleCodeSigner
|
||||
code_signer = SimpleCodeSigner()
|
||||
code_signer.sign_file_or_directory(Path(path))
|
||||
|
||||
|
||||
def create_buildbot_upload_zip(builder, package_files):
|
||||
import zipfile
|
||||
|
||||
buildbot_upload_zip = os.path.join(builder.upload_dir, "buildbot_upload.zip")
|
||||
if os.path.exists(buildbot_upload_zip):
|
||||
os.remove(buildbot_upload_zip)
|
||||
|
||||
try:
|
||||
z = zipfile.ZipFile(buildbot_upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
for filepath, filename in package_files:
|
||||
print("Packaged", filename)
|
||||
z.write(filepath, arcname=filename)
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed: ' + str(ex) + '\n')
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
def create_tar_xz(src, dest, package_name):
|
||||
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"))
|
||||
|
||||
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)
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
# Make sure install directory always exists
|
||||
if not os.path.exists(install_dir):
|
||||
os.makedirs(install_dir)
|
||||
|
||||
|
||||
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()
|
||||
@@ -75,124 +75,164 @@ def create_tar_xz(src, dest, package_name):
|
||||
flist.extend([(os.path.join(root, file), os.path.join(package_root, file)) for file in files])
|
||||
|
||||
import tarfile
|
||||
|
||||
# Set UID/GID of archived files to 0, otherwise they'd be owned by whatever
|
||||
# user compiled the package. If root then unpacks it to /usr/local/ you get
|
||||
# a security issue.
|
||||
def _fakeroot(tarinfo):
|
||||
tarinfo.gid = 0
|
||||
tarinfo.gname = "root"
|
||||
tarinfo.uid = 0
|
||||
tarinfo.uname = "root"
|
||||
return tarinfo
|
||||
|
||||
package = tarfile.open(dest, 'w:xz', preset=9)
|
||||
package = tarfile.open(dest, 'w:bz2')
|
||||
for entry in flist:
|
||||
package.add(entry[0], entry[1], recursive=False, filter=_fakeroot)
|
||||
package.add(entry[0], entry[1], recursive=False)
|
||||
package.close()
|
||||
|
||||
def cleanup_files(dirpath, extension):
|
||||
for f in os.listdir(dirpath):
|
||||
filepath = os.path.join(dirpath, f)
|
||||
if os.path.isfile(filepath) and f.endswith(extension):
|
||||
os.remove(filepath)
|
||||
|
||||
if builder.find('cmake') != -1:
|
||||
# CMake
|
||||
if 'win' in builder or 'mac' in builder:
|
||||
os.chdir(build_dir)
|
||||
|
||||
def pack_mac(builder):
|
||||
info = buildbot_utils.VersionInfo(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]
|
||||
|
||||
os.chdir(builder.build_dir)
|
||||
cleanup_files(builder.build_dir, '.dmg')
|
||||
# TODO(sergey): Such magic usually happens in SCon's packaging but 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.9-'
|
||||
if builder.endswith('x86_64_10_9_cmake'):
|
||||
platform += 'x86_64'
|
||||
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':
|
||||
builderified_name = branch + "-" + builderified_name
|
||||
|
||||
package_name = get_package_name(builder, 'macOS')
|
||||
package_filename = package_name + '.dmg'
|
||||
package_filepath = os.path.join(builder.build_dir, package_filename)
|
||||
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)
|
||||
z.write("{}.zip".format(builderified_name))
|
||||
z.close()
|
||||
sys.exit(retcode)
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
release_dir = os.path.join(builder.blender_dir, 'release', 'darwin')
|
||||
bundle_sh = os.path.join(release_dir, 'bundle.sh')
|
||||
elif builder.startswith('linux_'):
|
||||
blender = os.path.join(install_dir, 'blender')
|
||||
|
||||
command = [bundle_sh]
|
||||
command += ['--source', builder.install_dir]
|
||||
command += ['--dmg', package_filepath]
|
||||
if info.is_development_build:
|
||||
background_image = os.path.join(release_dir, 'buildbot', 'background.tif')
|
||||
command += ['--background-image', background_image]
|
||||
buildbot_utils.call(command)
|
||||
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")
|
||||
|
||||
create_buildbot_upload_zip(builder, [(package_filepath, package_filename)])
|
||||
# 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]
|
||||
|
||||
|
||||
def pack_win(builder):
|
||||
info = buildbot_utils.VersionInfo(builder)
|
||||
|
||||
os.chdir(builder.build_dir)
|
||||
cleanup_files(builder.build_dir, '.zip')
|
||||
|
||||
# CPack will add the platform name
|
||||
cpack_name = get_package_name(builder, None)
|
||||
package_name = get_package_name(builder, 'windows' + str(builder.bits))
|
||||
|
||||
command = ['cmake', '-DCPACK_OVERRIDE_PACKAGENAME:STRING=' + cpack_name, '.']
|
||||
buildbot_utils.call(builder.command_prefix + command)
|
||||
command = ['cpack', '-G', 'ZIP']
|
||||
buildbot_utils.call(builder.command_prefix + command)
|
||||
|
||||
package_filename = package_name + '.zip'
|
||||
package_filepath = os.path.join(builder.build_dir, package_filename)
|
||||
package_files = [(package_filepath, package_filename)]
|
||||
|
||||
if info.version_cycle == 'release':
|
||||
# Installer only for final release builds, otherwise will get
|
||||
# 'this product is already installed' messages.
|
||||
command = ['cpack', '-G', 'WIX']
|
||||
buildbot_utils.call(builder.command_prefix + command)
|
||||
|
||||
package_filename = package_name + '.msi'
|
||||
package_filepath = os.path.join(builder.build_dir, package_filename)
|
||||
sign_file_or_directory(package_filepath)
|
||||
|
||||
package_files += [(package_filepath, package_filename)]
|
||||
|
||||
create_buildbot_upload_zip(builder, package_files)
|
||||
|
||||
|
||||
def pack_linux(builder):
|
||||
blender_executable = os.path.join(builder.install_dir, 'blender')
|
||||
|
||||
info = buildbot_utils.VersionInfo(builder)
|
||||
blender_glibc = builder.name.split('_')[1]
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_jessie_x86_64'
|
||||
bits = 64
|
||||
blender_arch = 'x86_64'
|
||||
elif builder.endswith('i686_cmake'):
|
||||
chroot_name = 'buildbot_jessie_i686'
|
||||
bits = 32
|
||||
blender_arch = 'i686'
|
||||
|
||||
# Strip all unused symbols from the binaries
|
||||
print("Stripping binaries...")
|
||||
buildbot_utils.call(builder.command_prefix + ['strip', '--strip-all', blender_executable])
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
subprocess.call(chroot_prefix + ['strip', '--strip-all', blender])
|
||||
|
||||
print("Stripping python...")
|
||||
py_target = os.path.join(builder.install_dir, info.version)
|
||||
buildbot_utils.call(builder.command_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
|
||||
py_target = os.path.join(install_dir, blender_version)
|
||||
subprocess.call(chroot_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
|
||||
|
||||
# Construct package name
|
||||
platform_name = 'linux-' + blender_glibc + '-' + blender_arch
|
||||
package_name = get_package_name(builder, platform_name)
|
||||
package_filename = package_name + ".tar.xz"
|
||||
# Copy all specific files which are too specific to be copied by
|
||||
# the CMake rules themselves
|
||||
print("Copying extra scripts and libs...")
|
||||
|
||||
print("Creating .tar.xz archive")
|
||||
package_filepath = builder.install_dir + '.tar.xz'
|
||||
create_tar_xz(builder.install_dir, package_filepath, package_name)
|
||||
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')
|
||||
|
||||
# Create buildbot_upload.zip
|
||||
create_buildbot_upload_zip(builder, [(package_filepath, package_filename)])
|
||||
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")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
builder = buildbot_utils.create_builder_from_arguments()
|
||||
if upload_filepath is None:
|
||||
# clean release directory if it already exists
|
||||
release_dir = 'release'
|
||||
|
||||
# Make sure install directory always exists
|
||||
os.makedirs(builder.install_dir, exist_ok=True)
|
||||
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.platform == 'mac':
|
||||
pack_mac(builder)
|
||||
elif builder.platform == 'win':
|
||||
pack_win(builder)
|
||||
elif builder.platform == 'linux':
|
||||
pack_linux(builder)
|
||||
# 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
|
||||
|
||||
# create zip file
|
||||
try:
|
||||
upload_zip = os.path.join(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.close()
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
@@ -21,17 +21,23 @@
|
||||
# Runs on buildbot slave, rsync zip directly to buildbot server rather
|
||||
# than using upload which is much slower
|
||||
|
||||
import buildbot_utils
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
builder = buildbot_utils.create_builder_from_arguments()
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
builder = sys.argv[1]
|
||||
|
||||
# rsync, this assumes ssh keys are setup so no password is needed
|
||||
local_zip = "buildbot_upload.zip"
|
||||
remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/"
|
||||
remote_zip = remote_folder + "buildbot_upload_" + builder.name + ".zip"
|
||||
remote_zip = remote_folder + "buildbot_upload_" + builder + ".zip"
|
||||
command = "rsync -avz %s %s" % (local_zip, remote_zip)
|
||||
|
||||
command = ["rsync", "-avz", local_zip, remote_zip]
|
||||
buildbot_utils.call(command)
|
||||
print(command)
|
||||
|
||||
ret = os.system(command)
|
||||
sys.exit(ret)
|
||||
|
@@ -18,22 +18,42 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import buildbot_utils
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
def get_ctest_arguments(builder):
|
||||
args = ['--output-on-failure']
|
||||
if builder.platform == 'win':
|
||||
args += ['-C', 'Release']
|
||||
return args
|
||||
# get builder name
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||
sys.exit(1)
|
||||
|
||||
def test(builder):
|
||||
os.chdir(builder.build_dir)
|
||||
builder = sys.argv[1]
|
||||
|
||||
command = builder.command_prefix + ['ctest'] + get_ctest_arguments(builder)
|
||||
buildbot_utils.call(command)
|
||||
# we run from build/ directory
|
||||
blender_dir = '../blender.git'
|
||||
|
||||
if __name__ == "__main__":
|
||||
builder = buildbot_utils.create_builder_from_arguments()
|
||||
test(builder)
|
||||
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_jessie_x86_64'
|
||||
elif builder.endswith('i686_cmake'):
|
||||
chroot_name = 'buildbot_jessie_i686'
|
||||
if chroot_name:
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
"""
|
||||
|
||||
os.chdir(build_dir)
|
||||
retcode = subprocess.call(chroot_prefix + ['ctest', '--output-on-failure'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
||||
|
@@ -1,31 +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.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import buildbot_utils
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
builder = buildbot_utils.create_builder_from_arguments()
|
||||
os.chdir(builder.blender_dir)
|
||||
|
||||
# Run make update which handles all libraries and submodules.
|
||||
make_update = os.path.join(builder.blender_dir, "build_files", "utils", "make_update.py")
|
||||
buildbot_utils.call([sys.executable, make_update, '--no-blender', "--use-tests", "--use-centos-libraries"])
|
@@ -47,10 +47,10 @@ FIND_PATH(EMBREE_INCLUDE_DIR
|
||||
|
||||
|
||||
SET(_embree_FIND_COMPONENTS
|
||||
embree3
|
||||
embree_avx
|
||||
embree_avx2
|
||||
embree_sse42
|
||||
embree3
|
||||
lexers
|
||||
math
|
||||
simd
|
||||
|
@@ -1,122 +0,0 @@
|
||||
# - Find OpenImageDenoise library
|
||||
# Find the native OpenImageDenoise includes and library
|
||||
# This module defines
|
||||
# OPENIMAGEDENOISE_INCLUDE_DIRS, where to find oidn.h, Set when
|
||||
# OPENIMAGEDENOISE is found.
|
||||
# OPENIMAGEDENOISE_LIBRARIES, libraries to link against to use OpenImageDenoise.
|
||||
# OPENIMAGEDENOISE_ROOT_DIR, The base directory to search for OpenImageDenoise.
|
||||
# This can also be an environment variable.
|
||||
# OPENIMAGEDENOISE_FOUND, If false, do not try to use OpenImageDenoise.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENIMAGEDENOISE_LIBRARY, where to find the OpenImageDenoise library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2019 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 OPENIMAGEDENOISE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENIMAGEDENOISE_ROOT_DIR AND NOT $ENV{OPENIMAGEDENOISE_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENIMAGEDENOISE_ROOT_DIR $ENV{OPENIMAGEDENOISE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_openimagedenoise_SEARCH_DIRS
|
||||
${OPENIMAGEDENOISE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/lib/openimagedenoise
|
||||
)
|
||||
|
||||
FIND_PATH(OPENIMAGEDENOISE_INCLUDE_DIR
|
||||
NAMES
|
||||
OpenImageDenoise/oidn.h
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_openimagedenoise_FIND_COMPONENTS
|
||||
OpenImageDenoise
|
||||
)
|
||||
|
||||
# These are needed when building statically
|
||||
SET(_openimagedenoise_FIND_STATIC_COMPONENTS
|
||||
common
|
||||
mkldnn
|
||||
)
|
||||
|
||||
SET(_openimagedenoise_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_openimagedenoise_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _openimagedenoise_LIBRARIES "${OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
FOREACH(COMPONENT ${_openimagedenoise_FIND_STATIC_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
MARK_AS_ADVANCED(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY)
|
||||
IF(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY)
|
||||
LIST(APPEND _openimagedenoise_LIBRARIES "${OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
FIND_LIBRARY(OPENIMAGEDENOISE_LIBRARY
|
||||
NAMES
|
||||
OpenImageDenoise
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEDENOISE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENIMAGEDENOISE DEFAULT_MSG
|
||||
OPENIMAGEDENOISE_LIBRARY OPENIMAGEDENOISE_INCLUDE_DIR)
|
||||
|
||||
IF(OPENIMAGEDENOISE_FOUND)
|
||||
SET(OPENIMAGEDENOISE_LIBRARIES ${_openimagedenoise_LIBRARIES})
|
||||
SET(OPENIMAGEDENOISE_INCLUDE_DIRS ${OPENIMAGEDENOISE_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(OPENIMAGEDENOISE_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENIMAGEDENOISE_INCLUDE_DIR
|
||||
)
|
||||
|
||||
FOREACH(COMPONENT ${_openimagedenoise_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(_openimagedenoise_SEARCH_DIRS)
|
||||
UNSET(_openimagedenoise_FIND_COMPONENTS)
|
||||
UNSET(_openimagedenoise_LIBRARIES)
|
@@ -1,57 +0,0 @@
|
||||
# - Find OptiX library
|
||||
# Find the native OptiX includes and library
|
||||
# This module defines
|
||||
# OPTIX_INCLUDE_DIRS, where to find optix.h, Set when
|
||||
# OPTIX_INCLUDE_DIR is found.
|
||||
# OPTIX_ROOT_DIR, The base directory to search for OptiX.
|
||||
# This can also be an environment variable.
|
||||
# OPTIX_FOUND, If false, do not try to use OptiX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2019 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 OPTIX_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPTIX_ROOT_DIR AND NOT $ENV{OPTIX_ROOT_DIR} STREQUAL "")
|
||||
SET(OPTIX_ROOT_DIR $ENV{OPTIX_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_optix_SEARCH_DIRS
|
||||
${OPTIX_ROOT_DIR}
|
||||
"$ENV{PROGRAMDATA}/NVIDIA Corporation/OptiX SDK 7.0.0"
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
)
|
||||
|
||||
FIND_PATH(OPTIX_INCLUDE_DIR
|
||||
NAMES
|
||||
optix.h
|
||||
HINTS
|
||||
${_optix_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPTIX_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OptiX DEFAULT_MSG
|
||||
OPTIX_INCLUDE_DIR)
|
||||
|
||||
IF(OPTIX_FOUND)
|
||||
SET(OPTIX_INCLUDE_DIRS ${OPTIX_INCLUDE_DIR})
|
||||
ENDIF(OPTIX_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPTIX_INCLUDE_DIR
|
||||
)
|
||||
|
||||
UNSET(_optix_SEARCH_DIRS)
|
@@ -6,7 +6,7 @@
|
||||
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||
# This can also be an environment variable.
|
||||
# SNDFILE_FOUND, If false, do not try to use SndFile.
|
||||
# LIBSNDFILE_FOUND, If false, do not try to use SndFile.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
|
||||
@@ -50,16 +50,16 @@ FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBSNDFILE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
||||
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
||||
|
||||
IF(SNDFILE_FOUND)
|
||||
IF(LIBSNDFILE_FOUND)
|
||||
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
||||
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
||||
ENDIF(SNDFILE_FOUND)
|
||||
ENDIF(LIBSNDFILE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LIBSNDFILE_INCLUDE_DIR
|
||||
|
@@ -12,22 +12,14 @@
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
macro(BLENDER_SRC_GTEST_EX)
|
||||
macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
|
||||
if(WITH_GTESTS)
|
||||
set(options SKIP_ADD_TEST)
|
||||
set(oneValueArgs NAME)
|
||||
set(multiValueArgs SRC EXTRA_LIBS COMMAND_ARGS)
|
||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
|
||||
set(TARGET_NAME ${ARG_NAME}_test)
|
||||
get_property(_current_include_directories
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PROPERTY INCLUDE_DIRECTORIES)
|
||||
set(TEST_INC
|
||||
${_current_include_directories}
|
||||
${CMAKE_SOURCE_DIR}/tests/gtests
|
||||
)
|
||||
set(TEST_INC_SYS
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFLAGS_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/extern/gtest/include
|
||||
@@ -35,11 +27,9 @@ macro(BLENDER_SRC_GTEST_EX)
|
||||
)
|
||||
unset(_current_include_directories)
|
||||
|
||||
add_executable(${TARGET_NAME} ${ARG_SRC})
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${TEST_INC}")
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${TEST_INC_SYS}")
|
||||
target_link_libraries(${TARGET_NAME}
|
||||
${ARG_EXTRA_LIBS}
|
||||
add_executable(${NAME}_test ${SRC})
|
||||
target_link_libraries(${NAME}_test
|
||||
${EXTRA_LIBS}
|
||||
${PLATFORM_LINKLIBS}
|
||||
bf_testing_main
|
||||
bf_intern_eigen
|
||||
@@ -51,54 +41,27 @@ macro(BLENDER_SRC_GTEST_EX)
|
||||
${GLOG_LIBRARIES}
|
||||
${GFLAGS_LIBRARIES})
|
||||
if(WITH_OPENMP_STATIC)
|
||||
target_link_libraries(${TARGET_NAME} ${OpenMP_LIBRARIES})
|
||||
target_link_libraries(${NAME}_test ${OpenMP_LIBRARIES})
|
||||
endif()
|
||||
|
||||
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(GENERATOR_IS_MULTI_CONFIG)
|
||||
string(REPLACE "\${BUILD_TYPE}" "$<CONFIG>" TEST_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
else()
|
||||
string(REPLACE "\${BUILD_TYPE}" "" TEST_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
endif()
|
||||
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES
|
||||
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}")
|
||||
if(NOT ARG_SKIP_ADD_TEST)
|
||||
add_test(
|
||||
NAME ${TARGET_NAME}
|
||||
COMMAND ${TESTS_OUTPUT_DIR}/${TARGET_NAME} ${ARG_COMMAND_ARGS}
|
||||
WORKING_DIRECTORY ${TEST_INSTALL_DIR})
|
||||
|
||||
# Don't fail tests on leaks since these often happen in external libraries
|
||||
# that we can't fix.
|
||||
set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
|
||||
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>)
|
||||
endif()
|
||||
unset(TEST_INC)
|
||||
unset(TEST_INC_SYS)
|
||||
unset(TARGET_NAME)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX(
|
||||
NAME "${NAME}"
|
||||
SRC "${SRC}"
|
||||
EXTRA_LIBS "${EXTRA_LIBS}")
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_TEST NAME EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX(
|
||||
NAME "${NAME}"
|
||||
SRC "${NAME}_test.cc"
|
||||
EXTRA_LIBS "${EXTRA_LIBS}")
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX(
|
||||
NAME "${NAME}"
|
||||
SRC "${NAME}_test.cc"
|
||||
EXTRA_LIBS "${EXTRA_LIBS}"
|
||||
SKIP_ADD_TEST)
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
|
||||
endmacro()
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#
|
||||
# VLMC RPM Finder
|
||||
# Authors: Rohit Yadav <rohityadav89@gmail.com>
|
||||
#
|
||||
|
@@ -22,7 +22,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
|
||||
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=12 HEAD
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
@@ -80,12 +80,12 @@ if(EXISTS ${SOURCE_DIR}/.git)
|
||||
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=12 HEAD
|
||||
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=12 @{u}
|
||||
execute_process(COMMAND git rev-parse --short @{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@@ -94,7 +94,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
|
||||
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=12 HEAD
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
@@ -145,13 +145,22 @@ if(EXISTS ${SOURCE_DIR}/.git)
|
||||
unset(_git_changed_files)
|
||||
endif()
|
||||
|
||||
# BUILD_PLATFORM is taken from CMake
|
||||
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
|
||||
# but BUILD_DATE and BUILD_TIME are platform dependent
|
||||
if(UNIX)
|
||||
if(NOT BUILD_DATE)
|
||||
STRING(TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC)
|
||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
if(NOT BUILD_TIME)
|
||||
STRING(TIMESTAMP BUILD_TIME "%H:%M:%S" UTC)
|
||||
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()
|
||||
endif()
|
||||
|
||||
# Write a file with the BUILD_HASH define
|
||||
|
@@ -130,7 +130,7 @@ def function_parm_wash_tokens(parm):
|
||||
)
|
||||
|
||||
"""
|
||||
Return tokens without trailing commands and 'const'
|
||||
Return tolens without trailing commands and 'const'
|
||||
"""
|
||||
|
||||
tokens = [t for t in parm.get_tokens()]
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
@@ -27,9 +29,7 @@ if not sys.version.startswith("3"):
|
||||
sys.exit(1)
|
||||
|
||||
from cmake_consistency_check_config import (
|
||||
IGNORE_SOURCE,
|
||||
IGNORE_SOURCE_MISSING,
|
||||
IGNORE_CMAKE,
|
||||
IGNORE,
|
||||
UTF8_CHECK,
|
||||
SOURCE_DIR,
|
||||
BUILD_DIR,
|
||||
@@ -43,11 +43,6 @@ global_h = set()
|
||||
global_c = set()
|
||||
global_refs = {}
|
||||
|
||||
# Ignore cmake file, path pairs.
|
||||
global_ignore_source_missing = {}
|
||||
for k, v in IGNORE_SOURCE_MISSING:
|
||||
global_ignore_source_missing.setdefault(k, []).append(v)
|
||||
|
||||
|
||||
def replace_line(f, i, text, keep_indent=True):
|
||||
file_handle = open(f, 'r')
|
||||
@@ -143,13 +138,6 @@ def cmake_get_src(f):
|
||||
cmake_base = dirname(f)
|
||||
cmake_base_bin = os.path.join(BUILD_DIR, os.path.relpath(cmake_base, SOURCE_DIR))
|
||||
|
||||
# Find known missing sources list (if we have one).
|
||||
f_rel = os.path.relpath(f, SOURCE_DIR)
|
||||
f_rel_key = f_rel
|
||||
if os.sep != "/":
|
||||
f_rel_key = f_rel_key.replace(os.sep, "/")
|
||||
local_ignore_source_missing = global_ignore_source_missing.get(f_rel_key, [])
|
||||
|
||||
while it is not None:
|
||||
i += 1
|
||||
try:
|
||||
@@ -162,16 +150,12 @@ def cmake_get_src(f):
|
||||
|
||||
if not l.startswith("#"):
|
||||
|
||||
# Remove in-line comments.
|
||||
l = l.split(" # ")[0].rstrip()
|
||||
|
||||
if ")" in l:
|
||||
if l.strip() != ")":
|
||||
raise Exception("strict formatting not kept '*)' %s:%d" % (f, i))
|
||||
break
|
||||
|
||||
# replace dirs
|
||||
l = l.replace("${CMAKE_SOURCE_DIR}", SOURCE_DIR)
|
||||
l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base)
|
||||
l = l.replace("${CMAKE_CURRENT_BINARY_DIR}", cmake_base_bin)
|
||||
l = l.strip('"')
|
||||
@@ -226,9 +210,6 @@ def cmake_get_src(f):
|
||||
# # Save time. just replace the line
|
||||
# replace_line(f, i - 1, new_path_rel)
|
||||
|
||||
else:
|
||||
if l in local_ignore_source_missing:
|
||||
local_ignore_source_missing.remove(l)
|
||||
else:
|
||||
raise Exception("non existent include %s:%d -> %s" % (f, i, new_file))
|
||||
|
||||
@@ -257,16 +238,8 @@ def cmake_get_src(f):
|
||||
filen.close()
|
||||
|
||||
|
||||
def is_ignore_source(f, ignore_used):
|
||||
for index, ig in enumerate(IGNORE_SOURCE):
|
||||
if ig in f:
|
||||
ignore_used[index] = True
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def is_ignore_cmake(f, ignore_used):
|
||||
for index, ig in enumerate(IGNORE_CMAKE):
|
||||
def is_ignore(f, ignore_used):
|
||||
for index, ig in enumerate(IGNORE):
|
||||
if ig in f:
|
||||
ignore_used[index] = True
|
||||
return True
|
||||
@@ -277,11 +250,7 @@ def main():
|
||||
|
||||
print("Scanning:", SOURCE_DIR)
|
||||
|
||||
ignore_used_source = [False] * len(IGNORE_SOURCE)
|
||||
ignore_used_cmake = [False] * len(IGNORE_CMAKE)
|
||||
|
||||
for cmake in source_list(SOURCE_DIR, is_cmake):
|
||||
if not is_ignore_cmake(cmake, ignore_used_cmake):
|
||||
cmake_get_src(cmake)
|
||||
|
||||
# First do stupid check, do these files exist?
|
||||
@@ -313,10 +282,12 @@ def main():
|
||||
del is_err
|
||||
del errs
|
||||
|
||||
ignore_used = [False] * len(IGNORE)
|
||||
|
||||
# now check on files not accounted for.
|
||||
print("\nC/C++ Files CMake does not know about...")
|
||||
for cf in sorted(source_list(SOURCE_DIR, is_c)):
|
||||
if not is_ignore_source(cf, ignore_used_source):
|
||||
if not is_ignore(cf, ignore_used):
|
||||
if cf not in global_c:
|
||||
print("missing_c: ", cf)
|
||||
|
||||
@@ -333,7 +304,7 @@ def main():
|
||||
|
||||
print("\nC/C++ Headers CMake does not know about...")
|
||||
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
|
||||
if not is_ignore_source(hf, ignore_used_source):
|
||||
if not is_ignore(hf, ignore_used):
|
||||
if hf not in global_h:
|
||||
print("missing_h: ", hf)
|
||||
|
||||
@@ -355,21 +326,9 @@ def main():
|
||||
traceback.print_exc()
|
||||
|
||||
# Check ignores aren't stale
|
||||
print("\nCheck for unused 'IGNORE_SOURCE' paths...")
|
||||
for index, ig in enumerate(IGNORE_SOURCE):
|
||||
if not ignore_used_source[index]:
|
||||
print("unused ignore: %r" % ig)
|
||||
|
||||
# Check ignores aren't stale
|
||||
print("\nCheck for unused 'IGNORE_SOURCE_MISSING' paths...")
|
||||
for k, v in sorted(global_ignore_source_missing.items()):
|
||||
for ig in v:
|
||||
print("unused ignore: %r -> %r" % (ig, k))
|
||||
|
||||
# Check ignores aren't stale
|
||||
print("\nCheck for unused 'IGNORE_CMAKE' paths...")
|
||||
for index, ig in enumerate(IGNORE_CMAKE):
|
||||
if not ignore_used_cmake[index]:
|
||||
print("\nCheck for unused 'IGNORE' paths...")
|
||||
for index, ig in enumerate(IGNORE):
|
||||
if not ignore_used[index]:
|
||||
print("unused ignore: %r" % ig)
|
||||
|
||||
|
||||
|
@@ -1,13 +1,10 @@
|
||||
import os
|
||||
|
||||
IGNORE_SOURCE = (
|
||||
IGNORE = (
|
||||
"/test/",
|
||||
"/tests/gtests/",
|
||||
"/release/",
|
||||
|
||||
# specific source files
|
||||
"extern/audaspace/",
|
||||
|
||||
# specific source files
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
|
||||
@@ -17,11 +14,9 @@ IGNORE_SOURCE = (
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.cpp",
|
||||
|
||||
"doc/doxygen/doxygen.extern.h",
|
||||
"doc/doxygen/doxygen.intern.h",
|
||||
"doc/doxygen/doxygen.main.h",
|
||||
"doc/doxygen/doxygen.source.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
|
||||
@@ -30,16 +25,8 @@ IGNORE_SOURCE = (
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
|
||||
)
|
||||
|
||||
# Ignore cmake file, path pairs.
|
||||
IGNORE_SOURCE_MISSING = (
|
||||
# Use for cycles stand-alone.
|
||||
("intern/cycles/util/CMakeLists.txt", "../../third_party/numaapi/include"),
|
||||
)
|
||||
|
||||
IGNORE_CMAKE = (
|
||||
"extern/audaspace/CMakeLists.txt",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
|
||||
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
|
||||
)
|
||||
|
||||
UTF8_CHECK = True
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
@@ -238,7 +240,7 @@ def create_nb_project_main():
|
||||
|
||||
f.write(' </makeTool>\n')
|
||||
f.write(' </makefileType>\n')
|
||||
# finished makefile info
|
||||
# finishe makefle info
|
||||
|
||||
f.write(' \n')
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -1,19 +0,0 @@
|
||||
# Configuration for developers, with faster builds, error checking and tests.
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_developer.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_DEBUG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GTESTS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_SAFETY ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# This may have issues with C++ initialization order, needs to be tested
|
||||
# on all platforms to be sure this is safe to enable.
|
||||
# set(WITH_CXX_GUARDEDALLOC ON CACHE BOOL "" FORCE)
|
@@ -12,12 +12,13 @@ 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_DRACO 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_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)
|
||||
@@ -28,6 +29,7 @@ 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_FLUID ON CACHE BOOL "" FORCE)
|
||||
@@ -38,26 +40,29 @@ 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_OPENIMAGEDENOISE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV 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_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
# platform dependent options
|
||||
if(NOT WIN32)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
|
||||
endif()
|
||||
|
@@ -17,13 +17,13 @@ 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_DEVICE_OPTIX OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO 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)
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_SOLVER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_ITASC OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_CINEON OFF CACHE BOOL "" FORCE)
|
||||
@@ -45,17 +45,11 @@ set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEDENOISE 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_QUADRIFLOW OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
@@ -13,12 +13,13 @@ 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_DRACO 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_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)
|
||||
@@ -29,6 +30,7 @@ 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_FLUID ON CACHE BOOL "" FORCE)
|
||||
@@ -39,29 +41,30 @@ 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_OPENIMAGEDENOISE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV 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_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75 CACHE STRING "" FORCE)
|
||||
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE)
|
||||
|
||||
# platform dependent options
|
||||
if(NOT WIN32)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
|
||||
endif()
|
||||
|
@@ -30,19 +30,3 @@ 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)
|
||||
|
||||
# Depends on Python install, do this to quiet warning.
|
||||
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# Note, if linking errors can be resolved, lines below can be removed.
|
||||
# Until then, disable configurations known to fail.
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# jemalloc causes linking error on import, disable.
|
||||
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
# OpenMP causes linking error on build, disable.
|
||||
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
10
build_files/cmake/example_scripts/make_quiet.sh
Executable file
10
build_files/cmake/example_scripts/make_quiet.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# filters CMake output to be more like nan-makefiles
|
||||
|
||||
FILTER="^\[ *[0-9]*%] \|^Built target \|^Scanning "
|
||||
make $@ | \
|
||||
sed -u -e 's/^Linking .*\//Linking /' | \
|
||||
sed -u -e 's/^.*\// /' | \
|
||||
grep --line-buffered -v "$FILTER"
|
||||
|
||||
echo "Build Done"
|
@@ -16,6 +16,11 @@
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
macro(list_insert_after
|
||||
@@ -147,9 +152,9 @@ function(blender_include_dirs
|
||||
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
|
||||
list(APPEND _ALL_INCS ${_ABS_INC})
|
||||
# for checking for invalid includes, disable for regular use
|
||||
# if(NOT EXISTS "${_ABS_INC}/")
|
||||
# message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
|
||||
# endif()
|
||||
##if(NOT EXISTS "${_ABS_INC}/")
|
||||
## message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
|
||||
##endif()
|
||||
endforeach()
|
||||
include_directories(${_ALL_INCS})
|
||||
endfunction()
|
||||
@@ -162,9 +167,9 @@ function(blender_include_dirs_sys
|
||||
foreach(_INC ${ARGV})
|
||||
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
|
||||
list(APPEND _ALL_INCS ${_ABS_INC})
|
||||
# if(NOT EXISTS "${_ABS_INC}/")
|
||||
# message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
|
||||
# endif()
|
||||
##if(NOT EXISTS "${_ABS_INC}/")
|
||||
## message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
|
||||
##endif()
|
||||
endforeach()
|
||||
include_directories(SYSTEM ${_ALL_INCS})
|
||||
endfunction()
|
||||
@@ -173,23 +178,9 @@ function(blender_source_group
|
||||
sources
|
||||
)
|
||||
|
||||
# if enabled, use the sources directories as filters.
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
|
||||
foreach(_SRC ${sources})
|
||||
# remove ../'s
|
||||
get_filename_component(_SRC_DIR ${_SRC} REALPATH)
|
||||
get_filename_component(_SRC_DIR ${_SRC_DIR} DIRECTORY)
|
||||
string(FIND ${_SRC_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/" _pos)
|
||||
if(NOT _pos EQUAL -1)
|
||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" GROUP_ID ${_SRC_DIR})
|
||||
string(REPLACE "/" "\\" GROUP_ID ${GROUP_ID})
|
||||
source_group("${GROUP_ID}" FILES ${_SRC})
|
||||
endif()
|
||||
unset(_pos)
|
||||
endforeach()
|
||||
else()
|
||||
# Group by location on disk
|
||||
source_group("Source Files" FILES CMakeLists.txt)
|
||||
|
||||
foreach(_SRC ${sources})
|
||||
get_filename_component(_SRC_EXT ${_SRC} EXT)
|
||||
if((${_SRC_EXT} MATCHES ".h") OR
|
||||
@@ -197,14 +188,11 @@ function(blender_source_group
|
||||
(${_SRC_EXT} MATCHES ".hh"))
|
||||
|
||||
set(GROUP_ID "Header Files")
|
||||
elseif(${_SRC_EXT} MATCHES ".glsl$")
|
||||
set(GROUP_ID "Shaders")
|
||||
else()
|
||||
set(GROUP_ID "Source Files")
|
||||
endif()
|
||||
source_group("${GROUP_ID}" FILES ${_SRC})
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -239,7 +227,6 @@ function(blender_add_lib__impl
|
||||
sources
|
||||
includes
|
||||
includes_sys
|
||||
library_deps
|
||||
)
|
||||
|
||||
# message(STATUS "Configuring library ${name}")
|
||||
@@ -251,16 +238,12 @@ function(blender_add_lib__impl
|
||||
|
||||
add_library(${name} ${sources})
|
||||
|
||||
if(NOT "${library_deps}" STREQUAL "")
|
||||
target_link_libraries(${name} INTERFACE "${library_deps}")
|
||||
endif()
|
||||
|
||||
# works fine without having the includes
|
||||
# listed is helpful for IDE's (QtCreator/MSVC)
|
||||
blender_source_group("${sources}")
|
||||
|
||||
#if enabled, set the FOLDER property for visual studio projects
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
||||
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
|
||||
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
|
||||
@@ -279,12 +262,11 @@ function(blender_add_lib_nolist
|
||||
sources
|
||||
includes
|
||||
includes_sys
|
||||
library_deps
|
||||
)
|
||||
|
||||
add_cc_flags_custom_test(${name} PARENT_SCOPE)
|
||||
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_deps}")
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
|
||||
endfunction()
|
||||
|
||||
function(blender_add_lib
|
||||
@@ -292,36 +274,15 @@ function(blender_add_lib
|
||||
sources
|
||||
includes
|
||||
includes_sys
|
||||
library_deps
|
||||
)
|
||||
|
||||
add_cc_flags_custom_test(${name} PARENT_SCOPE)
|
||||
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_deps}")
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
|
||||
endfunction()
|
||||
|
||||
# Ninja only: assign 'heavy pool' to some targets that are especially RAM-consuming to build.
|
||||
function(setup_heavy_lib_pool)
|
||||
if(WITH_NINJA_POOL_JOBS AND NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
if(WITH_CYCLES)
|
||||
list(APPEND _HEAVY_LIBS "cycles_device" "cycles_kernel")
|
||||
endif()
|
||||
if(WITH_LIBMV)
|
||||
list(APPEND _HEAVY_LIBS "bf_intern_libmv")
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND _HEAVY_LIBS "bf_intern_openvdb")
|
||||
endif()
|
||||
|
||||
foreach(TARGET ${_HEAVY_LIBS})
|
||||
if(TARGET ${TARGET})
|
||||
set_property(TARGET ${TARGET} PROPERTY JOB_POOL_COMPILE compile_heavy_job_pool)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(SETUP_LIBDIRS)
|
||||
|
||||
@@ -352,9 +313,6 @@ function(SETUP_LIBDIRS)
|
||||
if(WITH_OPENIMAGEIO)
|
||||
link_directories(${OPENIMAGEIO_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
link_directories(${OPENIMAGEDENOISE_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENCOLORIO)
|
||||
link_directories(${OPENCOLORIO_LIBPATH})
|
||||
endif()
|
||||
@@ -396,7 +354,6 @@ endfunction()
|
||||
|
||||
macro(setup_platform_linker_flags)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||
endmacro()
|
||||
|
||||
@@ -406,20 +363,12 @@ function(setup_liblinks
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
|
||||
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
|
||||
|
||||
# jemalloc must be early in the list, to be before pthread (see T57998)
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${target}
|
||||
@@ -427,11 +376,19 @@ function(setup_liblinks
|
||||
${FREETYPE_LIBRARY}
|
||||
)
|
||||
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
|
||||
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
|
||||
target_link_libraries(${target} ${PYTHON_LINKFLAGS})
|
||||
|
||||
if(WIN32 AND NOT UNIX)
|
||||
file_list_suffix(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d")
|
||||
target_link_libraries_debug(${target} "${PYTHON_LIBRARIES_DEBUG}")
|
||||
target_link_libraries_optimized(${target} "${PYTHON_LIBRARIES}")
|
||||
unset(PYTHON_LIBRARIES_DEBUG)
|
||||
else()
|
||||
target_link_libraries(${target} ${PYTHON_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LZO AND WITH_SYSTEM_LZO)
|
||||
target_link_libraries(${target} ${LZO_LIBRARIES})
|
||||
@@ -460,27 +417,24 @@ function(setup_liblinks
|
||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||
target_link_libraries(${target} ${SDL_LIBRARY})
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
if(WITH_IMAGE_TIFF)
|
||||
target_link_libraries(${target} ${TIFF_LIBRARY})
|
||||
endif()
|
||||
if(WITH_OPENIMAGEIO)
|
||||
target_link_libraries(${target} ${OPENIMAGEIO_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
target_link_libraries(${target} ${OPENIMAGEDENOISE_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_TBB)
|
||||
target_link_libraries(${target} ${TBB_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENCOLORIO)
|
||||
target_link_libraries(${target} ${OPENCOLORIO_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENSUBDIV)
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CYCLES_EMBREE)
|
||||
target_link_libraries(${target} ${EMBREE_LIBRARIES})
|
||||
endif()
|
||||
@@ -494,9 +448,6 @@ function(setup_liblinks
|
||||
if(WITH_ALEMBIC)
|
||||
target_link_libraries(${target} ${ALEMBIC_LIBRARIES} ${HDF5_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_IMAGE_TIFF)
|
||||
target_link_libraries(${target} ${TIFF_LIBRARY})
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
target_link_libraries(${target} ${OPENEXR_LIBRARIES})
|
||||
endif()
|
||||
@@ -534,6 +485,12 @@ function(setup_liblinks
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
target_link_libraries(${target} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
target_link_libraries(${target} ${LLVM_LIBRARY})
|
||||
endif()
|
||||
@@ -570,7 +527,7 @@ function(setup_liblinks
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
# System libraries with no dependencies such as platform link libs or opengl should go last.
|
||||
#system libraries with no dependencies such as platform link libs or opengl should go last
|
||||
target_link_libraries(${target}
|
||||
${BLENDER_GL_LIBRARIES})
|
||||
|
||||
@@ -578,6 +535,265 @@ function(setup_liblinks
|
||||
target_link_libraries(${target} ${PLATFORM_LINKLIBS})
|
||||
endfunction()
|
||||
|
||||
|
||||
function(SETUP_BLENDER_SORTED_LIBS)
|
||||
|
||||
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
|
||||
|
||||
list(APPEND BLENDER_LINK_LIBS
|
||||
bf_windowmanager
|
||||
bf_render
|
||||
)
|
||||
|
||||
if(WITH_MOD_FLUID)
|
||||
list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES)
|
||||
list(APPEND BLENDER_LINK_LIBS
|
||||
cycles_render
|
||||
cycles_graph
|
||||
cycles_bvh
|
||||
cycles_device
|
||||
cycles_kernel
|
||||
cycles_util
|
||||
cycles_subd)
|
||||
if(WITH_CYCLES_OSL)
|
||||
list(APPEND BLENDER_LINK_LIBS cycles_kernel_osl)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
||||
list(APPEND BLENDER_LINK_LIBS
|
||||
audaspace
|
||||
audaspace-py)
|
||||
endif()
|
||||
|
||||
# Sort libraries
|
||||
set(BLENDER_SORTED_LIBS
|
||||
bf_windowmanager
|
||||
|
||||
bf_editor_undo
|
||||
|
||||
bf_editor_space_api
|
||||
bf_editor_space_action
|
||||
bf_editor_space_buttons
|
||||
bf_editor_space_console
|
||||
bf_editor_space_file
|
||||
bf_editor_space_graph
|
||||
bf_editor_space_image
|
||||
bf_editor_space_info
|
||||
bf_editor_space_logic
|
||||
bf_editor_space_nla
|
||||
bf_editor_space_node
|
||||
bf_editor_space_outliner
|
||||
bf_editor_space_script
|
||||
bf_editor_space_sequencer
|
||||
bf_editor_space_statusbar
|
||||
bf_editor_space_text
|
||||
bf_editor_space_time
|
||||
bf_editor_space_topbar
|
||||
bf_editor_space_userpref
|
||||
bf_editor_space_view3d
|
||||
bf_editor_space_clip
|
||||
|
||||
bf_editor_transform
|
||||
bf_editor_uvedit
|
||||
bf_editor_curve
|
||||
bf_editor_interface
|
||||
bf_editor_gizmo_library
|
||||
bf_editor_mesh
|
||||
bf_editor_metaball
|
||||
bf_editor_object
|
||||
bf_editor_gpencil
|
||||
bf_editor_lattice
|
||||
bf_editor_armature
|
||||
bf_editor_physics
|
||||
bf_editor_render
|
||||
bf_editor_scene
|
||||
bf_editor_screen
|
||||
bf_editor_sculpt_paint
|
||||
bf_editor_sound
|
||||
bf_editor_animation
|
||||
bf_editor_datafiles
|
||||
bf_editor_mask
|
||||
bf_editor_io
|
||||
bf_editor_util
|
||||
|
||||
bf_render
|
||||
bf_python
|
||||
bf_python_ext
|
||||
bf_python_mathutils
|
||||
bf_python_gpu
|
||||
bf_python_bmesh
|
||||
bf_freestyle
|
||||
bf_ikplugin
|
||||
bf_modifiers
|
||||
bf_gpencil_modifiers
|
||||
bf_alembic
|
||||
bf_bmesh
|
||||
bf_gpu
|
||||
bf_draw
|
||||
bf_blenloader
|
||||
bf_blenkernel
|
||||
bf_shader_fx
|
||||
bf_gpencil_modifiers
|
||||
bf_physics
|
||||
bf_nodes
|
||||
bf_rna
|
||||
bf_editor_gizmo_library # rna -> gizmo bad-level calls
|
||||
bf_python
|
||||
bf_imbuf
|
||||
bf_blenlib
|
||||
bf_depsgraph
|
||||
bf_intern_ghost
|
||||
bf_intern_string
|
||||
bf_avi
|
||||
bf_imbuf_cineon
|
||||
bf_imbuf_openexr
|
||||
bf_imbuf_openimageio
|
||||
bf_imbuf_dds
|
||||
bf_collada
|
||||
bf_intern_elbeem
|
||||
bf_intern_memutil
|
||||
bf_intern_guardedalloc
|
||||
bf_intern_ctr
|
||||
bf_intern_utfconv
|
||||
bf_intern_smoke
|
||||
extern_lzma
|
||||
extern_curve_fit_nd
|
||||
bf_intern_moto
|
||||
extern_openjpeg
|
||||
bf_dna
|
||||
|
||||
bf_blenfont
|
||||
bf_gpu # duplicate for blenfont
|
||||
bf_blentranslation
|
||||
bf_intern_audaspace
|
||||
audaspace
|
||||
audaspace-py
|
||||
bf_intern_mikktspace
|
||||
bf_intern_dualcon
|
||||
bf_intern_cycles
|
||||
cycles_device
|
||||
cycles_render
|
||||
cycles_graph
|
||||
cycles_bvh
|
||||
cycles_kernel
|
||||
cycles_util
|
||||
cycles_subd
|
||||
bf_intern_opencolorio
|
||||
bf_intern_gawain
|
||||
bf_intern_eigen
|
||||
extern_rangetree
|
||||
extern_wcwidth
|
||||
bf_intern_libmv
|
||||
extern_sdlew
|
||||
|
||||
bf_intern_glew_mx
|
||||
bf_intern_clog
|
||||
bf_intern_opensubdiv
|
||||
)
|
||||
|
||||
if(NOT WITH_SYSTEM_GLOG)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_glog)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_GFLAGS)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_gflags)
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR)
|
||||
# added for opencl compositor
|
||||
list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor")
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_intern_opencl")
|
||||
endif()
|
||||
|
||||
if(WITH_LIBMV)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_ceres)
|
||||
endif()
|
||||
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_LZO)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_minilzo)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_GLEW)
|
||||
list(APPEND BLENDER_SORTED_LIBS ${BLENDER_GLEW_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_BINRELOC)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_binreloc)
|
||||
endif()
|
||||
|
||||
if(WITH_CXX_GUARDEDALLOC)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
|
||||
endif()
|
||||
|
||||
if(WITH_IK_SOLVER)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_intern_elbeem" "bf_intern_iksolver")
|
||||
endif()
|
||||
|
||||
if(WITH_IK_ITASC)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_XDND)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "cycles_kernel" "cycles_kernel_osl")
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
|
||||
endif()
|
||||
|
||||
if(WITH_BULLET)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
|
||||
endif()
|
||||
|
||||
if(WITH_BULLET AND NOT WITH_SYSTEM_BULLET)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "extern_openjpeg" "extern_bullet")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_gpudirect)
|
||||
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})
|
||||
if(${SEARCHLIB} STREQUAL ${SORTLIB})
|
||||
set(REMLIB "")
|
||||
endif()
|
||||
endforeach()
|
||||
if(REMLIB)
|
||||
# message(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
|
||||
list(APPEND REM_MSG ${REMLIB})
|
||||
list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
|
||||
endif()
|
||||
endforeach()
|
||||
if(REM_MSG)
|
||||
list(SORT REM_MSG)
|
||||
message(STATUS "Blender Skipping: (${REM_MSG})")
|
||||
endif()
|
||||
|
||||
|
||||
set(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} PARENT_SCOPE)
|
||||
|
||||
# for top-level tests
|
||||
set_property(GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP ${BLENDER_SORTED_LIBS})
|
||||
endfunction()
|
||||
|
||||
macro(TEST_SSE_SUPPORT
|
||||
_sse_flags
|
||||
_sse2_flags)
|
||||
@@ -723,7 +939,7 @@ macro(remove_strict_flags)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
remove_cc_flag(/w34189) # Restore warn C4189 (unused variable) back to w4
|
||||
# TODO
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
@@ -965,7 +1181,6 @@ function(delayed_install
|
||||
endif()
|
||||
set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
|
||||
endforeach()
|
||||
unset(f)
|
||||
endfunction()
|
||||
|
||||
# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
|
||||
@@ -1213,9 +1428,7 @@ macro(openmp_delayload
|
||||
)
|
||||
if(MSVC)
|
||||
if(WITH_OPENMP)
|
||||
if(MSVC_CLANG)
|
||||
set(OPENMP_DLL_NAME "libomp")
|
||||
elseif(MSVC_VERSION EQUAL 1800)
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(OPENMP_DLL_NAME "vcomp120")
|
||||
else()
|
||||
set(OPENMP_DLL_NAME "vcomp140")
|
||||
@@ -1228,25 +1441,25 @@ macro(openmp_delayload
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(blender_precompile_headers target cpp header)
|
||||
if(MSVC)
|
||||
# get the name for the pch output file
|
||||
get_filename_component( pchbase ${cpp} NAME_WE )
|
||||
set( pchfinal "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${pchbase}.pch" )
|
||||
|
||||
# mark the cpp as the one outputting the pch
|
||||
set_property(SOURCE ${cpp} APPEND PROPERTY OBJECT_OUTPUTS "${pchfinal}")
|
||||
|
||||
# get all sources for the target
|
||||
get_target_property(sources ${target} SOURCES)
|
||||
|
||||
# make all sources depend on the pch to enforce the build order
|
||||
foreach(src ${sources})
|
||||
set_property(SOURCE ${src} APPEND PROPERTY OBJECT_DEPENDS "${pchfinal}")
|
||||
endforeach()
|
||||
|
||||
target_sources(${target} PRIVATE ${cpp} ${header})
|
||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS "/Yu${header} /Fp${pchfinal} /FI${header}")
|
||||
set_source_files_properties(${cpp} PROPERTIES COMPILE_FLAGS "/Yc${header} /Fp${pchfinal}")
|
||||
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()
|
||||
|
@@ -26,7 +26,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
# message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||
execute_process(COMMAND git rev-parse --short=12 HEAD
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@@ -80,28 +80,22 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender ${MAJOR_VERSION}.${MINOR_VERSION}")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender ${MAJOR_VERSION}.${MINOR_VERSION}")
|
||||
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_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt)
|
||||
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(BLENDER_NAMESPACE_GUID "507F933F-5898-404A-9A05-18282FD491A6")
|
||||
|
||||
string(UUID CPACK_WIX_UPGRADE_GUID
|
||||
NAMESPACE ${BLENDER_NAMESPACE_GUID}
|
||||
NAME ${CPACK_PACKAGE_INSTALL_DIRECTORY}
|
||||
TYPE SHA1 UPPER
|
||||
)
|
||||
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)
|
||||
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:medium)
|
||||
#force lzma instead of deflate
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
|
||||
@@ -135,7 +129,7 @@ elseif(UNIX)
|
||||
|
||||
add_package_archive(
|
||||
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
|
||||
"tar.xz")
|
||||
"tar.bz2")
|
||||
endif()
|
||||
|
||||
unset(MAJOR_VERSION)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user