Compare commits
94 Commits
geometry-n
...
smoke2
Author | SHA1 | Date | |
---|---|---|---|
b61abd4fe0 | |||
43bb431548 | |||
b8905ba0a6 | |||
79f638791d | |||
0e31dcdf0d | |||
e9d3a54a40 | |||
7f793b35b2 | |||
d0608872b7 | |||
7f28ddfa8a | |||
b8111fbea0 | |||
76837bd2b9 | |||
adbbcef63b | |||
9868924573 | |||
6f55d7d9ae | |||
cc68d19329 | |||
5a472e64fb | |||
72780227d0 | |||
8de4c368e4 | |||
ec66cd4910 | |||
bb5e072320 | |||
13d14ea415 | |||
e99a990258 | |||
fc19e608a6 | |||
cd277bf7fe | |||
8397398c2a | |||
9885ac2096 | |||
9fa604d301 | |||
8317c02ec4 | |||
8c55c2d65a | |||
c8441d334c | |||
723982def2 | |||
8178792f9b | |||
12c6ad7021 | |||
1801983f36 | |||
3ac5d889f6 | |||
22892f40ee | |||
e4076d9590 | |||
440c7fa56d | |||
f74046ab65 | |||
35a92bacd0 | |||
0ef73826e2 | |||
6489bb9593 | |||
2c7363f5d5 | |||
3894178175 | |||
aa2addae16 | |||
8309dc7159 | |||
c0f8ad978c | |||
15e6219fd3 | |||
5e6fd995fe | |||
3319a32b98 | |||
3fbe6b3ac3 | |||
3242b8afea | |||
8e3b221aaa | |||
483d4380e8 | |||
cd9a3a3ca4 | |||
1a81eba430 | |||
ac33410abb | |||
9f61ef1e89 | |||
c0e7c7acbf | |||
5413fee77e | |||
37ed2e4f46 | |||
f3ed42fd4b | |||
d15ad02888 | |||
471d0fcc3f | |||
7c650602ca | |||
ecae41cc25 | |||
6a71020a92 | |||
9824c244eb | |||
c292d72738 | |||
f495c4db16 | |||
208f09ce6b | |||
c4885add26 | |||
b482177b16 | |||
4231167c51 | |||
81967c83fd | |||
59e37352a5 | |||
e1c9dc6892 | |||
fe883eac11 | |||
22db0708ba | |||
b84bd25655 | |||
8ad9b4d497 | |||
103b601747 | |||
084582cf45 | |||
62de3d42b6 | |||
dfdf45b6f6 | |||
85f56b9a10 | |||
c50902b334 | |||
81dbaf622f | |||
9d53b573c6 | |||
f10f33656f | |||
04233010bd | |||
bda4be5f88 | |||
2316b93202 | |||
1479698f09 |
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"project_id" : "Blender",
|
||||
"conduit_uri" : "https://developer.blender.org/",
|
||||
"phabricator.uri" : "https://developer.blender.org/",
|
||||
"git.default-relative-commit" : "origin/master",
|
||||
"arc.land.update.default" : "rebase",
|
||||
"arc.land.onto.default" : "master"
|
||||
}
|
270
.clang-format
270
.clang-format
@@ -1,270 +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
|
||||
|
||||
SortIncludes: true
|
||||
|
||||
# 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_MESH_BUFFER_CACHE
|
||||
- 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
|
||||
- GP_EVALUATED_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
|
||||
- LISTBASE_FOREACH_INDEX
|
||||
- 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
|
||||
- RENDER_PASS_ITER_BEGIN
|
||||
- RNA_BEGIN
|
||||
- RNA_PROP_BEGIN
|
||||
- RNA_STRUCT_BEGIN
|
||||
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
|
||||
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
|
||||
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
|
||||
- SEQ_ALL_BEGIN
|
||||
- SEQ_CURRENT_BEGIN
|
||||
- SURFACE_QUAD_ITER_BEGIN
|
||||
- foreach
|
||||
- ED_screen_areas_iter
|
||||
- SLOT_PROBING_BEGIN
|
||||
- SET_SLOT_PROBING_BEGIN
|
||||
- MAP_SLOT_PROBING_BEGIN
|
||||
- VECTOR_SET_SLOT_PROBING_BEGIN
|
||||
|
||||
# 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
|
36
.clang-tidy
36
.clang-tidy
@@ -1,36 +0,0 @@
|
||||
# The warnings below are disabled because they are too pedantic and not worth fixing.
|
||||
# Some of them will be enabled as part of the Clang-Tidy task, see T78535.
|
||||
|
||||
Checks: >
|
||||
-*,
|
||||
readability-*,
|
||||
-readability-uppercase-literal-suffix,
|
||||
-readability-magic-numbers,
|
||||
-readability-isolate-declaration,
|
||||
-readability-convert-member-functions-to-static,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-readability-simplify-boolean-expr,
|
||||
-readability-make-member-function-const,
|
||||
|
||||
-readability-misleading-indentation,
|
||||
|
||||
-readability-redundant-member-init,
|
||||
-readability-use-anyofallof,
|
||||
|
||||
-readability-function-cognitive-complexity,
|
||||
|
||||
bugprone-*,
|
||||
-bugprone-narrowing-conversions,
|
||||
-bugprone-unhandled-self-assignment,
|
||||
-bugprone-branch-clone,
|
||||
-bugprone-macro-parentheses,
|
||||
-bugprone-reserved-identifier,
|
||||
|
||||
-bugprone-sizeof-expression,
|
||||
-bugprone-integer-division,
|
||||
|
||||
-bugprone-exception-escape,
|
||||
-bugprone-redundant-branch-condition,
|
||||
|
||||
WarningsAsErrors: '*'
|
@@ -1,44 +0,0 @@
|
||||
# C/C++
|
||||
[*.{c,cc,h,hh,inl,glsl}]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
|
||||
# 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
|
||||
|
||||
# Python
|
||||
[*.py]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# Shell
|
||||
[*.sh]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
|
||||
# reStructuredText
|
||||
[*.rst]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
max_line_length = 120
|
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
|
48
.gitignore
vendored
48
.gitignore
vendored
@@ -1,48 +0,0 @@
|
||||
# generic files to ignore
|
||||
.*
|
||||
|
||||
# python temp paths
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# editors
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
*#
|
||||
|
||||
# Indexes for emacs, vi & others
|
||||
TAGS
|
||||
tags
|
||||
|
||||
# QtCreator
|
||||
CMakeLists.txt.user
|
||||
|
||||
# ms-windows
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
|
||||
# commonly used paths in blender
|
||||
/blender.bin
|
||||
/BUILD_NOTES.txt
|
||||
|
||||
# local patches
|
||||
/*.patch
|
||||
/*.diff
|
||||
|
||||
# in-source doc-gen
|
||||
/doc/doxygen/html/
|
||||
/doc/python_api/sphinx-in-tmp/
|
||||
/doc/python_api/sphinx-in/
|
||||
/doc/python_api/sphinx-out/
|
||||
/doc/python_api/rst/bmesh.ops.rst
|
||||
|
||||
# in-source lib downloads
|
||||
/build_files/build_environment/downloads
|
||||
|
||||
# in-source buildbot signing configuration
|
||||
/build_files/buildbot/codesign/config_server.py
|
||||
|
||||
# smoke simulation noise tile (generated)
|
||||
waveletNoiseTile.bin
|
20
.gitmodules
vendored
20
.gitmodules
vendored
@@ -1,20 +0,0 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
branch = master
|
||||
ignore = all
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
branch = master
|
||||
ignore = all
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
url = ../blender-translations.git
|
||||
branch = master
|
||||
ignore = all
|
||||
[submodule "source/tools"]
|
||||
path = source/tools
|
||||
url = ../blender-dev-tools.git
|
||||
branch = master
|
||||
ignore = all
|
2954
CMakeLists.txt
2954
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
510
GNUmakefile
510
GNUmakefile
@@ -1,4 +1,4 @@
|
||||
# -*- mode: gnumakefile; tab-width: 4; indent-tabs-mode: t; -*-
|
||||
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
|
||||
# vim: tabstop=4
|
||||
#
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
@@ -24,185 +24,25 @@
|
||||
# ../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.
|
||||
* release Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
|
||||
* 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
|
||||
|
||||
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_descriptions: Check for duplicate/invalid descriptions.
|
||||
|
||||
Spell Checkers
|
||||
|
||||
* check_spelling_c: Check for spelling errors (C/C++ only),
|
||||
* check_spelling_osl: Check for spelling errors (OSL only).
|
||||
* check_spelling_py: Check for spelling errors (Python only).
|
||||
|
||||
Note that spell checkers can take a 'CHECK_SPELLING_CACHE' filepath argument,
|
||||
so re-running does not need to re-check unchanged files.
|
||||
|
||||
Example:
|
||||
make check_spelling_c CHECK_SPELLING_CACHE=../spelling_cache.data
|
||||
|
||||
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)
|
||||
|
||||
# This makefile is not meant for Windows
|
||||
ifeq ($(OS),Windows_NT)
|
||||
$(error On Windows, use "cmd //c make.bat" instead of "make")
|
||||
endif
|
||||
|
||||
# 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)
|
||||
BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build_$(OS_NCASE)
|
||||
endif
|
||||
|
||||
# Dependencies DIR's
|
||||
DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
|
||||
|
||||
ifndef DEPS_BUILD_DIR
|
||||
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
|
||||
endif
|
||||
|
||||
ifndef DEPS_INSTALL_DIR
|
||||
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
|
||||
|
||||
ifneq ($(OS_NCASE),darwin)
|
||||
# Add processor type to directory name
|
||||
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Allow to use alternative binary (pypy3, etc)
|
||||
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,91 +52,44 @@ ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_debug
|
||||
BUILD_TYPE:=Debug
|
||||
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)
|
||||
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)
|
||||
endif
|
||||
ifneq "$(findstring release, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_release
|
||||
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_release.cmake" $(CMAKE_CONFIG_ARGS)
|
||||
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/blender_lite.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_DIR:=$(BUILD_DIR)_bpy
|
||||
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)
|
||||
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"
|
||||
else
|
||||
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Get the number of cores for threaded build
|
||||
ifndef NPROCS
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell nproc)
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
|
||||
endif
|
||||
ifneq (,$(filter $(OS),Darwin FreeBSD))
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
endif
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3)
|
||||
endif
|
||||
ifeq ($(OS), FreeBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Macro for configuring cmake
|
||||
|
||||
CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
|
||||
-H"$(BLENDER_DIR)" \
|
||||
-B"$(BUILD_DIR)" \
|
||||
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
|
||||
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
|
||||
-H$(BLENDER_DIR) \
|
||||
-B$(BUILD_DIR) \
|
||||
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -305,239 +98,188 @@ CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
|
||||
# X11 spesific
|
||||
ifdef DISPLAY
|
||||
CMAKE_CONFIG_TOOL = cmake-gui
|
||||
else
|
||||
else
|
||||
CMAKE_CONFIG_TOOL = ccmake
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build Blender
|
||||
all: .FORCE
|
||||
all:
|
||||
@echo
|
||||
@echo Configuring Blender in \"$(BUILD_DIR)\" ...
|
||||
@echo Configuring Blender ...
|
||||
|
||||
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
||||
# # $(CMAKE_CONFIG); \
|
||||
# # fi
|
||||
|
||||
# # do this always incase of failed initial build, could be smarter here...
|
||||
@$(CMAKE_CONFIG)
|
||||
# if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
||||
# $(CMAKE_CONFIG); \
|
||||
# fi
|
||||
|
||||
# do this always incase of failed initial build, could be smarter here...
|
||||
$(CMAKE_CONFIG)
|
||||
|
||||
@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)
|
||||
@echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
|
||||
@echo
|
||||
|
||||
debug: all
|
||||
full: all
|
||||
lite: all
|
||||
release: all
|
||||
cycles: all
|
||||
headless: all
|
||||
bpy: all
|
||||
developer: all
|
||||
ninja: all
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build dependencies
|
||||
DEPS_TARGET = install
|
||||
ifneq "$(findstring clean, $(MAKECMDGOALS))" ""
|
||||
DEPS_TARGET = clean
|
||||
endif
|
||||
|
||||
deps: .FORCE
|
||||
@echo
|
||||
@echo Configuring dependencies in \"$(DEPS_BUILD_DIR)\"
|
||||
|
||||
@cmake -H"$(DEPS_SOURCE_DIR)" \
|
||||
-B"$(DEPS_BUILD_DIR)" \
|
||||
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
|
||||
|
||||
@echo
|
||||
@echo Building dependencies ...
|
||||
$(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
|
||||
@echo
|
||||
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
|
||||
@echo
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration (save some cd'ing around)
|
||||
config: .FORCE
|
||||
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
|
||||
config:
|
||||
$(CMAKE_CONFIG_TOOL) $(BUILD_DIR)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Help for build targets
|
||||
export HELP_TEXT
|
||||
help: .FORCE
|
||||
@echo "$$HELP_TEXT"
|
||||
help:
|
||||
@echo ""
|
||||
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
|
||||
@echo " * debug - build a debug binary"
|
||||
@echo " * lite - disable non essential features for a smaller binary and faster build"
|
||||
@echo " * headless - build without an interface (renderfarm or server automation)"
|
||||
@echo " * bpy - build as a python module which can be loaded from python directly"
|
||||
@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 pacmanpackage"
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Testing Targets (not associated with building blender)"
|
||||
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
|
||||
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
|
||||
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
|
||||
@echo " * test_style - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo ""
|
||||
@echo "Static Source Code Checking (not associated with building blender)"
|
||||
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
|
||||
@echo " * check_splint - run blenders source through splint (C only)"
|
||||
@echo " * check_sparse - run blenders source through sparse (C only)"
|
||||
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
|
||||
@echo " * check_spelling_py - check for spelling errors (Python only)"
|
||||
@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 ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Packages
|
||||
#
|
||||
package_debian: .FORCE
|
||||
package_debian:
|
||||
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
|
||||
|
||||
package_pacman: .FORCE
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
|
||||
package_pacman:
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg --asroot
|
||||
|
||||
package_archive: .FORCE
|
||||
make -C "$(BUILD_DIR)" -s package_archive
|
||||
package_archive:
|
||||
make -C $(BUILD_DIR) -s package_archive
|
||||
@echo archive in "$(BUILD_DIR)/release"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
#
|
||||
test: .FORCE
|
||||
$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
|
||||
test:
|
||||
cd $(BUILD_DIR) ; ctest . --output-on-failure
|
||||
|
||||
# run pep8 check check on scripts we distribute.
|
||||
test_pep8: .FORCE
|
||||
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
|
||||
test_pep8:
|
||||
python3.2 source/tests/pep8.py > test_pep8.log 2>&1
|
||||
@echo "written: test_pep8.log"
|
||||
|
||||
# run some checks on our cmakefiles.
|
||||
test_cmake: .FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
||||
test_cmake:
|
||||
python3.2 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
||||
@echo "written: test_cmake_consistency.log"
|
||||
|
||||
# run deprecation tests, see if we have anything to remove.
|
||||
test_deprecated: .FORCE
|
||||
$(PYTHON) tests/check_deprecated.py
|
||||
test_deprecated:
|
||||
python3.2 source/tests/check_deprecated.py
|
||||
|
||||
test_style:
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/source/blender $(BLENDER_DIR)/source/creator --no-length-check
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Project Files
|
||||
#
|
||||
|
||||
project_qtcreator: .FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
|
||||
project_qtcreator:
|
||||
python3.2 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR)
|
||||
|
||||
project_netbeans: .FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
||||
project_netbeans:
|
||||
python3.2 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR)
|
||||
|
||||
project_eclipse: .FORCE
|
||||
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
|
||||
project_eclipse:
|
||||
cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Static Checking
|
||||
#
|
||||
|
||||
check_cppcheck: .FORCE
|
||||
check_cppcheck:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
|
||||
"$(BLENDER_DIR)/check_cppcheck.txt"
|
||||
@echo "written: check_cppcheck.txt"
|
||||
cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
|
||||
|
||||
check_clang_array: .FORCE
|
||||
check_splint:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
|
||||
cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
|
||||
|
||||
check_splint: .FORCE
|
||||
check_sparse:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
|
||||
cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
|
||||
|
||||
check_sparse: .FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
|
||||
|
||||
check_smatch: .FORCE
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
|
||||
|
||||
check_spelling_py: .FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/release/scripts"
|
||||
|
||||
check_spelling_c: .FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
--cache-file=$(CHECK_SPELLING_CACHE) \
|
||||
"$(BLENDER_DIR)/source" \
|
||||
"$(BLENDER_DIR)/intern/cycles" \
|
||||
"$(BLENDER_DIR)/intern/guardedalloc" \
|
||||
"$(BLENDER_DIR)/intern/ghost" \
|
||||
|
||||
check_spelling_osl: .FORCE
|
||||
cd "$(BUILD_DIR)" ;\
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
--cache-file=$(CHECK_SPELLING_CACHE) \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
|
||||
|
||||
check_descriptions: .FORCE
|
||||
$(BLENDER_BIN) --background -noaudio --factory-startup --python \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Utilities
|
||||
#
|
||||
|
||||
source_archive: .FORCE
|
||||
./build_files/utils/make_source_archive.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
|
||||
BLENDER_BIN=$(BLENDER_BIN) \
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
|
||||
|
||||
update: .FORCE
|
||||
$(PYTHON) ./build_files/utils/make_update.py
|
||||
|
||||
format: .FORCE
|
||||
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
|
||||
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
|
||||
check_spelling_py:
|
||||
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
|
||||
|
||||
check_spelling_c:
|
||||
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Documentation
|
||||
#
|
||||
|
||||
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
|
||||
doc_py: .FORCE
|
||||
ASAN_OPTIONS=halt_on_error=0 \
|
||||
$(BLENDER_BIN) --background -noaudio --factory-startup \
|
||||
--python doc/python_api/sphinx_doc_gen.py
|
||||
sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
|
||||
doc_py:
|
||||
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
|
||||
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
|
||||
|
||||
doc_doxy: .FORCE
|
||||
doc_doxy:
|
||||
cd doc/doxygen; doxygen Doxyfile
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
|
||||
|
||||
doc_dna: .FORCE
|
||||
$(BLENDER_BIN) --background -noaudio --factory-startup \
|
||||
--python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
doc_dna:
|
||||
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
|
||||
|
||||
doc_man: .FORCE
|
||||
$(PYTHON) doc/manpage/blender.1.py $(BLENDER_BIN) blender.1
|
||||
doc_man:
|
||||
python3.2 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
|
||||
|
||||
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
|
||||
clean:
|
||||
$(MAKE) -C $(BUILD_DIR) clean
|
||||
|
||||
.PHONY: all
|
||||
|
||||
.FORCE:
|
||||
|
928
SConstruct
Normal file
928
SConstruct
Normal file
@@ -0,0 +1,928 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Nathan Letwory.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# Main entry-point for the SCons building system
|
||||
# Set up some custom actions and target/argument handling
|
||||
# Then read all SConscripts and build
|
||||
#
|
||||
# TODO: fix /FORCE:MULTIPLE on windows to get proper debug builds.
|
||||
# TODO: directory copy functions are far too complicated, see:
|
||||
# http://wiki.blender.org/index.php/User:Ideasman42/SConsNotSimpleInstallingFiles
|
||||
|
||||
import platform as pltfrm
|
||||
|
||||
# Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
|
||||
if pltfrm.architecture()[0] == '64bit':
|
||||
bitness = 64
|
||||
else:
|
||||
bitness = 32
|
||||
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
import string
|
||||
import shutil
|
||||
import glob
|
||||
import re
|
||||
from tempfile import mkdtemp
|
||||
|
||||
# store path to tools
|
||||
toolpath=os.path.join(".", "build_files", "scons", "tools")
|
||||
|
||||
# needed for importing tools
|
||||
sys.path.append(toolpath)
|
||||
|
||||
import Blender
|
||||
import btools
|
||||
import bcolors
|
||||
|
||||
EnsureSConsVersion(1,0,0)
|
||||
|
||||
# Before we do anything, let's check if we have a sane os.environ
|
||||
if not btools.check_environ():
|
||||
Exit()
|
||||
|
||||
BlenderEnvironment = Blender.BlenderEnvironment
|
||||
B = Blender
|
||||
|
||||
VERSION = btools.VERSION # This is used in creating the local config directories
|
||||
VERSION_RELEASE_CYCLE = btools.VERSION_RELEASE_CYCLE
|
||||
|
||||
### globals ###
|
||||
platform = sys.platform
|
||||
quickie = None
|
||||
quickdebug = None
|
||||
|
||||
##### BEGIN SETUP #####
|
||||
|
||||
B.possible_types = ['core', 'player', 'player2', 'intern', 'extern']
|
||||
|
||||
B.binarykind = ['blender' , 'blenderplayer']
|
||||
##################################
|
||||
# target and argument validation #
|
||||
##################################
|
||||
# XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
|
||||
use_color = ARGUMENTS.get('BF_FANCY', '1')
|
||||
if platform=='win32':
|
||||
use_color = None
|
||||
|
||||
if not use_color=='1':
|
||||
B.bc.disable()
|
||||
|
||||
#on defaut white Os X terminal, some colors are totally unlegible
|
||||
if platform=='darwin':
|
||||
B.bc.OKGREEN = '\033[34m'
|
||||
B.bc.WARNING = '\033[36m'
|
||||
|
||||
# arguments
|
||||
print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
|
||||
B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
|
||||
btools.print_arguments(B.arguments, B.bc)
|
||||
|
||||
# targets
|
||||
print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
|
||||
B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
|
||||
btools.print_targets(B.targets, B.bc)
|
||||
|
||||
##########################
|
||||
# setting up environment #
|
||||
##########################
|
||||
|
||||
# handling cmd line arguments & config file
|
||||
|
||||
# bitness stuff
|
||||
tempbitness = int(B.arguments.get('BF_BITNESS', bitness)) # default to bitness found as per starting python
|
||||
if tempbitness in (32, 64): # only set if 32 or 64 has been given
|
||||
bitness = int(tempbitness)
|
||||
|
||||
if bitness:
|
||||
B.bitness = bitness
|
||||
else:
|
||||
B.bitness = tempbitness
|
||||
|
||||
|
||||
# first check cmdline for toolset and we create env to work on
|
||||
quickie = B.arguments.get('BF_QUICK', None)
|
||||
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
|
||||
|
||||
if quickdebug:
|
||||
B.quickdebug=string.split(quickdebug, ',')
|
||||
else:
|
||||
B.quickdebug=[]
|
||||
|
||||
if quickie:
|
||||
B.quickie=string.split(quickie,',')
|
||||
else:
|
||||
B.quickie=[]
|
||||
|
||||
toolset = B.arguments.get('BF_TOOLSET', None)
|
||||
if toolset:
|
||||
print "Using " + toolset
|
||||
if toolset=='mstoolkit':
|
||||
env = BlenderEnvironment(ENV = os.environ)
|
||||
env.Tool('mstoolkit', [toolpath])
|
||||
else:
|
||||
env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
|
||||
if env:
|
||||
btools.SetupSpawn(env)
|
||||
else:
|
||||
if bitness==64 and platform=='win32':
|
||||
env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64')
|
||||
else:
|
||||
env = BlenderEnvironment(ENV = os.environ)
|
||||
|
||||
if not env:
|
||||
print "Could not create a build environment"
|
||||
Exit()
|
||||
|
||||
cc = B.arguments.get('CC', None)
|
||||
cxx = B.arguments.get('CXX', None)
|
||||
if cc:
|
||||
env['CC'] = cc
|
||||
if cxx:
|
||||
env['CXX'] = cxx
|
||||
|
||||
if sys.platform=='win32':
|
||||
if env['CC'] in ['cl', 'cl.exe']:
|
||||
platform = 'win64-vc' if bitness == 64 else 'win32-vc'
|
||||
elif env['CC'] in ['gcc']:
|
||||
platform = 'win64-mingw' if bitness == 64 else 'win32-mingw'
|
||||
|
||||
env.SConscriptChdir(0)
|
||||
|
||||
# Remove major kernel version from linux platform.
|
||||
# After Linus switched kernel to new version model this major version
|
||||
# shouldn't take much sense for building rules.
|
||||
|
||||
if re.match('linux[0-9]+', platform):
|
||||
platform = 'linux'
|
||||
|
||||
crossbuild = B.arguments.get('BF_CROSS', None)
|
||||
if crossbuild and platform not in ('win32-vc', 'win64-vc'):
|
||||
platform = 'linuxcross'
|
||||
|
||||
env['OURPLATFORM'] = platform
|
||||
|
||||
configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
|
||||
|
||||
if os.path.exists(configfile):
|
||||
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
|
||||
else:
|
||||
print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
|
||||
|
||||
if crossbuild and env['PLATFORM'] != 'win32':
|
||||
print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
|
||||
env.Tool('crossmingw', [toolpath])
|
||||
# todo: determine proper libs/includes etc.
|
||||
# Needed for gui programs, console programs should do without it
|
||||
|
||||
# Now we don't need this option to have console window
|
||||
# env.Append(LINKFLAGS=['-mwindows'])
|
||||
|
||||
userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
|
||||
# first read platform config. B.arguments will override
|
||||
optfiles = [configfile]
|
||||
if os.path.exists(userconfig):
|
||||
print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
|
||||
optfiles += [userconfig]
|
||||
else:
|
||||
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
|
||||
|
||||
opts = btools.read_opts(env, optfiles, B.arguments)
|
||||
opts.Update(env)
|
||||
|
||||
if sys.platform=='win32':
|
||||
if bitness==64:
|
||||
env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
|
||||
|
||||
if not env['BF_FANCY']:
|
||||
B.bc.disable()
|
||||
|
||||
|
||||
# remove install dir so old and new files are not mixed.
|
||||
# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
|
||||
# TODO: perhaps we need an option (off by default) to not do this altogether...
|
||||
if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
|
||||
scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
|
||||
if os.path.isdir(scriptsDir):
|
||||
print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
|
||||
shutil.rmtree(scriptsDir)
|
||||
|
||||
|
||||
SetOption('num_jobs', int(env['BF_NUMJOBS']))
|
||||
print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
|
||||
print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
|
||||
|
||||
if 'blenderlite' in B.targets:
|
||||
target_env_defs = {}
|
||||
target_env_defs['WITH_BF_GAMEENGINE'] = False
|
||||
target_env_defs['WITH_BF_CYCLES'] = False
|
||||
target_env_defs['WITH_BF_OPENAL'] = False
|
||||
target_env_defs['WITH_BF_OPENEXR'] = False
|
||||
target_env_defs['WITH_BF_OPENMP'] = False
|
||||
target_env_defs['WITH_BF_ICONV'] = False
|
||||
target_env_defs['WITH_BF_INTERNATIONAL'] = False
|
||||
target_env_defs['WITH_BF_OPENJPEG'] = False
|
||||
target_env_defs['WITH_BF_FFMPEG'] = False
|
||||
target_env_defs['WITH_BF_QUICKTIME'] = False
|
||||
target_env_defs['WITH_BF_REDCODE'] = False
|
||||
target_env_defs['WITH_BF_DDS'] = False
|
||||
target_env_defs['WITH_BF_CINEON'] = False
|
||||
target_env_defs['WITH_BF_FRAMESERVER'] = False
|
||||
target_env_defs['WITH_BF_HDR'] = False
|
||||
target_env_defs['WITH_BF_ZLIB'] = False
|
||||
target_env_defs['WITH_BF_SDL'] = False
|
||||
target_env_defs['WITH_BF_JPEG'] = False
|
||||
target_env_defs['WITH_BF_PNG'] = False
|
||||
target_env_defs['WITH_BF_BULLET'] = False
|
||||
target_env_defs['WITH_BF_BINRELOC'] = False
|
||||
target_env_defs['BF_BUILDINFO'] = False
|
||||
target_env_defs['WITH_BF_FLUID'] = False
|
||||
target_env_defs['WITH_BF_OCEANSIM'] = False
|
||||
target_env_defs['WITH_BF_SMOKE'] = False
|
||||
target_env_defs['WITH_BF_DECIMATE'] = False
|
||||
target_env_defs['WITH_BF_BOOLEAN'] = False
|
||||
target_env_defs['WITH_BF_REMESH'] = False
|
||||
target_env_defs['WITH_BF_PYTHON'] = False
|
||||
target_env_defs['WITH_BF_3DMOUSE'] = False
|
||||
target_env_defs['WITH_BF_LIBMV'] = False
|
||||
|
||||
# Merge blenderlite, let command line to override
|
||||
for k,v in target_env_defs.iteritems():
|
||||
if k not in B.arguments:
|
||||
env[k] = v
|
||||
|
||||
# Extended OSX_SDK and 3D_CONNEXION_CLIENT_LIBRARY and JAckOSX detection for OSX
|
||||
if env['OURPLATFORM']=='darwin':
|
||||
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
|
||||
print "Available " + env['MACOSX_SDK_CHECK']
|
||||
if not 'Mac OS X 10.6' in env['MACOSX_SDK_CHECK']:
|
||||
print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.7.sdk"
|
||||
elif not 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
|
||||
print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.6.sdk"
|
||||
else:
|
||||
print B.bc.OKGREEN + "Found recommended sdk :" + B.bc.ENDC + " using MacOSX10.5.sdk"
|
||||
|
||||
# for now, Mac builders must download and install the 3DxWare 10 Beta 4 driver framework from 3Dconnexion
|
||||
# necessary header file lives here when installed:
|
||||
# /Library/Frameworks/3DconnexionClient.framework/Versions/Current/Headers/ConnexionClientAPI.h
|
||||
if env['WITH_BF_3DMOUSE'] == 1:
|
||||
if not os.path.exists('/Library/Frameworks/3DconnexionClient.framework'):
|
||||
print "3D_CONNEXION_CLIENT_LIBRARY not found, disabling WITH_BF_3DMOUSE" # avoid build errors !
|
||||
env['WITH_BF_3DMOUSE'] = 0
|
||||
else:
|
||||
env.Append(LINKFLAGS=['-Xlinker','-weak_framework','-Xlinker','3DconnexionClient'])
|
||||
|
||||
# for now, Mac builders must download and install the JackOSX framework
|
||||
# necessary header file lives here when installed:
|
||||
# /Library/Frameworks/Jackmp.framework/Versions/A/Headers/jack.h
|
||||
if env['WITH_BF_JACK'] == 1:
|
||||
if not os.path.exists('/Library/Frameworks/Jackmp.framework'):
|
||||
print "JackOSX install not found, disabling WITH_BF_JACK" # avoid build errors !
|
||||
env['WITH_BF_JACK'] = 0
|
||||
else:
|
||||
env.Append(LINKFLAGS=['-Xlinker','-weak_framework','-Xlinker','Jackmp'])
|
||||
|
||||
if env['WITH_BF_OPENMP'] == 1:
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
env['CCFLAGS'].append('/openmp')
|
||||
else:
|
||||
if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
|
||||
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
|
||||
env['CCFLAGS'].append('-openmp')
|
||||
else:
|
||||
env.Append(CCFLAGS=['-fopenmp'])
|
||||
|
||||
if env['WITH_GHOST_COCOA'] == True:
|
||||
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
|
||||
|
||||
if env['USE_QTKIT'] == True:
|
||||
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
|
||||
|
||||
#check for additional debug libnames
|
||||
|
||||
if env.has_key('BF_DEBUG_LIBS'):
|
||||
B.quickdebug += env['BF_DEBUG_LIBS']
|
||||
|
||||
printdebug = B.arguments.get('BF_LISTDEBUG', 0)
|
||||
|
||||
if len(B.quickdebug) > 0 and printdebug != 0:
|
||||
print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
|
||||
for l in B.quickdebug:
|
||||
print "\t" + l
|
||||
|
||||
# remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
|
||||
if env['WITH_BF_STATICCXX']:
|
||||
if 'stdc++' in env['LLIBS']:
|
||||
env['LLIBS'].remove('stdc++')
|
||||
else:
|
||||
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
|
||||
|
||||
# check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
|
||||
if 'blenderplayer' in B.targets:
|
||||
env['WITH_BF_PLAYER'] = True
|
||||
|
||||
if 'blendernogame' in B.targets:
|
||||
env['WITH_BF_GAMEENGINE'] = False
|
||||
|
||||
# build without elbeem (fluidsim)?
|
||||
if env['WITH_BF_FLUID'] == 1:
|
||||
env['CPPFLAGS'].append('-DWITH_MOD_FLUID')
|
||||
|
||||
# build with ocean sim?
|
||||
if env['WITH_BF_OCEANSIM'] == 1:
|
||||
env['WITH_BF_FFTW3'] = 1 # ocean needs fftw3 so enable it
|
||||
env['CPPFLAGS'].append('-DWITH_MOD_OCEANSIM')
|
||||
|
||||
|
||||
if btools.ENDIAN == "big":
|
||||
env['CPPFLAGS'].append('-D__BIG_ENDIAN__')
|
||||
else:
|
||||
env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
|
||||
|
||||
# TODO, make optional
|
||||
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
|
||||
|
||||
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
|
||||
B.root_build_dir = env['BF_BUILDDIR']
|
||||
B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
|
||||
if not B.root_build_dir[-1]==os.sep:
|
||||
B.root_build_dir += os.sep
|
||||
if not B.doc_build_dir[-1]==os.sep:
|
||||
B.doc_build_dir += os.sep
|
||||
|
||||
# We do a shortcut for clean when no quicklist is given: just delete
|
||||
# builddir without reading in SConscripts
|
||||
do_clean = None
|
||||
if 'clean' in B.targets:
|
||||
do_clean = True
|
||||
|
||||
if not quickie and do_clean:
|
||||
if os.path.exists(B.doc_build_dir):
|
||||
print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
|
||||
dirs = os.listdir(B.doc_build_dir)
|
||||
for entry in dirs:
|
||||
if os.path.isdir(B.doc_build_dir + entry) == 1:
|
||||
print "clean dir %s"%(B.doc_build_dir+entry)
|
||||
shutil.rmtree(B.doc_build_dir+entry)
|
||||
else: # remove file
|
||||
print "remove file %s"%(B.doc_build_dir+entry)
|
||||
os.remove(B.root_build_dir+entry)
|
||||
if os.path.exists(B.root_build_dir):
|
||||
print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
|
||||
dirs = os.listdir(B.root_build_dir)
|
||||
for entry in dirs:
|
||||
if os.path.isdir(B.root_build_dir + entry) == 1:
|
||||
print "clean dir %s"%(B.root_build_dir+entry)
|
||||
shutil.rmtree(B.root_build_dir+entry)
|
||||
else: # remove file
|
||||
print "remove file %s"%(B.root_build_dir+entry)
|
||||
os.remove(B.root_build_dir+entry)
|
||||
for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
|
||||
'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
|
||||
if os.path.exists(confile):
|
||||
print "clean file %s"%confile
|
||||
if os.path.isdir(confile):
|
||||
for root, dirs, files in os.walk(confile):
|
||||
for name in files:
|
||||
os.remove(os.path.join(root, name))
|
||||
else:
|
||||
os.remove(confile)
|
||||
print B.bc.OKGREEN+'...done'+B.bc.ENDC
|
||||
else:
|
||||
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
|
||||
Exit()
|
||||
|
||||
|
||||
# ensure python header is found since detection can fail, this could happen
|
||||
# with _any_ library but since we used a fixed python version this tends to
|
||||
# be most problematic.
|
||||
if env['WITH_BF_PYTHON']:
|
||||
py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
|
||||
|
||||
if not os.path.exists(py_h):
|
||||
print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
|
||||
" Set 'BF_PYTHON_INC' to point "
|
||||
"to a valid python include path.\n Containing "
|
||||
"Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
|
||||
|
||||
Exit()
|
||||
del py_h
|
||||
|
||||
|
||||
if not os.path.isdir ( B.root_build_dir):
|
||||
os.makedirs ( B.root_build_dir )
|
||||
os.makedirs ( B.root_build_dir + 'source' )
|
||||
os.makedirs ( B.root_build_dir + 'intern' )
|
||||
os.makedirs ( B.root_build_dir + 'extern' )
|
||||
os.makedirs ( B.root_build_dir + 'lib' )
|
||||
os.makedirs ( B.root_build_dir + 'bin' )
|
||||
# # Docs not working with epy anymore
|
||||
# if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
|
||||
# os.makedirs ( B.doc_build_dir )
|
||||
|
||||
###################################
|
||||
# Ensure all data files are valid #
|
||||
###################################
|
||||
if not os.path.isdir ( B.root_build_dir + 'data_headers'):
|
||||
os.makedirs ( B.root_build_dir + 'data_headers' )
|
||||
if not os.path.isdir ( B.root_build_dir + 'data_sources'):
|
||||
os.makedirs ( B.root_build_dir + 'data_sources' )
|
||||
# use for includes
|
||||
env['DATA_HEADERS'] = os.path.join(os.path.abspath(env['BF_BUILDDIR']), "data_headers")
|
||||
env['DATA_SOURCES'] = os.path.join(os.path.abspath(env['BF_BUILDDIR']), "data_sources")
|
||||
def data_to_c(FILE_FROM, FILE_TO, VAR_NAME):
|
||||
if os.sep == "\\":
|
||||
FILE_FROM = FILE_FROM.replace("/", "\\")
|
||||
FILE_TO = FILE_TO.replace("/", "\\")
|
||||
|
||||
# first check if we need to bother.
|
||||
if os.path.exists(FILE_TO):
|
||||
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
|
||||
return
|
||||
|
||||
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
|
||||
fpin = open(FILE_FROM, "rb")
|
||||
fpin.seek(0, os.SEEK_END)
|
||||
size = fpin.tell()
|
||||
fpin.seek(0)
|
||||
|
||||
fpout = open(FILE_TO, "w")
|
||||
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
|
||||
fpout.write("char %s[] = {\n" % VAR_NAME)
|
||||
|
||||
while size > 0:
|
||||
size -= 1
|
||||
if size % 32 == 31:
|
||||
fpout.write("\n")
|
||||
|
||||
fpout.write("%3d," % ord(fpin.read(1)))
|
||||
fpout.write("\n 0};\n\n")
|
||||
|
||||
fpin.close()
|
||||
fpout.close()
|
||||
|
||||
def data_to_c_simple(FILE_FROM):
|
||||
filename_only = os.path.basename(FILE_FROM)
|
||||
FILE_TO = os.path.join(env['DATA_SOURCES'], filename_only + ".c")
|
||||
VAR_NAME = "datatoc_" + filename_only.replace(".", "_")
|
||||
|
||||
data_to_c(FILE_FROM, FILE_TO, VAR_NAME)
|
||||
|
||||
|
||||
data_to_c("source/blender/compositor/operations/COM_OpenCLKernels.cl",
|
||||
B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
|
||||
"datatoc_COM_OpenCLKernels_cl")
|
||||
|
||||
data_to_c_simple("release/datafiles/startup.blend")
|
||||
data_to_c_simple("release/datafiles/preview.blend")
|
||||
|
||||
# --- glsl ---
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
|
||||
|
||||
# --- blender ---
|
||||
data_to_c_simple("release/datafiles/bfont.pfb")
|
||||
data_to_c_simple("release/datafiles/bfont.ttf")
|
||||
data_to_c_simple("release/datafiles/bmonofont.ttf")
|
||||
|
||||
data_to_c_simple("release/datafiles/splash.png")
|
||||
data_to_c_simple("release/datafiles/blender_icons.png")
|
||||
data_to_c_simple("release/datafiles/prvicons.png")
|
||||
|
||||
data_to_c_simple("release/datafiles/brushicons/add.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/blob.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/blur.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/clay.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/claystrips.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/clone.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/crease.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/darken.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/draw.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/fill.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/flatten.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/grab.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/inflate.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/layer.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/lighten.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/mask.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/mix.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/multiply.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/nudge.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/pinch.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/scrape.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/smear.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/smooth.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/snake_hook.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/soften.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/subtract.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/texdraw.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/thumb.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/twist.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/vertexdraw.png")
|
||||
|
||||
##### END DATAFILES ##########
|
||||
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
# default is new quieter output, but if you need to see the
|
||||
# commands, do 'scons BF_QUIET=0'
|
||||
bf_quietoutput = B.arguments.get('BF_QUIET', '1')
|
||||
if env['BF_QUIET']:
|
||||
B.set_quiet_output(env)
|
||||
else:
|
||||
if toolset=='msvc':
|
||||
B.msvc_hack(env)
|
||||
|
||||
print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
|
||||
env.SConsignFile(B.root_build_dir+'scons-signatures')
|
||||
B.init_lib_dict()
|
||||
|
||||
##### END SETUP ##########
|
||||
|
||||
Export('env')
|
||||
|
||||
BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
|
||||
SConscript(B.root_build_dir+'/source/SConscript')
|
||||
BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
|
||||
SConscript(B.root_build_dir+'/intern/SConscript')
|
||||
BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
|
||||
SConscript(B.root_build_dir+'/extern/SConscript')
|
||||
|
||||
# now that we have read all SConscripts, we know what
|
||||
# libraries will be built. Create list of
|
||||
# libraries to give as objects to linking phase
|
||||
mainlist = []
|
||||
for tp in B.possible_types:
|
||||
if (not tp == 'player') and (not tp == 'player2'):
|
||||
mainlist += B.create_blender_liblist(env, tp)
|
||||
|
||||
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
|
||||
B.propose_priorities()
|
||||
|
||||
dobj = B.buildinfo(env, "dynamic") + B.resources
|
||||
creob = B.creator(env)
|
||||
thestatlibs, thelibincs = B.setup_staticlibs(env)
|
||||
thesyslibs = B.setup_syslibs(env)
|
||||
|
||||
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
|
||||
env.BlenderProg(B.root_build_dir, "blender", creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
if env['WITH_BF_PLAYER']:
|
||||
playerlist = B.create_blender_liblist(env, 'player')
|
||||
playerlist += B.create_blender_liblist(env, 'player2')
|
||||
playerlist += B.create_blender_liblist(env, 'intern')
|
||||
playerlist += B.create_blender_liblist(env, 'extern')
|
||||
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
|
||||
|
||||
##### Now define some targets
|
||||
|
||||
|
||||
#------------ INSTALL
|
||||
|
||||
#-- binaries
|
||||
blenderinstall = []
|
||||
if env['OURPLATFORM']=='darwin':
|
||||
for prg in B.program_list:
|
||||
bundle = '%s.app' % prg[0]
|
||||
bundledir = os.path.dirname(bundle)
|
||||
for dp, dn, df in os.walk(bundle):
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
if '_svn' in dn:
|
||||
dn.remove('_svn')
|
||||
dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
|
||||
source=[dp+os.sep+f for f in df]
|
||||
blenderinstall.append(env.Install(dir=dir,source=source))
|
||||
else:
|
||||
blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
|
||||
|
||||
#-- local path = config files in install dir: installdir\VERSION
|
||||
#- dont do config and scripts for darwin, it is already in the bundle
|
||||
dotblendlist = []
|
||||
datafileslist = []
|
||||
datafilestargetlist = []
|
||||
dottargetlist = []
|
||||
scriptinstall = []
|
||||
|
||||
if env['OURPLATFORM']!='darwin':
|
||||
dotblenderinstall = []
|
||||
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
|
||||
td, tf = os.path.split(targetdir)
|
||||
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
|
||||
for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
|
||||
td, tf = os.path.split(targetdir)
|
||||
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
#-- local/VERSION/scripts
|
||||
scriptpaths=['release/scripts']
|
||||
for scriptpath in scriptpaths:
|
||||
for dp, dn, df in os.walk(scriptpath):
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
if '_svn' in dn:
|
||||
dn.remove('_svn')
|
||||
if '__pycache__' in dn: # py3.2 cache dir
|
||||
dn.remove('__pycache__')
|
||||
|
||||
# only for testing builds
|
||||
if VERSION_RELEASE_CYCLE == "release" and "addons_contrib" in dn:
|
||||
dn.remove('addons_contrib')
|
||||
|
||||
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
|
||||
dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
|
||||
|
||||
source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
|
||||
# To ensure empty dirs are created too
|
||||
if len(source)==0 and not os.path.exists(dir):
|
||||
env.Execute(Mkdir(dir))
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
if env['WITH_BF_CYCLES']:
|
||||
# cycles python code
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles')
|
||||
source=os.listdir('intern/cycles/blender/addon')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source=['intern/cycles/blender/addon/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
|
||||
# cycles kernel code
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel')
|
||||
source=os.listdir('intern/cycles/kernel')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source.remove('kernel.cpp')
|
||||
source.remove('CMakeLists.txt')
|
||||
source.remove('svm')
|
||||
source.remove('osl')
|
||||
source=['intern/cycles/kernel/'+s for s in source]
|
||||
source.append('intern/cycles/util/util_color.h')
|
||||
source.append('intern/cycles/util/util_math.h')
|
||||
source.append('intern/cycles/util/util_transform.h')
|
||||
source.append('intern/cycles/util/util_types.h')
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
# svm
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'svm')
|
||||
source=os.listdir('intern/cycles/kernel/svm')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source=['intern/cycles/kernel/svm/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
|
||||
# licenses
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license')
|
||||
source=os.listdir('intern/cycles/doc/license')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source.remove('CMakeLists.txt')
|
||||
source=['intern/cycles/doc/license/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
|
||||
# cuda binaries
|
||||
if env['WITH_BF_CYCLES_CUDA_BINARIES']:
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib')
|
||||
for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
|
||||
kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel')
|
||||
cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
|
||||
scriptinstall.append(env.Install(dir=dir,source=cubin_file))
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
internationalpaths=['release' + os.sep + 'datafiles']
|
||||
|
||||
def check_path(path, member):
|
||||
return (member in path.split(os.sep))
|
||||
|
||||
for intpath in internationalpaths:
|
||||
for dp, dn, df in os.walk(intpath):
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
if '_svn' in dn:
|
||||
dn.remove('_svn')
|
||||
|
||||
# we only care about release/datafiles/fonts, release/datafiles/locales
|
||||
if check_path(dp, "fonts") or check_path(dp, "locale"):
|
||||
pass
|
||||
else:
|
||||
continue
|
||||
|
||||
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
|
||||
dir += os.sep + os.path.basename(intpath) + dp[len(intpath):]
|
||||
|
||||
source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
|
||||
# To ensure empty dirs are created too
|
||||
if len(source)==0:
|
||||
env.Execute(Mkdir(dir))
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
|
||||
#-- icons
|
||||
if env['OURPLATFORM']=='linux':
|
||||
iconlist = []
|
||||
icontargetlist = []
|
||||
|
||||
for tp, tn, tf in os.walk('release/freedesktop/icons'):
|
||||
if '.svn' in tn:
|
||||
tn.remove('.svn')
|
||||
if '_svn' in tn:
|
||||
tn.remove('_svn')
|
||||
for f in tf:
|
||||
iconlist.append(os.path.join(tp, f))
|
||||
icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) )
|
||||
|
||||
iconinstall = []
|
||||
for targetdir,srcfile in zip(icontargetlist, iconlist):
|
||||
td, tf = os.path.split(targetdir)
|
||||
iconinstall.append(env.Install(dir=td, source=srcfile))
|
||||
|
||||
# dlls for linuxcross
|
||||
# TODO - add more libs, for now this lets blenderlite run
|
||||
if env['OURPLATFORM']=='linuxcross':
|
||||
dir=env['BF_INSTALLDIR']
|
||||
source = []
|
||||
|
||||
if env['WITH_BF_OPENMP']:
|
||||
source += ['../lib/windows/pthreads/lib/pthreadGC2.dll']
|
||||
|
||||
scriptinstall.append(env.Install(dir=dir, source=source))
|
||||
|
||||
textlist = []
|
||||
texttargetlist = []
|
||||
for tp, tn, tf in os.walk('release/text'):
|
||||
if '.svn' in tn:
|
||||
tn.remove('.svn')
|
||||
if '_svn' in tn:
|
||||
tn.remove('_svn')
|
||||
for f in tf:
|
||||
textlist.append(tp+os.sep+f)
|
||||
|
||||
textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
|
||||
|
||||
if env['OURPLATFORM']=='darwin':
|
||||
allinstall = [blenderinstall, textinstall]
|
||||
elif env['OURPLATFORM']=='linux':
|
||||
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, textinstall, iconinstall]
|
||||
else:
|
||||
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, textinstall]
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
dllsources = []
|
||||
|
||||
if not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
|
||||
# For MinGW and linuxcross static linking will be used
|
||||
dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
|
||||
|
||||
dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
|
||||
# Used when linking to libtiff was dynamic
|
||||
# keep it here until compilation on all platform would be ok
|
||||
# dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
|
||||
|
||||
if env['OURPLATFORM'] != 'linuxcross':
|
||||
# pthreads library is already added
|
||||
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
if env['OURPLATFORM'] == 'win64-vc':
|
||||
pass # we link statically already to SDL on win64
|
||||
else:
|
||||
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
if env['BF_DEBUG']:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
|
||||
else:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
|
||||
|
||||
if env['WITH_BF_ICONV']:
|
||||
if env['OURPLATFORM'] == 'win64-vc':
|
||||
pass # we link statically to iconv on win64
|
||||
elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
|
||||
#gettext for MinGW and cross-compilation is compiled staticly
|
||||
dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
|
||||
|
||||
if env['WITH_BF_OPENAL']:
|
||||
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
|
||||
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
|
||||
|
||||
if env['WITH_BF_SNDFILE']:
|
||||
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
|
||||
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
dllsources += env['BF_FFMPEG_DLL'].split()
|
||||
|
||||
# Since the thumb handler is loaded by Explorer, architecture is
|
||||
# strict: the x86 build fails on x64 Windows. We need to ship
|
||||
# both builds in x86 packages.
|
||||
if bitness == 32:
|
||||
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
|
||||
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
|
||||
|
||||
if env['WITH_BF_OIIO'] and env['OURPLATFORM'] != 'win32-mingw':
|
||||
dllsources.append('${LCGDIR}/openimageio/bin/OpenImageIO.dll')
|
||||
|
||||
dllsources.append('#source/icons/blender.exe.manifest')
|
||||
|
||||
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
|
||||
allinstall += windlls
|
||||
|
||||
if env['OURPLATFORM'] == 'win64-mingw':
|
||||
dllsources = []
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
if env['BF_DEBUG']:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
|
||||
else:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
|
||||
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
dllsources += env['BF_FFMPEG_DLL'].split()
|
||||
|
||||
if env['WITH_BF_OPENAL']:
|
||||
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
|
||||
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
|
||||
|
||||
if env['WITH_BF_SNDFILE']:
|
||||
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
dllsources.append('${LCGDIR}/sdl/lib/SDL.dll')
|
||||
|
||||
if(env['WITH_BF_OPENMP']):
|
||||
dllsources.append('${LCGDIR}/binaries/libgomp-1.dll')
|
||||
|
||||
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
|
||||
dllsources.append('${LCGDIR}/binaries/libgcc_s_sjlj-1.dll')
|
||||
dllsources.append('${LCGDIR}/binaries/libwinpthread-1.dll')
|
||||
dllsources.append('${LCGDIR}/binaries/libstdc++-6.dll')
|
||||
dllsources.append('#source/icons/blender.exe.manifest')
|
||||
|
||||
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
|
||||
allinstall += windlls
|
||||
|
||||
installtarget = env.Alias('install', allinstall)
|
||||
bininstalltarget = env.Alias('install-bin', blenderinstall)
|
||||
|
||||
nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
|
||||
nsiscmd = env.Command('nsisinstaller', None, nsisaction)
|
||||
nsisalias = env.Alias('nsis', nsiscmd)
|
||||
|
||||
if 'blender' in B.targets:
|
||||
blenderexe= env.Alias('blender', B.program_list)
|
||||
Depends(blenderexe,installtarget)
|
||||
|
||||
if env['WITH_BF_PLAYER']:
|
||||
blenderplayer = env.Alias('blenderplayer', B.program_list)
|
||||
Depends(blenderplayer,installtarget)
|
||||
|
||||
if not env['WITH_BF_GAMEENGINE']:
|
||||
blendernogame = env.Alias('blendernogame', B.program_list)
|
||||
Depends(blendernogame,installtarget)
|
||||
|
||||
if 'blenderlite' in B.targets:
|
||||
blenderlite = env.Alias('blenderlite', B.program_list)
|
||||
Depends(blenderlite,installtarget)
|
||||
|
||||
Depends(nsiscmd, allinstall)
|
||||
|
||||
buildslave_action = env.Action(btools.buildslave, btools.buildslave_print)
|
||||
buildslave_cmd = env.Command('buildslave_exec', None, buildslave_action)
|
||||
buildslave_alias = env.Alias('buildslave', buildslave_cmd)
|
||||
|
||||
Depends(buildslave_cmd, allinstall)
|
||||
|
||||
Default(B.program_list)
|
||||
|
||||
if not env['WITHOUT_BF_INSTALL']:
|
||||
Default(installtarget)
|
||||
|
@@ -1,167 +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 build system used by platform maintainers to build library dependencies on
|
||||
# Windows, macOS and Linux.
|
||||
#
|
||||
# For users building Blender, we recommend using the precompiled libraries from lib/ on
|
||||
# Windows and macOS, and install_deps.sh on Linux.
|
||||
#
|
||||
# WINDOWS USAGE:
|
||||
# Don't call this cmake file yourself, use build_deps.cmd
|
||||
# build_deps 2013 x64 / build_deps 2013 x86
|
||||
# build_deps 2015 x64 / build_deps 2015 x86
|
||||
#
|
||||
# MAC OS X USAGE:
|
||||
# Install with homebrew: brew install autoconf automake bison cmake libtool pkg-config yasm
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
# LINUX USAGE:
|
||||
# Install compiler cmake autoconf automake libtool yasm tcl
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
####################################################################################################
|
||||
|
||||
project("BlenderDependencies")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include(ExternalProject)
|
||||
include(cmake/check_software.cmake)
|
||||
include(cmake/options.cmake)
|
||||
include(cmake/versions.cmake)
|
||||
|
||||
if(ENABLE_MINGW64)
|
||||
include(cmake/setup_mingw64.cmake)
|
||||
else()
|
||||
set(mingw_LIBDIR ${LIBDIR})
|
||||
endif()
|
||||
|
||||
include(cmake/zlib.cmake)
|
||||
include(cmake/openal.cmake)
|
||||
include(cmake/png.cmake)
|
||||
include(cmake/jpeg.cmake)
|
||||
include(cmake/blosc.cmake)
|
||||
include(cmake/pthreads.cmake)
|
||||
include(cmake/openexr.cmake)
|
||||
include(cmake/freetype.cmake)
|
||||
include(cmake/freeglut.cmake)
|
||||
include(cmake/glew.cmake)
|
||||
include(cmake/alembic.cmake)
|
||||
include(cmake/glfw.cmake)
|
||||
include(cmake/clew.cmake)
|
||||
include(cmake/cuew.cmake)
|
||||
include(cmake/opensubdiv.cmake)
|
||||
include(cmake/sdl.cmake)
|
||||
include(cmake/opencollada.cmake)
|
||||
include(cmake/opencolorio.cmake)
|
||||
include(cmake/llvm.cmake)
|
||||
include(cmake/clang.cmake)
|
||||
if(APPLE)
|
||||
include(cmake/openmp.cmake)
|
||||
endif()
|
||||
if(UNIX)
|
||||
include(cmake/nasm.cmake)
|
||||
endif()
|
||||
include(cmake/openimageio.cmake)
|
||||
include(cmake/tiff.cmake)
|
||||
include(cmake/flexbison.cmake)
|
||||
include(cmake/osl.cmake)
|
||||
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)
|
||||
include(cmake/usd.cmake)
|
||||
include(cmake/potrace.cmake)
|
||||
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
|
||||
include(cmake/boost.cmake)
|
||||
if(UNIX)
|
||||
# Rely on PugiXML compiled with OpenImageIO
|
||||
else()
|
||||
include(cmake/pugixml.cmake)
|
||||
endif()
|
||||
if((NOT APPLE) OR ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
|
||||
include(cmake/ispc.cmake)
|
||||
include(cmake/openimagedenoise.cmake)
|
||||
include(cmake/embree.cmake)
|
||||
endif()
|
||||
if(NOT APPLE)
|
||||
include(cmake/xr_openxr.cmake)
|
||||
endif()
|
||||
|
||||
if(WITH_WEBP)
|
||||
include(cmake/webp.cmake)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# OCIO deps
|
||||
include(cmake/tinyxml.cmake)
|
||||
include(cmake/yamlcpp.cmake)
|
||||
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
|
||||
# include(cmake/lcms.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 OR ENABLE_MINGW64)
|
||||
include(cmake/gmp.cmake)
|
||||
include(cmake/openjpeg.cmake)
|
||||
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
|
||||
if(WIN32)
|
||||
include(cmake/zlib_mingw.cmake)
|
||||
endif()
|
||||
include(cmake/lame.cmake)
|
||||
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)
|
||||
include(cmake/ffmpeg.cmake)
|
||||
include(cmake/fftw.cmake)
|
||||
include(cmake/sndfile.cmake)
|
||||
if(WIN32)
|
||||
include(cmake/iconv.cmake)
|
||||
endif()
|
||||
if(UNIX)
|
||||
include(cmake/flac.cmake)
|
||||
include(cmake/xml2.cmake)
|
||||
if(NOT APPLE)
|
||||
include(cmake/spnav.cmake)
|
||||
include(cmake/jemalloc.cmake)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
include(cmake/bzip2.cmake)
|
||||
include(cmake/ffi.cmake)
|
||||
include(cmake/lzma.cmake)
|
||||
include(cmake/ssl.cmake)
|
||||
include(cmake/sqlite.cmake)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
include(cmake/libglu.cmake)
|
||||
include(cmake/mesa.cmake)
|
||||
endif()
|
||||
|
||||
include(cmake/harvest.cmake)
|
@@ -1,87 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(ALEMBIC_EXTRA_ARGS
|
||||
-DBUILDSTATIC=ON
|
||||
-DLINKSTATIC=ON
|
||||
-DALEMBIC_LIB_USES_BOOST=ON
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DUSE_STATIC_BOOST=On
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBoost_DEBUG=ON
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DILMBASE_ROOT=${LIBDIR}/openexr
|
||||
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR
|
||||
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DALEMBIC_ILMBASE_IEXMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IexMath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DUSE_PYILMBASE=0
|
||||
-DUSE_PYALEMBIC=0
|
||||
-DUSE_ARNOLD=0
|
||||
-DUSE_MAYA=0
|
||||
-DUSE_PRMAN=0
|
||||
-DUSE_HDF5=Off
|
||||
-DUSE_STATIC_HDF5=Off
|
||||
-DUSE_TESTS=Off
|
||||
-DALEMBIC_NO_OPENGL=1
|
||||
-DUSE_BINARIES=ON
|
||||
-DALEMBIC_ILMBASE_LINK_STATIC=On
|
||||
-DALEMBIC_SHARED_LIBS=OFF
|
||||
-DGLUT_INCLUDE_DIR=""
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_alembic
|
||||
URL ${ALEMBIC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${ALEMBIC_MD5}
|
||||
PREFIX ${BUILD_DIR}/alembic
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/alembic
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_alembic after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_alembic after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
add_dependencies(
|
||||
external_alembic
|
||||
external_boost
|
||||
external_zlib
|
||||
external_openexr
|
||||
)
|
@@ -1,73 +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(BLOSC_EXTRA_ARGS
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-DThreads_FOUND=1
|
||||
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
|
||||
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
|
||||
-DDEACTIVATE_SNAPPY=ON
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
)
|
||||
|
||||
# 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
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_blosc
|
||||
URL ${BLOSC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${BLOSC_HASH}
|
||||
PREFIX ${BUILD_DIR}/blosc
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/blosc
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_blosc
|
||||
external_zlib
|
||||
)
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_blosc
|
||||
external_pthreads
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_blosc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_blosc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,107 +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(BOOST_ADDRESS_MODEL 64)
|
||||
|
||||
if(WIN32)
|
||||
set(BOOST_TOOLSET toolset=msvc-14.1)
|
||||
set(BOOST_COMPILER_STRING -vc141)
|
||||
|
||||
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
|
||||
set(BOOST_BUILD_COMMAND bjam)
|
||||
set(BOOST_BUILD_OPTIONS runtime-link=shared )
|
||||
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-${BOOST_VERSION_NODOTS_SHORT}/ ${HARVEST_TARGET}/boost/include/)
|
||||
endif()
|
||||
|
||||
elseif(APPLE)
|
||||
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
||||
set(BOOST_BUILD_COMMAND ./b2)
|
||||
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
set(BOOST_PATCH_COMMAND echo .)
|
||||
else()
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
||||
set(BOOST_BUILD_COMMAND ./b2)
|
||||
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
|
||||
set(BOOST_PATCH_COMMAND echo .)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(BOOST_ADDRESS_MODEL 64)
|
||||
else()
|
||||
set(BOOST_ADDRESS_MODEL 32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST_PYTHON)
|
||||
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
|
||||
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
|
||||
set(BOOST_PYTHON_OPTIONS
|
||||
--with-python
|
||||
--user-config=${JAM_FILE}
|
||||
)
|
||||
if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
set(BOOST_PYTHON_OPTIONS
|
||||
${BOOST_PYTHON_OPTIONS}
|
||||
define=BOOST_DEBUG_PYTHON
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(BOOST_OPTIONS
|
||||
--with-filesystem
|
||||
--with-locale
|
||||
--with-thread
|
||||
--with-regex
|
||||
--with-system
|
||||
--with-date_time
|
||||
--with-wave
|
||||
--with-atomic
|
||||
--with-serialization
|
||||
--with-program_options
|
||||
--with-iostreams
|
||||
-sNO_BZIP2=1
|
||||
-sNO_LZMA=1
|
||||
-sNO_ZSTD=1
|
||||
${BOOST_TOOLSET}
|
||||
${BOOST_PYTHON_OPTIONS}
|
||||
)
|
||||
|
||||
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
|
||||
|
||||
ExternalProject_Add(external_boost
|
||||
URL ${BOOST_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${BOOST_HASH}
|
||||
PREFIX ${BUILD_DIR}/boost
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
|
||||
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
|
||||
)
|
||||
|
||||
if(WITH_BOOST_PYTHON)
|
||||
add_dependencies(
|
||||
external_boost
|
||||
external_python
|
||||
external_numpy
|
||||
)
|
||||
endif()
|
@@ -1,41 +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(BZIP2_PREFIX "${LIBDIR}/bzip2")
|
||||
set(BZIP2_CONFIGURE_ENV echo .)
|
||||
set(BZIP2_CONFIGURATION_ARGS)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(BZIP2_LDFLAGS "-Wl,--as-needed")
|
||||
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
|
||||
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
|
||||
&& export PREFIX=${BZIP2_PREFIX})
|
||||
else()
|
||||
set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_bzip2
|
||||
URL ${BZIP2_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${BZIP2_HASH}
|
||||
PREFIX ${BUILD_DIR}/bzip2
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
|
||||
INSTALL_DIR ${LIBDIR}/bzip2
|
||||
)
|
@@ -1,66 +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
|
||||
bison
|
||||
${_libtoolize_name}
|
||||
pkg-config
|
||||
tclsh
|
||||
yasm
|
||||
)
|
||||
|
||||
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(APPLE)
|
||||
if(NOT EXISTS "/usr/local/opt/bison/bin/bison")
|
||||
set(_software_missing "${_software_missing} bison")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
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 tcl\n"
|
||||
"\n"
|
||||
"On macOS (with homebrew):\n"
|
||||
" brew install autoconf automake bison libtool pkg-config yasm\n"
|
||||
"\n"
|
||||
"Other platforms:\n"
|
||||
" Install equivalent packages.\n")
|
||||
message(FATAL_ERROR "Install missing software before continuing")
|
||||
endif()
|
||||
endif()
|
@@ -1,74 +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(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_CONFIG=${LIBDIR}/llvm/bin/llvm-config
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(CLANG_GENERATOR "Ninja")
|
||||
else()
|
||||
set(CLANG_GENERATOR "Unix Makefiles")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(CLANG_EXTRA_ARGS ${CLANG_EXTRA_ARGS}
|
||||
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_clang
|
||||
URL ${CLANG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${CLANG_HASH}
|
||||
PREFIX ${BUILD_DIR}/clang
|
||||
CMAKE_GENERATOR ${CLANG_GENERATOR}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/clang
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
|
||||
else()
|
||||
set(CLANG_HARVEST_COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_Step(external_clang after_install
|
||||
COMMAND ${CLANG_HARVEST_COMMAND}
|
||||
DEPENDEES mkdir update patch download configure build install
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_clang
|
||||
ll
|
||||
)
|
||||
|
||||
# We currently do not build libxml2 on Windows.
|
||||
if(NOT WIN32)
|
||||
add_dependencies(
|
||||
external_clang
|
||||
external_xml2
|
||||
)
|
||||
endif()
|
@@ -1,28 +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(CLEW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_clew
|
||||
URL ${CLEW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${CLEW_HASH}
|
||||
PREFIX ${BUILD_DIR}/clew
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/clew
|
||||
)
|
@@ -1,29 +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(CUEW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_cuew
|
||||
URL ${CUEW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${CUEW_HASH}
|
||||
PREFIX ${BUILD_DIR}/cuew
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/cuew
|
||||
)
|
@@ -1,86 +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 *****
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
-DEMBREE_ISPC_SUPPORT=OFF
|
||||
-DEMBREE_TUTORIALS=OFF
|
||||
-DEMBREE_STATIC_LIB=ON
|
||||
-DEMBREE_RAY_MASK=ON
|
||||
-DEMBREE_FILTER_FUNCTION=ON
|
||||
-DEMBREE_BACKFACE_CULLING=OFF
|
||||
-DEMBREE_MAX_ISA=AVX2
|
||||
-DEMBREE_TASKING_SYSTEM=TBB
|
||||
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
|
||||
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
|
||||
)
|
||||
|
||||
if(TBB_STATIC_LIBRARY)
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
${EMBREE_EXTRA_ARGS}
|
||||
-DEMBREE_TBB_LIBRARY_NAME=tbb_static
|
||||
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_static
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
|
||||
else()
|
||||
set(EMBREE_BUILD_DIR)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_embree
|
||||
URL ${EMBREE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${EMBREE_HASH}
|
||||
PREFIX ${BUILD_DIR}/embree
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/embree
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_embree
|
||||
external_tbb
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_embree after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
|
||||
DEPENDEES install
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add_Step(external_embree after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
ExternalProject_Add(external_ffi
|
||||
URL ${FFI_URI}
|
||||
URL_HASH SHA256=${FFI_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/ffi
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
|
||||
--enable-shared=no
|
||||
--enable-static=yes
|
||||
--with-pic
|
||||
--libdir=${LIBDIR}/ffi/lib/
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
|
||||
INSTALL_DIR ${LIBDIR}/ffi
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
ExternalProject_Add_Step(external_ffi after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,163 +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(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_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:)
|
||||
|
||||
if(WIN32)
|
||||
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--disable-static
|
||||
--enable-shared
|
||||
--enable-w32threads
|
||||
--disable-pthreads
|
||||
--enable-libopenjpeg
|
||||
)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--x86asmexe=yasm
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--enable-static
|
||||
--disable-shared
|
||||
--enable-libopenjpeg
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--target-os=darwin
|
||||
--x86asmexe=${LIBDIR}/nasm/bin/nasm
|
||||
)
|
||||
elseif(UNIX)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--x86asmexe=${LIBDIR}/nasm/bin/nasm
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_ffmpeg
|
||||
URL ${FFMPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FFMPEG_HASH}
|
||||
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
|
||||
# want for maximum runtime performance, but due to static nature of that library we
|
||||
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
|
||||
# will fail. This patch does that in a way that is compatible with multiple distributions.
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
|
||||
PREFIX ${BUILD_DIR}/ffmpeg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
|
||||
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
|
||||
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
|
||||
--disable-lzma
|
||||
--disable-avfilter
|
||||
--disable-vdpau
|
||||
--disable-bzlib
|
||||
--disable-libgsm
|
||||
--disable-libspeex
|
||||
--enable-libvpx
|
||||
--enable-libopus
|
||||
--prefix=${LIBDIR}/ffmpeg
|
||||
--enable-libtheora
|
||||
--enable-libvorbis
|
||||
--enable-zlib
|
||||
--enable-stripping
|
||||
--enable-runtime-cpudetect
|
||||
--disable-vaapi
|
||||
--disable-nonfree
|
||||
--enable-gpl
|
||||
--disable-postproc
|
||||
--enable-libmp3lame
|
||||
--disable-librtmp
|
||||
--enable-libx264
|
||||
--enable-libxvid
|
||||
--disable-libopencore-amrnb
|
||||
--disable-libopencore-amrwb
|
||||
--disable-libdc1394
|
||||
--disable-version3
|
||||
--disable-debug
|
||||
--enable-optimizations
|
||||
--enable-ffplay
|
||||
--disable-openssl
|
||||
--disable-securetransport
|
||||
--disable-indev=avfoundation
|
||||
--disable-indev=qtkit
|
||||
--disable-sdl2
|
||||
--disable-gnutls
|
||||
--disable-videotoolbox
|
||||
--disable-libxcb
|
||||
--disable-xlib
|
||||
--disable-audiotoolbox
|
||||
--disable-cuvid
|
||||
--disable-nvenc
|
||||
--disable-indev=jack
|
||||
--disable-indev=alsa
|
||||
--disable-outdev=alsa
|
||||
--disable-crystalhd
|
||||
--disable-sndio
|
||||
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/ffmpeg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib
|
||||
external_openjpeg
|
||||
external_xvidcore
|
||||
external_x264
|
||||
external_opus
|
||||
external_vpx
|
||||
external_theora
|
||||
external_vorbis
|
||||
external_ogg
|
||||
external_lame
|
||||
)
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib_mingw
|
||||
)
|
||||
endif()
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_nasm
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_ffmpeg after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,52 +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(FFTW_EXTRA_ARGS)
|
||||
|
||||
if(WIN32)
|
||||
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
|
||||
set(FFTW_EXTRA_ARGS --disable-static --enable-shared)
|
||||
set(FFTW_INSTALL install-strip)
|
||||
else()
|
||||
set(FFTW_EXTRA_ARGS --enable-static)
|
||||
set(FFTW_INSTALL install)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_fftw3
|
||||
URL ${FFTW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FFTW_HASH}
|
||||
PREFIX ${BUILD_DIR}/fftw3
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} --prefix=${mingw_LIBDIR}/fftw3
|
||||
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make ${FFTW_INSTALL}
|
||||
INSTALL_DIR ${LIBDIR}/fftw3
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_fftw3 after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,32 +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_flac
|
||||
URL ${FLAC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${FLAC_HASH}
|
||||
PREFIX ${BUILD_DIR}/flac
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/flac
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
set(FLEXBISON_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_flexbison
|
||||
URL ${FLEXBISON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FLEXBISON_HASH}
|
||||
PREFIX ${BUILD_DIR}/flexbison
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
|
||||
INSTALL_DIR ${LIBDIR}/flexbison
|
||||
)
|
@@ -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 *****
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(FREEGLUT_EXTRA_ARGS
|
||||
-DFREEGLUT_BUILD_SHARED_LIBS=Off
|
||||
-DFREEGLUT_BUILD_STATIC_LIBS=On
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_freeglut
|
||||
URL ${FREEGLUT_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FREEGLUT_HASH}
|
||||
PREFIX ${BUILD_DIR}/freeglut
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/freeglut
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
set(FREETYPE_EXTRA_ARGS
|
||||
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
|
||||
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
|
||||
-DWITH_BZip2=OFF
|
||||
-DWITH_HarfBuzz=OFF
|
||||
-DFT_WITH_HARFBUZZ=OFF
|
||||
-DFT_WITH_BZIP2=OFF
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE)
|
||||
|
||||
ExternalProject_Add(external_freetype
|
||||
URL ${FREETYPE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${FREETYPE_HASH}
|
||||
PREFIX ${BUILD_DIR}/freetype
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/freetype
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_freetype after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,32 +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(GLEW_EXTRA_ARGS
|
||||
-DBUILD_UTILS=Off
|
||||
-DBUILD_SHARED_LIBS=Off
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_glew
|
||||
URL ${GLEW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${GLEW_HASH}
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
|
||||
PREFIX ${BUILD_DIR}/glew
|
||||
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/glew
|
||||
)
|
@@ -1,28 +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(GLFW_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_glfw
|
||||
URL ${GLFW_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${GLFW_HASH}
|
||||
PREFIX ${BUILD_DIR}/glfw
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/glfw
|
||||
)
|
@@ -1,108 +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(GMP_EXTRA_ARGS -enable-cxx)
|
||||
|
||||
if(WIN32)
|
||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
|
||||
else()
|
||||
set(GMP_OPTIONS --enable-static --disable-shared )
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--disable-assembly
|
||||
)
|
||||
else()
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--with-pic
|
||||
)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--with-pic
|
||||
--enable-fat
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_gmp
|
||||
URL ${GMP_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${GMP_HASH}
|
||||
PREFIX ${BUILD_DIR}/gmp
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/gmp
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_gmp PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_gmp after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug AND WIN32)
|
||||
ExternalProject_Add_Step(external_gmp after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# gmpxx is somewhat special, it builds on top of the C style gmp library but exposes C++ bindings
|
||||
# given the C++ ABI between MSVC and mingw is not compatible, we need to build the bindings
|
||||
# with MSVC, while GMP can only be build with mingw.
|
||||
ExternalProject_Add(external_gmpxx
|
||||
URL ${GMP_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${GMP_HASH}
|
||||
PREFIX ${BUILD_DIR}/gmpxx
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_gmpxx.txt ${BUILD_DIR}/gmpxx/src/external_gmpxx/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/config_gmpxx.h ${BUILD_DIR}/gmpxx/src/external_gmpxx/config.h
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
|
||||
INSTALL_DIR ${LIBDIR}/gmpxx
|
||||
)
|
||||
set_target_properties(external_gmpxx PROPERTIES FOLDER Mingw)
|
||||
|
||||
add_dependencies(
|
||||
external_gmpxx
|
||||
external_gmp
|
||||
)
|
||||
|
||||
ExternalProject_Add_Step(external_gmpxx after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmpxx/ ${HARVEST_TARGET}/gmp
|
||||
DEPENDEES install
|
||||
)
|
||||
|
||||
endif()
|
@@ -1,192 +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 *****
|
||||
|
||||
########################################################################
|
||||
# Copy all generated files to the proper strucure as blender prefers
|
||||
########################################################################
|
||||
|
||||
if(NOT DEFINED HARVEST_TARGET)
|
||||
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
|
||||
endif()
|
||||
message("HARVEST_TARGET = ${HARVEST_TARGET}")
|
||||
|
||||
if(WIN32)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
add_custom_target(Harvest_Release_Results
|
||||
COMMAND # jpeg rename libfile + copy include
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
|
||||
# png
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
|
||||
# freeglut-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
# glew-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
# 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/
|
||||
DEPENDS
|
||||
)
|
||||
endif()
|
||||
|
||||
else(WIN32)
|
||||
|
||||
function(harvest from to)
|
||||
set(pattern "")
|
||||
foreach(f ${ARGN})
|
||||
set(pattern ${f})
|
||||
endforeach()
|
||||
|
||||
if(pattern STREQUAL "")
|
||||
get_filename_component(dirpath ${to} DIRECTORY)
|
||||
get_filename_component(filename ${to} NAME)
|
||||
install(
|
||||
FILES ${LIBDIR}/${from}
|
||||
DESTINATION ${HARVEST_TARGET}/${dirpath}
|
||||
RENAME ${filename})
|
||||
else()
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/${from}/
|
||||
DESTINATION ${HARVEST_TARGET}/${to}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
FILES_MATCHING PATTERN ${pattern}
|
||||
PATTERN "pkgconfig" EXCLUDE
|
||||
PATTERN "cmake" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE
|
||||
PATTERN "tests" EXCLUDE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
harvest(alembic/include alembic/include "*.h")
|
||||
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
|
||||
harvest(alembic/bin alembic/bin "*")
|
||||
harvest(boost/include boost/include "*")
|
||||
harvest(boost/lib boost/lib "*.a")
|
||||
harvest(ffmpeg/include ffmpeg/include "*.h")
|
||||
harvest(ffmpeg/lib ffmpeg/lib "*.a")
|
||||
harvest(fftw3/include fftw3/include "*.h")
|
||||
harvest(fftw3/lib fftw3/lib "*.a")
|
||||
harvest(flac/lib sndfile/lib "libFLAC.a")
|
||||
harvest(freetype/include freetype/include "*.h")
|
||||
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
|
||||
harvest(glew/include glew/include "*.h")
|
||||
harvest(glew/lib glew/lib "*.a")
|
||||
harvest(gmp/include gmp/include "*.h")
|
||||
harvest(gmp/lib gmp/lib "*.a")
|
||||
harvest(jemalloc/include jemalloc/include "*.h")
|
||||
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)
|
||||
harvest(openal/lib openal/lib "*.a")
|
||||
|
||||
harvest(blosc/include blosc/include "*.h")
|
||||
harvest(blosc/lib blosc/lib "*.a")
|
||||
|
||||
harvest(zlib/include zlib/include "*.h")
|
||||
harvest(zlib/lib zlib/lib "*.a")
|
||||
|
||||
harvest(xml2/include xml2/include "*.h")
|
||||
harvest(xml2/lib xml2/lib "*.a")
|
||||
else()
|
||||
harvest(blosc/lib openvdb/lib "*.a")
|
||||
harvest(xml2/lib opencollada/lib "*.a")
|
||||
endif()
|
||||
harvest(opencollada/include/opencollada opencollada/include "*.h")
|
||||
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
|
||||
harvest(opencolorio/include opencolorio/include "*.h")
|
||||
harvest(opencolorio/lib opencolorio/lib "*.a")
|
||||
harvest(opencolorio/lib/static opencolorio/lib "*.a")
|
||||
harvest(openexr/include openexr/include "*.h")
|
||||
harvest(openexr/lib openexr/lib "*.a")
|
||||
harvest(openimageio/bin openimageio/bin "idiff")
|
||||
harvest(openimageio/bin openimageio/bin "maketx")
|
||||
harvest(openimageio/bin openimageio/bin "oiiotool")
|
||||
harvest(openimageio/include openimageio/include "*")
|
||||
harvest(openimageio/lib openimageio/lib "*.a")
|
||||
if((NOT APPLE) OR ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
|
||||
harvest(openimagedenoise/include openimagedenoise/include "*")
|
||||
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
||||
harvest(embree/include embree/include "*.h")
|
||||
harvest(embree/lib embree/lib "*.a")
|
||||
endif()
|
||||
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
|
||||
harvest(openjpeg/lib openjpeg/lib "*.a")
|
||||
harvest(opensubdiv/include opensubdiv/include "*.h")
|
||||
harvest(opensubdiv/lib opensubdiv/lib "*.a")
|
||||
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
|
||||
if(WITH_NANOVDB)
|
||||
harvest(openvdb/nanovdb nanovdb/include/nanovdb "*.h")
|
||||
endif()
|
||||
harvest(openvdb/lib openvdb/lib "*.a")
|
||||
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
|
||||
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
|
||||
harvest(osl/bin osl/bin "oslc")
|
||||
harvest(osl/include osl/include "*.h")
|
||||
harvest(osl/lib osl/lib "*.a")
|
||||
harvest(osl/shaders osl/shaders "*.h")
|
||||
harvest(png/include png/include "*.h")
|
||||
harvest(png/lib png/lib "*.a")
|
||||
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
|
||||
harvest(python/include python/include "*h")
|
||||
harvest(python/lib python/lib "*")
|
||||
harvest(sdl/include/SDL2 sdl/include "*.h")
|
||||
harvest(sdl/lib sdl/lib "libSDL2.a")
|
||||
harvest(sndfile/include sndfile/include "*.h")
|
||||
harvest(sndfile/lib sndfile/lib "*.a")
|
||||
harvest(spnav/include spnav/include "*.h")
|
||||
harvest(spnav/lib spnav/lib "*.a")
|
||||
harvest(tbb/include tbb/include "*.h")
|
||||
harvest(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
|
||||
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")
|
||||
harvest(xvidcore/lib ffmpeg/lib "*.a")
|
||||
harvest(usd/include usd/include "*.h")
|
||||
harvest(usd/lib/usd usd/lib/usd "*")
|
||||
harvest(usd/plugin usd/plugin "*")
|
||||
harvest(potrace/include potrace/include "*.h")
|
||||
harvest(potrace/lib potrace/lib "*.a")
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
harvest(libglu/lib mesa/lib "*.so*")
|
||||
harvest(mesa/lib mesa/lib "*.so*")
|
||||
endif()
|
||||
|
||||
endif()
|
@@ -1,41 +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(ICONV_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_iconv
|
||||
URL ${ICONV_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${ICONV_HASH}
|
||||
PREFIX ${BUILD_DIR}/iconv
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/iconv
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_iconv after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,76 +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(WIN32)
|
||||
set(ISPC_EXTRA_ARGS_WIN
|
||||
-DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe
|
||||
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
|
||||
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
|
||||
)
|
||||
elseif(APPLE)
|
||||
# Use bison installed via Homebrew.
|
||||
# The one which comes which Xcode toolset is too old.
|
||||
set(ISPC_EXTRA_ARGS_APPLE
|
||||
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
|
||||
)
|
||||
elseif(UNIX)
|
||||
set(ISPC_EXTRA_ARGS_UNIX
|
||||
-DCMAKE_C_COMPILER=${LIBDIR}/clang/bin/clang
|
||||
-DCMAKE_CXX_COMPILER=${LIBDIR}/clang/bin/clang++
|
||||
)
|
||||
endif()
|
||||
|
||||
set(ISPC_EXTRA_ARGS
|
||||
-DARM_ENABLED=Off
|
||||
-DISPC_NO_DUMPS=On
|
||||
-DISPC_INCLUDE_EXAMPLES=Off
|
||||
-DISPC_INCLUDE_TESTS=Off
|
||||
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
|
||||
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
|
||||
-DCLANG_EXECUTABLE=${LIBDIR}/clang/bin/clang
|
||||
-DCLANGPP_EXECUTABLE=${LIBDIR}/clang/bin/clang++
|
||||
-DISPC_INCLUDE_TESTS=Off
|
||||
-DCLANG_LIBRARY_DIR=${LIBDIR}/clang/lib
|
||||
-DCLANG_INCLUDE_DIRS=${LIBDIR}/clang/include
|
||||
${ISPC_EXTRA_ARGS_WIN}
|
||||
${ISPC_EXTRA_ARGS_APPLE}
|
||||
${ISPC_EXTRA_ARGS_UNIX}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_ispc
|
||||
URL ${ISPC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${ISPC_HASH}
|
||||
PREFIX ${BUILD_DIR}/ispc
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ispc/src/external_ispc < ${PATCH_DIR}/ispc.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ispc -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ISPC_EXTRA_ARGS} ${BUILD_DIR}/ispc/src/external_ispc
|
||||
INSTALL_DIR ${LIBDIR}/ispc
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_ispc
|
||||
ll
|
||||
external_clang
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_ispc
|
||||
external_flexbison
|
||||
)
|
||||
endif()
|
@@ -1,28 +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_jemalloc
|
||||
URL ${JEMALLOC_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${JEMALLOC_HASH}
|
||||
PREFIX ${BUILD_DIR}/jemalloc
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/jemalloc
|
||||
)
|
@@ -1,62 +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(WIN32)
|
||||
# cmake for windows
|
||||
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
|
||||
|
||||
ExternalProject_Add(external_jpeg
|
||||
URL ${JPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${JPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/jpg
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/jpg
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_jpeg after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(JPEG_LIBRARY jpeg-static${LIBEXT})
|
||||
else()
|
||||
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
|
||||
endif()
|
||||
else(WIN32)
|
||||
# cmake for unix
|
||||
set(JPEG_EXTRA_ARGS
|
||||
-DWITH_JPEG8=ON
|
||||
-DENABLE_STATIC=ON
|
||||
-DENABLE_SHARED=OFF
|
||||
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpg/lib)
|
||||
|
||||
ExternalProject_Add(external_jpeg
|
||||
URL ${JPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${JPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/jpg
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/jpg
|
||||
)
|
||||
|
||||
set(JPEG_LIBRARY libjpeg${LIBEXT})
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
set(LAME_EXTRA_ARGS)
|
||||
if(MSVC)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
|
||||
set(LAME_EXTRA_ARGS CFLAGS=-msse)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_lame
|
||||
URL ${LAME_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LAME_HASH}
|
||||
PREFIX ${BUILD_DIR}/lame
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
|
||||
--enable-export=full
|
||||
--with-fileio=sndfile
|
||||
--without-vorbis
|
||||
--with-pic
|
||||
--disable-mp3x
|
||||
--disable-mp3rtp
|
||||
--disable-gtktest
|
||||
--disable-frontend
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/lame
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
set(LCMS_EXTRA_ARGS
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_lcms
|
||||
URL ${LCMS_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LCMS_HASH}
|
||||
PREFIX ${BUILD_DIR}/lcms
|
||||
# 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
|
||||
)
|
@@ -1,67 +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(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
set(LLVM_TARGETS AArch64)
|
||||
else()
|
||||
set(LLVM_TARGETS X86)
|
||||
endif()
|
||||
|
||||
set(LLVM_EXTRA_ARGS
|
||||
-DLLVM_USE_CRT_RELEASE=MD
|
||||
-DLLVM_USE_CRT_DEBUG=MDd
|
||||
-DLLVM_INCLUDE_TESTS=OFF
|
||||
-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS}
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF
|
||||
-DLLVM_ENABLE_TERMINFO=OFF
|
||||
-DLLVM_BUILD_LLVM_C_DYLIB=OFF
|
||||
-DLLVM_ENABLE_UNWIND_TABLES=OFF
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(LLVM_GENERATOR "Ninja")
|
||||
else()
|
||||
set(LLVM_GENERATOR "Unix Makefiles")
|
||||
endif()
|
||||
|
||||
# short project name due to long filename issues on windows
|
||||
ExternalProject_Add(ll
|
||||
URL ${LLVM_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${LLVM_HASH}
|
||||
CMAKE_GENERATOR ${LLVM_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/ll
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/llvm
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
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/
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_Step(ll after_install
|
||||
COMMAND ${LLVM_HARVEST_COMMAND}
|
||||
DEPENDEES mkdir update patch download configure build install
|
||||
)
|
||||
endif()
|
@@ -1,32 +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(LZMA_PATCH_CMD echo .)
|
||||
|
||||
ExternalProject_Add(external_lzma
|
||||
URL ${LZMA_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${LZMA_HASH}
|
||||
PREFIX ${BUILD_DIR}/lzma
|
||||
PATCH_COMMAND ${LZMA_PATCH_CMD}
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
|
||||
--disable-shared
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/lzma
|
||||
)
|
@@ -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
|
||||
)
|
@@ -1,29 +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_nasm
|
||||
URL ${NASM_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${NASM_HASH}
|
||||
PREFIX ${BUILD_DIR}/nasm
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/nasm/src/external_nasm < ${PATCH_DIR}/nasm.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/nasm
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/nasm
|
||||
)
|
@@ -1,50 +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)
|
||||
message("BIN >${PYTHON_BINARY}<")
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(NUMPY_DIR_POSTFIX -pydebug)
|
||||
set(NUMPY_ARCHIVE_POSTFIX d)
|
||||
set(NUMPY_BUILD_OPTION --debug)
|
||||
else()
|
||||
set(NUMPY_DIR_POSTFIX)
|
||||
set(NUMPY_ARCHIVE_POSTFIX)
|
||||
set(NUMPY_BUILD_OPTION)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(NUMPY_POSTFIX)
|
||||
|
||||
ExternalProject_Add(external_numpy
|
||||
URL ${NUMPY_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${NUMPY_HASH}
|
||||
PREFIX ${BUILD_DIR}/numpy
|
||||
PATCH_COMMAND ${NUMPY_PATCH}
|
||||
CONFIGURE_COMMAND ""
|
||||
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
|
||||
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 ""
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_numpy
|
||||
external_python
|
||||
)
|
@@ -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 *****
|
||||
|
||||
ExternalProject_Add(external_ogg
|
||||
URL ${OGG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OGG_HASH}
|
||||
PREFIX ${BUILD_DIR}/ogg
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ogg/src/external_ogg < ${PATCH_DIR}/ogg.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,66 +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(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
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_openal
|
||||
URL ${OPENAL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENAL_HASH}
|
||||
PREFIX ${BUILD_DIR}/openal
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openal
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
ExternalProject_Add_Step(external_openal after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
@@ -1,65 +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)
|
||||
set(OPENCOLLADA_EXTRA_ARGS
|
||||
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
|
||||
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_opencollada
|
||||
URL ${OPENCOLLADA_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENCOLLADA_HASH}
|
||||
PREFIX ${BUILD_DIR}/opencollada
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opencollada
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_opencollada
|
||||
external_xml2
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_opencollada after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_opencollada after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,119 +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(OPENCOLORIO_EXTRA_ARGS
|
||||
-DOCIO_BUILD_APPS=OFF
|
||||
-DOCIO_BUILD_PYGLUE=OFF
|
||||
-DOCIO_BUILD_NUKE=OFF
|
||||
-DOCIO_USE_BOOST_PTR=OFF
|
||||
-DOCIO_BUILD_STATIC=ON
|
||||
-DOCIO_BUILD_SHARED=OFF
|
||||
-DOCIO_BUILD_TRUELIGHT=OFF
|
||||
-DOCIO_BUILD_DOCS=OFF
|
||||
-DOCIO_BUILD_PYGLUE=OFF
|
||||
-DOCIO_BUILD_JNIGLUE=OFF
|
||||
-DOCIO_STATIC_JNIGLUE=OFF
|
||||
)
|
||||
|
||||
if(APPLE AND NOT("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
-DOCIO_USE_SSE=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(OCIO_PATCH opencolorio_win.diff)
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
-DOCIO_BUILD_TESTS=OFF
|
||||
-DOCIO_USE_SSE=ON
|
||||
-DOCIO_INLINES_HIDDEN=OFF
|
||||
-DOCIO_PYGLUE_LINK=OFF
|
||||
-DOCIO_PYGLUE_RESPECT_ABI=OFF
|
||||
-DOCIO_PYGLUE_SONAME=OFF
|
||||
-DOCIO_PYGLUE_LIB_PREFIX=OFF
|
||||
-DUSE_EXTERNAL_TINYXML=ON
|
||||
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
|
||||
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
|
||||
-DUSE_EXTERNAL_YAML=ON
|
||||
-DYAML_CPP_FOUND=ON
|
||||
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
|
||||
-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.
|
||||
-DYAML_CPP_VERSION=0.5.0
|
||||
)
|
||||
else()
|
||||
set(OCIO_PATCH opencolorio.diff)
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_opencolorio
|
||||
URL ${OPENCOLORIO_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENCOLORIO_HASH}
|
||||
PREFIX ${BUILD_DIR}/opencolorio
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opencolorio
|
||||
)
|
||||
|
||||
if(NOT WIN32)
|
||||
add_custom_command(
|
||||
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
|
||||
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
|
||||
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
|
||||
)
|
||||
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_opencolorio
|
||||
external_boost
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_opencolorio
|
||||
external_tinyxml
|
||||
external_yamlcpp
|
||||
|
||||
)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
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}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
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}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
@@ -1,64 +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(WIN32)
|
||||
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
|
||||
set(OPENEXR_EXTRA_ARGS
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
set(OPENEXR_EXTRA_ARGS
|
||||
)
|
||||
endif()
|
||||
|
||||
set(OPENEXR_EXTRA_ARGS
|
||||
${OPENEXR_EXTRA_ARGS}
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DBUILD_TESTING=OFF
|
||||
-DOPENEXR_BUILD_BOTH_STATIC_SHARED=OFF
|
||||
-DILMBASE_BUILD_BOTH_STATIC_SHARED=OFF
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DOPENEXR_BUILD_UTILS=OFF
|
||||
-DPYILMBASE_ENABLE=OFF
|
||||
-DOPENEXR_VIEWERS_ENABLE=OFF
|
||||
-DILMBASE_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
|
||||
-DOPENEXR_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openexr
|
||||
URL ${OPENEXR_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENEXR_HASH}
|
||||
PREFIX ${BUILD_DIR}/openexr
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openexr
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
ExternalProject_Add_Step(external_openexr after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_openexr
|
||||
external_zlib
|
||||
)
|
@@ -1,76 +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
|
||||
-DOIDN_APPS=OFF
|
||||
-DTBB_ROOT=${LIBDIR}/tbb
|
||||
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
|
||||
-DOIDN_STATIC_LIB=ON
|
||||
-DOIDN_STATIC_RUNTIME=OFF
|
||||
-DISPC_EXECUTABLE=${LIBDIR}/ispc/bin/ispc
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DTBB_DEBUG_LIBRARY=${LIBDIR}/tbb/lib/tbb.lib
|
||||
-DTBB_DEBUG_LIBRARY_MALLOC=${LIBDIR}/tbb/lib/tbbmalloc.lib
|
||||
)
|
||||
else()
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-Dtbb_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbb_static.a
|
||||
-Dtbbmalloc_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbbmalloc_static.a
|
||||
)
|
||||
endif()
|
||||
|
||||
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}
|
||||
INSTALL_DIR ${LIBDIR}/openimagedenoise
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openimagedenoise
|
||||
external_tbb
|
||||
external_ispc
|
||||
)
|
||||
|
||||
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/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl.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/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,158 +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(BUILD_MODE STREQUAL Release)
|
||||
set(OIIO_TOOLS ON)
|
||||
else()
|
||||
set(OIIO_TOOLS OFF)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# This causes linking to static pthread libraries which gives link errors.
|
||||
# Since we manually specify library paths it should static link other libs.
|
||||
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
|
||||
else()
|
||||
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PNG_LIBNAME libpng16_static${LIBEXT})
|
||||
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
|
||||
set(OPENJPEG_POSTFIX _msvc)
|
||||
else()
|
||||
set(PNG_LIBNAME libpng${LIBEXT})
|
||||
set(OIIO_SIMD_FLAGS)
|
||||
endif()
|
||||
|
||||
if(WITH_WEBP)
|
||||
set(WEBP_ARGS
|
||||
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
|
||||
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
|
||||
)
|
||||
set(WEBP_DEP external_webp)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(OPENJPEG_FLAGS
|
||||
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg_msvc
|
||||
)
|
||||
else()
|
||||
set(OPENJPEG_FLAGS
|
||||
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg
|
||||
)
|
||||
endif()
|
||||
|
||||
set(OPENIMAGEIO_EXTRA_ARGS
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
${OPENIMAGEIO_LINKSTATIC}
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-OIIO_BUILD_CPP11=ON
|
||||
-DUSE_LIBSQUISH=OFF
|
||||
-DUSE_QT5=OFF
|
||||
-DUSE_NUKE=OFF
|
||||
-DUSE_OPENVDB=OFF
|
||||
-DUSE_BZIP2=OFF
|
||||
-DUSE_FREETYPE=OFF
|
||||
-DUSE_DCMTK=OFF
|
||||
-DUSE_LIBHEIF=OFF
|
||||
-DUSE_OPENGL=OFF
|
||||
-DUSE_TBB=OFF
|
||||
-DUSE_FIELD3D=OFF
|
||||
-DUSE_QT=OFF
|
||||
-DUSE_PYTHON=OFF
|
||||
-DUSE_GIF=OFF
|
||||
-DUSE_OPENCV=OFF
|
||||
-DUSE_OPENJPEG=ON
|
||||
-DUSE_FFMPEG=OFF
|
||||
-DUSE_PTEX=OFF
|
||||
-DUSE_FREETYPE=OFF
|
||||
-DUSE_LIBRAW=OFF
|
||||
-DUSE_OPENCOLORIO=OFF
|
||||
-DUSE_WEBP=${WITH_WEBP}
|
||||
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
|
||||
-DOIIO_BUILD_TESTS=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
|
||||
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
|
||||
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
|
||||
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
|
||||
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
|
||||
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
|
||||
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
|
||||
${OPENJPEG_FLAGS}
|
||||
-DOpenEXR_USE_STATIC_LIBS=On
|
||||
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
|
||||
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DSTOP_ON_WARNING=OFF
|
||||
${WEBP_FLAGS}
|
||||
${OIIO_SIMD_FLAGS}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openimageio
|
||||
URL ${OPENIMAGEIO_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENIMAGEIO_HASH}
|
||||
PREFIX ${BUILD_DIR}/openimageio
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openimageio
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openimageio
|
||||
external_png
|
||||
external_zlib
|
||||
external_openexr
|
||||
external_jpeg
|
||||
external_boost
|
||||
external_tiff
|
||||
external_openjpeg${OPENJPEG_POSTFIX}
|
||||
${WEBP_DEP}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openimageio after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_openimageio after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,64 +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 *****
|
||||
|
||||
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
|
||||
|
||||
if(WIN32)
|
||||
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
|
||||
else()
|
||||
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_openjpeg
|
||||
URL ${OPENJPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OPENJPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/openjpeg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg
|
||||
)
|
||||
|
||||
# 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
|
||||
URL ${OPENJPEG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OPENJPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/openjpeg_msvc
|
||||
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
|
||||
)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openjpeg_msvc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
|
||||
if(MSVC)
|
||||
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,34 +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_openmp
|
||||
URL ${OPENMP_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENMP_HASH}
|
||||
PREFIX ${BUILD_DIR}/openmp
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openmp/src/external_openmp < ${PATCH_DIR}/openmp.diff
|
||||
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
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openmp
|
||||
external_clang
|
||||
)
|
@@ -1,100 +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(OPENSUBDIV_EXTRA_ARGS
|
||||
-DNO_EXAMPLES=ON
|
||||
-DNO_REGRESSION=ON
|
||||
-DNO_PYTHON=ON
|
||||
-DNO_MAYA=ON
|
||||
-DNO_PTEX=ON
|
||||
-DNO_DOC=ON
|
||||
-DNO_CLEW=OFF
|
||||
-DNO_OPENCL=OFF
|
||||
-DNO_TUTORIALS=ON
|
||||
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
|
||||
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
|
||||
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
|
||||
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
|
||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
|
||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
|
||||
)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DNO_CUDA=OFF
|
||||
)
|
||||
else()
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DNO_CUDA=ON
|
||||
)
|
||||
endif()
|
||||
|
||||
else()
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DNO_CUDA=ON
|
||||
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
|
||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_opensubdiv
|
||||
URL ${OPENSUBDIV_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENSUBDIV_HASH}
|
||||
PREFIX ${BUILD_DIR}/opensubdiv
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opensubdiv
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_opensubdiv after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_opensubdiv after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_opensubdiv
|
||||
external_glew
|
||||
external_glfw
|
||||
external_clew
|
||||
external_cuew
|
||||
external_tbb
|
||||
)
|
@@ -1,138 +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(BUILD_MODE STREQUAL Debug)
|
||||
set(BLOSC_POST _d)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(OPENVDB_SHARED ON)
|
||||
set(OPENVDB_STATIC OFF)
|
||||
else()
|
||||
set(OPENVDB_SHARED OFF)
|
||||
set(OPENVDB_STATIC ON)
|
||||
endif()
|
||||
|
||||
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_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/
|
||||
-DBlosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
|
||||
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
|
||||
-DOPENVDB_BUILD_UNITTESTS=Off
|
||||
-DOPENVDB_BUILD_PYTHON_MODULE=Off
|
||||
-DBlosc_ROOT=${LIBDIR}/blosc/
|
||||
-DTBB_ROOT=${LIBDIR}/tbb/
|
||||
-DOpenEXR_ROOT=${LIBDIR}/openexr
|
||||
-DIlmBase_ROOT=${LIBDIR}/openexr
|
||||
-DOPENEXR_LIBRARYDIR=${LIBDIR}/openexr/lib
|
||||
# All libs live in openexr, even the ilmbase ones
|
||||
-DILMBASE_LIBRARYDIR=${LIBDIR}/openexr/lib
|
||||
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
|
||||
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
|
||||
-DOPENVDB_BUILD_BINARIES=Off
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
# NanoVDB is header-only, so only need the install target
|
||||
-DNANOVDB_BUILD_UNITTESTS=OFF
|
||||
-DNANOVDB_BUILD_EXAMPLES=OFF
|
||||
-DNANOVDB_BUILD_BENCHMARK=OFF
|
||||
-DNANOVDB_BUILD_DOCS=OFF
|
||||
-DNANOVDB_BUILD_TOOLS=OFF
|
||||
-DNANOVDB_CUDA_KEEP_PTX=OFF
|
||||
-DNANOVDB_USE_OPENGL=OFF
|
||||
-DNANOVDB_USE_OPENGL=OFF
|
||||
-DNANOVDB_USE_CUDA=OFF
|
||||
-DNANOVDB_USE_TBB=OFF
|
||||
-DNANOVDB_USE_OPTIX=OFF
|
||||
-DNANOVDB_USE_OPENVDB=OFF
|
||||
-DNANOVDB_ALLOW_FETCHCONTENT=OFF
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# Namespaces seem to be buggy and cause linker errors due to things not
|
||||
# being in the correct namespace
|
||||
# needs to link pthreads due to it being a blosc dependency
|
||||
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES="${LIBDIR}/pthreads/lib/pthreadVC3.lib"
|
||||
-DUSE_EXR=On
|
||||
)
|
||||
else()
|
||||
# OpenVDB can't find the _static libraries automatically.
|
||||
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
|
||||
-DTbb_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
|
||||
-DTbb_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
|
||||
-DTbb_tbbmalloc_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbbmalloc_static${LIBEXT}
|
||||
-DTbb_tbbmalloc_proxy_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbbmalloc_proxy_static${LIBEXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
set(OPENVDB_PATCH_FILE openvdb_nanovdb.diff)
|
||||
else()
|
||||
set(OPENVDB_PATCH_FILE openvdb.diff)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(openvdb
|
||||
URL ${OPENVDB_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENVDB_HASH}
|
||||
PREFIX ${BUILD_DIR}/openvdb
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/${OPENVDB_PATCH_FILE}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openvdb
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
openvdb
|
||||
external_tbb
|
||||
external_boost
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_blosc
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(openvdb after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include/openvdb ${HARVEST_TARGET}/openvdb/include/openvdb
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
if(WITH_NANOVDB)
|
||||
ExternalProject_Add_Step(openvdb nanovdb_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/nanovdb ${HARVEST_TARGET}/nanovdb/include/nanovdb
|
||||
DEPENDEES after_install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(openvdb after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb_d.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb_d.dll ${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,213 +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(WIN32)
|
||||
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
|
||||
endif()
|
||||
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
|
||||
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
|
||||
option(WITH_NANOVDB "Enable building of OpenVDB with NanoVDB included" OFF)
|
||||
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
|
||||
|
||||
if(NOT BUILD_MODE)
|
||||
set(BUILD_MODE "Release")
|
||||
message(STATUS "Build type not specified: defaulting to a release build.")
|
||||
endif()
|
||||
message("BuildMode = ${BUILD_MODE}")
|
||||
|
||||
if(BUILD_MODE STREQUAL "Debug")
|
||||
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
|
||||
else(BUILD_MODE STREQUAL "Debug")
|
||||
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
|
||||
endif()
|
||||
|
||||
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
|
||||
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
|
||||
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
|
||||
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
|
||||
message("PATCH_DIR = ${PATCH_DIR}")
|
||||
message("BUILD_DIR = ${BUILD_DIR}")
|
||||
|
||||
if(WIN32)
|
||||
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
|
||||
set(LIBEXT ".lib")
|
||||
set(LIBPREFIX "")
|
||||
|
||||
# For OIIO and OSL
|
||||
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
|
||||
|
||||
if(MSVC_VERSION GREATER 1909)
|
||||
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
|
||||
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")
|
||||
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")
|
||||
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")
|
||||
|
||||
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")
|
||||
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(PLATFORM_FLAGS)
|
||||
set(PLATFORM_CXX_FLAGS)
|
||||
set(PLATFORM_CMAKE_FLAGS)
|
||||
|
||||
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
|
||||
set(MINGW_SHELL ming64sh.cmd)
|
||||
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
|
||||
set(MINGW_HOST x86_64-w64-mingw32)
|
||||
|
||||
set(CONFIGURE_ENV
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${PERL_SHELL} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS=-g &&
|
||||
set LDFLAGS=-Wl,--as-needed -static-libgcc
|
||||
)
|
||||
|
||||
set(CONFIGURE_ENV_NO_PERL
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS=-g &&
|
||||
set LDFLAGS=-Wl,--as-needed -static-libgcc
|
||||
)
|
||||
|
||||
set(CONFIGURE_COMMAND sh ./configure)
|
||||
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
|
||||
else()
|
||||
set(PATCH_CMD patch)
|
||||
set(LIBEXT ".a")
|
||||
set(LIBPREFIX "lib")
|
||||
|
||||
if(APPLE)
|
||||
# Let's get the current Xcode dir, to support xcode-select
|
||||
execute_process(
|
||||
COMMAND xcode-select --print-path
|
||||
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(
|
||||
COMMAND xcodebuild -version -sdk macosx SDKVersion
|
||||
OUTPUT_VARIABLE MACOSX_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT CMAKE_OSX_ARCHITECTURES)
|
||||
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Detected native architecture ${ARCHITECTURE}.")
|
||||
set(CMAKE_OSX_ARCHITECTURES "${ARCHITECTURE}")
|
||||
endif()
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
|
||||
set(OSX_DEPLOYMENT_TARGET 10.13)
|
||||
else()
|
||||
set(OSX_DEPLOYMENT_TARGET 11.00)
|
||||
endif()
|
||||
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
|
||||
|
||||
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin17.0.0) # OS X 10.13
|
||||
else()
|
||||
set(PLATFORM_BUILD_TARGET --build=aarch64-apple-darwin20.0.0) # macOS 11.00
|
||||
endif()
|
||||
set(PLATFORM_CMAKE_FLAGS
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
|
||||
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
|
||||
)
|
||||
else()
|
||||
set(PLATFORM_CFLAGS "-fPIC")
|
||||
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
|
||||
set(PLATFORM_LDFLAGS)
|
||||
set(PLATFORM_BUILD_TARGET)
|
||||
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
|
||||
else()
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
else()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
|
||||
endif()
|
||||
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
|
||||
|
||||
set(CONFIGURE_ENV
|
||||
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
|
||||
export MACOSX_SDK_VERSION=${OSX_DEPLOYMENT_TARGET} &&
|
||||
export CFLAGS=${PLATFORM_CFLAGS} &&
|
||||
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
|
||||
export LDFLAGS=${PLATFORM_LDFLAGS}
|
||||
)
|
||||
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
|
||||
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
|
||||
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_CMAKE_FLAGS
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
|
||||
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
|
||||
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
|
||||
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
|
||||
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
|
||||
${PLATFORM_CMAKE_FLAGS}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
|
||||
else()
|
||||
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
|
||||
endif()
|
||||
else()
|
||||
set(ZLIB_LIBRARY libz${LIBEXT})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_MESSAGE LAZY)
|
@@ -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()
|
@@ -1,143 +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(WIN32)
|
||||
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
|
||||
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
|
||||
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
|
||||
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
|
||||
else()
|
||||
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
|
||||
endif()
|
||||
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
|
||||
else()
|
||||
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
|
||||
set(OSL_FLEX_BISON)
|
||||
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
|
||||
SET(OSL_PLATFORM_FLAGS)
|
||||
endif()
|
||||
|
||||
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/openexr/lib/Imath${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Half{OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/IlmThread${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Iex${OPENEXR_VERSION_POSTFIX}.lib")
|
||||
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
|
||||
|
||||
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_ROOT=${LIBDIR}/boost
|
||||
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DLLVM_DIRECTORY=${LIBDIR}/llvm
|
||||
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
|
||||
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
|
||||
-DLLVM_VERSION=3.4
|
||||
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
|
||||
-DOPENEXR_HOME=${LIBDIR}/openexr/
|
||||
-DILMBASE_HOME=${LIBDIR}/openexr/
|
||||
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
|
||||
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
|
||||
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOSL_BUILD_TESTS=OFF
|
||||
-DOSL_BUILD_MATERIALX=OFF
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
|
||||
-DOPENIMAGEIO_INCLUDE_DIR=${LIBDIR}/openimageio/include
|
||||
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
|
||||
${OSL_FLEX_BISON}
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
|
||||
-DBUILDSTATIC=ON
|
||||
${OSL_PLATFORM_FLAGS}
|
||||
-DOSL_BUILD_PLUGINS=Off
|
||||
-DSTOP_ON_WARNING=OFF
|
||||
-DUSE_LLVM_BITCODE=OFF
|
||||
-DUSE_PARTIO=OFF
|
||||
-DUSE_QT=OFF
|
||||
-DINSTALL_DOCS=OFF
|
||||
${OSL_SIMD_FLAGS}
|
||||
-DPARTIO_LIBRARIES=
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(OSL_EXTRA_ARGS
|
||||
${OSL_EXTRA_ARGS}
|
||||
-DPUGIXML_HOME=${LIBDIR}/pugixml
|
||||
)
|
||||
elseif(APPLE)
|
||||
# Make symbol hiding consistent with OIIO which defaults to OFF,
|
||||
# avoids linker warnings on macOS
|
||||
set(OSL_EXTRA_ARGS
|
||||
${OSL_EXTRA_ARGS}
|
||||
-DHIDE_SYMBOLS=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_osl
|
||||
URL ${OSL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
LIST_SEPARATOR ^^
|
||||
URL_HASH MD5=${OSL_HASH}
|
||||
PREFIX ${BUILD_DIR}/osl
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/osl
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_osl
|
||||
external_boost
|
||||
ll
|
||||
external_clang
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_flexbison
|
||||
external_openimageio
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
# Rely on PugiXML compiled with OpenImageIO
|
||||
else()
|
||||
add_dependencies(
|
||||
external_osl
|
||||
external_pugixml
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_osl after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_osl after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,60 +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}/python3${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python3${PYTHON_POSTFIX}.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}/python3${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python3${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()
|
@@ -1,48 +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(PNG_EXTRA_ARGS
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DPNG_STATIC=ON
|
||||
)
|
||||
|
||||
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64"))
|
||||
set(PNG_EXTRA_ARGS ${PNG_EXTRA_ARGS} -DPNG_HARDWARE_OPTIMIZATIONS=ON -DPNG_ARM_NEON=on -DCMAKE_SYSTEM_PROCESSOR="aarch64")
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_png
|
||||
URL ${PNG_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${PNG_HASH}
|
||||
PREFIX ${BUILD_DIR}/png
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/png
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_png
|
||||
external_zlib
|
||||
)
|
||||
|
||||
if(WIN32 AND 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
|
||||
)
|
||||
endif()
|
@@ -1,38 +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(POTRACE_EXTRA_ARGS
|
||||
)
|
||||
|
||||
if((WIN32 AND BUILD_MODE STREQUAL Release) OR UNIX)
|
||||
ExternalProject_Add(external_potrace
|
||||
URL ${POTRACE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${POTRACE_HASH}
|
||||
PREFIX ${BUILD_DIR}/potrace
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_potrace.txt ${BUILD_DIR}/potrace/src/external_potrace/CMakeLists.txt
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/potrace ${DEFAULT_CMAKE_FLAGS} ${POTRACE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/potrace
|
||||
)
|
||||
if(WIN32)
|
||||
ExternalProject_Add_Step(external_potrace after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/potrace ${HARVEST_TARGET}/potrace
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
if(WIN32)
|
||||
|
||||
if(MSVC14) # vs2015 has timespec
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
|
||||
else() # everything before doesn't
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
|
||||
endif()
|
||||
|
||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
|
||||
|
||||
ExternalProject_Add(external_pthreads
|
||||
URL ${PTHREADS_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PTHREADS_HASH}
|
||||
PREFIX ${BUILD_DIR}/pthreads
|
||||
CONFIGURE_COMMAND echo .
|
||||
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -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/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
|
||||
INSTALL_DIR ${LIBDIR}/pthreads
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_pthreads after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
@@ -1,43 +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(PUGIXML_EXTRA_ARGS
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_pugixml
|
||||
URL ${PUGIXML_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PUGIXML_HASH}
|
||||
PREFIX ${BUILD_DIR}/pugixml
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/pugixml
|
||||
)
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_pugixml after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_pugixml after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,115 +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(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/)
|
||||
macro(cmake_to_dos_path MsysPath ResultingPath)
|
||||
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
|
||||
endmacro()
|
||||
|
||||
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
|
||||
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
|
||||
|
||||
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
|
||||
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
|
||||
|
||||
ExternalProject_Add(external_python
|
||||
URL ${PYTHON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PYTHON_HASH}
|
||||
PREFIX ${BUILD_DIR}/python
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -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-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
|
||||
)
|
||||
|
||||
else()
|
||||
if(APPLE)
|
||||
# Disable functions that can be in 10.13 sdk but aren't available on 10.9 target.
|
||||
#
|
||||
# Disable libintl (gettext library) as it might come from Homebrew, which makes
|
||||
# it so test program compiles, but the Python does not. This is because for Python
|
||||
# we use isysroot, which seems to forbid using libintl.h.
|
||||
# The gettext functionality seems to come from CoreFoundation, so should be all fine.
|
||||
set(PYTHON_FUNC_CONFIGS
|
||||
export ac_cv_func_futimens=no &&
|
||||
export ac_cv_func_utimensat=no &&
|
||||
export ac_cv_func_basename_r=no &&
|
||||
export ac_cv_func_clock_getres=no &&
|
||||
export ac_cv_func_clock_gettime=no &&
|
||||
export ac_cv_func_clock_settime=no &&
|
||||
export ac_cv_func_dirname_r=no &&
|
||||
export ac_cv_func_getentropy=no &&
|
||||
export ac_cv_func_mkostemp=no &&
|
||||
export ac_cv_func_mkostemps=no &&
|
||||
export ac_cv_func_timingsafe_bcmp=no &&
|
||||
export ac_cv_header_libintl_h=no &&
|
||||
export ac_cv_lib_intl_textdomain=no
|
||||
)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
set(PYTHON_FUNC_CONFIGS ${PYTHON_FUNC_CONFIGS} && export PYTHON_DECIMAL_WITH_MACHINE=ansi64)
|
||||
endif()
|
||||
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
|
||||
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_macos.diff)
|
||||
else()
|
||||
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
|
||||
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
|
||||
endif()
|
||||
|
||||
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
|
||||
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
|
||||
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
|
||||
set(PYTHON_CONFIGURE_EXTRA_ENV
|
||||
export CFLAGS=${PYTHON_CFLAGS} &&
|
||||
export CPPFLAGS=${PYTHON_CFLAGS} &&
|
||||
export LDFLAGS=${PYTHON_LDFLAGS} &&
|
||||
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
|
||||
|
||||
ExternalProject_Add(external_python
|
||||
URL ${PYTHON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PYTHON_HASH}
|
||||
PREFIX ${BUILD_DIR}/python
|
||||
PATCH_COMMAND ${PYTHON_PATCH}
|
||||
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
|
||||
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)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_python
|
||||
external_bzip2
|
||||
external_ffi
|
||||
external_lzma
|
||||
external_ssl
|
||||
external_sqlite
|
||||
external_zlib
|
||||
)
|
||||
endif()
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
global:
|
||||
Py*;
|
||||
_Py*;
|
||||
_py*;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
@@ -1,30 +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_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:
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_python_site_packages
|
||||
external_python
|
||||
)
|
@@ -1,49 +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(WIN32)
|
||||
set(SDL_EXTRA_ARGS
|
||||
-DSDL_STATIC=Off
|
||||
)
|
||||
else()
|
||||
set(SDL_EXTRA_ARGS
|
||||
-DSDL_STATIC=ON
|
||||
-DSDL_SHARED=OFF
|
||||
-DSDL_VIDEO=OFF
|
||||
-DSNDIO=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_sdl
|
||||
URL ${SDL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${SDL_HASH}
|
||||
PREFIX ${BUILD_DIR}/sdl
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/sdl
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_sdl after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,235 +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 *****
|
||||
|
||||
####################################################################################################################
|
||||
# Mingw64 Builds
|
||||
####################################################################################################################
|
||||
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3
|
||||
####################################################################################################################
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
string(REPLACE ":" "" TmpPath "${MsysPath}")
|
||||
string(SUBSTRING ${TmpPath} 0 1 Drive)
|
||||
string(SUBSTRING ${TmpPath} 1 255 PathPart)
|
||||
string(TOLOWER ${Drive} LowerDrive)
|
||||
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
|
||||
endmacro()
|
||||
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
|
||||
message("mingw_LIBDIR = ${mingw_LIBDIR}")
|
||||
|
||||
message("Checking for mingw64")
|
||||
# download ming64
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
|
||||
message("Downloading mingw64")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
|
||||
endif()
|
||||
|
||||
# make mingw root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract mingw64
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z"))
|
||||
message("Extracting mingw64")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for pkg-config")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
message("Downloading pkg-config")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
endif()
|
||||
|
||||
# extract pkgconfig
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
|
||||
message("Extracting pkg-config")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
message("Checking for nasm")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
|
||||
message("Downloading nasm")
|
||||
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
|
||||
endif()
|
||||
|
||||
# extract nasm
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"))
|
||||
message("Extracting nasm")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe)
|
||||
|
||||
message("Checking for mingwGet")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
message("Downloading mingw-get")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
endif()
|
||||
|
||||
# extract mingw_get
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
|
||||
message("Extracting mingw-get")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
|
||||
message("Installing MSYS")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/mktemp.exe"))
|
||||
message("Installing mktemp")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe"))
|
||||
message("Installing m4")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-m4
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for CoreUtils")
|
||||
# download old core_utils for pr.exe (ffmpeg needs it to build)
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
message("Downloading CoreUtils 5.97")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
|
||||
message("Installing pr from CoreUtils 5.97")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
|
||||
message("Installing ming64sh.cmd")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for perl")
|
||||
# download perl for libvpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
message("Downloading perl")
|
||||
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
endif()
|
||||
|
||||
# make perl root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract perl
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
|
||||
message("Extracting perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
|
||||
)
|
||||
endif()
|
||||
|
||||
# get yasm for vpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
|
||||
message("Downloading yasm")
|
||||
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-strings.exe")
|
||||
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
|
||||
message("fixing x86_64-w64-mingw32-strings.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-ar.exe")
|
||||
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
|
||||
message("fixing x86_64-w64-mingw32-ar.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-strip.exe")
|
||||
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
|
||||
message("fixing x86_64-w64-mingw32-strip.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-ranlib.exe")
|
||||
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
|
||||
message("fixing x86_64-w64-mingw32-ranlib.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
|
||||
)
|
||||
endif()
|
@@ -1,73 +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(SNDFILE_EXTRA_ARGS)
|
||||
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
|
||||
|
||||
if(WIN32)
|
||||
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
||||
# 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 )
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
|
||||
else()
|
||||
set(SNDFILE_PATCH_CMD)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_sndfile
|
||||
URL ${SNDFILE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${SNDFILE_HASH}
|
||||
PREFIX ${BUILD_DIR}/sndfile
|
||||
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/sndfile
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_sndfile
|
||||
external_ogg
|
||||
external_vorbis
|
||||
)
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_sndfile
|
||||
external_flac
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_sndfile after_install
|
||||
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,28 +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_spnav
|
||||
URL ${SPNAV_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${SPNAV_HASH}
|
||||
PREFIX ${BUILD_DIR}/spnav
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/spnav
|
||||
)
|
@@ -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 *****
|
||||
|
||||
set(SQLITE_CONFIGURE_ENV echo .)
|
||||
set(SQLITE_CONFIGURATION_ARGS)
|
||||
|
||||
if(UNIX)
|
||||
if(NOT APPLE)
|
||||
set(SQLITE_LDFLAGS -Wl,--as-needed)
|
||||
endif()
|
||||
set(SQLITE_CFLAGS
|
||||
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
|
||||
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
|
||||
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
|
||||
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
|
||||
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
|
||||
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
|
||||
-DSQLITE_ENABLE_LOAD_EXTENSION \
|
||||
-DSQLITE_ENABLE_JSON1 \
|
||||
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
|
||||
-DSQLITE_THREADSAFE=1 \
|
||||
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
|
||||
-DSQLITE_MAX_SCHEMA_RETRY=25 \
|
||||
-DSQLITE_ENABLE_PREUPDATE_HOOK \
|
||||
-DSQLITE_ENABLE_SESSION \
|
||||
-DSQLITE_ENABLE_STMTVTAB \
|
||||
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
|
||||
-fPIC")
|
||||
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
|
||||
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
|
||||
--enable-shared=no)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_sqlite
|
||||
URL ${SQLITE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA1=${SQLITE_HASH}
|
||||
PREFIX ${BUILD_DIR}/sqlite
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/sqlite/src/external_sqlite < ${PATCH_DIR}/sqlite.diff
|
||||
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/sqlite
|
||||
)
|
@@ -1,48 +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(SSL_CONFIGURE_COMMAND ./Configure)
|
||||
set(SSL_PATCH_CMD echo .)
|
||||
|
||||
if(APPLE)
|
||||
set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
|
||||
set(SSL_OS_COMPILER "blender-linux-x86_64")
|
||||
else()
|
||||
set(SSL_OS_COMPILER "blender-linux-x86")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_ssl
|
||||
URL ${SSL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${SSL_HASH}
|
||||
PREFIX ${BUILD_DIR}/ssl
|
||||
PATCH_COMMAND ${SSL_PATCH_CMD}
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
|
||||
--openssldir=${LIBDIR}/ssl
|
||||
no-shared
|
||||
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
|
||||
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
|
||||
${SSL_OS_COMPILER}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/ssl
|
||||
)
|
@@ -1,20 +0,0 @@
|
||||
my %targets = (
|
||||
|
||||
"blender-linux-x86" => {
|
||||
inherit_from => [ "linux-x86" ],
|
||||
cflags => add("-fPIC"),
|
||||
},
|
||||
"blender-linux-x86_64" => {
|
||||
inherit_from => [ "linux-x86_64" ],
|
||||
cflags => add("-fPIC"),
|
||||
},
|
||||
"blender-darwin-x86_64" => {
|
||||
inherit_from => [ "darwin64-x86_64-cc" ],
|
||||
cflags => add("-fPIC"),
|
||||
},
|
||||
"blender-darwin-arm64" => {
|
||||
inherit_from => [ "darwin-common" ],
|
||||
cxxflags => add("-fPIC -arch arm64"),
|
||||
cflags => add("-fPIC -arch arm64"),
|
||||
},
|
||||
);
|
@@ -1,84 +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(WIN32)
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=On
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=On
|
||||
-DTBB_BUILD_STATIC=Off
|
||||
)
|
||||
set(TBB_LIBRARY tbb)
|
||||
set(TBB_STATIC_LIBRARY Off)
|
||||
else()
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=Off
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=Off
|
||||
-DTBB_BUILD_STATIC=On
|
||||
)
|
||||
set(TBB_LIBRARY tbb_static)
|
||||
set(TBB_STATIC_LIBRARY On)
|
||||
endif()
|
||||
|
||||
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
|
||||
ExternalProject_Add(external_tbb
|
||||
URL ${TBB_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${TBB_HASH}
|
||||
PREFIX ${BUILD_DIR}/tbb
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/tbb
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_tbb after_install
|
||||
# findtbb.cmake in some deps *NEEDS* to find tbb_debug.lib even if they are not going to use it
|
||||
# to make that test pass, we place a copy with the right name in the lib folder.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb_debug.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.dll
|
||||
# Normal collection of build artifacts
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
|
||||
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
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_tbb after_install
|
||||
# findtbb.cmake in some deps *NEEDS* to find tbb.lib even if they are not going to use it
|
||||
# to make that test pass, we place a copy with the right name in the lib folder.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
|
||||
# Normal collection of build artifacts
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
|
||||
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()
|
||||
endif()
|
@@ -1,51 +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)
|
||||
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
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/theora/src/external_theora < ${PATCH_DIR}/theora.diff
|
||||
CONFIGURE_COMMAND ${THEORA_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
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_theora
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,55 +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(WITH_WEBP)
|
||||
set(WITH_TIFF_WEBP ON)
|
||||
else()
|
||||
set(WITH_TIFF_WEBP OFF)
|
||||
endif()
|
||||
|
||||
set(TIFF_EXTRA_ARGS
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
|
||||
-DPNG_STATIC=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-Dlzma=OFF
|
||||
-Djbig=OFF
|
||||
-Dzstd=OFF
|
||||
-Dwebp=${WITH_TIFF_WEBP}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_tiff
|
||||
URL ${TIFF_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${TIFF_HASH}
|
||||
PREFIX ${BUILD_DIR}/tiff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/tiff
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_tiff
|
||||
external_zlib
|
||||
)
|
||||
|
||||
if(WIN32 AND 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
|
||||
)
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
set(TINYXML_EXTRA_ARGS
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_tinyxml
|
||||
URL ${TINYXML_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${TINYXML_HASH}
|
||||
PREFIX ${BUILD_DIR}/tinyxml
|
||||
# patch taken from ocio
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/tinyxml
|
||||
)
|
@@ -1,106 +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(USD_EXTRA_ARGS
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
|
||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
||||
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
||||
# USD wants the tbb debug lib set even when you are doing a release build
|
||||
# Otherwise it will error out during the cmake configure phase.
|
||||
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
||||
|
||||
# This is a preventative measure that avoids possible conflicts when add-ons
|
||||
# try to load another USD library into the same process space.
|
||||
-DPXR_SET_INTERNAL_NAMESPACE=usdBlender
|
||||
|
||||
-DPXR_ENABLE_PYTHON_SUPPORT=OFF
|
||||
-DPXR_BUILD_IMAGING=OFF
|
||||
-DPXR_BUILD_TESTS=OFF
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
|
||||
-DPXR_BUILD_MONOLITHIC=ON
|
||||
|
||||
# The PXR_BUILD_USD_TOOLS argument is patched-in by usd.diff. An upstream pull request
|
||||
# can be found at https://github.com/PixarAnimationStudios/USD/pull/1048.
|
||||
-DPXR_BUILD_USD_TOOLS=OFF
|
||||
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
# USD is hellbound on making a shared lib, unless you point this variable to a valid cmake file
|
||||
# doesn't have to make sense, but as long as it points somewhere valid it will skip the shared lib.
|
||||
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_usd
|
||||
URL ${USD_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${USD_HASH}
|
||||
PREFIX ${BUILD_DIR}/usd
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/usd/src/external_usd < ${PATCH_DIR}/usd.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${USD_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/usd
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_usd
|
||||
external_tbb
|
||||
external_boost
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# USD currently demands python be available at build time
|
||||
# and then proceeds not to use it, but still checks that the
|
||||
# version of the interpreter it is not going to use is atleast 2.7
|
||||
# so we need this dep currently since there is no system python
|
||||
# on windows.
|
||||
add_dependencies(
|
||||
external_usd
|
||||
external_python
|
||||
)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_usd after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/ ${HARVEST_TARGET}/usd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/usd_m.lib ${HARVEST_TARGET}/usd/lib/libusd_m.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_usd after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/lib ${HARVEST_TARGET}/usd/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/usd_m_d.lib ${HARVEST_TARGET}/usd/lib/libusd_m_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# USD has two build options. The default build creates lots of small libraries,
|
||||
# whereas the 'monolithic' build produces only a single library. The latter
|
||||
# makes linking simpler, so that's what we use in Blender. However, running
|
||||
# 'make install' in the USD sources doesn't install the static library in that
|
||||
# case (only the shared library). As a result, we need to grab the `libusd_m.a`
|
||||
# file from the build directory instead of from the install directory.
|
||||
ExternalProject_Add_Step(external_usd after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/libusd_m.a ${HARVEST_TARGET}/usd/lib/libusd_m.a
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -1,332 +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(ZLIB_VERSION 1.2.11)
|
||||
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
|
||||
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
|
||||
|
||||
set(OPENAL_VERSION 1.20.1)
|
||||
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
|
||||
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
|
||||
|
||||
set(PNG_VERSION 1.6.37)
|
||||
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
|
||||
set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
|
||||
|
||||
set(JPEG_VERSION 2.0.4)
|
||||
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
|
||||
set(JPEG_HASH 44c43e4a9fb352f47090804529317c88)
|
||||
|
||||
set(BOOST_VERSION 1.70.0)
|
||||
set(BOOST_VERSION_NODOTS 1_70_0)
|
||||
set(BOOST_VERSION_NODOTS_SHORT 1_70)
|
||||
set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
|
||||
set(BOOST_HASH fea771fe8176828fabf9c09242ee8c26)
|
||||
|
||||
# Using old version as recommended by OpenVDB build documentation.
|
||||
set(BLOSC_VERSION 1.5.0)
|
||||
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
|
||||
set(BLOSC_HASH 6e4a49c8c06f05aa543f3312cfce3d55)
|
||||
|
||||
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(OPENEXR_VERSION 2.4.0)
|
||||
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
|
||||
set(OPENEXR_HASH 9e4d69cf2a12c6fb19b98af7c5e0eaee)
|
||||
if(WIN32)
|
||||
# Openexr started appending _d on its own so now
|
||||
# we need to tell the build the postfix is _s while
|
||||
# telling all other deps the postfix is _s_d
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(OPENEXR_VERSION_POSTFIX _s)
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
|
||||
else()
|
||||
set(OPENEXR_VERSION_POSTFIX _s_d)
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
|
||||
endif()
|
||||
else()
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX)
|
||||
set(OPENEXR_VERSION_POSTFIX)
|
||||
endif()
|
||||
|
||||
set(FREETYPE_VERSION 2.10.2)
|
||||
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
|
||||
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
|
||||
|
||||
set(GLEW_VERSION 1.13.0)
|
||||
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
|
||||
set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066)
|
||||
|
||||
set(FREEGLUT_VERSION 3.0.0)
|
||||
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
|
||||
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
|
||||
|
||||
set(ALEMBIC_VERSION 1.7.12)
|
||||
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
|
||||
set(ALEMBIC_MD5 e2b3777f23c5c09481a008cc6f0f8a40)
|
||||
|
||||
# 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)
|
||||
|
||||
# latest uid in git as of 2016-04-01
|
||||
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
|
||||
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
|
||||
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
|
||||
|
||||
# latest uid in git as of 2016-04-01
|
||||
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_3)
|
||||
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
|
||||
set(OPENSUBDIV_HASH 7bbfa275d021fb829e521df749160edb)
|
||||
|
||||
set(SDL_VERSION 2.0.12)
|
||||
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
|
||||
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
|
||||
|
||||
set(OPENCOLLADA_VERSION v1.6.68)
|
||||
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
|
||||
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
|
||||
|
||||
set(OPENCOLORIO_VERSION 1.1.1)
|
||||
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
|
||||
set(OPENCOLORIO_HASH 23d8b9ac81599305539a5a8674b94a3d)
|
||||
|
||||
set(LLVM_VERSION 9.0.1)
|
||||
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
|
||||
set(LLVM_HASH 31eb9ce73dd2a0f8dcab8319fb03f8fc)
|
||||
|
||||
set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz)
|
||||
set(CLANG_HASH 13468e4a44940efef1b75e8641752f90)
|
||||
|
||||
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
|
||||
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
|
||||
|
||||
set(OPENIMAGEIO_VERSION 2.1.15.0)
|
||||
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
|
||||
set(OPENIMAGEIO_HASH f03aa5e3ac4795af04771ee4146e9832)
|
||||
|
||||
set(TIFF_VERSION 4.1.0)
|
||||
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
|
||||
|
||||
set(OSL_VERSION 1.10.10)
|
||||
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 00dec08a93c8084e53848b9ad047889f)
|
||||
|
||||
set(PYTHON_VERSION 3.7.7)
|
||||
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 172c650156f7bea68ce31b2fd01fa766)
|
||||
|
||||
set(TBB_VERSION 2019_U9)
|
||||
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
|
||||
set(TBB_HASH 26263622e9187212ec240dcf01b66207)
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
set(OPENVDB_GIT_UID e62f7a0bf1e27397223c61ddeaaf57edf111b77f)
|
||||
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${OPENVDB_GIT_UID}.tar.gz)
|
||||
set(OPENVDB_HASH 90919510bc6ccd630fedc56f748cb199)
|
||||
else()
|
||||
set(OPENVDB_VERSION 7.0.0)
|
||||
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
||||
set(OPENVDB_HASH fd6c4f168282f7e0e494d290cd531fa8)
|
||||
endif()
|
||||
|
||||
set(IDNA_VERSION 2.9)
|
||||
set(CHARDET_VERSION 3.0.4)
|
||||
set(URLLIB3_VERSION 1.25.9)
|
||||
set(CERTIFI_VERSION 2020.4.5.2)
|
||||
set(REQUESTS_VERSION 2.23.0)
|
||||
|
||||
set(NUMPY_VERSION 1.17.5)
|
||||
set(NUMPY_SHORT_VERSION 1.17)
|
||||
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
|
||||
set(NUMPY_HASH 763a5646fa6eef7a22f4895bca0524f2)
|
||||
|
||||
set(LAME_VERSION 3.100)
|
||||
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
|
||||
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
|
||||
|
||||
set(OGG_VERSION 1.3.4)
|
||||
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
|
||||
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
|
||||
|
||||
set(VORBIS_VERSION 1.3.6)
|
||||
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
|
||||
set(VORBIS_HASH 6ed40e0241089a42c48604dc00e362beee00036af2d8b3f46338031c9e0351cb)
|
||||
|
||||
set(THEORA_VERSION 1.1.1)
|
||||
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
|
||||
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
|
||||
|
||||
set(FLAC_VERSION 1.3.3)
|
||||
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
|
||||
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
|
||||
|
||||
set(VPX_VERSION 1.8.2)
|
||||
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
|
||||
set(VPX_HASH 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
|
||||
|
||||
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 https://code.videolan.org/videolan/x264/-/archive/33f9e1474613f59392be5ab6a7e7abf60fa63622/x264-33f9e1474613f59392be5ab6a7e7abf60fa63622.tar.gz)
|
||||
set(X264_HASH 5456450ee1ae02cd2328be3157367a232a0ab73315e8c8f80dab80469524f525)
|
||||
|
||||
set(XVIDCORE_VERSION 1.3.7)
|
||||
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
|
||||
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
|
||||
|
||||
set(OPENJPEG_VERSION 2.3.1)
|
||||
set(OPENJPEG_SHORT_VERSION 2.3)
|
||||
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
|
||||
set(OPENJPEG_HASH 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9)
|
||||
|
||||
set(FFMPEG_VERSION 4.2.3)
|
||||
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
|
||||
set(FFMPEG_HASH 695fad11f3baf27784e24cb0e977b65a)
|
||||
|
||||
set(FFTW_VERSION 3.3.8)
|
||||
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
|
||||
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
|
||||
|
||||
set(ICONV_VERSION 1.16)
|
||||
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
|
||||
set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
|
||||
|
||||
set(SNDFILE_VERSION 1.0.28)
|
||||
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
|
||||
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
|
||||
|
||||
# set(HIDAPI_VERSION 0.8.0-rc1)
|
||||
# set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
|
||||
# set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
|
||||
|
||||
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
|
||||
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
|
||||
set(HIDAPI_HASH b6e22f6b514f8bcf594989f20ffc46fb)
|
||||
|
||||
set(WEBP_VERSION 0.6.1)
|
||||
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
|
||||
set(WEBP_HASH b49ce9c3e3e9acae4d91bca44bb85a72)
|
||||
|
||||
set(SPNAV_VERSION 0.2.3)
|
||||
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
|
||||
|
||||
set(JEMALLOC_VERSION 5.2.1)
|
||||
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
|
||||
set(JEMALLOC_HASH 3d41fbf006e6ebffd489bdb304d009ae)
|
||||
|
||||
set(XML2_VERSION 2.9.10)
|
||||
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
|
||||
set(XML2_HASH 10942a1dc23137a8aa07f0639cbfece5)
|
||||
|
||||
set(TINYXML_VERSION 2_6_2)
|
||||
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_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
|
||||
set(YAMLCPP_HASH b45bf1089a382e81f6b661062c10d0c2)
|
||||
|
||||
set(LCMS_VERSION 2.9)
|
||||
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
|
||||
set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
|
||||
|
||||
set(PUGIXML_VERSION 1.10)
|
||||
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v${PUGIXML_VERSION}.tar.gz)
|
||||
set(PUGIXML_HASH 0c208b0664c7fb822bf1b49ad035e8fd)
|
||||
|
||||
set(FLEXBISON_VERSION 2.5.5)
|
||||
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
|
||||
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
|
||||
|
||||
# Libraries to keep Python modules static on Linux.
|
||||
|
||||
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
|
||||
# sources from Debian packaging.
|
||||
set(BZIP2_VERSION 1.0.8)
|
||||
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.gz)
|
||||
set(BZIP2_HASH ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269)
|
||||
|
||||
set(FFI_VERSION 3.3)
|
||||
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
|
||||
set(FFI_HASH 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056)
|
||||
|
||||
set(LZMA_VERSION 5.2.5)
|
||||
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
|
||||
set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
|
||||
|
||||
set(SSL_VERSION 1.1.1g)
|
||||
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
|
||||
set(SSL_HASH ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46)
|
||||
|
||||
set(SQLITE_VERSION 3.31.1)
|
||||
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
|
||||
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
|
||||
|
||||
set(EMBREE_VERSION 3.10.0)
|
||||
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
|
||||
set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87)
|
||||
|
||||
set(USD_VERSION 20.05)
|
||||
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
|
||||
set(USD_HASH 6d679e739e7f65725d9c029e37dda9fc)
|
||||
|
||||
set(OIDN_VERSION 1.2.3)
|
||||
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
|
||||
set(OIDN_HASH 1f11466c2c3efc27faba5ec7078d12b2)
|
||||
|
||||
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)
|
||||
|
||||
set(NASM_VERSION 2.15.02)
|
||||
set(NASM_URI https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.xz)
|
||||
set(NASM_HASH f4fd1329b1713e1ccd34b2fc121c4bcd278c9f91cc4cb205ae8fcd2e4728dd14)
|
||||
|
||||
set(XR_OPENXR_SDK_VERSION 1.0.8)
|
||||
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
|
||||
set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07)
|
||||
|
||||
set(ISPC_VERSION v1.14.1)
|
||||
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
|
||||
set(ISPC_HASH 968fbc8dfd16a60ba4e32d2e0e03ea7a)
|
||||
|
||||
set(GMP_VERSION 6.2.0)
|
||||
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
|
||||
set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1)
|
||||
|
||||
set(POTRACE_VERSION 1.16)
|
||||
set(POTRACE_URI http://potrace.sourceforge.net/download/${POTRACE_VERSION}/potrace-${POTRACE_VERSION}.tar.gz)
|
||||
set(POTRACE_HASH 5f0bd87ddd9a620b0c4e65652ef93d69)
|
@@ -1,41 +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_vorbis
|
||||
URL ${VORBIS_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${VORBIS_HASH}
|
||||
PREFIX ${BUILD_DIR}/vorbis
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/vorbis
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,66 +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(WIN32)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
|
||||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
|
||||
endif()
|
||||
else()
|
||||
if(APPLE)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
set(VPX_EXTRA_FLAGS --target=generic-gnu)
|
||||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=x86_64-darwin17-gcc)
|
||||
endif()
|
||||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=generic-gnu)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_vpx
|
||||
URL ${VPX_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${VPX_HASH}
|
||||
PREFIX ${BUILD_DIR}/vpx
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
|
||||
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--disable-install-bins
|
||||
--disable-install-srcs
|
||||
--disable-sse4_1
|
||||
--disable-sse3
|
||||
--disable-ssse3
|
||||
--disable-avx
|
||||
--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
|
||||
INSTALL_DIR ${LIBDIR}/vpx
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,50 +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 *****
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
set(WEBP_EXTRA_ARGS
|
||||
-DWEBP_HAVE_SSE2=ON
|
||||
-DWEBP_HAVE_SSE41=OFF
|
||||
-DWEBP_HAVE_AVX2=OFF
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
|
||||
else()
|
||||
set(WEBP_BUILD_DIR)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_webp
|
||||
URL ${WEBP_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${WEBP_HASH}
|
||||
PREFIX ${BUILD_DIR}/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()
|
@@ -1,68 +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(WIN32)
|
||||
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
|
||||
endif()
|
||||
|
||||
|
||||
if(APPLE)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
set(X264_EXTRA_ARGS ${X264_EXTRA_ARGS} "--disable-asm")
|
||||
set(X264_CONFIGURE_ENV echo .)
|
||||
else()
|
||||
set(X264_CONFIGURE_ENV
|
||||
export AS=${LIBDIR}/nasm/bin/nasm
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
set(X264_CONFIGURE_ENV echo .)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(X264_CONFIGURE_ENV
|
||||
export AS=${LIBDIR}/nasm/bin/nasm
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_x264
|
||||
URL ${X264_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${X264_HASH}
|
||||
PREFIX ${BUILD_DIR}/x264
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
|
||||
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
|
||||
--enable-static
|
||||
--enable-pic
|
||||
--disable-lavf
|
||||
${X264_EXTRA_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/x264
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_x264
|
||||
external_nasm
|
||||
)
|
||||
endif()
|
@@ -1,36 +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_xml2
|
||||
URL ${XML2_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${XML2_HASH}
|
||||
PREFIX ${BUILD_DIR}/xml2
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
|
||||
--prefix=${LIBDIR}/xml2
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-python=no
|
||||
--with-lzma=no
|
||||
--with-zlib=no
|
||||
--with-iconv=no
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/xml2
|
||||
)
|
@@ -1,60 +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 *****
|
||||
|
||||
|
||||
# Keep flags in sync with install_deps.sh ones in compile_XR_OpenXR_SDK()
|
||||
set(XR_OPENXR_SDK_EXTRA_ARGS
|
||||
-DBUILD_FORCE_GENERATION=OFF
|
||||
-DBUILD_LOADER=ON
|
||||
-DDYNAMIC_LOADER=OFF
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
list(APPEND XR_OPENXR_SDK_EXTRA_ARGS
|
||||
-DBUILD_WITH_WAYLAND_HEADERS=OFF
|
||||
-DBUILD_WITH_XCB_HEADERS=OFF
|
||||
-DBUILD_WITH_XLIB_HEADERS=ON
|
||||
-DBUILD_WITH_SYSTEM_JSONCPP=OFF
|
||||
-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_xr_openxr_sdk
|
||||
URL ${XR_OPENXR_SDK_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${XR_OPENXR_SDK_HASH}
|
||||
PREFIX ${BUILD_DIR}/xr_openxr_sdk
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/xr_openxr_sdk ${DEFAULT_CMAKE_FLAGS} ${XR_OPENXR_SDK_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/xr_openxr_sdk
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/include/openxr ${HARVEST_TARGET}/xr_openxr_sdk/include/openxr
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/lib ${HARVEST_TARGET}/xr_openxr_sdk/lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/xr_openxr_sdk/lib/openxr_loader.lib ${HARVEST_TARGET}/xr_openxr_sdk/lib/openxr_loader_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -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 *****
|
||||
|
||||
if(WIN32)
|
||||
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_xvidcore
|
||||
URL ${XVIDCORE_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${XVIDCORE_HASH}
|
||||
PREFIX ${BUILD_DIR}/xvidcore
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} &&
|
||||
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
|
||||
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
|
||||
INSTALL_DIR ${LIBDIR}/xvidcore
|
||||
)
|
||||
|
||||
ExternalProject_Add_Step(external_xvidcore after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
|
||||
DEPENDEES install
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,34 +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(YAMLCPP_EXTRA_ARGS
|
||||
-DBUILD_GMOCK=OFF
|
||||
-DYAML_CPP_BUILD_TESTS=OFF
|
||||
-DYAML_CPP_BUILD_TOOLS=OFF
|
||||
-DYAML_CPP_BUILD_CONTRIB=OFF
|
||||
-DYAML_MSVC_SHARED_RT=ON
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_yamlcpp
|
||||
URL ${YAMLCPP_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${YAMLCPP_HASH}
|
||||
PREFIX ${BUILD_DIR}/yamlcpp
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/yamlcpp
|
||||
)
|
@@ -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 *****
|
||||
|
||||
ExternalProject_Add(external_zlib
|
||||
URL ${ZLIB_URI}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib
|
||||
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/zlib
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_zlib after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_zlib after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
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()
|
@@ -1,39 +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_zlib_mingw
|
||||
URL ${ZLIB_URI}
|
||||
URL_HASH MD5=${ZLIB_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/zlib_mingw
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND echo .
|
||||
INSTALL_DIR ${LIBDIR}/zlib_mingw
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_zlib_mingw after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
|
||||
endif()
|
@@ -1,100 +0,0 @@
|
||||
strict graph {
|
||||
graph[autosize = false, size = "25.7,8.3!", resolution = 300, overlap = false, splines = false, outputorder=edgesfirst ];
|
||||
node [style=filled fillcolor=white];
|
||||
external_alembic -- external_boost;
|
||||
external_alembic -- external_zlib;
|
||||
external_alembic -- external_openexr;
|
||||
external_blosc -- external_zlib;
|
||||
external_blosc -- external_pthreads;
|
||||
external_boost -- Make_Python_Environment;
|
||||
external_clang -- ll;
|
||||
external_ffmpeg -- external_zlib;
|
||||
external_ffmpeg -- external_faad;
|
||||
external_ffmpeg -- external_openjpeg;
|
||||
external_ffmpeg -- external_xvidcore;
|
||||
external_ffmpeg -- external_x264;
|
||||
external_ffmpeg -- external_vpx;
|
||||
external_ffmpeg -- external_theora;
|
||||
external_ffmpeg -- external_vorbis;
|
||||
external_ffmpeg -- external_ogg;
|
||||
external_ffmpeg -- external_lame;
|
||||
external_ffmpeg -- external_zlib_mingw;
|
||||
external_numpy -- Make_Python_Environment;
|
||||
external_opencollada -- external_xml2;
|
||||
external_opencolorio -- external_boost;
|
||||
external_opencolorio -- external_tinyxml;
|
||||
external_opencolorio -- external_yamlcpp;
|
||||
external_openexr -- external_zlib;
|
||||
external_openimageio -- external_png;
|
||||
external_openimageio -- external_zlib;
|
||||
external_openimageio -- external_openexr;
|
||||
external_openimageio -- external_openexr;
|
||||
external_openimageio -- external_jpeg;
|
||||
external_openimageio -- external_boost;
|
||||
external_openimageio -- external_tiff;
|
||||
external_openimageio -- external_opencolorio;
|
||||
external_openimageio -- external_openjpeg;
|
||||
external_openimageio -- external_webp;
|
||||
external_openimageio -- external_opencolorio_extra;
|
||||
external_openmp -- external_clang;
|
||||
external_opensubdiv -- external_glew;
|
||||
external_opensubdiv -- external_glfw;
|
||||
external_opensubdiv -- external_clew;
|
||||
external_opensubdiv -- external_cuew;
|
||||
external_opensubdiv -- external_tbb;
|
||||
openvdb -- external_tbb;
|
||||
openvdb -- external_boost;
|
||||
openvdb -- external_openexr;
|
||||
openvdb -- external_openexr;
|
||||
openvdb -- external_zlib;
|
||||
openvdb -- external_blosc;
|
||||
external_osl -- external_boost;
|
||||
external_osl -- ll;
|
||||
external_osl -- external_clang;
|
||||
external_osl -- external_openexr;
|
||||
external_osl -- external_openexr;
|
||||
external_osl -- external_zlib;
|
||||
external_osl -- external_flexbison;
|
||||
external_osl -- external_openimageio;
|
||||
external_osl -- external_pugixml;
|
||||
external_png -- external_zlib;
|
||||
external_python_site_packages -- Make_Python_Environment;
|
||||
external_sndfile -- external_ogg;
|
||||
external_sndfile -- external_vorbis;
|
||||
external_sndfile -- external_flac;
|
||||
external_theora -- external_vorbis;
|
||||
external_theora -- external_ogg;
|
||||
external_tiff -- external_zlib;
|
||||
external_vorbis -- external_ogg;
|
||||
blender-- external_ffmpeg;
|
||||
blender-- external_alembic;
|
||||
blender-- external_openjpeg;
|
||||
blender-- external_opencolorio;
|
||||
blender-- external_openexr;
|
||||
blender-- external_opensubdiv;
|
||||
blender-- openvdb;
|
||||
blender-- external_osl;
|
||||
blender-- external_boost;
|
||||
blender-- external_jpeg;
|
||||
blender-- external_png;
|
||||
blender-- external_python;
|
||||
blender-- external_sndfile;
|
||||
blender-- external_iconv;
|
||||
blender-- external_fftw3;
|
||||
external_python-- external_python_site_packages;
|
||||
external_python_site_packages-- requests;
|
||||
external_python_site_packages-- idna;
|
||||
external_python_site_packages-- chardet;
|
||||
external_python_site_packages-- urllib3;
|
||||
external_python_site_packages-- certifi;
|
||||
external_python-- external_numpy;
|
||||
external_usd-- external_boost;
|
||||
external_usd-- external_tbb;
|
||||
blender-- external_opencollada;
|
||||
blender-- external_sdl;
|
||||
blender-- external_freetype;
|
||||
blender-- external_pthreads;
|
||||
blender-- external_zlib;
|
||||
blender-- external_openal;
|
||||
blender-- external_usd;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
# Files contains mixed line endings, patch needs to preserve them to apply.
|
||||
opencollada.diff binary
|
@@ -1,131 +0,0 @@
|
||||
diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
|
||||
--- src/blosc/CMakeLists.txt 2016-02-03 10:26:28 -0700
|
||||
+++ external_blosc/blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
|
||||
@@ -61,6 +61,8 @@
|
||||
set(SOURCES ${SOURCES} win32/pthread.c)
|
||||
else(NOT Threads_FOUND)
|
||||
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
+ set(LIBS ${LIBS} ${PTHREAD_LIBS})
|
||||
+ include_directories( ${PTHREAD_INCLUDE_DIR} )
|
||||
endif(NOT Threads_FOUND)
|
||||
else(WIN32)
|
||||
find_package(Threads REQUIRED)
|
||||
diff -Naur src/CMakeLists.txt external_blosc/CMakeLists.txt
|
||||
--- src/CMakeLists.txt 2016-02-03 10:26:28 -0700
|
||||
+++ external_blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
|
||||
@@ -17,8 +17,8 @@
|
||||
# do not include support for the Snappy library
|
||||
# DEACTIVATE_ZLIB: default OFF
|
||||
# do not include support for the Zlib library
|
||||
-# PREFER_EXTERNAL_COMPLIBS: default ON
|
||||
-# when found, use the installed compression libs instead of included sources
|
||||
+# PREFER_EXTERNAL_ZLIB: default ON
|
||||
+# when found, use the installed zlib instead of included sources
|
||||
# TEST_INCLUDE_BENCH_SINGLE_1: default ON
|
||||
# add a test that runs the benchmark program passing "single" with 1 thread
|
||||
# as first parameter
|
||||
@@ -80,29 +80,23 @@
|
||||
"Do not include support for the SNAPPY library." OFF)
|
||||
option(DEACTIVATE_ZLIB
|
||||
"Do not include support for the ZLIB library." OFF)
|
||||
-option(PREFER_EXTERNAL_COMPLIBS
|
||||
- "When found, use the installed compression libs instead of included sources." ON)
|
||||
+option(PREFER_EXTERNAL_ZLIB
|
||||
+ "When found, use the installed zlib instead of included sources." ON)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
-if(NOT PREFER_EXTERNAL_COMPLIBS)
|
||||
+if(NOT PREFER_EXTERNAL_ZLIB)
|
||||
message(STATUS "Finding external libraries disabled. Using internal sources.")
|
||||
-endif(NOT PREFER_EXTERNAL_COMPLIBS)
|
||||
+endif(NOT PREFER_EXTERNAL_ZLIB)
|
||||
|
||||
|
||||
if(NOT DEACTIVATE_LZ4)
|
||||
- if(PREFER_EXTERNAL_COMPLIBS)
|
||||
- find_package(LZ4)
|
||||
- endif(PREFER_EXTERNAL_COMPLIBS)
|
||||
# HAVE_LZ4 will be set to true because even if the library is
|
||||
# not found, we will use the included sources for it
|
||||
set(HAVE_LZ4 TRUE)
|
||||
endif(NOT DEACTIVATE_LZ4)
|
||||
|
||||
if(NOT DEACTIVATE_SNAPPY)
|
||||
- if(PREFER_EXTERNAL_COMPLIBS)
|
||||
- find_package(Snappy)
|
||||
- endif(PREFER_EXTERNAL_COMPLIBS)
|
||||
# HAVE_SNAPPY will be set to true because even if the library is not found,
|
||||
# we will use the included sources for it
|
||||
set(HAVE_SNAPPY TRUE)
|
||||
@@ -110,13 +104,13 @@
|
||||
|
||||
if(NOT DEACTIVATE_ZLIB)
|
||||
# import the ZLIB_ROOT environment variable to help finding the zlib library
|
||||
- if(PREFER_EXTERNAL_COMPLIBS)
|
||||
+ if(PREFER_EXTERNAL_ZLIB)
|
||||
set(ZLIB_ROOT $ENV{ZLIB_ROOT})
|
||||
find_package( ZLIB )
|
||||
if (NOT ZLIB_FOUND )
|
||||
message(STATUS "No zlib found. Using internal sources.")
|
||||
endif (NOT ZLIB_FOUND )
|
||||
- endif(PREFER_EXTERNAL_COMPLIBS)
|
||||
+ endif(PREFER_EXTERNAL_ZLIB)
|
||||
# HAVE_ZLIB will be set to true because even if the library is not found,
|
||||
# we will use the included sources for it
|
||||
set(HAVE_ZLIB TRUE)
|
||||
diff -Naur external_blosc.orig/blosc/blosc.c external_blosc/blosc/blosc.c
|
||||
--- external_blosc.orig/blosc/blosc.c 2018-07-30 04:56:38 -0600
|
||||
+++ external_blosc/blosc/blosc.c 2018-08-11 15:27:26 -0600
|
||||
@@ -41,12 +41,7 @@
|
||||
#include <inttypes.h>
|
||||
#endif /* _WIN32 */
|
||||
|
||||
-#if defined(_WIN32)
|
||||
- #include "win32/pthread.h"
|
||||
- #include "win32/pthread.c"
|
||||
-#else
|
||||
- #include <pthread.h>
|
||||
-#endif
|
||||
+#include <pthread.h>
|
||||
|
||||
|
||||
/* Some useful units */
|
||||
diff --git a/blosc/shuffle.c b/blosc/shuffle.c
|
||||
index 84b5095..23053b4 100644
|
||||
--- a/blosc/shuffle.c
|
||||
+++ b/blosc/shuffle.c
|
||||
@@ -490,12 +490,12 @@ void unshuffle(size_t bytesoftype, size_t blocksize,
|
||||
#else /* no __SSE2__ available */
|
||||
|
||||
void shuffle(size_t bytesoftype, size_t blocksize,
|
||||
- uint8_t* _src, uint8_t* _dest) {
|
||||
+ const uint8_t* _src, uint8_t* _dest) {
|
||||
_shuffle(bytesoftype, blocksize, _src, _dest);
|
||||
}
|
||||
|
||||
void unshuffle(size_t bytesoftype, size_t blocksize,
|
||||
- uint8_t* _src, uint8_t* _dest) {
|
||||
+ const uint8_t* _src, uint8_t* _dest) {
|
||||
_unshuffle(bytesoftype, blocksize, _src, _dest);
|
||||
}
|
||||
--- a/cmake/FindSSE.cmake
|
||||
+++ b/cmake/FindSSE.cmake
|
||||
@@ -49,6 +49,17 @@
|
||||
set(AVX_FOUND false CACHE BOOL "AVX available on host")
|
||||
ENDIF (AVX_TRUE)
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ message(STATUS "Detected architecture ${ARCHITECTURE}")
|
||||
+ IF("${ARCHITECTURE}" STREQUAL "arm64")
|
||||
+ set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
|
||||
+ set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
|
||||
+ set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
|
||||
+ set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
|
||||
+ set(AVX_FOUND false CACHE BOOL "AVX available on host")
|
||||
+ return()
|
||||
+ ENDIF()
|
||||
+
|
||||
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
|
||||
CPUINFO)
|
||||
|
@@ -1,4 +0,0 @@
|
||||
using python : @PYTHON_SHORT_VERSION@ : @PYTHON_BINARY@
|
||||
: @LIBDIR@/python/include @LIBDIR@/python/include/python@PYTHON_SHORT_VERSION@m/
|
||||
: @LIBDIR@/python/libs
|
||||
;
|
@@ -1,69 +0,0 @@
|
||||
# - Find BLOSC library
|
||||
# Find the native BLOSC includes and library
|
||||
# This module defines
|
||||
# BLOSC_INCLUDE_DIRS, where to find blosc.h, Set when
|
||||
# BLOSC is found.
|
||||
# BLOSC_LIBRARIES, libraries to link against to use BLOSC.
|
||||
# BLOSC_ROOT_DIR, The base directory to search for BLOSC.
|
||||
# This can also be an environment variable.
|
||||
# BLOSC_FOUND, If false, do not try to use BLOSC.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# BLOSC_LIBRARY, where to find the BLOSC library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If BLOSC_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
|
||||
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_blosc_SEARCH_DIRS
|
||||
${BLOSC_ROOT_DIR}
|
||||
/opt/lib/blosc
|
||||
)
|
||||
|
||||
FIND_PATH(BLOSC_INCLUDE_DIR
|
||||
NAMES
|
||||
blosc.h
|
||||
HINTS
|
||||
${_blosc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(BLOSC_LIBRARY
|
||||
NAMES
|
||||
blosc
|
||||
HINTS
|
||||
${_blosc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
|
||||
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
|
||||
|
||||
IF(BLOSC_FOUND)
|
||||
SET(BLOSC_LIBRARIES ${BLOSC_LIBRARY})
|
||||
SET(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(BLOSC_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
BLOSC_INCLUDE_DIR
|
||||
BLOSC_LIBRARY
|
||||
)
|
@@ -1,69 +0,0 @@
|
||||
# - Find CPPUNIT library
|
||||
# Find the native CPPUNIT includes and library
|
||||
# This module defines
|
||||
# CPPUNIT_INCLUDE_DIRS, where to find cppunit.h, Set when
|
||||
# CPPUNIT is found.
|
||||
# CPPUNIT_LIBRARIES, libraries to link against to use CPPUNIT.
|
||||
# CPPUNIT_ROOT_DIR, The base directory to search for CPPUNIT.
|
||||
# This can also be an environment variable.
|
||||
# CPPUNIT_FOUND, If false, do not try to use CPPUNIT.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# CPPUNIT_LIBRARY, where to find the CPPUNIT library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If CPPUNIT_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT CPPUNIT_ROOT_DIR AND NOT $ENV{CPPUNIT_ROOT_DIR} STREQUAL "")
|
||||
SET(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_cppunit_SEARCH_DIRS
|
||||
${CPPUNIT_ROOT_DIR}
|
||||
/opt/lib/cppunit
|
||||
)
|
||||
|
||||
FIND_PATH(CPPUNIT_INCLUDE_DIR
|
||||
NAMES
|
||||
cppunit/Test.h
|
||||
HINTS
|
||||
${_cppunit_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(CPPUNIT_LIBRARY
|
||||
NAMES
|
||||
cppunit
|
||||
HINTS
|
||||
${_cppunit_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG
|
||||
CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR)
|
||||
|
||||
IF(CPPUNIT_FOUND)
|
||||
SET(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY})
|
||||
SET(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(CPPUNIT_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CPPUNIT_INCLUDE_DIR
|
||||
CPPUNIT_LIBRARY
|
||||
)
|
@@ -1,262 +0,0 @@
|
||||
# Module to find IlmBase
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - ILMBASE_HOME, ILMBASE_VERSION, ILMBASE_LIB_AREA
|
||||
#
|
||||
# It also supports non-standard names for the library components.
|
||||
#
|
||||
# To use a custom IlmBase:
|
||||
# - Set the variable ILMBASE_CUSTOM to True
|
||||
# - Set the variable ILMBASE_CUSTOM_LIBRARIES to a list of the libraries to
|
||||
# use, e.g. "SpiImath SpiHalf SpiIlmThread SpiIex"
|
||||
# - Optionally set the variable ILMBASE_CUSTOM_INCLUDE_DIR to any
|
||||
# particularly weird place that the OpenEXR/*.h files may be found
|
||||
# - Optionally set the variable ILMBASE_CUSTOM_LIB_DIR to any
|
||||
# particularly weird place that the libraries files may be found
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# ILMBASE_INCLUDE_DIR - where to find half.h, IlmBaseConfig.h, etc.
|
||||
# ILMBASE_LIBRARIES - list of libraries to link against when using IlmBase.
|
||||
# ILMBASE_FOUND - True if IlmBase was found.
|
||||
|
||||
# Other standarnd issue macros
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(FindPackageMessage)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
|
||||
if(ILMBASE_USE_STATIC_LIBS)
|
||||
set(_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Macro to assemble a helper state variable
|
||||
macro(SET_STATE_VAR varname)
|
||||
set(tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
|
||||
separate_arguments(tmp_ilmbaselibs)
|
||||
set(tmp_lst
|
||||
${ILMBASE_CUSTOM} | ${tmp_ilmbaselibs} |
|
||||
${ILMBASE_HOME} | ${ILMBASE_VERSION} | ${ILMBASE_LIB_AREA}
|
||||
)
|
||||
set(${varname} "${tmp_lst}")
|
||||
unset(tmp_ilmbaselibs)
|
||||
unset(tmp_lst)
|
||||
endmacro()
|
||||
|
||||
# To enforce that find_* functions do not use inadvertently existing versions
|
||||
if(ILMBASE_CUSTOM)
|
||||
set(ILMBASE_FIND_OPTIONS "NO_DEFAULT_PATH")
|
||||
endif()
|
||||
|
||||
# Macro to search for an include directory
|
||||
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
|
||||
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
|
||||
find_path(${tmp_varname} ${includefile}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES include
|
||||
${ILMBASE_FIND_OPTIONS}
|
||||
)
|
||||
if(${tmp_varname})
|
||||
mark_as_advanced(${tmp_varname})
|
||||
endif()
|
||||
unset(tmp_varname)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Macro to search for the given library and adds the cached
|
||||
# variable names to the specified list
|
||||
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
|
||||
string(TOUPPER ${prefix}_${libname} tmp_prefix)
|
||||
# Handle new library names for OpenEXR 2.1 build via cmake
|
||||
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
|
||||
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
|
||||
|
||||
find_library(${tmp_prefix}_LIBRARY_RELEASE
|
||||
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${ILMBASE_FIND_OPTIONS}
|
||||
)
|
||||
find_library(${tmp_prefix}_LIBRARY_DEBUG
|
||||
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${ILMBASE_FIND_OPTIONS}
|
||||
)
|
||||
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
|
||||
select_library_configurations(${tmp_prefix})
|
||||
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
|
||||
|
||||
# Add to the list of variables which should be reset
|
||||
list(APPEND ${cachelist_var}
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
mark_as_advanced(
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
unset(tmp_prefix)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Encode the current state of the external variables into a string
|
||||
SET_STATE_VAR(ILMBASE_CURRENT_STATE)
|
||||
|
||||
# If the state has changed, clear the cached variables
|
||||
if(ILMBASE_CACHED_STATE AND
|
||||
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
|
||||
|
||||
foreach(libvar ${ILMBASE_CACHED_VARS})
|
||||
unset(${libvar} CACHE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
# Generic search paths
|
||||
set(IlmBase_generic_include_paths
|
||||
${ILMBASE_CUSTOM_INCLUDE_DIR}
|
||||
/usr/include
|
||||
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
set(IlmBase_generic_library_paths
|
||||
${ILMBASE_CUSTOM_LIB_DIR}
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/lib
|
||||
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
# Search paths for the IlmBase files
|
||||
if(ILMBASE_HOME)
|
||||
if(ILMBASE_VERSION)
|
||||
set(IlmBase_include_paths
|
||||
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/include
|
||||
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION}
|
||||
)
|
||||
set(IlmBase_library_paths
|
||||
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib
|
||||
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION}
|
||||
)
|
||||
endif()
|
||||
list(APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
|
||||
set(IlmBase_library_paths
|
||||
${ILMBASE_HOME}/lib
|
||||
${ILMBASE_HOME}/lib64
|
||||
${ILMBASE_LIB_AREA}
|
||||
${IlmBase_library_paths})
|
||||
endif()
|
||||
list(APPEND IlmBase_include_paths ${IlmBase_generic_include_paths})
|
||||
list(APPEND IlmBase_library_paths ${IlmBase_generic_library_paths})
|
||||
|
||||
# Locate the header files
|
||||
PREFIX_FIND_INCLUDE_DIR(IlmBase
|
||||
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
|
||||
|
||||
if(ILMBASE_INCLUDE_DIR)
|
||||
# Get the version from config file, if not already set.
|
||||
if(NOT ILMBASE_VERSION)
|
||||
FILE(STRINGS "${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h" ILMBASE_BUILD_SPECIFICATION
|
||||
REGEX "^[ \t]*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
|
||||
|
||||
if(ILMBASE_BUILD_SPECIFICATION)
|
||||
if(NOT IlmBase_FIND_QUIETLY)
|
||||
message(STATUS "${ILMBASE_BUILD_SPECIFICATION}")
|
||||
endif()
|
||||
string(REGEX REPLACE ".*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
|
||||
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
|
||||
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
|
||||
else()
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(ILMBASE_CUSTOM)
|
||||
if(NOT ILMBASE_CUSTOM_LIBRARIES)
|
||||
message(FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
|
||||
endif()
|
||||
set(IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
|
||||
separate_arguments(IlmBase_Libraries)
|
||||
else()
|
||||
# elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
|
||||
set(IlmBase_Libraries Half Iex Imath IlmThread)
|
||||
# else()
|
||||
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
|
||||
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
|
||||
endif()
|
||||
|
||||
|
||||
# Locate the IlmBase libraries
|
||||
set(IlmBase_libvars "")
|
||||
set(IlmBase_cachevars "")
|
||||
foreach(ilmbase_lib ${IlmBase_Libraries})
|
||||
PREFIX_FIND_LIB(IlmBase ${ilmbase_lib}
|
||||
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
|
||||
endforeach()
|
||||
# Create the list of variables that might need to be cleared
|
||||
set(ILMBASE_CACHED_VARS
|
||||
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}
|
||||
CACHE INTERNAL "Variables set by FindIlmBase.cmake" FORCE)
|
||||
|
||||
# Store the current state so that variables might be cleared if required
|
||||
set(ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
|
||||
CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
|
||||
|
||||
# Link with pthreads if required
|
||||
if(NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
|
||||
file(STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
|
||||
ILMBASE_HAVE_PTHREAD
|
||||
REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
|
||||
)
|
||||
if(ILMBASE_HAVE_PTHREAD)
|
||||
find_package(Threads)
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
set(ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Use the standard function to handle ILMBASE_FOUND
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IlmBase DEFAULT_MSG
|
||||
ILMBASE_INCLUDE_DIR ${IlmBase_libvars})
|
||||
|
||||
if(ILMBASE_FOUND)
|
||||
set(ILMBASE_LIBRARIES "")
|
||||
foreach(tmplib ${IlmBase_libvars})
|
||||
list(APPEND ILMBASE_LIBRARIES ${${tmplib}})
|
||||
endforeach()
|
||||
list(APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
|
||||
if(NOT IlmBase_FIND_QUIETLY)
|
||||
FIND_PACKAGE_MESSAGE(ILMBASE
|
||||
"Found IlmBase: ${ILMBASE_LIBRARIES}"
|
||||
"[${ILMBASE_INCLUDE_DIR}][${ILMBASE_LIBRARIES}][${ILMBASE_CURRENT_STATE}]"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Restore the original find library ordering
|
||||
if(ILMBASE_USE_STATIC_LIBS )
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
|
||||
# Unset the helper variables to avoid pollution
|
||||
unset(ILMBASE_CURRENT_STATE)
|
||||
unset(IlmBase_include_paths)
|
||||
unset(IlmBase_library_paths)
|
||||
unset(IlmBase_generic_include_paths)
|
||||
unset(IlmBase_generic_library_paths)
|
||||
unset(IlmBase_libvars)
|
||||
unset(IlmBase_cachevars)
|
||||
unset(ILMBASE_PTHREADS)
|
@@ -1,69 +0,0 @@
|
||||
# - Find LOGC4PLUS library
|
||||
# Find the native LOGC4PLUS includes and library
|
||||
# This module defines
|
||||
# LOGC4PLUS_INCLUDE_DIRS, where to find logc4plus.h, Set when
|
||||
# LOGC4PLUS is found.
|
||||
# LOGC4PLUS_LIBRARIES, libraries to link against to use LOGC4PLUS.
|
||||
# LOGC4PLUS_ROOT_DIR, The base directory to search for LOGC4PLUS.
|
||||
# This can also be an environment variable.
|
||||
# LOGC4PLUS_FOUND, If false, do not try to use LOGC4PLUS.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LOGC4PLUS_LIBRARY, where to find the LOGC4PLUS library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If LOGC4PLUS_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LOGC4PLUS_ROOT_DIR AND NOT $ENV{LOGC4PLUS_ROOT_DIR} STREQUAL "")
|
||||
SET(LOGC4PLUS_ROOT_DIR $ENV{LOGC4PLUS_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_logc4plus_SEARCH_DIRS
|
||||
${LOGC4PLUS_ROOT_DIR}
|
||||
/opt/lib/logc4plus
|
||||
)
|
||||
|
||||
FIND_PATH(LOGC4PLUS_INCLUDE_DIR
|
||||
NAMES
|
||||
logc4plus.h
|
||||
HINTS
|
||||
${_logc4plus_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LOGC4PLUS_LIBRARY
|
||||
NAMES
|
||||
logc4plus
|
||||
HINTS
|
||||
${_logc4plus_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LOGC4PLUS_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LOGC4PLUS DEFAULT_MSG
|
||||
LOGC4PLUS_LIBRARY LOGC4PLUS_INCLUDE_DIR)
|
||||
|
||||
IF(LOGC4PLUS_FOUND)
|
||||
SET(LOGC4PLUS_LIBRARIES ${LOGC4PLUS_LIBRARY})
|
||||
SET(LOGC4PLUS_INCLUDE_DIRS ${LOGC4PLUS_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(LOGC4PLUS_LOGC4PLUS_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LOGC4PLUS_INCLUDE_DIR
|
||||
LOGC4PLUS_LIBRARY
|
||||
)
|
@@ -1,244 +0,0 @@
|
||||
# Module to find OpenEXR.
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - OPENEXR_HOME, OPENEXR_VERSION, OPENEXR_LIB_AREA
|
||||
#
|
||||
# It also supports non-standard names for the library components.
|
||||
#
|
||||
# To use a custom OpenEXR
|
||||
# - Set the variable OPENEXR_CUSTOM to True
|
||||
# - Set the variable OPENEXR_CUSTOM_LIBRARY to the name of the library to
|
||||
# use, e.g. "SpiIlmImf"
|
||||
# - Optionally set the variable OPENEXR_CUSTOM_INCLUDE_DIR to any
|
||||
# particularly weird place that the OpenEXR/*.h files may be found
|
||||
# - Optionally set the variable OPENEXR_CUSTOM_LIB_DIR to any
|
||||
# particularly weird place that the libraries files may be found
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# OPENEXR_INCLUDE_DIR - where to find ImfRgbaFile.h, OpenEXRConfig, etc.
|
||||
# OPENEXR_LIBRARIES - list of libraries to link against when using OpenEXR.
|
||||
# This list does NOT include the IlmBase libraries.
|
||||
# These are defined by the FindIlmBase module.
|
||||
# OPENEXR_FOUND - True if OpenEXR was found.
|
||||
|
||||
# Other standarnd issue macros
|
||||
include(SelectLibraryConfigurations)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(FindPackageMessage)
|
||||
|
||||
if(OPENEXR_USE_STATIC_LIBS)
|
||||
set(_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Macro to assemble a helper state variable
|
||||
macro(SET_STATE_VAR varname)
|
||||
set(tmp_lst
|
||||
${OPENEXR_CUSTOM} | ${OPENEXR_CUSTOM_LIBRARY} |
|
||||
${OPENEXR_HOME} | ${OPENEXR_VERSION} | ${OPENEXR_LIB_AREA}
|
||||
)
|
||||
set(${varname} "${tmp_lst}")
|
||||
unset(tmp_lst)
|
||||
endmacro()
|
||||
|
||||
# To enforce that find_* functions do not use inadvertently existing versions
|
||||
if(OPENEXR_CUSTOM)
|
||||
set(OPENEXR_FIND_OPTIONS "NO_DEFAULT_PATH")
|
||||
endif()
|
||||
|
||||
# Macro to search for an include directory
|
||||
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
|
||||
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
|
||||
find_path(${tmp_varname} ${includefile}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES include
|
||||
${OPENEXR_FIND_OPTIONS}
|
||||
)
|
||||
if(${tmp_varname})
|
||||
mark_as_advanced(${tmp_varname})
|
||||
endif()
|
||||
unset(tmp_varname)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Macro to search for the given library and adds the cached
|
||||
# variable names to the specified list
|
||||
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
|
||||
string(TOUPPER ${prefix}_${libname} tmp_prefix)
|
||||
# Handle new library names for OpenEXR 2.1 build via cmake
|
||||
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
|
||||
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
|
||||
find_library(${tmp_prefix}_LIBRARY_RELEASE
|
||||
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${OPENEXR_FIND_OPTIONS}
|
||||
)
|
||||
find_library(${tmp_prefix}_LIBRARY_DEBUG
|
||||
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
|
||||
HINTS ${${libpath_var}}
|
||||
PATH_SUFFIXES lib
|
||||
${OPENEXR_FIND_OPTIONS}
|
||||
)
|
||||
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
|
||||
select_library_configurations(${tmp_prefix})
|
||||
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
|
||||
|
||||
# Add to the list of variables which should be reset
|
||||
list(APPEND ${cachelist_var}
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
mark_as_advanced(
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
unset(tmp_prefix)
|
||||
endmacro()
|
||||
|
||||
|
||||
# Encode the current state of the external variables into a string
|
||||
SET_STATE_VAR(OPENEXR_CURRENT_STATE)
|
||||
|
||||
# If the state has changed, clear the cached variables
|
||||
if(OPENEXR_CACHED_STATE AND
|
||||
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
|
||||
foreach(libvar ${OPENEXR_CACHED_VARS})
|
||||
unset(${libvar} CACHE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Generic search paths
|
||||
set(OpenEXR_generic_include_paths
|
||||
${OPENEXR_CUSTOM_INCLUDE_DIR}
|
||||
/usr/include
|
||||
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
set(OpenEXR_generic_library_paths
|
||||
${OPENEXR_CUSTOM_LIB_DIR}
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/lib
|
||||
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
# Search paths for the OpenEXR files
|
||||
if(OPENEXR_HOME)
|
||||
set(OpenEXR_library_paths
|
||||
${OPENEXR_HOME}/lib
|
||||
${OPENEXR_HOME}/lib64)
|
||||
if(OPENEXR_VERSION)
|
||||
set(OpenEXR_include_paths
|
||||
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include
|
||||
${OPENEXR_HOME}/include/openexr-${OPENEXR_VERSION})
|
||||
list(APPEND OpenEXR_library_paths
|
||||
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/lib
|
||||
${OPENEXR_HOME}/lib/openexr-${OPENEXR_VERSION})
|
||||
endif()
|
||||
list(APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
|
||||
if(OPENEXR_LIB_AREA)
|
||||
list(INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
|
||||
endif()
|
||||
endif()
|
||||
if(ILMBASE_HOME AND OPENEXR_VERSION)
|
||||
list(APPEND OpenEXR_include_paths
|
||||
${ILMBASE_HOME}/include/openexr-${OPENEXR_VERSION})
|
||||
endif()
|
||||
list(APPEND OpenEXR_include_paths ${OpenEXR_generic_include_paths})
|
||||
list(APPEND OpenEXR_library_paths ${OpenEXR_generic_library_paths})
|
||||
|
||||
# Locate the header files
|
||||
PREFIX_FIND_INCLUDE_DIR(OpenEXR
|
||||
OpenEXR/ImfArray.h OpenEXR_include_paths)
|
||||
|
||||
if(OPENEXR_INCLUDE_DIR)
|
||||
# Get the version from config file, if not already set.
|
||||
if(NOT OPENEXR_VERSION)
|
||||
FILE(STRINGS "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h" OPENEXR_BUILD_SPECIFICATION
|
||||
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
|
||||
|
||||
if(OPENEXR_BUILD_SPECIFICATION)
|
||||
if(NOT OpenEXR_FIND_QUIETLY)
|
||||
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
|
||||
endif()
|
||||
string(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
|
||||
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
|
||||
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
|
||||
else()
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPENEXR_CUSTOM)
|
||||
if(NOT OPENEXR_CUSTOM_LIBRARY)
|
||||
message(FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
|
||||
endif()
|
||||
set(OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
|
||||
else()
|
||||
# elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
|
||||
set(OpenEXR_Library IlmImf)
|
||||
# else()
|
||||
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
|
||||
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
|
||||
endif()
|
||||
|
||||
# Locate the OpenEXR library
|
||||
set(OpenEXR_libvars "")
|
||||
set(OpenEXR_cachevars "")
|
||||
PREFIX_FIND_LIB(OpenEXR ${OpenEXR_Library}
|
||||
OpenEXR_library_paths OpenEXR_libvars OpenEXR_cachevars)
|
||||
|
||||
# Create the list of variables that might need to be cleared
|
||||
set(OPENEXR_CACHED_VARS
|
||||
OPENEXR_INCLUDE_DIR ${OpenEXR_cachevars}
|
||||
CACHE INTERNAL "Variables set by FindOpenEXR.cmake" FORCE)
|
||||
|
||||
# Store the current state so that variables might be cleared if required
|
||||
set(OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
|
||||
CACHE INTERNAL "State last seen by FindOpenEXR.cmake" FORCE)
|
||||
|
||||
# Always link explicitly with zlib
|
||||
set(OPENEXR_ZLIB ${ZLIB_LIBRARIES})
|
||||
|
||||
# Use the standard function to handle OPENEXR_FOUND
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
||||
OPENEXR_INCLUDE_DIR ${OpenEXR_libvars})
|
||||
|
||||
if(OPENEXR_FOUND)
|
||||
set(OPENEXR_LIBRARIES "")
|
||||
foreach(tmplib ${OpenEXR_libvars})
|
||||
list(APPEND OPENEXR_LIBRARIES ${${tmplib}})
|
||||
endforeach()
|
||||
list(APPEND OPENEXR_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
if(NOT OpenEXR_FIND_QUIETLY)
|
||||
FIND_PACKAGE_MESSAGE(OPENEXR
|
||||
"Found OpenEXR: ${OPENEXR_LIBRARIES}"
|
||||
"[${OPENEXR_INCLUDE_DIR}][${OPENEXR_LIBRARIES}][${OPENEXR_CURRENT_STATE}]"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Restore the original find library ordering
|
||||
if(OPENEXR_USE_STATIC_LIBS )
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
|
||||
# Unset the helper variables to avoid pollution
|
||||
unset(OPENEXR_CURRENT_STATE)
|
||||
unset(OpenEXR_include_paths)
|
||||
unset(OpenEXR_library_paths)
|
||||
unset(OpenEXR_generic_include_paths)
|
||||
unset(OpenEXR_generic_library_paths)
|
||||
unset(OpenEXR_libvars)
|
||||
unset(OpenEXR_cachevars)
|
@@ -1,69 +0,0 @@
|
||||
# - Find TBB library
|
||||
# Find the native TBB includes and library
|
||||
# This module defines
|
||||
# TBB_INCLUDE_DIRS, where to find tbb.h, Set when
|
||||
# TBB is found.
|
||||
# TBB_LIBRARIES, libraries to link against to use TBB.
|
||||
# TBB_ROOT_DIR, The base directory to search for TBB.
|
||||
# This can also be an environment variable.
|
||||
# TBB_FOUND, If false, do not try to use TBB.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# TBB_LIBRARY, where to find the TBB library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If TBB_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT TBB_ROOT_DIR AND NOT $ENV{TBB_ROOT_DIR} STREQUAL "")
|
||||
SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_tbb_SEARCH_DIRS
|
||||
${TBB_ROOT_DIR}
|
||||
/opt/lib/tbb
|
||||
)
|
||||
|
||||
FIND_PATH(TBB_INCLUDE_DIR
|
||||
NAMES
|
||||
tbb/tbb.h
|
||||
HINTS
|
||||
${_tbb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(TBB_LIBRARY
|
||||
NAMES
|
||||
tbb
|
||||
HINTS
|
||||
${_tbb_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set TBB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
|
||||
TBB_LIBRARY TBB_INCLUDE_DIR)
|
||||
|
||||
IF(TBB_FOUND)
|
||||
SET(TBB_LIBRARIES ${TBB_LIBRARY})
|
||||
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(TBB_TBB_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
TBB_INCLUDE_DIR
|
||||
TBB_LIBRARY
|
||||
)
|
@@ -1,81 +0,0 @@
|
||||
# select_library_configurations( basename )
|
||||
#
|
||||
# This macro takes a library base name as an argument, and will choose good
|
||||
# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and
|
||||
# basename_LIBRARY_RELEASE depending on what has been found and set. If only
|
||||
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
|
||||
# and basename_LIBRARY_RELEASE will be set to the release value. If only
|
||||
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
|
||||
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
|
||||
#
|
||||
# If the generator supports configuration types, then basename_LIBRARY and
|
||||
# basename_LIBRARIES will be set with debug and optimized flags specifying the
|
||||
# library to be used for the given configuration. If no build type has been set
|
||||
# or the generator in use does not support configuration types, then
|
||||
# basename_LIBRARY and basename_LIBRARIES will take only the release values.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009 Kitware, Inc.
|
||||
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
#
|
||||
# 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.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
|
||||
# Dicharry <wdicharry@stellarscience.com>.
|
||||
|
||||
# Utility macro to check if one variable exists while another doesn't, and set
|
||||
# one that doesn't exist to the one that exists.
|
||||
macro( _set_library_name basename GOOD BAD )
|
||||
if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
|
||||
set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} )
|
||||
endif( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
|
||||
endmacro( _set_library_name )
|
||||
|
||||
macro( select_library_configurations basename )
|
||||
# if only the release version was found, set the debug to be the release
|
||||
# version.
|
||||
_set_library_name( ${basename} RELEASE DEBUG )
|
||||
# if only the debug version was found, set the release value to be the
|
||||
# debug value.
|
||||
_set_library_name( ${basename} DEBUG RELEASE )
|
||||
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
|
||||
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
||||
# is set, then set optimized and debug options.
|
||||
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
set( ${basename}_LIBRARY
|
||||
optimized ${${basename}_LIBRARY_RELEASE}
|
||||
debug ${${basename}_LIBRARY_DEBUG} )
|
||||
set( ${basename}_LIBRARIES
|
||||
optimized ${${basename}_LIBRARY_RELEASE}
|
||||
debug ${${basename}_LIBRARY_DEBUG} )
|
||||
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
# If there are no configuration types or build type, just use
|
||||
# the release version
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
|
||||
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
|
||||
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
|
||||
"The ${basename} library" )
|
||||
|
||||
if( ${basename}_LIBRARY )
|
||||
set( ${basename}_FOUND TRUE )
|
||||
endif( ${basename}_LIBRARY )
|
||||
|
||||
mark_as_advanced( ${basename}_LIBRARY
|
||||
${basename}_LIBRARY_RELEASE
|
||||
${basename}_LIBRARY_DEBUG
|
||||
)
|
||||
endmacro( select_library_configurations )
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user