Compare commits
319 Commits
temp-works
...
openvdb
Author | SHA1 | Date | |
---|---|---|---|
a78b3ee53a | |||
4842cc017c | |||
faf74d1d2d | |||
b095c1979f | |||
4877e0efc9 | |||
9b598ebc47 | |||
c7e7038edc | |||
d30baf60c6 | |||
d3947aef59 | |||
ca21b0702c | |||
28f4388c2e | |||
099f7dc9dd | |||
235932ba2e | |||
736e3cd434 | |||
3d04df097a | |||
54318700dd | |||
947015de57 | |||
dd610cb6e9 | |||
f4ec58f465 | |||
c6495263c6 | |||
a7461419d8 | |||
d6ecf8efcd | |||
0e15c20a00 | |||
485911f3b5 | |||
e3556f339d | |||
02a07894a4 | |||
fdc6c21d17 | |||
8034371106 | |||
fe2cfed20c | |||
af9123d3aa | |||
f3400ebb90 | |||
ce659fe09e | |||
2ad44606a1 | |||
7df993425b | |||
3d56c890e8 | |||
cf18ebba7d | |||
82aa159b85 | |||
1fd8c3e3f1 | |||
75976a24d7 | |||
fd9674e0b3 | |||
e5b71e1017 | |||
45b46cfbe3 | |||
807e7fdc11 | |||
ef59dba7ba | |||
a49ade92fe | |||
de651318e6 | |||
cc1d9c3493 | |||
e394488665 | |||
503f0e8be6 | |||
74ae05cb04 | |||
9d77beb2c0 | |||
b67005b978 | |||
40517fb2e7 | |||
2ca168d6f5 | |||
61c6cae79e | |||
fd08905df7 | |||
2b17f0d4af | |||
29c51dd1ed | |||
96da223d0b | |||
65977350c5 | |||
443dc7c414 | |||
928a22e66e | |||
fbc8eeb46c | |||
427718ab16 | |||
0e9ccb3c12 | |||
a852abd9ce | |||
8cd645d20b | |||
e5a51d2818 | |||
1cd6c7fcd4 | |||
1a7e7b14b4 | |||
cd56c473ca | |||
adf0a12fa1 | |||
a48c171584 | |||
7bb03d99f6 | |||
2ebed329ae | |||
82603761bc | |||
22e3a4ad5e | |||
7b51e97617 | |||
8f098b0a40 | |||
f690c9b6ad | |||
2c5f878ba1 | |||
59a47ae091 | |||
786e81fd18 | |||
e7aa07c616 | |||
7278cb3428 | |||
01ff9adea5 | |||
8c1a2bc2b3 | |||
0422e12517 | |||
a862cebfd4 | |||
5c00edab94 | |||
fd0a2d4eb4 | |||
2b0d63be79 | |||
142abe0b4a | |||
0850165a5a | |||
f1f0e12f82 | |||
a072bc47cb | |||
407c9fc9d6 | |||
6a595bfa66 | |||
dd4e198636 | |||
3930356970 | |||
f52720d204 | |||
a09a7f022c | |||
ecd5904962 | |||
753b6b3c47 | |||
7bacb0080e | |||
069c867eb7 | |||
d3cd113ab0 | |||
e971f0a47e | |||
a2e51eb66a | |||
b387d7fb47 | |||
f5a0a3b66f | |||
cc22f1b571 | |||
99fd1603eb | |||
ec26830776 | |||
1aeac7c0c4 | |||
8d89417778 | |||
f628b5f843 | |||
6d13143b89 | |||
4ed92d8b31 | |||
7b6a841cde | |||
dd67538178 | |||
e3ed51deba | |||
44ba08d147 | |||
12649fbc21 | |||
c17ccb165e | |||
b9f6757cdb | |||
89dc5469d5 | |||
fb7fd2fcea | |||
23627f717d | |||
36ea543f82 | |||
09aef78229 | |||
af730061f2 | |||
86dd099619 | |||
df67565ae0 | |||
024d59ca31 | |||
a7b4e8a75c | |||
2ee0301554 | |||
bdb12bf045 | |||
1efa1d82e6 | |||
8008daba75 | |||
a950ae6090 | |||
3ff45ef48f | |||
b32acadfd3 | |||
8a7d0559f5 | |||
a788a91830 | |||
eae5f5b7d7 | |||
9351a3b650 | |||
26782fa350 | |||
950abc655e | |||
ae0ea8c937 | |||
387cd2eb4f | |||
5c43695f4d | |||
802f40c499 | |||
fe354606a2 | |||
1fcfb0b9e7 | |||
dde162d760 | |||
e3bafa8f50 | |||
39d66bf1a4 | |||
2719f51a70 | |||
0cd4b39f58 | |||
45c287d009 | |||
c571e5989d | |||
7bd3b34e02 | |||
1428324717 | |||
8f6e7e5565 | |||
b91aecc017 | |||
ee5b2d3765 | |||
f750a48cda | |||
6a91edb8e0 | |||
198fa023c1 | |||
f2e1284f05 | |||
35476f588f | |||
435def9bdc | |||
e11aead9e6 | |||
bc802ead98 | |||
8a11c45a09 | |||
10d6ad0798 | |||
6364ceea30 | |||
fc05d9603f | |||
28f88d2076 | |||
c2196395d6 | |||
ef264e1bb0 | |||
d9b70e40df | |||
04af059f57 | |||
9fa6a753c8 | |||
600a7cd2bf | |||
a9158140f7 | |||
aaa43e2b84 | |||
c5d0084606 | |||
1aeb676c2b | |||
24e3db2302 | |||
e4126ec9c1 | |||
5086decb80 | |||
fbf4aebfda | |||
6ecafc57f1 | |||
a9e9e9cbc9 | |||
706a0e2139 | |||
90dc21ce27 | |||
6ec3656e97 | |||
77246e2b93 | |||
99f79338d8 | |||
0a689d3cae | |||
2560e49c4e | |||
c2cdb38376 | |||
442748dfcd | |||
3c69a62f22 | |||
1c580e3a73 | |||
3dcb158f05 | |||
5cb2c01ca5 | |||
3f941ab8f5 | |||
0f6959d797 | |||
c064bc2202 | |||
0267ae96a2 | |||
a80ff6214e | |||
2214eae4d7 | |||
4e4e2940eb | |||
2d3d984be4 | |||
13e49e487e | |||
5406dfef8e | |||
feb8e91665 | |||
ba9800d1e3 | |||
bb62246eb7 | |||
af2ae46fbb | |||
75eea19d02 | |||
83752e2b40 | |||
fbc95426b9 | |||
623b8bcc9b | |||
d0effe8683 | |||
5ca5009e15 | |||
e6517c1fd7 | |||
eeb5b5411f | |||
db695688e9 | |||
ac22acaec3 | |||
68ec6efa76 | |||
b82b176f9b | |||
ac131ea551 | |||
4ce8a1bf25 | |||
cdbca9c018 | |||
bd30d25e40 | |||
4e9d5d1727 | |||
ca2f5cc466 | |||
2beb654d69 | |||
0d51aadbfe | |||
f456cc75f2 | |||
543ee7961b | |||
7135e17df9 | |||
e669eefae0 | |||
7e03c74c53 | |||
edf73ab96b | |||
a2e3b7d48a | |||
8c8b54b601 | |||
2a040825cb | |||
e189fe46e1 | |||
8d6e1f3139 | |||
1fd5f9f004 | |||
17fe79b228 | |||
d5551729bf | |||
fdc051b3ac | |||
6a0854e04a | |||
29fa4b9138 | |||
ce2b57ea91 | |||
788ecf29a7 | |||
2016c92ef1 | |||
76b5f3d1f7 | |||
f01afd7e2e | |||
74ecf0432b | |||
a11e61a3c7 | |||
46d4cb86b6 | |||
3e4d053a16 | |||
dabc9d1ee9 | |||
e656d07cbc | |||
f6fe6759d0 | |||
344de9ca95 | |||
09da26d720 | |||
6c2727e08e | |||
cd301995cc | |||
e0504bf9bb | |||
41f4ea4454 | |||
1b1566af98 | |||
1341109c70 | |||
cc220c34ad | |||
091ef60e48 | |||
9514191b0c | |||
ddd36a24a9 | |||
a1bb117dac | |||
5e82b837d9 | |||
8366d1de70 | |||
c465f9f729 | |||
9e892c6035 | |||
2cf7efff36 | |||
997f2009c0 | |||
bd65b12398 | |||
96054b23ec | |||
4634178396 | |||
579d88551c | |||
9d1bdd9647 | |||
d5c17b2c92 | |||
7b6deb2a46 | |||
3b9b59a9db | |||
02f307baf6 | |||
4eb69ba90f | |||
fc49fc69d3 | |||
bdaf887654 | |||
2d5bd5638f | |||
0cd3e5e72c | |||
fb71b93b43 | |||
e810dabf73 | |||
df9d4f4bff | |||
9a9b2f5b98 | |||
d758a73a74 | |||
51dceb32a8 | |||
d6d7297b74 | |||
b464dd4862 | |||
9d1652e843 | |||
9fe8f6e291 | |||
![]() |
abaa8617d7 | ||
![]() |
8066346267 | ||
![]() |
a75a5d3987 | ||
![]() |
bd96249455 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"project_id" : "Blender",
|
||||
"conduit_uri" : "https://developer.blender.org/",
|
||||
"git.default-relative-commit" : "origin/blender2.8",
|
||||
"git.default-relative-commit" : "origin/master",
|
||||
"arc.land.update.default" : "rebase"
|
||||
}
|
||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,24 +1,20 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
branch = blender2.8
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
url = ../blender-translations.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "source/tools"]
|
||||
path = source/tools
|
||||
url = ../blender-dev-tools.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
|
161
CMakeLists.txt
161
CMakeLists.txt
@@ -45,7 +45,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
if(NOT EXECUTABLE_OUTPUT_PATH)
|
||||
set(FIRST_RUN TRUE)
|
||||
@@ -195,7 +195,7 @@ endif()
|
||||
# Options
|
||||
|
||||
# First platform specific non-cached vars
|
||||
if(UNIX AND NOT (APPLE OR HAIKU))
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_X11 ON)
|
||||
endif()
|
||||
|
||||
@@ -244,15 +244,13 @@ endif()
|
||||
option(WITH_PLAYER "Build Player" OFF)
|
||||
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
|
||||
|
||||
option(WITH_CLAY_ENGINE "Enable Clay engine" ON)
|
||||
|
||||
# Compositor
|
||||
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
|
||||
|
||||
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPENSUBDIV)
|
||||
|
||||
option(WITH_OPENVDB "Enable features relying on OpenVDB" OFF)
|
||||
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
|
||||
option(WITH_OPENVDB "Enable features relying on OpenVDB" ON)
|
||||
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON)
|
||||
|
||||
# GHOST Windowing Library Options
|
||||
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
|
||||
@@ -287,7 +285,6 @@ endif()
|
||||
if(WITH_X11)
|
||||
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
|
||||
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
|
||||
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
|
||||
option(WITH_X11_ALPHA "Enable X11 transparent background" ON)
|
||||
endif()
|
||||
|
||||
@@ -389,14 +386,10 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
|
||||
if(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
|
||||
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
|
||||
mark_as_advanced(PYTHON_NUMPY_PATH)
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
|
||||
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
|
||||
endif()
|
||||
if(WITH_PYTHON_INSTALL)
|
||||
option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
|
||||
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
|
||||
mark_as_advanced(PYTHON_NUMPY_PATH)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
|
||||
@@ -415,14 +408,12 @@ option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF)
|
||||
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL})
|
||||
option(WITH_CYCLES_OPENSUBDIV "Build Cycles with OpenSubdiv support" ${_init_CYCLES_OPENSUBDIV})
|
||||
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
|
||||
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 CACHE STRING "CUDA architectures to build binaries for")
|
||||
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
|
||||
unset(PLATFORM_DEFAULT)
|
||||
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
|
||||
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
|
||||
option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
|
||||
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
|
||||
mark_as_advanced(WITH_CYCLES_LOGGING)
|
||||
mark_as_advanced(WITH_CYCLES_DEBUG)
|
||||
mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
|
||||
@@ -469,16 +460,28 @@ endif()
|
||||
|
||||
# OpenGL
|
||||
|
||||
option(WITH_GLEW_MX "Support multiple GLEW contexts (experimental)" OFF )
|
||||
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
|
||||
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
|
||||
option(WITH_GL_PROFILE_COMPAT "Support using the OpenGL 'compatibility' profile. (deprecated)" ON )
|
||||
option(WITH_GL_PROFILE_CORE "Support using the OpenGL 3.2+ 'core' profile." OFF)
|
||||
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
||||
|
||||
mark_as_advanced(
|
||||
WITH_GLEW_MX
|
||||
WITH_GLEW_ES
|
||||
WITH_GL_EGL
|
||||
WITH_GL_PROFILE_COMPAT
|
||||
WITH_GL_PROFILE_CORE
|
||||
WITH_GL_PROFILE_ES20
|
||||
)
|
||||
|
||||
if(WITH_GL_PROFILE_COMPAT)
|
||||
set(WITH_GLU ON)
|
||||
else()
|
||||
set(WITH_GLU OFF)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
|
||||
mark_as_advanced(WITH_GL_ANGLE)
|
||||
@@ -504,10 +507,11 @@ if(APPLE)
|
||||
set(WITH_CXX11 ON)
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
|
||||
set(_c11_init ON)
|
||||
set(_cxx11_init ON)
|
||||
else()
|
||||
set(_c11_init OFF)
|
||||
set(_cxx11_init OFF)
|
||||
endif()
|
||||
set(_cxx11_init ON)
|
||||
|
||||
option(WITH_C11 "Build with C11 standard enabled, for development use only!" ${_c11_init})
|
||||
mark_as_advanced(WITH_C11)
|
||||
@@ -520,6 +524,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
mark_as_advanced(WITH_LINKER_GOLD)
|
||||
endif()
|
||||
|
||||
# Dependency graph
|
||||
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
|
||||
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
|
||||
|
||||
if(WIN32)
|
||||
# Use hardcoded paths or find_package to find externals
|
||||
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
|
||||
@@ -533,9 +541,6 @@ if(WIN32)
|
||||
|
||||
set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING "password for pfx file used for codesigning.")
|
||||
mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
|
||||
|
||||
option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
|
||||
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
||||
endif()
|
||||
|
||||
# avoid using again
|
||||
@@ -582,12 +587,6 @@ if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
|
||||
endif()
|
||||
|
||||
if(NOT WITH_CXX11)
|
||||
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
||||
message(FATAL_ERROR "WITH_AUDASPACE requires WITH_CXX11")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WITH_AUDASPACE)
|
||||
if(WITH_OPENAL)
|
||||
message(FATAL_ERROR "WITH_OPENAL requires WITH_AUDASPACE")
|
||||
@@ -636,11 +635,16 @@ if(NOT WITH_BOOST)
|
||||
endmacro()
|
||||
|
||||
set_and_warn(WITH_CYCLES OFF)
|
||||
set_and_warn(WITH_AUDASPACE OFF)
|
||||
set_and_warn(WITH_INTERNATIONAL OFF)
|
||||
set_and_warn(WITH_OPENVDB OFF)
|
||||
set_and_warn(WITH_OPENCOLORIO OFF)
|
||||
set_and_warn(WITH_MOD_BOOLEAN OFF)
|
||||
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
||||
|
||||
set_and_warn(WITH_OPENAL OFF) # depends on AUDASPACE
|
||||
set_and_warn(WITH_GAMEENGINE OFF) # depends on AUDASPACE
|
||||
set_and_warn(WITH_PLAYER OFF) # depends on GAMEENGINE
|
||||
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL OR
|
||||
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_MOD_BOOLEAN)
|
||||
# Keep enabled
|
||||
else()
|
||||
@@ -683,7 +687,6 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
|
||||
set(WITH_X11 OFF)
|
||||
set(WITH_X11_XINPUT OFF)
|
||||
set(WITH_X11_XF86VMODE OFF)
|
||||
set(WITH_X11_XFIXES OFF)
|
||||
set(WITH_X11_ALPHA OFF)
|
||||
set(WITH_GHOST_XDND OFF)
|
||||
set(WITH_INPUT_IME OFF)
|
||||
@@ -709,9 +712,30 @@ TEST_SHARED_PTR_SUPPORT()
|
||||
TEST_UNORDERED_MAP_SUPPORT()
|
||||
|
||||
if(WITH_AUDASPACE)
|
||||
if(NOT WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings/C" "${CMAKE_BINARY_DIR}/extern/audaspace")
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings")
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_DEFINITIONS
|
||||
-DWITH_AUDASPACE
|
||||
-DWITH_SYSTEM_AUDASPACE
|
||||
"-DAUD_DEVICE_H=<AUD_Device.h>"
|
||||
"-DAUD_SPECIAL_H=<AUD_Special.h>"
|
||||
"-DAUD_SOUND_H=<AUD_Sound.h>"
|
||||
"-DAUD_HANDLE_H=<AUD_Handle.h>"
|
||||
"-DAUD_SEQUENCE_H=<AUD_Sequence.h>"
|
||||
"-DAUD_TYPES_H=<AUD_Types.h>"
|
||||
"-DAUD_PYTHON_H=<python/PyAPI.h>"
|
||||
)
|
||||
else()
|
||||
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
|
||||
set(AUDASPACE_DEFINITIONS
|
||||
-DWITH_AUDASPACE
|
||||
"-DAUD_DEVICE_H=<AUD_C-API.h>"
|
||||
"-DAUD_SPECIAL_H=<AUD_C-API.h>"
|
||||
"-DAUD_SOUND_H=<AUD_C-API.h>"
|
||||
"-DAUD_HANDLE_H=<AUD_C-API.h>"
|
||||
"-DAUD_SEQUENCE_H=<AUD_C-API.h>"
|
||||
"-DAUD_TYPES_H=<AUD_Space.h>"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -734,7 +758,7 @@ if(WITH_INTERNATIONAL)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# While we have this as an '#error' in 'bpy_capi_utils.h',
|
||||
# While we have this as an '#error' in bpy_util.h,
|
||||
# upgrading Python tends to cause confusion for users who build.
|
||||
# Give the error message early to make this more obvious.
|
||||
#
|
||||
@@ -814,14 +838,6 @@ if(WITH_X11)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_X11_XFIXES)
|
||||
if(X11_Xfixes_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
|
||||
else()
|
||||
set(WITH_X11_XFIXES OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_X11_ALPHA)
|
||||
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
|
||||
mark_as_advanced(X11_Xrender_LIB)
|
||||
@@ -955,11 +971,19 @@ endif()
|
||||
find_package(OpenGL)
|
||||
blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
|
||||
|
||||
if(WITH_GLU)
|
||||
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_glu_LIBRARY}")
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GLU)
|
||||
endif()
|
||||
|
||||
if(WITH_SYSTEM_GLES)
|
||||
find_package_wrapper(OpenGLES)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
if(WITH_GL_PROFILE_COMPAT OR WITH_GL_PROFILE_CORE)
|
||||
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||
|
||||
elseif(WITH_GL_PROFILE_ES20)
|
||||
if(WITH_SYSTEM_GLES)
|
||||
if(NOT OPENGLES_LIBRARY)
|
||||
message(FATAL_ERROR
|
||||
@@ -1019,9 +1043,6 @@ if(WITH_GL_PROFILE_ES20)
|
||||
|
||||
endif()
|
||||
|
||||
else()
|
||||
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_GL_EGL)
|
||||
@@ -1069,10 +1090,16 @@ if(WITH_GL_EGL)
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_COMPAT)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_COMPAT)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_CORE)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
|
||||
else()
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_EGL)
|
||||
@@ -1109,6 +1136,10 @@ endif()
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure GLEW
|
||||
|
||||
if(WITH_GLEW_MX)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GLEW_MX)
|
||||
endif()
|
||||
|
||||
if(WITH_SYSTEM_GLEW)
|
||||
find_package(GLEW)
|
||||
|
||||
@@ -1118,7 +1149,11 @@ if(WITH_SYSTEM_GLEW)
|
||||
message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
|
||||
endif()
|
||||
|
||||
set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
|
||||
if(WITH_GLEW_MX)
|
||||
set(BLENDER_GLEW_LIBRARIES ${GLEW_MX_LIBRARY})
|
||||
else()
|
||||
set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
|
||||
endif()
|
||||
else()
|
||||
if(WITH_GLEW_ES)
|
||||
set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
|
||||
@@ -1126,11 +1161,12 @@ else()
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
|
||||
|
||||
# These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
|
||||
else()
|
||||
if(NOT WITH_GL_PROFILE_ES20)
|
||||
# No ES functions are needed
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
|
||||
elseif(NOT (WITH_GL_PROFILE_CORE OR WITH_GL_PROFILE_COMPAT))
|
||||
# ES is enabled, but the other functions are all disabled
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
@@ -1167,7 +1203,9 @@ else()
|
||||
|
||||
endif()
|
||||
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
|
||||
if(NOT WITH_GLU)
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure Bullet
|
||||
@@ -1374,6 +1412,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
|
||||
if(APPLE AND WITH_OPENMP) # we need the Intel omp lib linked here to not fail all tests due presence of -fopenmp !
|
||||
set(CMAKE_REQUIRED_FLAGS "-L${LIBDIR}/openmp/lib -liomp5") # these are only used for the checks
|
||||
endif()
|
||||
|
||||
# strange, clang complains these are not supported, but then uses them.
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
|
||||
@@ -1471,15 +1513,10 @@ if(WITH_PYTHON)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(WIN32 OR APPLE)
|
||||
# pass, we have this in an archive to extract
|
||||
elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
|
||||
if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
|
||||
find_python_package(numpy)
|
||||
unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
|
||||
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
|
||||
endif()
|
||||
elseif(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
|
||||
find_python_package(numpy)
|
||||
endif()
|
||||
|
||||
if(WIN32 OR APPLE)
|
||||
@@ -1609,10 +1646,10 @@ include(build_files/cmake/packaging.cmake)
|
||||
# Use dynamic loading for OpenMP
|
||||
if(WITH_BLENDER)
|
||||
openmp_delayload(blender)
|
||||
endif()
|
||||
endif(WITH_BLENDER)
|
||||
if(WITH_PLAYER)
|
||||
openmp_delayload(blenderplayer)
|
||||
endif()
|
||||
endif(WITH_PLAYER)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Print Final Configuration
|
||||
@@ -1670,7 +1707,6 @@ if(FIRST_RUN)
|
||||
info_cfg_option(WITH_INSTALL_PORTABLE)
|
||||
info_cfg_option(WITH_X11_ALPHA)
|
||||
info_cfg_option(WITH_X11_XF86VMODE)
|
||||
info_cfg_option(WITH_X11_XFIXES)
|
||||
info_cfg_option(WITH_X11_XINPUT)
|
||||
info_cfg_option(WITH_MEM_JEMALLOC)
|
||||
info_cfg_option(WITH_MEM_VALGRIND)
|
||||
@@ -1717,7 +1753,10 @@ if(FIRST_RUN)
|
||||
|
||||
info_cfg_text("OpenGL:")
|
||||
info_cfg_option(WITH_GLEW_ES)
|
||||
info_cfg_option(WITH_GLU)
|
||||
info_cfg_option(WITH_GL_EGL)
|
||||
info_cfg_option(WITH_GL_PROFILE_COMPAT)
|
||||
info_cfg_option(WITH_GL_PROFILE_CORE)
|
||||
info_cfg_option(WITH_GL_PROFILE_ES20)
|
||||
if(WIN32)
|
||||
info_cfg_option(WITH_GL_ANGLE)
|
||||
|
@@ -48,11 +48,6 @@ DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
|
||||
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
|
||||
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)_$(shell uname -p)
|
||||
endif
|
||||
|
||||
# Allow to use alternative binary (pypy3, etc)
|
||||
ifndef PYTHON
|
||||
PYTHON:=python3
|
||||
|
@@ -78,7 +78,7 @@ include(cmake/openvdb.cmake)
|
||||
include(cmake/python.cmake)
|
||||
include(cmake/python_site_packages.cmake)
|
||||
include(cmake/numpy.cmake)
|
||||
if(WITH_WEBP)
|
||||
if (WITH_WEBP)
|
||||
include(cmake/webp.cmake)
|
||||
endif()
|
||||
if(WIN32)
|
||||
|
@@ -72,9 +72,4 @@ ExternalProject_Add(external_alembic
|
||||
INSTALL_DIR ${LIBDIR}/alembic
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_alembic
|
||||
external_boost
|
||||
external_zlib
|
||||
external_ilmbase
|
||||
)
|
||||
add_dependencies(external_alembic external_boost external_zlib external_ilmbase)
|
||||
|
@@ -47,10 +47,7 @@ if(BUILD_MODE STREQUAL Release)
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
|
||||
INSTALL_DIR ${LIBDIR}/blendthumb32
|
||||
)
|
||||
add_dependencies(
|
||||
external_blendthumb_32
|
||||
external_zlib_32
|
||||
)
|
||||
add_dependencies(external_blendthumb_32 external_zlib_32)
|
||||
|
||||
ExternalProject_Add(external_blendthumb_64
|
||||
CMAKE_GENERATOR ${GENERATOR_64}
|
||||
@@ -59,9 +56,6 @@ if(BUILD_MODE STREQUAL Release)
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
|
||||
INSTALL_DIR ${LIBDIR}/blendthumb64
|
||||
)
|
||||
add_dependencies(
|
||||
external_blendthumb_64
|
||||
external_zlib_64
|
||||
)
|
||||
add_dependencies(external_blendthumb_64 external_zlib_64)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -37,13 +37,7 @@ ExternalProject_Add(external_blosc
|
||||
INSTALL_DIR ${LIBDIR}/blosc
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_blosc
|
||||
external_zlib
|
||||
)
|
||||
add_dependencies(external_blosc external_zlib)
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_blosc
|
||||
external_pthreads
|
||||
)
|
||||
add_dependencies(external_blosc external_pthreads)
|
||||
endif()
|
||||
|
@@ -103,8 +103,5 @@ ExternalProject_Add(external_boost
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_boost
|
||||
Make_Python_Environment
|
||||
)
|
||||
add_dependencies(external_boost Make_Python_Environment)
|
||||
endif()
|
||||
|
@@ -32,15 +32,15 @@ ExternalProject_Add(external_clang
|
||||
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/)
|
||||
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/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
|
||||
)
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_Step(external_clang after_install
|
||||
COMMAND ${CLANG_HARVEST_COMMAND}
|
||||
@@ -48,7 +48,4 @@ if(MSVC)
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_clang
|
||||
ll
|
||||
)
|
||||
add_dependencies(external_clang ll)
|
||||
|
@@ -30,14 +30,13 @@ if(WIN32)
|
||||
--enable-w32threads
|
||||
--disable-pthreads
|
||||
--enable-libopenjpeg
|
||||
)
|
||||
)
|
||||
else()
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--enable-static
|
||||
--disable-shared
|
||||
--enable-libopenjpeg
|
||||
)
|
||||
--enable-libopenjpeg)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
@@ -103,34 +102,18 @@ ExternalProject_Add(external_ffmpeg
|
||||
--disable-indev=jack
|
||||
--disable-indev=alsa
|
||||
--disable-outdev=alsa
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
|
||||
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
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
|
||||
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()
|
||||
endif(MSVC)
|
||||
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib
|
||||
external_faad
|
||||
external_openjpeg
|
||||
external_xvidcore
|
||||
external_x264
|
||||
external_schroedinger
|
||||
external_vpx
|
||||
external_theora
|
||||
external_vorbis
|
||||
external_ogg
|
||||
external_lame
|
||||
)
|
||||
add_dependencies(external_ffmpeg external_zlib external_faad external_openjpeg external_xvidcore external_x264 external_schroedinger external_vpx external_theora external_vorbis external_ogg external_lame)
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib_mingw
|
||||
)
|
||||
add_dependencies(external_ffmpeg external_zlib_mingw)
|
||||
endif()
|
||||
|
@@ -37,4 +37,4 @@ ExternalProject_Add(external_fftw3
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
endif(MSVC)
|
||||
|
@@ -29,4 +29,4 @@ ExternalProject_Add(external_flac
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
endif(MSVC)
|
||||
|
@@ -26,6 +26,7 @@ endif()
|
||||
message("HARVEST_TARGET = ${HARVEST_TARGET}")
|
||||
|
||||
if(WIN32)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
add_custom_target(Harvest_Release_Results
|
||||
# Zlib Rename the lib file and copy the include/bin folders
|
||||
@@ -116,8 +117,8 @@ if(BUILD_MODE STREQUAL Release)
|
||||
# webp, straight up copy
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
|
||||
DEPENDS
|
||||
)
|
||||
endif()
|
||||
)
|
||||
endif(BUILD_MODE STREQUAL Release)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
add_custom_target(Harvest_Debug_Results
|
||||
@@ -168,8 +169,8 @@ if(BUILD_MODE STREQUAL Debug)
|
||||
# python
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
|
||||
DEPENDS Package_Python
|
||||
)
|
||||
endif()
|
||||
)
|
||||
endif(BUILD_MODE STREQUAL Debug)
|
||||
|
||||
else(WIN32)
|
||||
|
||||
@@ -275,4 +276,4 @@ harvest(x264/lib ffmpeg/lib "*.a")
|
||||
harvest(xml2/lib opencollada/lib "*.a")
|
||||
harvest(xvidcore/lib ffmpeg/lib "*.a")
|
||||
|
||||
endif()
|
||||
endif(WIN32)
|
||||
|
@@ -32,11 +32,11 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_hdf5
|
||||
URL ${HDF5_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${HDF5_HASH}
|
||||
PREFIX ${BUILD_DIR}/hdf5
|
||||
PATCH_COMMAND ${HDF5_PATCH}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/hdf5
|
||||
URL ${HDF5_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${HDF5_HASH}
|
||||
PREFIX ${BUILD_DIR}/hdf5
|
||||
PATCH_COMMAND ${HDF5_PATCH}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/hdf5
|
||||
)
|
||||
|
@@ -43,15 +43,15 @@ ExternalProject_Add(ll
|
||||
INSTALL_DIR ${LIBDIR}/llvm
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
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/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
|
||||
)
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add_Step(ll after_install
|
||||
COMMAND ${LLVM_HARVEST_COMMAND}
|
||||
|
@@ -25,7 +25,7 @@ if(MSVC)
|
||||
set(NUMPY_DIR_POSTFIX)
|
||||
set(NUMPY_ARCHIVE_POSTFIX)
|
||||
set(NUMPY_BUILD_OPTION)
|
||||
endif()
|
||||
endif(BUILD_MODE STREQUAL Debug)
|
||||
endif()
|
||||
|
||||
set(NUMPY_POSTFIX)
|
||||
@@ -54,7 +54,4 @@ ExternalProject_Add(external_numpy
|
||||
INSTALL_COMMAND ${NUMPY_INSTALL}
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_numpy
|
||||
Make_Python_Environment
|
||||
)
|
||||
add_dependencies(external_numpy Make_Python_Environment)
|
||||
|
@@ -33,8 +33,5 @@ ExternalProject_Add(external_opencollada
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_dependencies(
|
||||
external_opencollada
|
||||
external_xml2
|
||||
)
|
||||
add_dependencies(external_opencollada external_xml2)
|
||||
endif()
|
||||
|
@@ -67,7 +67,4 @@ if(NOT WIN32)
|
||||
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_opencolorio
|
||||
external_boost
|
||||
)
|
||||
add_dependencies(external_opencolorio external_boost)
|
||||
|
@@ -38,8 +38,4 @@ ExternalProject_Add(external_openexr
|
||||
INSTALL_DIR ${LIBDIR}/openexr
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_ilmbase
|
||||
)
|
||||
add_dependencies(external_openexr external_zlib external_ilmbase)
|
||||
|
@@ -39,25 +39,21 @@ else()
|
||||
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}
|
||||
)
|
||||
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()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(OPENJPEG_FLAGS
|
||||
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
|
||||
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
|
||||
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
|
||||
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
|
||||
)
|
||||
if (MSVC)
|
||||
set(OPENJPEG_FLAGS -DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
|
||||
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
|
||||
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
|
||||
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
|
||||
)
|
||||
else()
|
||||
set(OPENJPEG_FLAGS
|
||||
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
|
||||
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
|
||||
set(OPENJPEG_FLAGS -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
|
||||
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -124,28 +120,13 @@ ExternalProject_Add(external_openimageio
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENIMAGEIO_HASH}
|
||||
PREFIX ${BUILD_DIR}/openimageio
|
||||
PATCH_COMMAND
|
||||
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
|
||||
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.diff
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
|
||||
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.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_ilmbase
|
||||
external_openexr
|
||||
external_jpeg
|
||||
external_boost
|
||||
external_tiff
|
||||
external_opencolorio
|
||||
external_openjpeg${OPENJPEG_POSTFIX}
|
||||
${WEBP_DEP}
|
||||
)
|
||||
add_dependencies(external_openimageio external_png external_zlib external_ilmbase external_openexr external_jpeg external_boost external_tiff external_opencolorio external_openjpeg${OPENJPEG_POSTFIX} ${WEBP_DEP})
|
||||
if(NOT WIN32)
|
||||
add_dependencies(
|
||||
external_openimageio
|
||||
external_opencolorio_extra
|
||||
)
|
||||
add_dependencies(external_openimageio external_opencolorio_extra)
|
||||
endif()
|
||||
|
@@ -39,26 +39,19 @@ ExternalProject_Add(external_openjpeg
|
||||
)
|
||||
|
||||
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
|
||||
if(MSVC)
|
||||
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()
|
||||
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
|
||||
)
|
||||
endif()
|
||||
|
||||
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
|
||||
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
|
||||
if(MSVC)
|
||||
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
endif(MSVC)
|
||||
|
@@ -43,7 +43,7 @@ if(WIN32)
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DNO_CUDA=${OPENSUBDIV_CUDA}
|
||||
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
|
||||
-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}
|
||||
@@ -54,7 +54,6 @@ else()
|
||||
${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()
|
||||
@@ -69,10 +68,4 @@ ExternalProject_Add(external_opensubdiv
|
||||
INSTALL_DIR ${LIBDIR}/opensubdiv
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_opensubdiv
|
||||
external_glew
|
||||
external_glfw
|
||||
external_clew
|
||||
external_cuew
|
||||
)
|
||||
add_dependencies(external_opensubdiv external_glew external_glfw external_clew external_cuew)
|
||||
|
@@ -61,20 +61,11 @@ ExternalProject_Add(openvdb
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENVDB_HASH}
|
||||
PREFIX ${BUILD_DIR}/openvdb
|
||||
PATCH_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ &&
|
||||
${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ &&
|
||||
${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff
|
||||
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_ilmbase
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_blosc
|
||||
)
|
||||
add_dependencies(openvdb external_tbb external_boost external_ilmbase external_openexr external_zlib external_blosc)
|
||||
|
@@ -26,13 +26,13 @@ if(NOT BUILD_MODE)
|
||||
set(BUILD_MODE "Release")
|
||||
message(STATUS "Build type not specified: defaulting to a release build.")
|
||||
endif()
|
||||
message("BuildMode = ${BUILD_MODE}")
|
||||
Message("BuildMode = ${BUILD_MODE}")
|
||||
|
||||
if(BUILD_MODE STREQUAL "Debug")
|
||||
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
|
||||
else(BUILD_MODE STREQUAL "Debug")
|
||||
ELSE(BUILD_MODE STREQUAL "Debug")
|
||||
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
|
||||
endif()
|
||||
ENDIF(BUILD_MODE STREQUAL "Debug")
|
||||
|
||||
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
|
||||
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
|
||||
@@ -116,11 +116,10 @@ else()
|
||||
set(LIBPREFIX "lib")
|
||||
|
||||
if(APPLE)
|
||||
# Let's get the current Xcode dir, to support xcode-select
|
||||
execute_process(
|
||||
# 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
|
||||
)
|
||||
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(OSX_ARCHITECTURES x86_64)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.9)
|
||||
set(OSX_SDK_VERSION 10.12)
|
||||
@@ -131,9 +130,9 @@ else()
|
||||
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
|
||||
set(PLATFORM_CMAKE_FLAGS
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
|
||||
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
|
||||
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
|
||||
)
|
||||
else()
|
||||
set(PLATFORM_CFLAGS "-fPIC")
|
||||
|
@@ -78,21 +78,10 @@ ExternalProject_Add(external_osl
|
||||
LIST_SEPARATOR ^^
|
||||
URL_HASH MD5=${OSL_HASH}
|
||||
PREFIX ${BUILD_DIR}/osl
|
||||
PATCH_COMMAND
|
||||
${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff &&
|
||||
${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff &&
|
||||
${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.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_ilmbase
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_flexbison
|
||||
external_openimageio
|
||||
)
|
||||
add_dependencies(external_osl external_boost ll external_clang external_ilmbase external_openexr external_zlib external_flexbison external_openimageio)
|
||||
|
@@ -31,10 +31,7 @@ ExternalProject_Add(external_png
|
||||
INSTALL_DIR ${LIBDIR}/png
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_png
|
||||
external_zlib
|
||||
)
|
||||
add_dependencies(external_png external_zlib)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_png after_install
|
||||
|
@@ -35,12 +35,11 @@ if(WIN32)
|
||||
CONFIGURE_COMMAND echo .
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
|
||||
BUILD_COMMAND ${PTHREADS_BUILD}
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h
|
||||
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h
|
||||
INSTALL_DIR ${LIBDIR}/pthreads
|
||||
)
|
||||
endif()
|
||||
|
@@ -44,22 +44,20 @@ if(WIN32)
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PYTHON_HASH}
|
||||
PREFIX ${BUILD_DIR}/python
|
||||
PATCH_COMMAND
|
||||
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff &&
|
||||
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff
|
||||
PATCH_COMMAND echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff &&
|
||||
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE} -k ${PYTHON_COMPILER_STRING}
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
|
||||
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
|
||||
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
|
||||
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
|
||||
)
|
||||
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
|
||||
message("POutput = ${PYTHON_OUTPUTDIR}")
|
||||
Message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
|
||||
Message("POutput = ${PYTHON_OUTPUTDIR}")
|
||||
else()
|
||||
if(APPLE)
|
||||
# we need to manually add homebrew headers to get ssl module building
|
||||
@@ -137,4 +135,4 @@ if(MSVC)
|
||||
COMMAND ${PYTHON_DISTUTIL_PATCH}
|
||||
)
|
||||
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
|
||||
endif()
|
||||
endif(MSVC)
|
||||
|
@@ -17,14 +17,14 @@
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
if(WIN32)
|
||||
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
|
||||
)
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
|
||||
)
|
||||
else()
|
||||
set(HARVEST_CMD echo .)
|
||||
set(HARVEST_CMD echo .)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_python_site_packages
|
||||
@@ -35,7 +35,4 @@ ExternalProject_Add(external_python_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: && ${HARVEST_CMD}
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_python_site_packages
|
||||
Make_Python_Environment
|
||||
)
|
||||
add_dependencies(external_python_site_packages Make_Python_Environment)
|
||||
|
@@ -38,10 +38,7 @@ ExternalProject_Add(external_schroedinger
|
||||
INSTALL_DIR ${LIBDIR}/schroedinger
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_schroedinger
|
||||
external_orc
|
||||
)
|
||||
add_dependencies(external_schroedinger external_orc)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_schroedinger PROPERTIES FOLDER Mingw)
|
||||
|
@@ -49,14 +49,7 @@ if(MSVC)
|
||||
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_sndfile
|
||||
external_ogg
|
||||
external_vorbis
|
||||
)
|
||||
add_dependencies(external_sndfile external_ogg external_vorbis)
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_sndfile
|
||||
external_flac
|
||||
)
|
||||
add_dependencies(external_sndfile external_flac)
|
||||
endif()
|
||||
|
@@ -23,14 +23,6 @@ set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_STATIC=On
|
||||
)
|
||||
|
||||
if(TBB_VERSION MATCHES 2018)
|
||||
set(TBB_VS_VERSION vs2013)
|
||||
elseif(TBB_VERSION MATCHES 2017)
|
||||
set(TBB_VS_VERSION vs2012)
|
||||
else()
|
||||
set(TBB_VS_VERSION vs2010)
|
||||
endif()
|
||||
|
||||
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
|
||||
ExternalProject_Add(external_tbb
|
||||
URL ${TBB_URI}
|
||||
@@ -38,7 +30,7 @@ ExternalProject_Add(external_tbb
|
||||
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/${TBB_VS_VERSION}/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2010/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
|
||||
)
|
||||
|
@@ -33,11 +33,7 @@ ExternalProject_Add(external_theora
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_theora
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
add_dependencies(external_theora external_vorbis external_ogg)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
|
||||
|
@@ -34,10 +34,7 @@ ExternalProject_Add(external_tiff
|
||||
INSTALL_DIR ${LIBDIR}/tiff
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_tiff
|
||||
external_zlib
|
||||
)
|
||||
add_dependencies(external_tiff external_zlib)
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_tiff after_install
|
||||
|
@@ -104,10 +104,10 @@ set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c
|
||||
set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
|
||||
|
||||
set(LLVM_VERSION 3.4.2)
|
||||
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
|
||||
set(LLVM_URI http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
|
||||
set(LLVM_HASH a20669f75967440de949ac3b1bad439c)
|
||||
|
||||
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
|
||||
set(CLANG_URI http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
|
||||
set(CLANG_HASH 87945973b7c73038871c5f849a818588)
|
||||
|
||||
set(OPENIMAGEIO_VERSION 1.7.15)
|
||||
@@ -137,16 +137,9 @@ set(PYTHON_SHORT_VERSION_NO_DOTS 36)
|
||||
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_HASH 2c68846471994897278364fc18730dd9)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Needed to be compatible with GCC 7, other platforms can upgrade later
|
||||
set(TBB_VERSION 2017_U7)
|
||||
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
|
||||
set(TBB_HASH 364f2a4b80e978f38a69cbf7c466b898)
|
||||
else()
|
||||
set(TBB_VERSION 44_20160128)
|
||||
set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz)
|
||||
set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc)
|
||||
endif()
|
||||
set(TBB_VERSION 44_20160128)
|
||||
set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz)
|
||||
set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc)
|
||||
|
||||
set(OPENVDB_VERSION 3.1.0)
|
||||
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
||||
|
@@ -31,10 +31,7 @@ ExternalProject_Add(external_vorbis
|
||||
INSTALL_DIR ${LIBDIR}/vorbis
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
add_dependencies(external_vorbis external_ogg)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
|
||||
|
@@ -25,7 +25,7 @@
|
||||
ARGS=$( \
|
||||
getopt \
|
||||
-o s:i:t:h \
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,use-cxx11,\
|
||||
with-all,with-opencollada,with-jack,\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
|
||||
force-all,force-python,force-numpy,force-boost,\
|
||||
@@ -104,6 +104,11 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--no-confirm
|
||||
Disable any interaction with user (suitable for automated run).
|
||||
|
||||
--use-cxx11
|
||||
Build all libraries in cpp11 'mode' (will be mandatory soon in blender2.8 branch).
|
||||
NOTE: If your compiler is gcc-6.0 or above, you probably *want* to enable this option (since it's default
|
||||
standard starting from this version).
|
||||
|
||||
--with-all
|
||||
By default, a number of optional and not-so-often needed libraries are not installed.
|
||||
This option will try to install them, at the cost of potential conflicts (depending on
|
||||
@@ -285,7 +290,7 @@ SUDO="sudo"
|
||||
|
||||
NO_BUILD=false
|
||||
NO_CONFIRM=false
|
||||
USE_CXX11=true # Mandatory in blender2.8
|
||||
USE_CXX11=false
|
||||
|
||||
PYTHON_VERSION="3.6.2"
|
||||
PYTHON_VERSION_MIN="3.6"
|
||||
@@ -496,6 +501,9 @@ while true; do
|
||||
--no-confirm)
|
||||
NO_CONFIRM=true; shift; continue
|
||||
;;
|
||||
--use-cxx11)
|
||||
USE_CXX11=true; shift; continue
|
||||
;;
|
||||
--with-all)
|
||||
WITH_ALL=true; shift; continue
|
||||
;;
|
||||
@@ -753,8 +761,8 @@ OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION
|
||||
OIIO_SOURCE_REPO=( "https://github.com/OpenImageIO/oiio.git" )
|
||||
OIIO_SOURCE_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
|
||||
|
||||
LLVM_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
|
||||
LLVM_CLANG_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
|
||||
LLVM_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
|
||||
LLVM_CLANG_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
|
||||
|
||||
OSL_USE_REPO=false
|
||||
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
|
||||
@@ -796,7 +804,7 @@ FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
||||
|
||||
CXXFLAGS_BACK=$CXXFLAGS
|
||||
if [ "$USE_CXX11" = true ]; then
|
||||
WARNING "C++11 is now mandatory for blender2.8, this *should* go smoothly with any very recent distribution.
|
||||
WARNING "You are trying to use c++11, this *should* go smoothely with any very recent distribution
|
||||
However, if you are experiencing linking errors (also when building Blender itself), please try the following:
|
||||
* Re-run this script with '--build-all --force-all' options.
|
||||
* Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above.
|
||||
@@ -1254,11 +1262,7 @@ compile_Boost() {
|
||||
#### Build OCIO ####
|
||||
_init_ocio() {
|
||||
_src=$SRC/OpenColorIO-$OCIO_VERSION
|
||||
if [ "$OCIO_USE_REPO" = true ]; then
|
||||
_git=true
|
||||
else
|
||||
_git=false
|
||||
fi
|
||||
_git=false
|
||||
_inst=$INST/ocio-$OCIO_VERSION
|
||||
_inst_shortcut=$INST/ocio
|
||||
}
|
||||
@@ -2677,10 +2681,10 @@ install_DEB() {
|
||||
install_packages_DEB $_packages
|
||||
|
||||
PRINT""
|
||||
LIBSNDFILE_DEV="libsndfile1-dev"
|
||||
check_package_DEB $LIBSNDFILE_DEV
|
||||
SNDFILE_DEV="libsndfile1-dev"
|
||||
check_package_DEB $SNDFILE_DEV
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_DEB $LIBSNDFILE_DEV
|
||||
install_packages_DEB $SNDFILE_DEV
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
@@ -3275,10 +3279,10 @@ install_RPM() {
|
||||
fi
|
||||
|
||||
PRINT""
|
||||
LIBSNDFILE_DEV="libsndfile-devel"
|
||||
check_package_RPM $LIBSNDFILE_DEV
|
||||
SNDFILE_DEV="libsndfile-devel"
|
||||
check_package_RPM $SNDFILE_DEV
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_RPM $LIBSNDFILE_DEV
|
||||
install_packages_RPM $SNDFILE_DEV
|
||||
fi
|
||||
|
||||
if [ "$WITH_ALL" = true ]; then
|
||||
@@ -3682,10 +3686,10 @@ install_ARCH() {
|
||||
install_packages_ARCH $_packages
|
||||
|
||||
PRINT""
|
||||
LIBSNDFILE_DEV="libsndfile"
|
||||
check_package_ARCH $LIBSNDFILE_DEV
|
||||
SNDFILE_DEV="libsndfile"
|
||||
check_package_ARCH $SNDFILE_DEV
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_ARCH $LIBSNDFILE_DEV
|
||||
install_packages_ARCH $SNDFILE_DEV
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
|
@@ -32,6 +32,7 @@ SET(_blosc_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/blosc
|
||||
)
|
||||
|
||||
|
@@ -32,6 +32,7 @@ SET(_cppunit_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/cppunit
|
||||
)
|
||||
|
||||
|
@@ -21,9 +21,9 @@
|
||||
# ILMBASE_FOUND - True if IlmBase was found.
|
||||
|
||||
# Other standarnd issue macros
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(FindPackageMessage)
|
||||
include(SelectLibraryConfigurations)
|
||||
include (FindPackageHandleStandardArgs)
|
||||
include (FindPackageMessage)
|
||||
include (SelectLibraryConfigurations)
|
||||
|
||||
|
||||
if( ILMBASE_USE_STATIC_LIBS )
|
||||
@@ -36,42 +36,42 @@ if( ILMBASE_USE_STATIC_LIBS )
|
||||
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
|
||||
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()
|
||||
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()
|
||||
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)
|
||||
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()
|
||||
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)
|
||||
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 )
|
||||
@@ -89,90 +89,86 @@ macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
|
||||
${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)
|
||||
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}
|
||||
list (APPEND ${cachelist_var}
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
mark_as_advanced(
|
||||
mark_as_advanced (
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
unset(tmp_prefix)
|
||||
endmacro()
|
||||
unset (tmp_prefix)
|
||||
endmacro ()
|
||||
|
||||
|
||||
# Encode the current state of the external variables into a string
|
||||
SET_STATE_VAR(ILMBASE_CURRENT_STATE)
|
||||
SET_STATE_VAR (ILMBASE_CURRENT_STATE)
|
||||
|
||||
# If the state has changed, clear the cached variables
|
||||
if(ILMBASE_CACHED_STATE AND
|
||||
if (ILMBASE_CACHED_STATE AND
|
||||
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
|
||||
|
||||
foreach(libvar ${ILMBASE_CACHED_VARS})
|
||||
unset(${libvar} CACHE)
|
||||
endforeach()
|
||||
endif()
|
||||
foreach (libvar ${ILMBASE_CACHED_VARS})
|
||||
unset (${libvar} CACHE)
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
|
||||
# Generic search paths
|
||||
set(IlmBase_generic_include_paths
|
||||
set (IlmBase_generic_include_paths
|
||||
${ILMBASE_CUSTOM_INCLUDE_DIR}
|
||||
/usr/include
|
||||
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
)
|
||||
set(IlmBase_generic_library_paths
|
||||
/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}
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
/opt/local/lib)
|
||||
|
||||
# Search paths for the IlmBase files
|
||||
if(ILMBASE_HOME)
|
||||
if(ILMBASE_VERSION)
|
||||
set(IlmBase_include_paths
|
||||
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}/include/ilmbase-${ILMBASE_VERSION})
|
||||
set (IlmBase_library_paths
|
||||
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib
|
||||
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION}
|
||||
)
|
||||
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION})
|
||||
endif()
|
||||
list(APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
|
||||
set(IlmBase_library_paths
|
||||
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})
|
||||
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
|
||||
PREFIX_FIND_INCLUDE_DIR (IlmBase
|
||||
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
|
||||
|
||||
if(ILMBASE_INCLUDE_DIR)
|
||||
if (ILMBASE_INCLUDE_DIR)
|
||||
# Get the version from config file, if not already set.
|
||||
if(NOT ILMBASE_VERSION)
|
||||
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)
|
||||
if (NOT IlmBase_FIND_QUIETLY)
|
||||
message(STATUS "${ILMBASE_BUILD_SPECIFICATION}")
|
||||
endif()
|
||||
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")
|
||||
@@ -182,71 +178,71 @@ if(ILMBASE_INCLUDE_DIR)
|
||||
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
|
||||
endif()
|
||||
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.")
|
||||
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})
|
||||
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()
|
||||
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()
|
||||
# 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}
|
||||
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()
|
||||
endforeach ()
|
||||
# Create the list of variables that might need to be cleared
|
||||
set(ILMBASE_CACHED_VARS
|
||||
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}
|
||||
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
|
||||
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()
|
||||
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
|
||||
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
|
||||
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()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Restore the original find library ordering
|
||||
if( ILMBASE_USE_STATIC_LIBS )
|
||||
@@ -254,11 +250,11 @@ if( ILMBASE_USE_STATIC_LIBS )
|
||||
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)
|
||||
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)
|
||||
|
@@ -32,6 +32,7 @@ SET(_logc4plus_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/logc4plus
|
||||
)
|
||||
|
||||
|
@@ -23,12 +23,12 @@
|
||||
# OPENEXR_FOUND - True if OpenEXR was found.
|
||||
|
||||
# Other standarnd issue macros
|
||||
include(SelectLibraryConfigurations)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(FindPackageMessage)
|
||||
include (SelectLibraryConfigurations)
|
||||
include (FindPackageHandleStandardArgs)
|
||||
include (FindPackageMessage)
|
||||
|
||||
if(OPENEXR_USE_STATIC_LIBS)
|
||||
set(_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
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()
|
||||
@@ -37,39 +37,39 @@ if(OPENEXR_USE_STATIC_LIBS)
|
||||
endif()
|
||||
|
||||
# Macro to assemble a helper state variable
|
||||
macro(SET_STATE_VAR varname)
|
||||
set(tmp_lst
|
||||
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()
|
||||
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()
|
||||
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)
|
||||
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()
|
||||
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)
|
||||
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 )
|
||||
@@ -86,91 +86,89 @@ macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
|
||||
${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)
|
||||
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}
|
||||
list (APPEND ${cachelist_var}
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
mark_as_advanced(
|
||||
mark_as_advanced (
|
||||
${tmp_prefix}_LIBRARY
|
||||
${tmp_prefix}_LIBRARY_RELEASE
|
||||
${tmp_prefix}_LIBRARY_DEBUG)
|
||||
unset(tmp_prefix)
|
||||
endmacro()
|
||||
unset (tmp_prefix)
|
||||
endmacro ()
|
||||
|
||||
|
||||
# Encode the current state of the external variables into a string
|
||||
SET_STATE_VAR(OPENEXR_CURRENT_STATE)
|
||||
SET_STATE_VAR (OPENEXR_CURRENT_STATE)
|
||||
|
||||
# If the state has changed, clear the cached variables
|
||||
if(OPENEXR_CACHED_STATE AND
|
||||
if (OPENEXR_CACHED_STATE AND
|
||||
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
|
||||
foreach(libvar ${OPENEXR_CACHED_VARS})
|
||||
unset(${libvar} CACHE)
|
||||
endforeach()
|
||||
endif()
|
||||
foreach (libvar ${OPENEXR_CACHED_VARS})
|
||||
unset (${libvar} CACHE)
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
# Generic search paths
|
||||
set(OpenEXR_generic_include_paths
|
||||
set (OpenEXR_generic_include_paths
|
||||
${OPENEXR_CUSTOM_INCLUDE_DIR}
|
||||
/usr/include
|
||||
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
)
|
||||
set(OpenEXR_generic_library_paths
|
||||
/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}
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
/opt/local/lib)
|
||||
|
||||
# Search paths for the OpenEXR files
|
||||
if(OPENEXR_HOME)
|
||||
set(OpenEXR_library_paths
|
||||
if (OPENEXR_HOME)
|
||||
set (OpenEXR_library_paths
|
||||
${OPENEXR_HOME}/lib
|
||||
${OPENEXR_HOME}/lib64)
|
||||
if(OPENEXR_VERSION)
|
||||
set(OpenEXR_include_paths
|
||||
if (OPENEXR_VERSION)
|
||||
set (OpenEXR_include_paths
|
||||
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include
|
||||
${OPENEXR_HOME}/include/openexr-${OPENEXR_VERSION})
|
||||
list(APPEND OpenEXR_library_paths
|
||||
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
|
||||
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})
|
||||
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
|
||||
PREFIX_FIND_INCLUDE_DIR (OpenEXR
|
||||
OpenEXR/ImfArray.h OpenEXR_include_paths)
|
||||
|
||||
if(OPENEXR_INCLUDE_DIR)
|
||||
if (OPENEXR_INCLUDE_DIR)
|
||||
# Get the version from config file, if not already set.
|
||||
if(NOT OPENEXR_VERSION)
|
||||
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)
|
||||
if (NOT OpenEXR_FIND_QUIETLY)
|
||||
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
|
||||
endif()
|
||||
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")
|
||||
@@ -180,56 +178,56 @@ if(OPENEXR_INCLUDE_DIR)
|
||||
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
|
||||
endif()
|
||||
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.")
|
||||
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()
|
||||
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()
|
||||
# set (OpenEXR_Library IlmImf-${_openexr_libs_ver})
|
||||
endif ()
|
||||
|
||||
# Locate the OpenEXR library
|
||||
set(OpenEXR_libvars "")
|
||||
set(OpenEXR_cachevars "")
|
||||
PREFIX_FIND_LIB(OpenEXR ${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
|
||||
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}
|
||||
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})
|
||||
set (OPENEXR_ZLIB ${ZLIB_LIBRARIES})
|
||||
|
||||
# Use the standard function to handle OPENEXR_FOUND
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
||||
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
|
||||
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()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Restore the original find library ordering
|
||||
if( OPENEXR_USE_STATIC_LIBS )
|
||||
@@ -237,10 +235,10 @@ if( OPENEXR_USE_STATIC_LIBS )
|
||||
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)
|
||||
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)
|
||||
|
@@ -32,6 +32,7 @@ SET(_tbb_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/tbb
|
||||
)
|
||||
|
||||
|
@@ -49,7 +49,7 @@ macro( select_library_configurations basename )
|
||||
# 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 (${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 )
|
||||
|
@@ -5,15 +5,15 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
|
||||
# Detect which libc we'll be linking against.
|
||||
# Some of the paths will depend on this
|
||||
|
||||
if(EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
|
||||
if (EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
|
||||
message(STATUS "Building in GLibc-2.19 environment")
|
||||
set(GLIBC "2.19")
|
||||
set(MULTILIB "/x86_64-linux-gnu")
|
||||
elseif(EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
|
||||
elseif (EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
|
||||
message(STATUS "Building in GLibc-2.19 environment")
|
||||
set(GLIBC "2.19")
|
||||
set(MULTILIB "/i386-linux-gnu")
|
||||
elseif(EXISTS "/lib/libc-2.11.3.so")
|
||||
elseif (EXISTS "/lib/libc-2.11.3.so")
|
||||
message(STATUS "Building in GLibc-2.11 environment")
|
||||
set(GLIBC "2.11")
|
||||
set(MULTILIB "")
|
||||
@@ -74,7 +74,7 @@ set(SNDFILE_LIBRARY "/usr/lib${MULTILIB}/libsndfile.a;/usr/lib${MULTILI
|
||||
|
||||
# OpenAL libraries
|
||||
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)
|
||||
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include/AL" CACHE STRING "" FORCE)
|
||||
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include" CACHE STRING "" FORCE)
|
||||
set(OPENAL_LIBRARY
|
||||
${OPENAL_ROOT_DIR}/lib/libopenal.a
|
||||
${OPENAL_ROOT_DIR}/lib/libcommon.a
|
||||
|
@@ -30,6 +30,7 @@ SET(_alembic_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/alembic
|
||||
)
|
||||
|
||||
|
@@ -20,6 +20,7 @@ SET(_audaspace_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
# Use pkg-config to get hints about paths
|
||||
|
@@ -28,6 +28,7 @@ SET(_eigen3_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(EIGEN3_INCLUDE_DIR
|
||||
|
@@ -32,6 +32,7 @@ SET(_fftw3_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(FFTW3_INCLUDE_DIR
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#
|
||||
# also defined,
|
||||
# GLEW_LIBRARY, where to find the Glew library.
|
||||
# GLEW_MX_LIBRARY, where to find the GlewMX library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
@@ -49,6 +50,16 @@ FIND_LIBRARY(GLEW_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
|
||||
FIND_LIBRARY(GLEW_MX_LIBRARY
|
||||
NAMES
|
||||
GLEWmx
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -62,6 +73,7 @@ ENDIF(GLEW_FOUND)
|
||||
MARK_AS_ADVANCED(
|
||||
GLEW_INCLUDE_DIR
|
||||
GLEW_LIBRARY
|
||||
GLEW_MX_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_glew_SEARCH_DIRS)
|
||||
|
@@ -445,6 +445,7 @@ if(NOT GFLAGS_FOUND)
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/sw/include # Fink
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/lib/gflags/include)
|
||||
|
||||
list(APPEND GFLAGS_CHECK_PATH_SUFFIXES
|
||||
@@ -458,6 +459,7 @@ if(NOT GFLAGS_FOUND)
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
/sw/lib # Fink
|
||||
/opt/csw/lib # Blastwave
|
||||
/opt/lib/gflags/lib)
|
||||
list(APPEND GFLAGS_CHECK_LIBRARY_SUFFIXES
|
||||
gflags/lib # Windows (for C:/Program Files prefix).
|
||||
|
@@ -129,6 +129,7 @@ list(APPEND GLOG_CHECK_INCLUDE_DIRS
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
/sw/include # Fink
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/lib/glog/include)
|
||||
# Windows (for C:/Program Files prefix).
|
||||
list(APPEND GLOG_CHECK_PATH_SUFFIXES
|
||||
@@ -144,6 +145,7 @@ list(APPEND GLOG_CHECK_LIBRARY_DIRS
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
/sw/lib # Fink
|
||||
/opt/csw/lib # Blastwave
|
||||
/opt/lib/gflags/lib)
|
||||
# Windows (for C:/Program Files prefix).
|
||||
list(APPEND GLOG_CHECK_LIBRARY_SUFFIXES
|
||||
|
@@ -29,6 +29,7 @@ SET(_hdf5_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/hdf5
|
||||
)
|
||||
|
||||
|
@@ -35,6 +35,7 @@ SET(_icu_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
# We don't need includes, only libs to link against...
|
||||
|
@@ -32,6 +32,7 @@ SET(_jack_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(JACK_INCLUDE_DIR
|
||||
|
@@ -32,6 +32,7 @@ SET(_jemalloc_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/jemalloc
|
||||
)
|
||||
|
||||
|
@@ -32,6 +32,7 @@ SET(_lzo_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h
|
||||
|
@@ -65,6 +65,7 @@ SET(_opencollada_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/opencollada
|
||||
)
|
||||
|
||||
|
@@ -38,6 +38,7 @@ SET(_opencolorio_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/ocio
|
||||
)
|
||||
|
||||
|
@@ -50,6 +50,7 @@ SET(_openexr_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/openexr
|
||||
)
|
||||
|
||||
|
@@ -34,6 +34,7 @@ SET(_openimageio_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/oiio
|
||||
)
|
||||
|
||||
@@ -75,8 +76,6 @@ IF(OPENIMAGEIO_FOUND)
|
||||
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
|
||||
ELSE()
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
|
||||
|
@@ -32,6 +32,7 @@ SET(_openjpeg_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(OPENJPEG_INCLUDE_DIR
|
||||
|
@@ -38,6 +38,7 @@ SET(_osl_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/osl
|
||||
)
|
||||
|
||||
|
@@ -37,6 +37,7 @@ SET(_opensubdiv_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/opensubdiv
|
||||
/opt/lib/osd # install_deps.sh
|
||||
)
|
||||
|
@@ -32,6 +32,7 @@ SET(_openvdb_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/openvdb
|
||||
/opt/lib/openvdb
|
||||
)
|
||||
|
@@ -32,6 +32,7 @@ SET(_pcre_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(PCRE_INCLUDE_DIR pcre.h
|
||||
|
@@ -32,6 +32,7 @@ SET(_pugixml_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/oiio
|
||||
)
|
||||
|
||||
|
@@ -34,6 +34,7 @@ SET(_sdl2_SEARCH_DIRS
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR
|
||||
@@ -42,7 +43,7 @@ FIND_PATH(SDL2_INCLUDE_DIR
|
||||
HINTS
|
||||
${_sdl2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/SDL2 include SDL2
|
||||
include/SDL2 include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY
|
||||
|
@@ -1,15 +1,15 @@
|
||||
# - Find SndFile library
|
||||
# Find the native SndFile includes and library
|
||||
# This module defines
|
||||
# LIBSNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
|
||||
# LIBSNDFILE_INCLUDE_DIR is found.
|
||||
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||
# SNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
|
||||
# SNDFILE_INCLUDE_DIR is found.
|
||||
# SNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||
# SNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||
# This can also be an environment variable.
|
||||
# LIBSNDFILE_FOUND, If false, do not try to use SndFile.
|
||||
# SNDFILE_FOUND, If false, do not try to use SndFile.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
|
||||
# SNDFILE_LIBRARY, where to find the SndFile library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
@@ -22,26 +22,27 @@
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If LIBSNDFILE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LIBSNDFILE_ROOT_DIR AND NOT $ENV{LIBSNDFILE_ROOT_DIR} STREQUAL "")
|
||||
SET(LIBSNDFILE_ROOT_DIR $ENV{LIBSNDFILE_ROOT_DIR})
|
||||
# If SNDFILE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "")
|
||||
SET(SNDFILE_ROOT_DIR $ENV{SNDFILE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_sndfile_SEARCH_DIRS
|
||||
${LIBSNDFILE_ROOT_DIR}
|
||||
${SNDFILE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h
|
||||
FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h
|
||||
HINTS
|
||||
${_sndfile_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
||||
FIND_LIBRARY(SNDFILE_LIBRARY
|
||||
NAMES
|
||||
sndfile
|
||||
HINTS
|
||||
@@ -50,18 +51,18 @@ FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBSNDFILE_FOUND to TRUE if
|
||||
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
||||
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
||||
SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
|
||||
|
||||
IF(LIBSNDFILE_FOUND)
|
||||
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
||||
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
||||
ENDIF(LIBSNDFILE_FOUND)
|
||||
IF(SNDFILE_FOUND)
|
||||
SET(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
|
||||
SET(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
|
||||
ENDIF(SNDFILE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LIBSNDFILE_INCLUDE_DIR
|
||||
LIBSNDFILE_LIBRARY
|
||||
SNDFILE_INCLUDE_DIR
|
||||
SNDFILE_LIBRARY
|
||||
)
|
||||
|
@@ -32,6 +32,7 @@ SET(_spacenav_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(SPACENAV_INCLUDE_DIR
|
||||
|
@@ -32,6 +32,7 @@ SET(_tbb_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/tbb
|
||||
)
|
||||
|
||||
|
@@ -32,6 +32,7 @@ SET(_xml2_SEARCH_DIRS
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(XML2_INCLUDE_DIR libxml2/libxml/xpath.h
|
||||
|
@@ -107,12 +107,12 @@ def main():
|
||||
return
|
||||
|
||||
# execute
|
||||
cmd = ["make"] + args + targets_new + ["blender/fast"]
|
||||
cmd = "make %s %s blender/fast" % (" ".join(args), " ".join(targets_new))
|
||||
print("cmake building with targets: %s" % " ".join(targets_new))
|
||||
print("executing: %s" % " ".join(cmd))
|
||||
print("executing: %s" % cmd)
|
||||
|
||||
import subprocess
|
||||
subprocess.call(cmd)
|
||||
import os
|
||||
os.system(cmd)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@@ -242,13 +242,6 @@ function(blender_add_lib__impl
|
||||
# listed is helpful for IDE's (QtCreator/MSVC)
|
||||
blender_source_group("${sources}")
|
||||
|
||||
#if enabled, set the FOLDER property for visual studio projects
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
||||
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
|
||||
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
|
||||
endif()
|
||||
|
||||
list_assert_duplicates("${sources}")
|
||||
list_assert_duplicates("${includes}")
|
||||
# Not for system includes because they can resolve to the same path
|
||||
@@ -289,66 +282,64 @@ function(SETUP_LIBDIRS)
|
||||
# NOTE: For all new libraries, use absolute library paths.
|
||||
# This should eventually be phased out.
|
||||
|
||||
if(NOT MSVC)
|
||||
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
|
||||
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
|
||||
|
||||
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
|
||||
link_directories(${PYTHON_LIBPATH})
|
||||
endif()
|
||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||
link_directories(${SDL_LIBPATH})
|
||||
endif()
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
link_directories(${FFMPEG_LIBPATH})
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
link_directories(${OPENEXR_LIBPATH})
|
||||
endif()
|
||||
if(WITH_IMAGE_TIFF)
|
||||
link_directories(${TIFF_LIBPATH})
|
||||
endif()
|
||||
if(WITH_BOOST)
|
||||
link_directories(${BOOST_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENIMAGEIO)
|
||||
link_directories(${OPENIMAGEIO_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENCOLORIO)
|
||||
link_directories(${OPENCOLORIO_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
link_directories(${OPENVDB_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENAL)
|
||||
link_directories(${OPENAL_LIBPATH})
|
||||
endif()
|
||||
if(WITH_JACK AND NOT WITH_JACK_DYNLOAD)
|
||||
link_directories(${JACK_LIBPATH})
|
||||
endif()
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
link_directories(${LIBSNDFILE_LIBPATH})
|
||||
endif()
|
||||
if(WITH_FFTW3)
|
||||
link_directories(${FFTW3_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENCOLLADA)
|
||||
link_directories(${OPENCOLLADA_LIBPATH})
|
||||
## Never set
|
||||
# link_directories(${PCRE_LIBPATH})
|
||||
# link_directories(${EXPAT_LIBPATH})
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
link_directories(${LLVM_LIBPATH})
|
||||
endif()
|
||||
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
|
||||
link_directories(${PYTHON_LIBPATH})
|
||||
endif()
|
||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||
link_directories(${SDL_LIBPATH})
|
||||
endif()
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
link_directories(${FFMPEG_LIBPATH})
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
link_directories(${OPENEXR_LIBPATH})
|
||||
endif()
|
||||
if(WITH_IMAGE_TIFF)
|
||||
link_directories(${TIFF_LIBPATH})
|
||||
endif()
|
||||
if(WITH_BOOST)
|
||||
link_directories(${BOOST_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENIMAGEIO)
|
||||
link_directories(${OPENIMAGEIO_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENCOLORIO)
|
||||
link_directories(${OPENCOLORIO_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
link_directories(${OPENVDB_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENAL)
|
||||
link_directories(${OPENAL_LIBPATH})
|
||||
endif()
|
||||
if(WITH_JACK AND NOT WITH_JACK_DYNLOAD)
|
||||
link_directories(${JACK_LIBPATH})
|
||||
endif()
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
link_directories(${SNDFILE_LIBPATH})
|
||||
endif()
|
||||
if(WITH_FFTW3)
|
||||
link_directories(${FFTW3_LIBPATH})
|
||||
endif()
|
||||
if(WITH_OPENCOLLADA)
|
||||
link_directories(${OPENCOLLADA_LIBPATH})
|
||||
## Never set
|
||||
# link_directories(${PCRE_LIBPATH})
|
||||
# link_directories(${EXPAT_LIBPATH})
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
link_directories(${LLVM_LIBPATH})
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
link_directories(${ALEMBIC_LIBPATH})
|
||||
link_directories(${HDF5_LIBPATH})
|
||||
endif()
|
||||
if(WITH_ALEMBIC)
|
||||
link_directories(${ALEMBIC_LIBPATH})
|
||||
link_directories(${HDF5_LIBPATH})
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT UNIX)
|
||||
link_directories(${PTHREADS_LIBPATH})
|
||||
endif()
|
||||
if(WIN32 AND NOT UNIX)
|
||||
link_directories(${PTHREADS_LIBPATH})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -407,7 +398,7 @@ function(setup_liblinks
|
||||
target_link_libraries(${target} ${JACK_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
target_link_libraries(${target} ${LIBSNDFILE_LIBRARIES})
|
||||
target_link_libraries(${target} ${SNDFILE_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||
target_link_libraries(${target} ${SDL_LIBRARY})
|
||||
@@ -555,12 +546,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
||||
list(APPEND BLENDER_LINK_LIBS
|
||||
audaspace
|
||||
audaspace-py)
|
||||
endif()
|
||||
|
||||
# Sort libraries
|
||||
set(BLENDER_SORTED_LIBS
|
||||
bf_windowmanager
|
||||
@@ -591,14 +576,12 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_editor_curve
|
||||
bf_editor_gpencil
|
||||
bf_editor_interface
|
||||
bf_editor_manipulator_library
|
||||
bf_editor_mesh
|
||||
bf_editor_metaball
|
||||
bf_editor_object
|
||||
bf_editor_armature
|
||||
bf_editor_physics
|
||||
bf_editor_render
|
||||
bf_editor_scene
|
||||
bf_editor_screen
|
||||
bf_editor_sculpt_paint
|
||||
bf_editor_sound
|
||||
@@ -611,7 +594,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_python
|
||||
bf_python_ext
|
||||
bf_python_mathutils
|
||||
bf_python_gawain
|
||||
bf_python_bmesh
|
||||
bf_freestyle
|
||||
bf_ikplugin
|
||||
@@ -619,14 +601,11 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_alembic
|
||||
bf_bmesh
|
||||
bf_gpu
|
||||
bf_draw
|
||||
bf_blenloader
|
||||
bf_blenkernel
|
||||
bf_physics
|
||||
bf_nodes
|
||||
bf_rna
|
||||
bf_editor_manipulator_library # rna -> manipulator bad-level calls
|
||||
bf_python
|
||||
bf_imbuf
|
||||
bf_blenlib
|
||||
bf_depsgraph
|
||||
@@ -667,8 +646,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_blenfont
|
||||
bf_blentranslation
|
||||
bf_intern_audaspace
|
||||
audaspace
|
||||
audaspace-py
|
||||
bf_intern_mikktspace
|
||||
bf_intern_dualcon
|
||||
bf_intern_cycles
|
||||
@@ -680,7 +657,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
||||
cycles_util
|
||||
cycles_subd
|
||||
bf_intern_opencolorio
|
||||
bf_intern_gawain
|
||||
bf_intern_eigen
|
||||
extern_rangetree
|
||||
extern_wcwidth
|
||||
@@ -1394,7 +1370,7 @@ endfunction()
|
||||
|
||||
# macro for converting pixmap directory to a png and then a c file
|
||||
function(data_to_c_simple_icons
|
||||
path_from icon_prefix icon_names
|
||||
path_from
|
||||
list_to_add
|
||||
)
|
||||
|
||||
@@ -1412,11 +1388,8 @@ function(data_to_c_simple_icons
|
||||
|
||||
get_filename_component(_file_to_path ${_file_to} PATH)
|
||||
|
||||
# Construct a list of absolute paths from input
|
||||
set(_icon_files)
|
||||
foreach(_var ${icon_names})
|
||||
list(APPEND _icon_files "${_path_from_abs}/${icon_prefix}${_var}.dat")
|
||||
endforeach()
|
||||
# ideally we wouldn't glob, but storing all names for all pixmaps is a bit heavy
|
||||
file(GLOB _icon_files "${path_from}/*.dat")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${_file_from} ${_file_to}
|
||||
@@ -1523,13 +1496,11 @@ function(find_python_package
|
||||
NAMES
|
||||
${package}
|
||||
HINTS
|
||||
"${PYTHON_LIBPATH}/"
|
||||
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
|
||||
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
|
||||
PATH_SUFFIXES
|
||||
site-packages
|
||||
dist-packages
|
||||
vendor-packages
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
@@ -1540,8 +1511,6 @@ function(find_python_package
|
||||
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/vendor-packages/${package}', "
|
||||
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/vendor-packages/${package}', "
|
||||
"\n"
|
||||
"The 'WITH_PYTHON_INSTALL_${_upper_package}' option will be ignored when installing Python.\n"
|
||||
"The build will be usable, only add-ons that depend on this package won't be functional."
|
||||
@@ -1575,11 +1544,11 @@ macro(openmp_delayload
|
||||
SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_DEBUG "/DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
|
||||
SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||
SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_MINSIZEREL "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||
endif()
|
||||
endif()
|
||||
endif(WITH_OPENMP)
|
||||
endif(MSVC)
|
||||
endmacro()
|
||||
|
||||
macro(WINDOWS_SIGN_TARGET target)
|
||||
MACRO(WINDOWS_SIGN_TARGET target)
|
||||
if(WITH_WINDOWS_CODESIGN)
|
||||
if(!SIGNTOOL_EXE)
|
||||
error("Codesigning is enabled, but signtool is not found")
|
||||
@@ -1600,4 +1569,4 @@ macro(WINDOWS_SIGN_TARGET target)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
ENDMACRO()
|
||||
|
@@ -25,7 +25,7 @@ set(MY_WC_HASH "unknown")
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
# message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
|
@@ -23,8 +23,6 @@
|
||||
|
||||
# Libraries configuration for Apple.
|
||||
|
||||
set(MACOSX_DEPLOYMENT_TARGET "10.9")
|
||||
|
||||
macro(find_package_wrapper)
|
||||
# do nothing, just satisfy the macro
|
||||
endmacro()
|
||||
@@ -42,7 +40,7 @@ if(WITH_OPENAL)
|
||||
find_package(OpenAL)
|
||||
if(OPENAL_FOUND)
|
||||
set(WITH_OPENAL ON)
|
||||
set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include/AL")
|
||||
set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include")
|
||||
else()
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
@@ -78,10 +76,10 @@ if(WITH_JACK)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(LIBSNDFILE ${LIBDIR}/sndfile)
|
||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
|
||||
set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
@@ -163,7 +161,7 @@ if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG OR WITH_CODEC_FFMPEG)
|
||||
if(WITH_OPENJPEG OR WITH_CODEC_FFMPEG)
|
||||
# use openjpeg from libdir that is linked into ffmpeg
|
||||
set(OPENJPEG ${LIBDIR}/openjpeg)
|
||||
set(WITH_SYSTEM_OPENJPEG ON)
|
||||
@@ -293,7 +291,6 @@ if(WITH_OPENIMAGEIO)
|
||||
${JPEG_LIBRARIES}
|
||||
${TIFF_LIBRARY}
|
||||
${OPENEXR_LIBRARIES}
|
||||
${OPENJPEG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${LIBDIR}/ffmpeg/lib/libwebp.a)
|
||||
@@ -390,6 +387,22 @@ if(WITH_OPENMP)
|
||||
set(WITH_OPENMP OFF)
|
||||
else() # vanilla gcc or clang_omp support OpenMP
|
||||
message(STATUS "Using special OpenMP enabled compiler !") # letting find_package(OpenMP) module work for gcc
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang") # clang-omp in darwin libs
|
||||
set(OPENMP_FOUND ON)
|
||||
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C compiler flags for OpenMP parallization" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE)
|
||||
include_directories(${LIBDIR}/openmp/include)
|
||||
link_directories(${LIBDIR}/openmp/lib)
|
||||
# This is a workaround for our helperbinaries ( datatoc, masgfmt, ... ),
|
||||
# They are linked also to omp lib, so we need it in builddir for runtime exexcution,
|
||||
# TODO: remove all unneeded dependencies from these
|
||||
|
||||
# for intermediate binaries, in respect to lib ID
|
||||
execute_process(
|
||||
COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES}
|
||||
${LIBDIR}/openmp/lib/libiomp5.dylib
|
||||
${CMAKE_BINARY_DIR}/Resources/lib/libiomp5.dylib)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -23,19 +23,6 @@
|
||||
|
||||
# Libraries configuration for any *nix system including Linux and Unix.
|
||||
|
||||
# Detect precompiled library directory
|
||||
set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
|
||||
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
||||
|
||||
if(EXISTS ${LIBDIR})
|
||||
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
|
||||
set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
|
||||
set(WITH_STATIC_LIBS ON)
|
||||
set(WITH_OPENMP_STATIC ON)
|
||||
endif()
|
||||
|
||||
# Wrapper to prefer static libraries
|
||||
macro(find_package_wrapper)
|
||||
if(WITH_STATIC_LIBS)
|
||||
find_package_static(${ARGV})
|
||||
@@ -148,21 +135,14 @@ endif()
|
||||
# Codecs
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
find_package_wrapper(SndFile)
|
||||
if(NOT LIBSNDFILE_FOUND)
|
||||
if(NOT SNDFILE_FOUND)
|
||||
set(WITH_CODEC_SNDFILE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
if(EXISTS ${LIBDIR})
|
||||
# For precompiled lib directory, all ffmpeg dependencies are in the same folder
|
||||
file(GLOB ffmpeg_libs ${LIBDIR}/ffmpeg/lib/*.a ${LIBDIR}/sndfile/lib/*.a)
|
||||
set(FFMPEG ${LIBDIR}/ffmpeg CACHE PATH "FFMPEG Directory")
|
||||
set(FFMPEG_LIBRARIES ${ffmpeg_libs} ${ffmpeg_libs} CACHE STRING "FFMPEG Libraries")
|
||||
else()
|
||||
set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
|
||||
set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
|
||||
endif()
|
||||
set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
|
||||
set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
|
||||
|
||||
mark_as_advanced(FFMPEG)
|
||||
|
||||
@@ -349,14 +329,6 @@ if(WITH_OPENCOLORIO)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
# Symbol conflicts with same UTF library used by OpenCollada
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(LLVM_STATIC ON)
|
||||
if(WITH_OPENCOLLADA)
|
||||
list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package_wrapper(LLVM)
|
||||
|
||||
if(NOT LLVM_FOUND)
|
||||
@@ -386,11 +358,7 @@ if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
endif()
|
||||
|
||||
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
|
||||
if(HAIKU)
|
||||
list(APPEND PLATFORM_LINKLIBS -lnetwork)
|
||||
else()
|
||||
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
|
||||
endif()
|
||||
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
@@ -25,528 +25,31 @@
|
||||
|
||||
add_definitions(-DWIN32)
|
||||
|
||||
if(NOT MSVC)
|
||||
if(MSVC)
|
||||
include(platform_win32_msvc)
|
||||
else()
|
||||
message(FATAL_ERROR "Compiler is unsupported")
|
||||
endif()
|
||||
|
||||
# Libraries configuration for Windows when compiling with MSVC.
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_FOLDERS})
|
||||
|
||||
if(NOT WITH_PYTHON_MODULE)
|
||||
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT blender)
|
||||
endif()
|
||||
|
||||
macro(warn_hardcoded_paths package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
message(WARNING "Using HARDCODED ${package_name} locations")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(windows_find_package package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(${package_name})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(find_package_wrapper)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(${ARGV})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
add_definitions(-DWIN32)
|
||||
|
||||
# Needed, otherwise system encoding causes utf-8 encoding to fail in some cases (C4819)
|
||||
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
||||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
||||
|
||||
# Minimum MSVC Version
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(_min_ver "18.0.31101")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2013 (Update 4, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
if(MSVC_VERSION EQUAL 1900)
|
||||
set(_min_ver "19.0.24210")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2015 (Update 3, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
unset(_min_ver)
|
||||
|
||||
# needed for some MSVC installations
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32
|
||||
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
list(APPEND PLATFORM_LINKLIBS imm32)
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_SCL_SECURE_NO_DEPRECATE
|
||||
-D_CONSOLE
|
||||
-D_LIB
|
||||
)
|
||||
|
||||
# MSVC11 needs _ALLOW_KEYWORD_MACROS to build
|
||||
add_definitions(-D_ALLOW_KEYWORD_MACROS)
|
||||
|
||||
# We want to support Vista level ABI
|
||||
add_definitions(-D_WIN32_WINNT=0x600)
|
||||
|
||||
# Make cmake find the msvc redistributables
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP FALSE)
|
||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
|
||||
|
||||
set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib ")
|
||||
|
||||
# Ignore meaningless for us linker warnings.
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
|
||||
|
||||
if(CMAKE_CL_64)
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:X64 ${PLATFORM_LINKFLAGS}")
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
|
||||
endif()
|
||||
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
|
||||
# Setup 64bit and 64bit windows systems
|
||||
if(CMAKE_CL_64)
|
||||
message(STATUS "64 bit compiler detected.")
|
||||
set(LIBDIR_BASE "win64")
|
||||
else()
|
||||
message(STATUS "32 bit compiler detected.")
|
||||
set(LIBDIR_BASE "windows")
|
||||
endif()
|
||||
# Can be 1910..1912
|
||||
if(MSVC_VERSION GREATER 1909)
|
||||
message(STATUS "Visual Studio 2017 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
elseif(MSVC_VERSION EQUAL 1900)
|
||||
message(STATUS "Visual Studio 2015 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
else()
|
||||
message(STATUS "Visual Studio 2013 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc12)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
# Add each of our libraries to our cmake_prefix_path so find_package() could work
|
||||
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${LIBDIR}/${child})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${LIBDIR}/${child})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARY ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_DIR ${LIBDIR}/zlib)
|
||||
|
||||
windows_find_package(zlib) # we want to find before finding things that depend on it like png
|
||||
windows_find_package(png)
|
||||
|
||||
if(NOT PNG_FOUND)
|
||||
warn_hardcoded_paths(libpng)
|
||||
set(PNG_PNG_INCLUDE_DIR ${LIBDIR}/png/include)
|
||||
set(PNG_LIBRARIES ${LIBDIR}/png/lib/libpng.lib)
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
|
||||
endif()
|
||||
|
||||
set(JPEG_NAMES ${JPEG_NAMES} libjpeg)
|
||||
windows_find_package(jpeg REQUIRED)
|
||||
if(NOT JPEG_FOUND)
|
||||
warn_hardcoded_paths(jpeg)
|
||||
set(JPEG_INCLUDE_DIR ${LIBDIR}/jpeg/include)
|
||||
set(JPEG_LIBRARIES ${LIBDIR}/jpeg/lib/libjpeg.lib)
|
||||
endif()
|
||||
|
||||
set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
|
||||
set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${LIBDIR}/freetype/include
|
||||
${LIBDIR}/freetype/include/freetype2
|
||||
)
|
||||
set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
|
||||
windows_find_package(freetype REQUIRED)
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_LIBRARIES ${FFTW3}/lib/libfftw.lib)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAStreamWriter
|
||||
${OPENCOLLADA}/include/opencollada/COLLADABaseUtils
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAFramework
|
||||
${OPENCOLLADA}/include/opencollada/COLLADASaxFrameworkLoader
|
||||
${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
|
||||
)
|
||||
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAFramework.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADABaseUtils.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAStreamWriter.lib
|
||||
${OPENCOLLADA}/lib/opencollada/MathMLSolver.lib
|
||||
${OPENCOLLADA}/lib/opencollada/GeneratedSaxParser.lib
|
||||
${OPENCOLLADA}/lib/opencollada/xml.lib
|
||||
${OPENCOLLADA}/lib/opencollada/buffer.lib
|
||||
${OPENCOLLADA}/lib/opencollada/ftoa.lib
|
||||
)
|
||||
|
||||
if(NOT WITH_LLVM)
|
||||
list(APPEND OPENCOLLADA_LIBRARIES ${OPENCOLLADA}/lib/opencollada/UTF.lib)
|
||||
endif()
|
||||
|
||||
set(PCRE_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/pcre.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_INCLUDE_DIRS
|
||||
${LIBDIR}/ffmpeg/include
|
||||
${LIBDIR}/ffmpeg/include/msvc
|
||||
)
|
||||
windows_find_package(FFMPEG)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
warn_hardcoded_paths(ffmpeg)
|
||||
set(FFMPEG_LIBRARY_VERSION 57)
|
||||
set(FFMPEG_LIBRARY_VERSION_AVU 55)
|
||||
set(FFMPEG_LIBRARIES
|
||||
${LIBDIR}/ffmpeg/lib/avcodec.lib
|
||||
${LIBDIR}/ffmpeg/lib/avformat.lib
|
||||
${LIBDIR}/ffmpeg/lib/avdevice.lib
|
||||
${LIBDIR}/ffmpeg/lib/avutil.lib
|
||||
${LIBDIR}/ffmpeg/lib/swscale.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_VERSION "2.1")
|
||||
windows_find_package(OPENEXR REQUIRED)
|
||||
if(NOT OPENEXR_FOUND)
|
||||
warn_hardcoded_paths(OpenEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
set(OPENEXR_LIBRARIES
|
||||
optimized ${OPENEXR_LIBPATH}/Iex-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Half.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmImf-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Imath-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmThread-2_2.lib
|
||||
debug ${OPENEXR_LIBPATH}/Iex-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Half_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmImf-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Imath-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmThread-2_2_d.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
# Try to find tiff first then complain and set static and maybe wrong paths
|
||||
windows_find_package(TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
warn_hardcoded_paths(libtiff)
|
||||
set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
|
||||
set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(JACK_INCLUDE_DIRS
|
||||
${LIBDIR}/jack/include/jack
|
||||
${LIBDIR}/jack/include
|
||||
)
|
||||
set(JACK_LIBRARIES optimized ${LIBDIR}/jack/lib/libjack.lib debug ${LIBDIR}/jack/lib/libjack_d.lib)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
set(PYTHON_VERSION 3.6) # CACHE STRING)
|
||||
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# Shared includes for both vc2008 and vc2010
|
||||
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/include/python${PYTHON_VERSION})
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(boost_extra_libs wave)
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND boost_extra_libs locale)
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND boost_extra_libs iostreams)
|
||||
endif()
|
||||
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
|
||||
set(Boost_USE_MULTITHREADED ON) # suffix -mt
|
||||
set(Boost_USE_STATIC_LIBS ON) # suffix -s
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(Boost COMPONENTS date_time filesystem thread regex system ${boost_extra_libs})
|
||||
endif()
|
||||
if(NOT Boost_FOUND)
|
||||
warn_hardcoded_paths(BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(MSVC12)
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc120-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc120-mt-sgd-1_60.lib")
|
||||
else()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc140-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc140-mt-sgd-1_60.lib")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized ${BOOST_LIBPATH}/libboost_date_time-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_filesystem-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_regex-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_system-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_thread-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_chrono-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_date_time-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_regex-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_system-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_thread-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_chrono-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized ${BOOST_LIBPATH}/libboost_wave-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized ${BOOST_LIBPATH}/libboost_locale-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_locale-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
else() # we found boost using find_package
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
|
||||
endif()
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
windows_find_package(OpenImageIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OIIO_OPTIMIZED optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO.lib optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util.lib)
|
||||
set(OIIO_DEBUG debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_d.lib debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util_d.lib)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
||||
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
|
||||
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||
add_definitions(-DOIIO_STATIC_BUILD)
|
||||
add_definitions(-DOIIO_NO_SSE=1)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_ROOT_DIR}/lib/*.lib)
|
||||
|
||||
if(EXISTS ${LLVM_ROOT_DIR}/debug/lib)
|
||||
foreach(LLVM_OPTIMIZED_LIB ${LLVM_LIBRARY_OPTIMIZED})
|
||||
get_filename_component(LIBNAME ${LLVM_OPTIMIZED_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS optimized ${LIBNAME})
|
||||
endforeach(LLVM_OPTIMIZED_LIB)
|
||||
|
||||
file(GLOB LLVM_LIBRARY_DEBUG ${LLVM_ROOT_DIR}/debug/lib/*.lib)
|
||||
|
||||
foreach(LLVM_DEBUG_LIB ${LLVM_LIBRARY_DEBUG})
|
||||
get_filename_component(LIBNAME ${LLVM_DEBUG_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS debug ${LIBNAME})
|
||||
endforeach(LLVM_DEBUG_LIB)
|
||||
|
||||
set(LLVM_LIBRARY ${LLVM_LIBS})
|
||||
else()
|
||||
message(WARNING "LLVM debug libs not present on this system. Using release libs for debug builds.")
|
||||
set(LLVM_LIBRARY ${LLVM_LIBRARY_OPTIMIZED})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBPATH ${LIBDIR}/opencolorio/lib)
|
||||
set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBPATH}/OpenColorIO.lib)
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(BLOSC_LIBRARIES optimized ${LIBDIR}/blosc/lib/libblosc.lib debug ${LIBDIR}/blosc/lib/libblosc_d.lib)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include ${TBB_INCLUDE_DIR})
|
||||
set(OPENVDB_LIBRARIES optimized ${OPENVDB_LIBPATH}/openvdb.lib debug ${OPENVDB_LIBPATH}/openvdb_d.lib ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES optimized ${ALEMBIC}/lib/alembic.lib debug ${ALEMBIC}/lib/alembic_d.lib)
|
||||
set(ALEMBIC_FOUND 1)
|
||||
endif()
|
||||
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
set(LAPACK ${LIBDIR}/lapack)
|
||||
# set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
|
||||
set(LAPACK_LIBPATH ${LAPACK}/lib)
|
||||
set(LAPACK_LIBRARIES
|
||||
${LIBDIR}/lapack/lib/libf2c.lib
|
||||
${LIBDIR}/lapack/lib/clapack_nowrap.lib
|
||||
${LIBDIR}/lapack/lib/BLAS_nowrap.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
set(OPENSUBDIV_INCLUDE_DIR ${LIBDIR}/opensubdiv/include)
|
||||
set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib)
|
||||
set(OPENSUBDIV_LIBRARIES
|
||||
optimized ${OPENSUBDIV_LIBPATH}/osdCPU.lib
|
||||
optimized ${OPENSUBDIV_LIBPATH}/osdGPU.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdCPU_d.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdGPU_d.lib
|
||||
)
|
||||
set(OPENSUBDIV_HAS_OPENMP TRUE)
|
||||
set(OPENSUBDIV_HAS_TBB FALSE)
|
||||
set(OPENSUBDIV_HAS_OPENCL TRUE)
|
||||
set(OPENSUBDIV_HAS_CUDA FALSE)
|
||||
set(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK TRUE)
|
||||
set(OPENSUBDIV_HAS_GLSL_COMPUTE TRUE)
|
||||
windows_find_package(OpenSubdiv)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
set(SDL_LIBRARY ${SDL_LIBPATH}/SDL2.lib)
|
||||
endif()
|
||||
|
||||
# Audio IO
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace.lib)
|
||||
set(AUDASPACE_C_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_C_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-c.lib)
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
|
||||
endif()
|
||||
|
||||
# used in many places so include globally, like OpenGL
|
||||
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
|
||||
|
||||
#find signtool
|
||||
set(ProgramFilesX86_NAME "ProgramFiles(x86)") #env dislikes the ( )
|
||||
find_program(SIGNTOOL_EXE signtool
|
||||
HINTS
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.0/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86/"
|
||||
)
|
||||
set(WINTAB_INC ${LIBDIR}/wintab/include)
|
||||
|
||||
if(WITH_OPENAL)
|
||||
set(OPENAL ${LIBDIR}/openal)
|
||||
set(OPENALDIR ${LIBDIR}/openal)
|
||||
set(OPENAL_INCLUDE_DIR ${OPENAL}/include/AL)
|
||||
set(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||
set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
|
||||
if(MSVC)
|
||||
set(OPENAL_LIBRARY ${OPENAL_LIBPATH}/openal32.lib)
|
||||
set(OPENAL_LIBRARY openal32)
|
||||
else()
|
||||
set(OPENAL_LIBRARY ${OPENAL_LIBPATH}/wrap_oal.lib)
|
||||
set(OPENAL_LIBRARY wrap_oal)
|
||||
endif()
|
||||
|
||||
set(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(LIBSNDFILE ${LIBDIR}/sndfile)
|
||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
|
||||
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib) # TODO, deprecate
|
||||
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/libsndfile-1.lib)
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBRARIES libsndfile-1)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
|
||||
endif()
|
||||
|
||||
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
|
||||
|
505
build_files/cmake/platform/platform_win32_msvc.cmake
Normal file
505
build_files/cmake/platform/platform_win32_msvc.cmake
Normal file
@@ -0,0 +1,505 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows when compiling with MSVC.
|
||||
|
||||
macro(warn_hardcoded_paths package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
message(WARNING "Using HARDCODED ${package_name} locations")
|
||||
endif(WITH_WINDOWS_FIND_MODULES)
|
||||
endmacro()
|
||||
|
||||
macro(windows_find_package package_name
|
||||
)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(${package_name})
|
||||
endif(WITH_WINDOWS_FIND_MODULES)
|
||||
endmacro()
|
||||
|
||||
macro(find_package_wrapper)
|
||||
if(WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(${ARGV})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
add_definitions(-DWIN32)
|
||||
# Minimum MSVC Version
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(_min_ver "18.0.31101")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2013 (Update 4, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
if(MSVC_VERSION EQUAL 1900)
|
||||
set(_min_ver "19.0.24210")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
|
||||
message(FATAL_ERROR
|
||||
"Visual Studio 2015 (Update 3, ${_min_ver}) required, "
|
||||
"found (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
unset(_min_ver)
|
||||
|
||||
# needed for some MSVC installations
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32
|
||||
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
list(APPEND PLATFORM_LINKLIBS imm32)
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_SCL_SECURE_NO_DEPRECATE
|
||||
-D_CONSOLE
|
||||
-D_LIB
|
||||
)
|
||||
|
||||
# MSVC11 needs _ALLOW_KEYWORD_MACROS to build
|
||||
add_definitions(-D_ALLOW_KEYWORD_MACROS)
|
||||
|
||||
# We want to support Vista level ABI
|
||||
add_definitions(-D_WIN32_WINNT=0x600)
|
||||
|
||||
# Make cmake find the msvc redistributables
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
|
||||
|
||||
set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib ")
|
||||
|
||||
# Ignore meaningless for us linker warnings.
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
|
||||
|
||||
if(CMAKE_CL_64)
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:X64 ${PLATFORM_LINKFLAGS}")
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
|
||||
endif()
|
||||
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
|
||||
# Setup 64bit and 64bit windows systems
|
||||
if(CMAKE_CL_64)
|
||||
message(STATUS "64 bit compiler detected.")
|
||||
set(LIBDIR_BASE "win64")
|
||||
else()
|
||||
message(STATUS "32 bit compiler detected.")
|
||||
set(LIBDIR_BASE "windows")
|
||||
endif()
|
||||
if(MSVC_VERSION EQUAL 1911)
|
||||
message(STATUS "Visual Studio 2017 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
elseif(MSVC_VERSION EQUAL 1910)
|
||||
message(STATUS "Visual Studio 2017 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
elseif(MSVC_VERSION EQUAL 1900)
|
||||
message(STATUS "Visual Studio 2015 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||
else()
|
||||
message(STATUS "Visual Studio 2013 detected.")
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc12)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
endif()
|
||||
if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
# Add each of our libraries to our cmake_prefix_path so find_package() could work
|
||||
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${LIBDIR}/${child})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${LIBDIR}/${child})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
|
||||
set(ZLIB_LIBRARY ${LIBDIR}/zlib/lib/libz_st.lib)
|
||||
set(ZLIB_DIR ${LIBDIR}/zlib)
|
||||
|
||||
windows_find_package(zlib) # we want to find before finding things that depend on it like png
|
||||
windows_find_package(png)
|
||||
|
||||
if(NOT PNG_FOUND)
|
||||
warn_hardcoded_paths(libpng)
|
||||
set(PNG_PNG_INCLUDE_DIR ${LIBDIR}/png/include)
|
||||
set(PNG_LIBRARIES libpng)
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
|
||||
endif()
|
||||
|
||||
set(JPEG_NAMES ${JPEG_NAMES} libjpeg)
|
||||
windows_find_package(jpeg REQUIRED)
|
||||
if(NOT JPEG_FOUND)
|
||||
warn_hardcoded_paths(jpeg)
|
||||
set(JPEG_INCLUDE_DIR ${LIBDIR}/jpeg/include)
|
||||
set(JPEG_LIBRARIES ${LIBDIR}/jpeg/lib/libjpeg.lib)
|
||||
endif()
|
||||
|
||||
set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
|
||||
set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${LIBDIR}/freetype/include
|
||||
${LIBDIR}/freetype/include/freetype2
|
||||
)
|
||||
set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
|
||||
windows_find_package(freetype REQUIRED)
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_LIBRARIES libfftw)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAStreamWriter
|
||||
${OPENCOLLADA}/include/opencollada/COLLADABaseUtils
|
||||
${OPENCOLLADA}/include/opencollada/COLLADAFramework
|
||||
${OPENCOLLADA}/include/opencollada/COLLADASaxFrameworkLoader
|
||||
${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
|
||||
)
|
||||
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAFramework.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADABaseUtils.lib
|
||||
${OPENCOLLADA}/lib/opencollada/OpenCOLLADAStreamWriter.lib
|
||||
${OPENCOLLADA}/lib/opencollada/MathMLSolver.lib
|
||||
${OPENCOLLADA}/lib/opencollada/GeneratedSaxParser.lib
|
||||
${OPENCOLLADA}/lib/opencollada/xml.lib
|
||||
${OPENCOLLADA}/lib/opencollada/buffer.lib
|
||||
${OPENCOLLADA}/lib/opencollada/ftoa.lib
|
||||
)
|
||||
|
||||
if(NOT WITH_LLVM)
|
||||
list(APPEND OPENCOLLADA_LIBRARIES ${OPENCOLLADA}/lib/opencollada/UTF.lib)
|
||||
endif()
|
||||
|
||||
set(PCRE_LIBRARIES
|
||||
${OPENCOLLADA}/lib/opencollada/pcre.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_INCLUDE_DIRS
|
||||
${LIBDIR}/ffmpeg/include
|
||||
${LIBDIR}/ffmpeg/include/msvc
|
||||
)
|
||||
windows_find_package(FFMPEG)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
warn_hardcoded_paths(ffmpeg)
|
||||
set(FFMPEG_LIBRARY_VERSION 57)
|
||||
set(FFMPEG_LIBRARY_VERSION_AVU 55)
|
||||
set(FFMPEG_LIBRARIES
|
||||
${LIBDIR}/ffmpeg/lib/avcodec.lib
|
||||
${LIBDIR}/ffmpeg/lib/avformat.lib
|
||||
${LIBDIR}/ffmpeg/lib/avdevice.lib
|
||||
${LIBDIR}/ffmpeg/lib/avutil.lib
|
||||
${LIBDIR}/ffmpeg/lib/swscale.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_VERSION "2.1")
|
||||
windows_find_package(OPENEXR REQUIRED)
|
||||
if(NOT OPENEXR_FOUND)
|
||||
warn_hardcoded_paths(OpenEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
set(OPENEXR_LIBRARIES
|
||||
optimized ${OPENEXR_LIBPATH}/Iex-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Half.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmImf-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Imath-2_2.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmThread-2_2.lib
|
||||
debug ${OPENEXR_LIBPATH}/Iex-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Half_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmImf-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Imath-2_2_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmThread-2_2_d.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
# Try to find tiff first then complain and set static and maybe wrong paths
|
||||
windows_find_package(TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
warn_hardcoded_paths(libtiff)
|
||||
set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
|
||||
set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
set(JACK_INCLUDE_DIRS
|
||||
${LIBDIR}/jack/include/jack
|
||||
${LIBDIR}/jack/include
|
||||
)
|
||||
set(JACK_LIBRARIES optimized ${LIBDIR}/jack/lib/libjack.lib debug ${LIBDIR}/jack/lib/libjack_d.lib)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
set(PYTHON_VERSION 3.6) # CACHE STRING)
|
||||
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# Shared includes for both vc2008 and vc2010
|
||||
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/include/python${PYTHON_VERSION})
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(boost_extra_libs wave)
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND boost_extra_libs locale)
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND boost_extra_libs iostreams)
|
||||
endif()
|
||||
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
|
||||
set(Boost_USE_MULTITHREADED ON) # suffix -mt
|
||||
set(Boost_USE_STATIC_LIBS ON) # suffix -s
|
||||
if (WITH_WINDOWS_FIND_MODULES)
|
||||
find_package(Boost COMPONENTS date_time filesystem thread regex system ${boost_extra_libs})
|
||||
endif (WITH_WINDOWS_FIND_MODULES)
|
||||
if(NOT Boost_FOUND)
|
||||
warn_hardcoded_paths(BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(MSVC12)
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc120-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc120-mt-sgd-1_60.lib")
|
||||
else()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc140-mt-s-1_60.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc140-mt-sgd-1_60.lib")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized libboost_date_time-${BOOST_POSTFIX}
|
||||
optimized libboost_filesystem-${BOOST_POSTFIX}
|
||||
optimized libboost_regex-${BOOST_POSTFIX}
|
||||
optimized libboost_system-${BOOST_POSTFIX}
|
||||
optimized libboost_thread-${BOOST_POSTFIX}
|
||||
debug libboost_date_time-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_regex-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_system-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_thread-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
if(WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized libboost_wave-${BOOST_POSTFIX}
|
||||
debug libboost_wave-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized libboost_locale-${BOOST_POSTFIX}
|
||||
debug libboost_locale-${BOOST_DEBUG_POSTFIX})
|
||||
endif()
|
||||
else() # we found boost using find_package
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
|
||||
endif()
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
windows_find_package(OpenImageIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OIIO_OPTIMIZED optimized OpenImageIO optimized OpenImageIO_Util)
|
||||
set(OIIO_DEBUG debug OpenImageIO_d debug OpenImageIO_Util_d)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
|
||||
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||
add_definitions(-DOIIO_STATIC_BUILD)
|
||||
add_definitions(-DOIIO_NO_SSE=1)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_ROOT_DIR}/lib/*.lib)
|
||||
|
||||
if(EXISTS ${LLVM_ROOT_DIR}/debug/lib)
|
||||
foreach(LLVM_OPTIMIZED_LIB ${LLVM_LIBRARY_OPTIMIZED})
|
||||
get_filename_component(LIBNAME ${LLVM_OPTIMIZED_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS optimized ${LIBNAME})
|
||||
endforeach(LLVM_OPTIMIZED_LIB)
|
||||
|
||||
file(GLOB LLVM_LIBRARY_DEBUG ${LLVM_ROOT_DIR}/debug/lib/*.lib)
|
||||
|
||||
foreach(LLVM_DEBUG_LIB ${LLVM_LIBRARY_DEBUG})
|
||||
get_filename_component(LIBNAME ${LLVM_DEBUG_LIB} ABSOLUTE)
|
||||
list(APPEND LLVM_LIBS debug ${LIBNAME})
|
||||
endforeach(LLVM_DEBUG_LIB)
|
||||
|
||||
set(LLVM_LIBRARY ${LLVM_LIBS})
|
||||
else()
|
||||
message(WARNING "LLVM debug libs not present on this system. Using release libs for debug builds.")
|
||||
set(LLVM_LIBRARY ${LLVM_LIBRARY_OPTIMIZED})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO)
|
||||
set(OPENCOLORIO_LIBPATH ${LIBDIR}/opencolorio/lib)
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(BLOSC_LIBRARIES optimized ${LIBDIR}/blosc/lib/libblosc.lib debug ${LIBDIR}/blosc/lib/libblosc_d.lib)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include ${TBB_INCLUDE_DIR})
|
||||
set(OPENVDB_LIBRARIES optimized openvdb debug openvdb_d ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES optimized alembic debug alembic_d)
|
||||
set(ALEMBIC_FOUND 1)
|
||||
endif()
|
||||
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
set(LAPACK ${LIBDIR}/lapack)
|
||||
# set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
|
||||
set(LAPACK_LIBPATH ${LAPACK}/lib)
|
||||
set(LAPACK_LIBRARIES
|
||||
${LIBDIR}/lapack/lib/libf2c.lib
|
||||
${LIBDIR}/lapack/lib/clapack_nowrap.lib
|
||||
${LIBDIR}/lapack/lib/BLAS_nowrap.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
|
||||
set(OPENSUBDIV_INCLUDE_DIR ${LIBDIR}/opensubdiv/include)
|
||||
set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib)
|
||||
set(OPENSUBDIV_LIBRARIES
|
||||
optimized ${OPENSUBDIV_LIBPATH}/osdCPU.lib
|
||||
optimized ${OPENSUBDIV_LIBPATH}/osdGPU.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdCPU_d.lib
|
||||
debug ${OPENSUBDIV_LIBPATH}/osdGPU_d.lib
|
||||
)
|
||||
set(OPENSUBDIV_HAS_OPENMP TRUE)
|
||||
set(OPENSUBDIV_HAS_TBB FALSE)
|
||||
set(OPENSUBDIV_HAS_OPENCL TRUE)
|
||||
set(OPENSUBDIV_HAS_CUDA FALSE)
|
||||
set(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK TRUE)
|
||||
set(OPENSUBDIV_HAS_GLSL_COMPUTE TRUE)
|
||||
windows_find_package(OpenSubdiv)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
set(SDL_LIBRARY SDL2)
|
||||
endif()
|
||||
|
||||
# Audio IO
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace.lib)
|
||||
set(AUDASPACE_C_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_C_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-c.lib)
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
|
||||
set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
|
||||
endif()
|
||||
|
||||
# used in many places so include globally, like OpenGL
|
||||
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
|
||||
|
||||
#find signtool
|
||||
set(ProgramFilesX86_NAME "ProgramFiles(x86)") #env dislikes the ( )
|
||||
find_program(SIGNTOOL_EXE signtool
|
||||
HINTS
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/10/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86/"
|
||||
"$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.0/bin/x86/"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86/"
|
||||
)
|
@@ -28,9 +28,6 @@ Module for accessing project file data for Blender.
|
||||
Before use, call init(cmake_build_dir).
|
||||
"""
|
||||
|
||||
# TODO: Use CMAKE_EXPORT_COMPILE_COMMANDS (compile_commands.json)
|
||||
# Instead of Eclipse project format.
|
||||
|
||||
__all__ = (
|
||||
"SIMPLE_PROJECTFILE",
|
||||
"SOURCE_DIR",
|
||||
@@ -48,22 +45,14 @@ __all__ = (
|
||||
|
||||
|
||||
import sys
|
||||
if sys.version_info.major < 3:
|
||||
if not sys.version.startswith("3"):
|
||||
print("\nPython3.x needed, found %s.\nAborting!\n" %
|
||||
sys.version.partition(" ")[0])
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
from os.path import (
|
||||
abspath,
|
||||
dirname,
|
||||
exists,
|
||||
join,
|
||||
normpath,
|
||||
splitext,
|
||||
)
|
||||
from os.path import join, dirname, normpath, abspath, splitext, exists
|
||||
|
||||
SOURCE_DIR = join(dirname(__file__), "..", "..")
|
||||
SOURCE_DIR = normpath(SOURCE_DIR)
|
||||
@@ -157,13 +146,13 @@ def cmake_advanced_info():
|
||||
raise Exception("Error: win32 is not supported")
|
||||
else:
|
||||
if make_exe_basename.startswith(("make", "gmake")):
|
||||
cmd = ("cmake", CMAKE_DIR, "-GEclipse CDT4 - Unix Makefiles")
|
||||
cmd = 'cmake "%s" -G"Eclipse CDT4 - Unix Makefiles"' % CMAKE_DIR
|
||||
elif make_exe_basename.startswith("ninja"):
|
||||
cmd = ("cmake", CMAKE_DIR, "-GEclipse CDT4 - Ninja")
|
||||
cmd = 'cmake "%s" -G"Eclipse CDT4 - Ninja"' % CMAKE_DIR
|
||||
else:
|
||||
raise Exception("Unknown make program %r" % make_exe)
|
||||
|
||||
subprocess.check_call(cmd)
|
||||
os.system(cmd)
|
||||
return join(CMAKE_DIR, ".cproject")
|
||||
|
||||
includes = []
|
||||
|
@@ -220,10 +220,6 @@
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup edscene scene
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup edsculpt sculpt and paint
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
@@ -1,38 +0,0 @@
|
||||
"""
|
||||
Enum Search Popup
|
||||
+++++++++++++++++
|
||||
|
||||
You may want to have an operator prompt the user to select an item
|
||||
from a search field, this can be done using :class:`bpy.types.Operator.invoke_search_popup`.
|
||||
"""
|
||||
import bpy
|
||||
from bpy.props import EnumProperty
|
||||
|
||||
|
||||
class SearchEnumOperator(bpy.types.Operator):
|
||||
bl_idname = "object.search_enum_operator"
|
||||
bl_label = "Search Enum Operator"
|
||||
bl_property = "my_search"
|
||||
|
||||
my_search = EnumProperty(
|
||||
name="My Search",
|
||||
items=(
|
||||
('FOO', "Foo", ""),
|
||||
('BAR', "Bar", ""),
|
||||
('BAZ', "Baz", ""),
|
||||
),
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
self.report({'INFO'}, "Selected:" + self.my_search)
|
||||
return {'FINISHED'}
|
||||
|
||||
def invoke(self, context, event):
|
||||
context.window_manager.invoke_search_popup(self)
|
||||
return {'RUNNING_MODAL'}
|
||||
|
||||
|
||||
bpy.utils.register_class(SearchEnumOperator)
|
||||
|
||||
# test call
|
||||
bpy.ops.object.search_enum_operator('INVOKE_DEFAULT')
|
@@ -64,9 +64,9 @@ def register():
|
||||
# In this example, we need to see the main render image button and
|
||||
# the material preview panel.
|
||||
from bl_ui import (
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render.RENDER_PT_render.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
|
||||
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
|
||||
|
||||
@@ -75,9 +75,9 @@ def unregister():
|
||||
bpy.utils.unregister_class(CustomRenderEngine)
|
||||
|
||||
from bl_ui import (
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render,
|
||||
properties_material,
|
||||
)
|
||||
properties_render.RENDER_PT_render.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
|
||||
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
|
||||
|
||||
|
@@ -52,7 +52,6 @@ class OffScreenDraw(bpy.types.Operator):
|
||||
@staticmethod
|
||||
def _update_offscreen(context, offscreen):
|
||||
scene = context.scene
|
||||
render_layer = context.render_layer
|
||||
render = scene.render
|
||||
camera = scene.camera
|
||||
|
||||
@@ -66,7 +65,6 @@ class OffScreenDraw(bpy.types.Operator):
|
||||
|
||||
offscreen.draw_view3d(
|
||||
scene,
|
||||
render_layer,
|
||||
context.space_data,
|
||||
context.region,
|
||||
projection_matrix,
|
||||
|
@@ -332,9 +332,6 @@ except ImportError:
|
||||
# to avoid having to match Blender's source tree.
|
||||
EXTRA_SOURCE_FILES = (
|
||||
"../../../release/scripts/templates_py/bmesh_simple.py",
|
||||
"../../../release/scripts/templates_py/manipulator_operator.py",
|
||||
"../../../release/scripts/templates_py/manipulator_operator_target.py",
|
||||
"../../../release/scripts/templates_py/manipulator_simple.py",
|
||||
"../../../release/scripts/templates_py/operator_simple.py",
|
||||
"../../../release/scripts/templates_py/ui_panel_simple.py",
|
||||
"../../../release/scripts/templates_py/ui_previews_custom_icon.py",
|
||||
@@ -1027,7 +1024,6 @@ context_type_map = {
|
||||
"brush": ("Brush", False),
|
||||
"camera": ("Camera", False),
|
||||
"cloth": ("ClothModifier", False),
|
||||
"collection": ("LayerCollection", False),
|
||||
"collision": ("CollisionModifier", False),
|
||||
"curve": ("Curve", False),
|
||||
"dynamic_paint": ("DynamicPaintModifier", False),
|
||||
@@ -1048,7 +1044,6 @@ context_type_map = {
|
||||
"image_paint_object": ("Object", False),
|
||||
"lamp": ("Lamp", False),
|
||||
"lattice": ("Lattice", False),
|
||||
"lightprobe": ("LightProbe", False),
|
||||
"line_style": ("FreestyleLineStyle", False),
|
||||
"material": ("Material", False),
|
||||
"material_slot": ("MaterialSlot", False),
|
||||
@@ -1060,7 +1055,6 @@ context_type_map = {
|
||||
"particle_system": ("ParticleSystem", False),
|
||||
"particle_system_editable": ("ParticleSystem", False),
|
||||
"pose_bone": ("PoseBone", False),
|
||||
"render_layer": ("SceneLayer", False),
|
||||
"scene": ("Scene", False),
|
||||
"sculpt_object": ("Object", False),
|
||||
"selectable_bases": ("ObjectBase", True),
|
||||
|
7
extern/CMakeLists.txt
vendored
7
extern/CMakeLists.txt
vendored
@@ -99,7 +99,7 @@ if(WITH_LIBMV)
|
||||
endif()
|
||||
|
||||
if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
|
||||
if(NOT WITH_SYSTEM_GFLAGS)
|
||||
if (NOT WITH_SYSTEM_GFLAGS)
|
||||
add_subdirectory(gflags)
|
||||
endif()
|
||||
add_subdirectory(glog)
|
||||
@@ -113,8 +113,3 @@ endif()
|
||||
if(WITH_SDL AND WITH_SDL_DYNLOAD)
|
||||
add_subdirectory(sdlew)
|
||||
endif()
|
||||
|
||||
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_CMAKE_CFG ${CMAKE_CURRENT_SOURCE_DIR}/audaspace/blender_config.cmake)
|
||||
add_subdirectory(audaspace)
|
||||
endif()
|
||||
|
16
extern/audaspace/AUTHORS
vendored
16
extern/audaspace/AUTHORS
vendored
@@ -1,16 +0,0 @@
|
||||
Main author: Jörg Müller <nexyon@gmail.com>
|
||||
|
||||
Minor improvements have been done while audaspace was an internal part of Blender by
|
||||
|
||||
- Campbell Barton (bug fixes and cleanup)
|
||||
- Brecht Van Lommel (bug fixes and cleanup)
|
||||
- Sergey Sharybin (bug fixes and cleanup)
|
||||
- Nathan Letwory (bug fixes and cleanup)
|
||||
- Peter Schlaile (ffmpeg)
|
||||
- Jens Verwiebe (jack on Apple)
|
||||
|
||||
The first three of them were employed by the Blender Foundation during that time.
|
||||
|
||||
Some features (random sounds, dynamic music, playback manager, convolution and HRTFs support) were added as part of the VALS (Virtual Alliances for Learning Society) project by
|
||||
|
||||
- Juan Francisco Crespo Galán <dethon_5@outlook.com>
|
115
extern/audaspace/CHANGES
vendored
115
extern/audaspace/CHANGES
vendored
@@ -1,115 +0,0 @@
|
||||
Audaspace 1.3
|
||||
=============
|
||||
|
||||
- New features:
|
||||
- linear interpolation for volume changes in the software mixer
|
||||
- dynamic Loading for JACK
|
||||
- Bug fixes:
|
||||
- renamed Jack to JACK
|
||||
- C API was not working
|
||||
- filter python API parameter check
|
||||
- finding ffmpeg with pkgconfig
|
||||
|
||||
64884a7 Windows fixes.
|
||||
53ba3e6 Implemented JACK dynamic loading.
|
||||
5ee0ee1 Continues last commit.
|
||||
c24b384 Trying to fix travis-ci python versioning once and for all (at least for python3).
|
||||
1fbf3bf Rename Jack => JACK where possible.
|
||||
6e4b31f Implemented linear interpolation for volume changes in the software mixer.
|
||||
817043c Fixing C API not working.
|
||||
c384daf Maybe travis-ci works now.
|
||||
aa7ddd7 Fix (hopefully) for previous commit.
|
||||
57c5dd7 Configure MACOSX_DEPLOYMENT_TARGET for travis-ci.
|
||||
7ae6ff9 Fix travis-ci python path.
|
||||
552fea4 Added posibillity to use math constants on MinGW
|
||||
c18ed59 Bugfix: incorrect parameter check in python API.
|
||||
6f048c3 CMake: fix finding ffmpeg with pkgconfig.
|
||||
|
||||
Audaspace 1.2
|
||||
=============
|
||||
|
||||
- New features:
|
||||
- sound list
|
||||
- random sounds
|
||||
- dynamic music playing
|
||||
- playback manager
|
||||
- convolution/reverbation
|
||||
- multi-threading
|
||||
- binaural audio
|
||||
- API changes:
|
||||
- changing default sample rate from 44.1 to 48 kHz
|
||||
- Bug fixes:
|
||||
- several standard library fixes.
|
||||
- Bindings API:
|
||||
- mixdown C API refactored
|
||||
- CMake/Building:
|
||||
- assuring numpy is installed
|
||||
- building the Python module on Mac OS X with CMake
|
||||
|
||||
a6b6e70 Changing default sample rate from 44.1 to 48 kHz.
|
||||
20f0164 Bugfix: CMake custom command for python module on OS X.
|
||||
98679a2 Bugfix: using standard library (s)rand.
|
||||
5ab4fe7 Bugfix: first step in fixing the vector of array problem.
|
||||
e83f01d FFTW: trying to use complex to circumvent vector of array problem.
|
||||
093ebc0 Bugfix: abs -> std::fabs.
|
||||
328d7cc Bugfix: standard library include and call fixes.
|
||||
f78e330 Bugfix: using correct includes.
|
||||
64d7825 Behavior change: C API Mixdown
|
||||
749896b Merge pull request #3 from DethonUSAL/master
|
||||
6e9491c CMake: finding NumPy.
|
||||
|
||||
Audaspace 1.1
|
||||
=============
|
||||
|
||||
- Bug fixes:
|
||||
- pkgconfig uses cmake configured library directory
|
||||
- FFMPEG file writing crashed, also corrected pts for encoding
|
||||
- silenced Doxygen warnings about undefined defines
|
||||
- C++ API:
|
||||
- ResampleReader uses specs instead of sample rate
|
||||
- Bindings API:
|
||||
- writing sounds to files
|
||||
- reading sound data, specs and length
|
||||
- resampling sounds
|
||||
- CMake/Building:
|
||||
- first steps towards building for Mac
|
||||
- windows builds copy dlls automatically
|
||||
- Python module:
|
||||
- using distutils instead of setuptools
|
||||
- added numpy as dependency
|
||||
- Documentation:
|
||||
- added windows building and plugin documentation
|
||||
- disabled html timestamps in doxygen
|
||||
- updated sphinx template
|
||||
- build binding documentation without installing the python module
|
||||
|
||||
Detailed list of changes:
|
||||
|
||||
326a300 Documentation: windows, dll copying now done automatically.
|
||||
54cac4f Windows: install dlls.
|
||||
65c2d78 Bindings: Sound length and specs properties.
|
||||
c38da70 Bindings API: adding resampling.
|
||||
374822f Documentation: Added windows and plugin documentation.
|
||||
a9dc5b9 Python module: add numpy as dependency.
|
||||
c933a02 C API: implement new API based on the python API.
|
||||
ac54c52 Python API: silence numpy warnings.
|
||||
c9491bb Python API: checking for a positive sample rate.
|
||||
4eb1fa8 Python API: reorder functions.
|
||||
ec7c00b Sphinx update and fixes.
|
||||
e16d979 FFMPEG: correct pts during encoding.
|
||||
7ab3935 Documentation: git path fix.
|
||||
28d77bb Python: use distutils directly instead of setuptools.
|
||||
1f43284 Silence doxygen warning about undefined defines.
|
||||
0d52458 CMake: improvements and fixes for building on Mac.
|
||||
37daedf FFMPEG: bugfixes for file writing.
|
||||
780ca2a ResampleReader API change
|
||||
4d9863d Python API: Optimization for cached sounds' data access.
|
||||
ea04fee Python API: read sound data and create sound buffers as well as getting the specs of a sound.
|
||||
335b293 Python sound writing API.
|
||||
36a7252 Pkgconfig: use cmake configured library directory.
|
||||
5503908 Doxygen: disable html timestamps.
|
||||
|
||||
Initial Release of Audaspace 1.0
|
||||
================================
|
||||
|
||||
Audaspace has been the internal audio library of blender since blender 2.5. It is now released as a standalone library to be used in other projects as well.
|
986
extern/audaspace/CMakeLists.txt
vendored
986
extern/audaspace/CMakeLists.txt
vendored
@@ -1,986 +0,0 @@
|
||||
################################################################################
|
||||
# Copyright 2009-2016 Jörg Müller
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
################################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(CMakeDependentOption)
|
||||
|
||||
if(POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
project(audaspace)
|
||||
|
||||
set(AUDASPACE_VERSION 1.3)
|
||||
set(AUDASPACE_LONG_VERSION ${AUDASPACE_VERSION}.0)
|
||||
|
||||
if(DEFINED AUDASPACE_CMAKE_CFG)
|
||||
include(${AUDASPACE_CMAKE_CFG})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED AUDASPACE_STANDALONE)
|
||||
set(AUDASPACE_STANDALONE TRUE)
|
||||
endif()
|
||||
|
||||
# sources
|
||||
|
||||
set(SRC
|
||||
src/devices/DefaultSynchronizer.cpp
|
||||
src/devices/DeviceManager.cpp
|
||||
src/devices/NULLDevice.cpp
|
||||
src/devices/ReadDevice.cpp
|
||||
src/devices/SoftwareDevice.cpp
|
||||
src/Exception.cpp
|
||||
src/file/File.cpp
|
||||
src/file/FileManager.cpp
|
||||
src/file/FileWriter.cpp
|
||||
src/fx/Accumulator.cpp
|
||||
src/fx/ADSR.cpp
|
||||
src/fx/ADSRReader.cpp
|
||||
src/fx/BaseIIRFilterReader.cpp
|
||||
src/fx/ButterworthCalculator.cpp
|
||||
src/fx/Butterworth.cpp
|
||||
src/fx/CallbackIIRFilterReader.cpp
|
||||
src/fx/Delay.cpp
|
||||
src/fx/DelayReader.cpp
|
||||
src/fx/DynamicIIRFilter.cpp
|
||||
src/fx/DynamicIIRFilterReader.cpp
|
||||
src/fx/DynamicMusic.cpp
|
||||
src/fx/Effect.cpp
|
||||
src/fx/EffectReader.cpp
|
||||
src/fx/Envelope.cpp
|
||||
src/fx/Fader.cpp
|
||||
src/fx/FaderReader.cpp
|
||||
src/fx/HighpassCalculator.cpp
|
||||
src/fx/Highpass.cpp
|
||||
src/fx/IIRFilter.cpp
|
||||
src/fx/IIRFilterReader.cpp
|
||||
src/fx/Limiter.cpp
|
||||
src/fx/LimiterReader.cpp
|
||||
src/fx/Loop.cpp
|
||||
src/fx/LoopReader.cpp
|
||||
src/fx/LowpassCalculator.cpp
|
||||
src/fx/Lowpass.cpp
|
||||
src/fx/MutableReader.cpp
|
||||
src/fx/MutableSound.cpp
|
||||
src/fx/Pitch.cpp
|
||||
src/fx/PitchReader.cpp
|
||||
src/fx/PlaybackManager.cpp
|
||||
src/fx/PlaybackCategory.cpp
|
||||
src/fx/Reverse.cpp
|
||||
src/fx/ReverseReader.cpp
|
||||
src/fx/SoundList.cpp
|
||||
src/fx/Source.cpp
|
||||
src/fx/Sum.cpp
|
||||
src/fx/Threshold.cpp
|
||||
src/fx/Volume.cpp
|
||||
src/fx/VolumeReader.cpp
|
||||
src/fx/VolumeSound.cpp
|
||||
src/fx/VolumeStorage.cpp
|
||||
src/generator/Sawtooth.cpp
|
||||
src/generator/SawtoothReader.cpp
|
||||
src/generator/Silence.cpp
|
||||
src/generator/SilenceReader.cpp
|
||||
src/generator/Sine.cpp
|
||||
src/generator/SineReader.cpp
|
||||
src/generator/Square.cpp
|
||||
src/generator/SquareReader.cpp
|
||||
src/generator/Triangle.cpp
|
||||
src/generator/TriangleReader.cpp
|
||||
src/respec/ChannelMapper.cpp
|
||||
src/respec/ChannelMapperReader.cpp
|
||||
src/respec/Converter.cpp
|
||||
src/respec/ConverterFunctions.cpp
|
||||
src/respec/ConverterReader.cpp
|
||||
src/respec/JOSResample.cpp
|
||||
src/respec/JOSResampleReaderCoeff.cpp
|
||||
src/respec/JOSResampleReader.cpp
|
||||
src/respec/LinearResample.cpp
|
||||
src/respec/LinearResampleReader.cpp
|
||||
src/respec/Mixer.cpp
|
||||
src/respec/ResampleReader.cpp
|
||||
src/respec/SpecsChanger.cpp
|
||||
src/sequence/AnimateableProperty.cpp
|
||||
src/sequence/Double.cpp
|
||||
src/sequence/DoubleReader.cpp
|
||||
src/sequence/PingPong.cpp
|
||||
src/sequence/Sequence.cpp
|
||||
src/sequence/SequenceData.cpp
|
||||
src/sequence/SequenceEntry.cpp
|
||||
src/sequence/SequenceHandle.cpp
|
||||
src/sequence/SequenceReader.cpp
|
||||
src/sequence/Superpose.cpp
|
||||
src/sequence/SuperposeReader.cpp
|
||||
src/util/Barrier.cpp
|
||||
src/util/Buffer.cpp
|
||||
src/util/BufferReader.cpp
|
||||
src/util/StreamBuffer.cpp
|
||||
src/util/ThreadPool.cpp
|
||||
)
|
||||
|
||||
set(PRIVATE_HDR
|
||||
src/sequence/SequenceHandle.h
|
||||
)
|
||||
|
||||
set(PUBLIC_HDR
|
||||
include/devices/DefaultSynchronizer.h
|
||||
include/devices/DeviceManager.h
|
||||
include/devices/I3DDevice.h
|
||||
include/devices/I3DHandle.h
|
||||
include/devices/IDeviceFactory.h
|
||||
include/devices/IDevice.h
|
||||
include/devices/IHandle.h
|
||||
include/devices/ISynchronizer.h
|
||||
include/devices/NULLDevice.h
|
||||
include/devices/ReadDevice.h
|
||||
include/devices/SoftwareDevice.h
|
||||
include/Exception.h
|
||||
include/file/File.h
|
||||
include/file/FileManager.h
|
||||
include/file/FileWriter.h
|
||||
include/file/IFileInput.h
|
||||
include/file/IFileOutput.h
|
||||
include/file/IWriter.h
|
||||
include/fx/Accumulator.h
|
||||
include/fx/ADSR.h
|
||||
include/fx/ADSRReader.h
|
||||
include/fx/BaseIIRFilterReader.h
|
||||
include/fx/ButterworthCalculator.h
|
||||
include/fx/Butterworth.h
|
||||
include/fx/CallbackIIRFilterReader.h
|
||||
include/fx/Delay.h
|
||||
include/fx/DelayReader.h
|
||||
include/fx/DynamicIIRFilter.h
|
||||
include/fx/DynamicIIRFilterReader.h
|
||||
include/fx/DynamicMusic.h
|
||||
include/fx/Effect.h
|
||||
include/fx/EffectReader.h
|
||||
include/fx/Envelope.h
|
||||
include/fx/Fader.h
|
||||
include/fx/FaderReader.h
|
||||
include/fx/HighpassCalculator.h
|
||||
include/fx/Highpass.h
|
||||
include/fx/IDynamicIIRFilterCalculator.h
|
||||
include/fx/IIRFilter.h
|
||||
include/fx/IIRFilterReader.h
|
||||
include/fx/Limiter.h
|
||||
include/fx/LimiterReader.h
|
||||
include/fx/Loop.h
|
||||
include/fx/LoopReader.h
|
||||
include/fx/LowpassCalculator.h
|
||||
include/fx/Lowpass.h
|
||||
include/fx/MutableReader.h
|
||||
include/fx/MutableSound.h
|
||||
include/fx/Pitch.h
|
||||
include/fx/PitchReader.h
|
||||
include/fx/PlaybackManager.h
|
||||
include/fx/PlaybackCategory.h
|
||||
include/fx/Reverse.h
|
||||
include/fx/ReverseReader.h
|
||||
include/fx/SoundList.h
|
||||
include/fx/Source.h
|
||||
include/fx/Sum.h
|
||||
include/fx/Threshold.h
|
||||
include/fx/Volume.h
|
||||
include/fx/VolumeReader.h
|
||||
include/fx/VolumeSound.h
|
||||
include/fx/VolumeStorage.h
|
||||
include/generator/Sawtooth.h
|
||||
include/generator/SawtoothReader.h
|
||||
include/generator/Silence.h
|
||||
include/generator/SilenceReader.h
|
||||
include/generator/Sine.h
|
||||
include/generator/SineReader.h
|
||||
include/generator/Square.h
|
||||
include/generator/SquareReader.h
|
||||
include/generator/Triangle.h
|
||||
include/generator/TriangleReader.h
|
||||
include/IReader.h
|
||||
include/ISound.h
|
||||
include/plugin/PluginManager.h
|
||||
include/respec/ChannelMapper.h
|
||||
include/respec/ChannelMapperReader.h
|
||||
include/respec/ConverterFunctions.h
|
||||
include/respec/Converter.h
|
||||
include/respec/ConverterReader.h
|
||||
include/respec/JOSResample.h
|
||||
include/respec/JOSResampleReader.h
|
||||
include/respec/LinearResample.h
|
||||
include/respec/LinearResampleReader.h
|
||||
include/respec/Mixer.h
|
||||
include/respec/ResampleReader.h
|
||||
include/respec/Specification.h
|
||||
include/respec/SpecsChanger.h
|
||||
include/sequence/AnimateableProperty.h
|
||||
include/sequence/Double.h
|
||||
include/sequence/DoubleReader.h
|
||||
include/sequence/PingPong.h
|
||||
include/sequence/SequenceData.h
|
||||
include/sequence/SequenceEntry.h
|
||||
include/sequence/Sequence.h
|
||||
include/sequence/SequenceReader.h
|
||||
include/sequence/Superpose.h
|
||||
include/sequence/SuperposeReader.h
|
||||
include/util/Barrier.h
|
||||
include/util/Buffer.h
|
||||
include/util/BufferReader.h
|
||||
include/util/ILockable.h
|
||||
include/util/Math3D.h
|
||||
include/util/StreamBuffer.h
|
||||
include/util/ThreadPool.h
|
||||
)
|
||||
|
||||
set(HDR ${PRIVATE_HDR} ${PUBLIC_HDR})
|
||||
|
||||
set(INCLUDE ${CMAKE_CURRENT_BINARY_DIR} include)
|
||||
|
||||
if(WIN32)
|
||||
set(LIBRARIES)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(DLLS)
|
||||
set(LIBRARY_PATH "../lib" CACHE PATH "Path which contains the libraries.")
|
||||
file(GLOB LIBRARY_DIRS ${LIBRARY_PATH}/*)
|
||||
list(APPEND CMAKE_PREFIX_PATH ${LIBRARY_DIRS})
|
||||
endif()
|
||||
else()
|
||||
set(LIBRARIES ${CMAKE_DL_LIBS} -lpthread)
|
||||
endif()
|
||||
|
||||
set(STATIC_PLUGINS "")
|
||||
|
||||
# dependencies
|
||||
|
||||
if(AUDASPACE_STANDALONE)
|
||||
set(PACKAGE_OPTION QUIET)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
|
||||
|
||||
option(BUILD_DEMOS "Build and install demos" TRUE)
|
||||
|
||||
option(SHARED_LIBRARY "Build Shared Library" TRUE)
|
||||
|
||||
option(WITH_C "Build C Module" TRUE)
|
||||
option(WITH_DOCS "Build C++ HTML Documentation with Doxygen" TRUE)
|
||||
option(WITH_FFMPEG "Build With FFMPEG" TRUE)
|
||||
option(WITH_FFTW "Build With FFTW" TRUE)
|
||||
option(WITH_JACK "Build With Plugin" TRUE)
|
||||
option(WITH_LIBSNDFILE "Build With LibSndFile" TRUE)
|
||||
option(WITH_OPENAL "Build With OpenAL" TRUE)
|
||||
option(WITH_PYTHON "Build With Python Library" TRUE)
|
||||
option(WITH_SDL "Build With SDL" TRUE)
|
||||
option(WITH_STRICT_DEPENDENCIES "Error and abort instead of warning if a library is not found." FALSE)
|
||||
|
||||
if(WITH_STRICT_DEPENDENCIES)
|
||||
set(PACKAGE_OPTION REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(DEFAULT_PLUGIN_PATH "." CACHE STRING "Default plugin installation and loading path.")
|
||||
set(DOCUMENTATION_INSTALL_PATH "doc" CACHE PATH "Path where the documentation is installed.")
|
||||
else()
|
||||
set(DEFAULT_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/share/audaspace/plugins" CACHE STRING "Default plugin installation and loading path.")
|
||||
set(DOCUMENTATION_INSTALL_PATH "share/doc/audaspace" CACHE PATH "Path where the documentation is installed.")
|
||||
endif()
|
||||
|
||||
if(AUDASPACE_STANDALONE)
|
||||
cmake_dependent_option(SEPARATE_C "Build C Binding as separate library" TRUE "WITH_C" FALSE)
|
||||
cmake_dependent_option(PLUGIN_FFMPEG "Build FFMPEG Plugin" TRUE "WITH_FFMPEG;SHARED_LIBRARY" FALSE)
|
||||
cmake_dependent_option(PLUGIN_JACK "Build JACK Plugin" TRUE "WITH_JACK;SHARED_LIBRARY" FALSE)
|
||||
cmake_dependent_option(PLUGIN_LIBSNDFILE "Build LibSndFile Plugin" TRUE "WITH_LIBSNDFILE;SHARED_LIBRARY" FALSE)
|
||||
cmake_dependent_option(PLUGIN_OPENAL "Build OpenAL Plugin" TRUE "WITH_OPENAL;SHARED_LIBRARY" FALSE)
|
||||
cmake_dependent_option(PLUGIN_SDL "Build SDL Plugin" TRUE "WITH_SDL;SHARED_LIBRARY" FALSE)
|
||||
cmake_dependent_option(WITH_PYTHON_MODULE "Build Python Module" TRUE "WITH_PYTHON" FALSE)
|
||||
cmake_dependent_option(USE_SDL2 "Use SDL2 instead of 1 if available" TRUE "WITH_SDL" FALSE)
|
||||
cmake_dependent_option(DYNLOAD_JACK "Dynamically load JACK" FALSE "WITH_JACK" FALSE)
|
||||
cmake_dependent_option(WITH_BINDING_DOCS "Build C/Python HTML Documentation with Sphinx" TRUE "WITH_PYTHON_MODULE" FALSE)
|
||||
endif()
|
||||
|
||||
# compiler options
|
||||
|
||||
if(AUDASPACE_STANDALONE)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
add_definitions(-std=c++11)
|
||||
list(APPEND CMAKE_C_COMPILER_FLAGS "-fvisibility=hidden")
|
||||
list(APPEND CMAKE_CXX_COMPILER_FLAGS "-fvisibility=hidden")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND CMAKE_C_FLAGS_DEBUG "/Zi /Od")
|
||||
list(APPEND CMAKE_CXX_FLAGS_DEBUG "/Zi /Od")
|
||||
list(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG "/DEBUG")
|
||||
list(APPEND CMAKE_STATIC_LINKER_FLAGS_DEBUG "/DEBUG")
|
||||
list(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG")
|
||||
|
||||
if(SHARED_LIBRARY)
|
||||
include(GenerateExportHeader)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(
|
||||
/D_USE_MATH_DEFINES
|
||||
/EHsc
|
||||
/DNOMINMAX
|
||||
/D_STDINT_H
|
||||
)
|
||||
endif()
|
||||
|
||||
# platform specific options
|
||||
|
||||
if(MSYS OR MINGW)
|
||||
add_definitions(-D_USE_MATH_DEFINES)
|
||||
endif()
|
||||
|
||||
# C
|
||||
if(WITH_C)
|
||||
set(C_SRC
|
||||
bindings/C/AUD_ThreadPool.cpp
|
||||
bindings/C/AUD_Source.cpp
|
||||
bindings/C/AUD_Device.cpp
|
||||
bindings/C/AUD_DynamicMusic.cpp
|
||||
bindings/C/AUD_Handle.cpp
|
||||
bindings/C/AUD_PlaybackManager.cpp
|
||||
bindings/C/AUD_Sequence.cpp
|
||||
bindings/C/AUD_Sound.cpp
|
||||
bindings/C/AUD_Special.cpp
|
||||
)
|
||||
set(C_HDR
|
||||
bindings/C/AUD_ThreadPool.h
|
||||
bindings/C/AUD_Source.h
|
||||
bindings/C/AUD_Device.h
|
||||
bindings/C/AUD_DynamicMusic.h
|
||||
bindings/C/AUD_Handle.h
|
||||
bindings/C/AUD_PlaybackManager.h
|
||||
bindings/C/AUD_Sequence.h
|
||||
bindings/C/AUD_Sound.h
|
||||
bindings/C/AUD_Special.h
|
||||
bindings/C/AUD_Types.h
|
||||
)
|
||||
|
||||
if(WITH_FFTW)
|
||||
list(APPEND C_SRC
|
||||
bindings/C/AUD_HRTF.cpp
|
||||
bindings/C/AUD_ImpulseResponse.cpp
|
||||
)
|
||||
|
||||
list(APPEND C_HDR
|
||||
bindings/C/AUD_HRTF.h
|
||||
bindings/C/AUD_ImpulseResponse.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT SEPARATE_C)
|
||||
list(APPEND SRC ${C_SRC})
|
||||
list(APPEND HDR ${C_HDR})
|
||||
else()
|
||||
set(AUDASPACE_C_LIBRARY -laudaspace-c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# FFMPEG
|
||||
if(WITH_FFMPEG)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
find_package(FFMPEG ${PACKAGE_OPTION})
|
||||
endif()
|
||||
|
||||
if(FFMPEG_FOUND)
|
||||
set(FFMPEG_SRC
|
||||
plugins/ffmpeg/FFMPEG.cpp
|
||||
plugins/ffmpeg/FFMPEGReader.cpp
|
||||
plugins/ffmpeg/FFMPEGWriter.cpp
|
||||
)
|
||||
set(FFMPEG_HDR
|
||||
plugins/ffmpeg/FFMPEG.h
|
||||
plugins/ffmpeg/FFMPEGReader.h
|
||||
plugins/ffmpeg/FFMPEGWriter.h
|
||||
)
|
||||
|
||||
if(NOT PLUGIN_FFMPEG)
|
||||
list(APPEND INCLUDE ${FFMPEG_INCLUDE_DIRS})
|
||||
list(APPEND LIBRARIES ${FFMPEG_LIBRARIES})
|
||||
list(APPEND SRC ${FFMPEG_SRC})
|
||||
list(APPEND HDR ${FFMPEG_HDR})
|
||||
list(APPEND STATIC_PLUGINS FFMPEG)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND AUDASPACE_STANDALONE)
|
||||
file(GLOB FFMPEG_DLLS ${LIBRARY_PATH}/ffmpeg/bin/*.dll)
|
||||
list(APPEND DLLS ${FFMPEG_DLLS})
|
||||
endif()
|
||||
else()
|
||||
set(WITH_FFMPEG FALSE CACHE BOOL "Build With FFMPEG" FORCE)
|
||||
message(WARNING "FFMPEG not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# FFTW
|
||||
if(WITH_FFTW)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
find_package(FFTW ${PACKAGE_OPTION})
|
||||
endif()
|
||||
|
||||
if(FFTW_FOUND)
|
||||
set(FFTW_SRC
|
||||
src/fx/BinauralSound.cpp
|
||||
src/fx/BinauralReader.cpp
|
||||
src/fx/Convolver.cpp
|
||||
src/fx/ConvolverReader.cpp
|
||||
src/fx/ConvolverSound.cpp
|
||||
src/fx/FFTConvolver.cpp
|
||||
src/fx/HRTF.cpp
|
||||
src/fx/ImpulseResponse.cpp
|
||||
src/util/FFTPlan.cpp
|
||||
)
|
||||
set(FFTW_HDR
|
||||
include/fx/BinauralSound.h
|
||||
include/fx/BinauralReader.h
|
||||
include/fx/Convolver.h
|
||||
include/fx/ConvolverReader.h
|
||||
include/fx/ConvolverSound.h
|
||||
include/fx/FFTConvolver.h
|
||||
include/fx/HRTF.h
|
||||
include/fx/HRTFLoader.h
|
||||
include/fx/ImpulseResponse.h
|
||||
include/util/FFTPlan.h
|
||||
)
|
||||
|
||||
add_definitions(-DWITH_CONVOLUTION)
|
||||
|
||||
list(APPEND INCLUDE ${FFTW_INCLUDE_DIR})
|
||||
list(APPEND LIBRARIES ${FFTW_LIBRARY})
|
||||
|
||||
list(APPEND SRC ${FFTW_SRC})
|
||||
list(APPEND HDR ${FFTW_HDR})
|
||||
|
||||
if(WIN32 AND AUDASPACE_STANDALONE)
|
||||
file(GLOB FFTW_DLLS ${LIBRARY_PATH}/fftw/bin/*.dll)
|
||||
list(APPEND DLLS ${FFTW_DLLS})
|
||||
endif()
|
||||
else()
|
||||
set(WITH_FFTW FALSE CACHE BOOL "Build With FFTW" FORCE)
|
||||
message(WARNING "FFTW not found, convolution functionality will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# JACK
|
||||
if(WITH_JACK)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
find_package(Jack ${PACKAGE_OPTION})
|
||||
endif()
|
||||
|
||||
if(JACK_FOUND)
|
||||
set(JACK_SRC
|
||||
plugins/jack/JackDevice.cpp
|
||||
plugins/jack/JackSynchronizer.cpp
|
||||
plugins/jack/JackLibrary.cpp
|
||||
)
|
||||
set(JACK_HDR
|
||||
plugins/jack/JackDevice.h
|
||||
plugins/jack/JackSynchronizer.h
|
||||
plugins/jack/JackLibrary.h
|
||||
plugins/jack/JackSymbols.h
|
||||
)
|
||||
|
||||
if(DYNLOAD_JACK)
|
||||
add_definitions(-DDYNLOAD_JACK)
|
||||
endif()
|
||||
|
||||
if(NOT PLUGIN_JACK)
|
||||
list(APPEND INCLUDE ${JACK_INCLUDE_DIRS})
|
||||
if(NOT DYNLOAD_JACK)
|
||||
list(APPEND LIBRARIES ${JACK_LIBRARIES})
|
||||
endif()
|
||||
list(APPEND SRC ${JACK_SRC})
|
||||
list(APPEND HDR ${JACK_HDR})
|
||||
list(APPEND STATIC_PLUGINS JackDevice)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND AUDASPACE_STANDALONE)
|
||||
file(GLOB JACK_DLLS ${LIBRARY_PATH}/jack/bin/*.dll)
|
||||
list(APPEND DLLS ${JACK_DLLS})
|
||||
endif()
|
||||
else()
|
||||
set(WITH_JACK FALSE CACHE BOOL "Build With JACK" FORCE)
|
||||
message(WARNING "JACK not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# LibSndFile
|
||||
if(WITH_LIBSNDFILE)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
find_package(LibSndFile ${PACKAGE_OPTION})
|
||||
endif()
|
||||
|
||||
if(LIBSNDFILE_FOUND)
|
||||
set(LIBSNDFILE_SRC
|
||||
plugins/libsndfile/SndFile.cpp
|
||||
plugins/libsndfile/SndFileReader.cpp
|
||||
plugins/libsndfile/SndFileWriter.cpp
|
||||
)
|
||||
set(LIBSNDFILE_HDR
|
||||
plugins/libsndfile/SndFile.h
|
||||
plugins/libsndfile/SndFileReader.h
|
||||
plugins/libsndfile/SndFileWriter.h
|
||||
)
|
||||
|
||||
if(NOT PLUGIN_LIBSNDFILE)
|
||||
list(APPEND INCLUDE ${LIBSNDFILE_INCLUDE_DIRS})
|
||||
list(APPEND LIBRARIES ${LIBSNDFILE_LIBRARIES})
|
||||
list(APPEND SRC ${LIBSNDFILE_SRC})
|
||||
list(APPEND HDR ${LIBSNDFILE_HDR})
|
||||
list(APPEND STATIC_PLUGINS SndFile)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND AUDASPACE_STANDALONE)
|
||||
file(GLOB LIBSNDFILE_DLLS ${LIBRARY_PATH}/libsndfile/bin/*.dll)
|
||||
list(APPEND DLLS ${LIBSNDFILE_DLLS})
|
||||
endif()
|
||||
else()
|
||||
set(WITH_LIBSNDFILE FALSE CACHE BOOL "Build With LibSndFile" FORCE)
|
||||
message(WARNING "LibSndFile not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OpenAL
|
||||
if(WITH_OPENAL)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
find_package(OpenAL ${PACKAGE_OPTION})
|
||||
endif()
|
||||
|
||||
if(OPENAL_FOUND)
|
||||
set(OPENAL_SRC
|
||||
plugins/openal/OpenALDevice.cpp
|
||||
plugins/openal/OpenALReader.cpp
|
||||
)
|
||||
set(OPENAL_HDR
|
||||
plugins/openal/OpenALDevice.h
|
||||
plugins/openal/OpenALReader.h
|
||||
)
|
||||
|
||||
if(NOT PLUGIN_OPENAL)
|
||||
list(APPEND INCLUDE ${OPENAL_INCLUDE_DIR})
|
||||
list(APPEND LIBRARIES ${OPENAL_LIBRARY})
|
||||
list(APPEND SRC ${OPENAL_SRC})
|
||||
list(APPEND HDR ${OPENAL_HDR})
|
||||
list(APPEND STATIC_PLUGINS OpenALDevice)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND AUDASPACE_STANDALONE)
|
||||
file(GLOB OPENAL_DLLS ${LIBRARY_PATH}/OpenAL/bin/*.dll)
|
||||
list(APPEND DLLS ${OPENAL_DLLS})
|
||||
endif()
|
||||
else()
|
||||
set(WITH_OPENAL FALSE CACHE BOOL "Build With OpenAL" FORCE)
|
||||
message(WARNING "OpenAL not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Python
|
||||
if(WITH_PYTHON)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
find_package(PythonLibs 3.2 ${PACKAGE_OPTION})
|
||||
find_package(NumPy ${PACKAGE_OPTION})
|
||||
endif()
|
||||
|
||||
if(PYTHONLIBS_FOUND AND NUMPY_FOUND)
|
||||
list(APPEND INCLUDE ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS})
|
||||
|
||||
if(WITH_PYTHON_MODULE)
|
||||
find_package(PythonInterp 3.2 ${PACKAGE_OPTION})
|
||||
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
set(WITH_PYTHON_MODULE FALSE)
|
||||
message(WARNING "Python interpreter not found, module will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(AUDASPACE_PY_LIBRARY -laudaspace-py)
|
||||
|
||||
if(WIN32 AND AUDASPACE_STANDALONE)
|
||||
file(GLOB PYTHON_DLLS ${LIBRARY_PATH}/Python/bin/*.dll)
|
||||
list(APPEND DLLS ${PYTHON_DLLS})
|
||||
endif()
|
||||
else()
|
||||
set(WITH_PYTHON FALSE CACHE BOOL "Build With Python Library" FORCE)
|
||||
message(WARNING "Python libraries not found, language binding will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# SDL
|
||||
if(WITH_SDL)
|
||||
if(AUDASPACE_STANDALONE)
|
||||
if(USE_SDL2)
|
||||
find_package(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIR})
|
||||
set(SDL_LIBRARY ${SDL2_LIBRARY})
|
||||
set(SDL_FOUND TRUE)
|
||||
else()
|
||||
find_package(SDL ${PACKAGE_OPTION})
|
||||
endif()
|
||||
else()
|
||||
find_package(SDL ${PACKAGE_OPTION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_FOUND)
|
||||
set(SDL_SRC
|
||||
plugins/sdl/SDLDevice.cpp
|
||||
)
|
||||
set(SDL_HDR
|
||||
plugins/sdl/SDLDevice.h
|
||||
)
|
||||
|
||||
if(NOT PLUGIN_SDL)
|
||||
list(APPEND INCLUDE ${SDL_INCLUDE_DIR})
|
||||
list(APPEND LIBRARIES ${SDL_LIBRARY})
|
||||
list(APPEND SRC ${SDL_SRC})
|
||||
list(APPEND HDR ${SDL_HDR})
|
||||
list(APPEND STATIC_PLUGINS SDLDevice)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND AUDASPACE_STANDALONE)
|
||||
file(GLOB SDL_DLLS ${LIBRARY_PATH}/sdl/bin/*.dll)
|
||||
list(APPEND DLLS ${SDL_DLLS})
|
||||
endif()
|
||||
else()
|
||||
set(WITH_SDL FALSE CACHE BOOL "Build With SDL" FORCE)
|
||||
message(WARNING "SDL not found, plugin will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# library configuration
|
||||
|
||||
if(SHARED_LIBRARY)
|
||||
set(AUD_LIBRARY_TYPE AUD_SHARED_LIBRARY)
|
||||
set(LIBRARY_TYPE SHARED)
|
||||
add_definitions(-DAUD_BUILD_SHARED_LIBRARY)
|
||||
else()
|
||||
set(AUD_LIBRARY_TYPE AUD_STATIC_LIBRARY)
|
||||
set(LIBRARY_TYPE STATIC)
|
||||
endif()
|
||||
|
||||
# file configuration
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config/Audaspace.h.in ${CMAKE_CURRENT_BINARY_DIR}/Audaspace.h ESCAPE_QUOTES @ONLY)
|
||||
|
||||
list(APPEND HDR ${CMAKE_CURRENT_BINARY_DIR}/Audaspace.h)
|
||||
|
||||
set(STATIC_PLUGIN_CLASSES "")
|
||||
set(STATIC_PLUGIN_REGISTERS "")
|
||||
|
||||
foreach(PLUGIN ${STATIC_PLUGINS})
|
||||
list(APPEND STATIC_PLUGIN_CLASSES "STATIC_PLUGIN_CLASS(" ${PLUGIN} ")\n")
|
||||
list(APPEND STATIC_PLUGIN_REGISTERS "\tSTATIC_PLUGIN_REGISTER(" ${PLUGIN} ")\n")
|
||||
endforeach()
|
||||
|
||||
string(CONCAT STATIC_PLUGIN_CLASSES ${STATIC_PLUGIN_CLASSES})
|
||||
string(CONCAT STATIC_PLUGIN_REGISTERS ${STATIC_PLUGIN_REGISTERS})
|
||||
|
||||
if(WIN32)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/plugin/PluginManagerWindows.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/PluginManager.cpp ESCAPE_QUOTES @ONLY)
|
||||
if(WITH_FFTW)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/fx/HRTFLoaderWindows.cpp ${CMAKE_CURRENT_BINARY_DIR}/HRTFLoader.cpp COPYONLY)
|
||||
endif()
|
||||
else()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/plugin/PluginManagerUnix.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/PluginManager.cpp ESCAPE_QUOTES @ONLY)
|
||||
if(WITH_FFTW)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/fx/HRTFLoaderUnix.cpp ${CMAKE_CURRENT_BINARY_DIR}/HRTFLoader.cpp COPYONLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND SRC ${CMAKE_CURRENT_BINARY_DIR}/PluginManager.cpp)
|
||||
if(WITH_FFTW)
|
||||
list(APPEND SRC ${CMAKE_CURRENT_BINARY_DIR}/HRTFLoader.cpp)
|
||||
endif()
|
||||
|
||||
# directories
|
||||
|
||||
include_directories(${INCLUDE})
|
||||
link_directories()
|
||||
|
||||
# install configuration
|
||||
|
||||
if(WIN32)
|
||||
set(BIN_DESTINATION ".")
|
||||
else()
|
||||
set(BIN_DESTINATION "bin")
|
||||
endif()
|
||||
|
||||
set(LIB_DESTINATION "lib${LIB_SUFFIX}")
|
||||
|
||||
# library
|
||||
|
||||
add_library(audaspace ${LIBRARY_TYPE} ${SRC} ${HDR})
|
||||
target_link_libraries(audaspace ${LIBRARIES})
|
||||
set_target_properties(audaspace PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
|
||||
if(AUDASPACE_STANDALONE)
|
||||
install(TARGETS audaspace
|
||||
RUNTIME DESTINATION ${BIN_DESTINATION}
|
||||
LIBRARY DESTINATION ${LIB_DESTINATION}
|
||||
ARCHIVE DESTINATION ${LIB_DESTINATION}
|
||||
)
|
||||
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/audaspace)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Audaspace.h DESTINATION include/audaspace)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages/pkgconfig/audaspace.pc.in ${CMAKE_CURRENT_BINARY_DIR}/audaspace.pc @ONLY)
|
||||
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/audaspace.pc DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# plugins
|
||||
|
||||
if(WITH_FFMPEG AND PLUGIN_FFMPEG)
|
||||
add_definitions(-DFFMPEG_PLUGIN)
|
||||
include_directories(${INCLUDE} ${FFMPEG_INCLUDE_DIRS})
|
||||
add_library(audffmpeg SHARED ${FFMPEG_SRC} ${FFMPEG_HDR} ${HDR})
|
||||
target_link_libraries(audffmpeg audaspace ${FFMPEG_LIBRARIES})
|
||||
set_target_properties(audffmpeg PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
install(TARGETS audffmpeg DESTINATION ${DEFAULT_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
if(WITH_JACK AND PLUGIN_JACK)
|
||||
add_definitions(-DJACK_PLUGIN)
|
||||
include_directories(${INCLUDE} ${JACK_INCLUDE_DIRS})
|
||||
add_library(audjack SHARED ${JACK_SRC} ${JACK_HDR} ${HDR})
|
||||
if(DYNLOAD_JACK)
|
||||
target_link_libraries(audjack audaspace)
|
||||
else()
|
||||
target_link_libraries(audjack audaspace ${JACK_LIBRARIES})
|
||||
endif()
|
||||
set_target_properties(audjack PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
install(TARGETS audjack DESTINATION ${DEFAULT_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
if(WITH_LIBSNDFILE AND PLUGIN_LIBSNDFILE)
|
||||
add_definitions(-DLIBSNDFILE_PLUGIN)
|
||||
include_directories(${INCLUDE} ${LIBSNDFILE_INCLUDE_DIRS})
|
||||
add_library(audlibsndfile SHARED ${LIBSNDFILE_SRC} ${LIBSNDFILE_HDR} ${HDR})
|
||||
set_target_properties(audlibsndfile PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
target_link_libraries(audlibsndfile audaspace ${LIBSNDFILE_LIBRARIES})
|
||||
install(TARGETS audlibsndfile DESTINATION ${DEFAULT_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL AND PLUGIN_OPENAL)
|
||||
add_definitions(-DOPENAL_PLUGIN)
|
||||
include_directories(${INCLUDE} ${OPENAL_INCLUDE_DIR})
|
||||
add_library(audopenal SHARED ${OPENAL_SRC} ${OPENAL_HDR} ${HDR})
|
||||
set_target_properties(audopenal PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
target_link_libraries(audopenal audaspace ${OPENAL_LIBRARY})
|
||||
install(TARGETS audopenal DESTINATION ${DEFAULT_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
if(WITH_SDL AND PLUGIN_SDL)
|
||||
add_definitions(-DSDL_PLUGIN)
|
||||
include_directories(${INCLUDE} ${SDL_INCLUDE_DIR})
|
||||
add_library(audsdl SHARED ${SDL_SRC} ${SDL_HDR} ${HDR})
|
||||
set_target_properties(audsdl PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
target_link_libraries(audsdl audaspace ${SDL_LIBRARY})
|
||||
install(TARGETS audsdl DESTINATION ${DEFAULT_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
# dlls
|
||||
|
||||
if(WIN32)
|
||||
if(DLLS)
|
||||
install(FILES ${DLLS} DESTINATION ${BIN_DESTINATION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# demos
|
||||
|
||||
if(BUILD_DEMOS)
|
||||
include_directories(${INCLUDE})
|
||||
|
||||
set(DEMOS audaplay audaconvert audaremap signalgen randsounds dynamicmusic playbackmanager)
|
||||
|
||||
add_executable(audaplay demos/audaplay.cpp)
|
||||
target_link_libraries(audaplay audaspace)
|
||||
|
||||
add_executable(audaconvert demos/audaconvert.cpp)
|
||||
target_link_libraries(audaconvert audaspace)
|
||||
|
||||
add_executable(audaremap demos/audaremap.cpp)
|
||||
target_link_libraries(audaremap audaspace)
|
||||
|
||||
add_executable(signalgen demos/signalgen.cpp)
|
||||
target_link_libraries(signalgen audaspace)
|
||||
|
||||
add_executable(randsounds demos/randsounds.cpp)
|
||||
target_link_libraries(randsounds audaspace)
|
||||
|
||||
add_executable(dynamicmusic demos/dynamicmusic.cpp)
|
||||
target_link_libraries(dynamicmusic audaspace)
|
||||
|
||||
add_executable(playbackmanager demos/playbackmanager.cpp)
|
||||
target_link_libraries(playbackmanager audaspace)
|
||||
|
||||
if(WITH_FFTW)
|
||||
list(APPEND DEMOS convolution binaural)
|
||||
|
||||
add_executable(convolution demos/convolution.cpp)
|
||||
target_link_libraries(convolution audaspace)
|
||||
|
||||
add_executable(binaural demos/binaural.cpp)
|
||||
target_link_libraries(binaural audaspace)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL)
|
||||
list(APPEND DEMOS openaldevices)
|
||||
|
||||
add_executable(openaldevices demos/openaldevices.cpp)
|
||||
if(PLUGIN_OPENAL)
|
||||
target_link_libraries(openaldevices audaspace audopenal)
|
||||
else()
|
||||
target_link_libraries(openaldevices audaspace)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS ${DEMOS}
|
||||
RUNTIME DESTINATION ${BIN_DESTINATION}
|
||||
LIBRARY DESTINATION ${LIB_DESTINATION}
|
||||
ARCHIVE DESTINATION ${LIB_DESTINATION}
|
||||
)
|
||||
endif()
|
||||
|
||||
# bindings
|
||||
|
||||
if(WITH_C)
|
||||
if(SEPARATE_C)
|
||||
add_library(audaspace-c ${LIBRARY_TYPE} ${C_SRC} ${C_HDR})
|
||||
target_link_libraries(audaspace-c audaspace)
|
||||
set_target_properties(audaspace-c PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
install(TARGETS audaspace-c
|
||||
RUNTIME DESTINATION ${BIN_DESTINATION}
|
||||
LIBRARY DESTINATION ${LIB_DESTINATION}
|
||||
ARCHIVE DESTINATION ${LIB_DESTINATION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(AUDASPACE_STANDALONE)
|
||||
install(FILES ${C_HDR} DESTINATION include/audaspace)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
set(PYTHON_SRC
|
||||
bindings/python/PyAPI.cpp
|
||||
bindings/python/PyDevice.cpp
|
||||
bindings/python/PyDynamicMusic.cpp
|
||||
bindings/python/PyHandle.cpp
|
||||
bindings/python/PyPlaybackManager.cpp
|
||||
bindings/python/PySequence.cpp
|
||||
bindings/python/PySequenceEntry.cpp
|
||||
bindings/python/PySound.cpp
|
||||
bindings/python/PySource.cpp
|
||||
bindings/python/PyThreadPool.cpp
|
||||
)
|
||||
set(PYTHON_HDR
|
||||
bindings/python/PyAPI.h
|
||||
bindings/python/PyDevice.h
|
||||
bindings/python/PyDynamicMusic.h
|
||||
bindings/python/PyHandle.h
|
||||
bindings/python/PyPlaybackManager.h
|
||||
bindings/python/PySequence.h
|
||||
bindings/python/PySequenceEntry.h
|
||||
bindings/python/PySound.h
|
||||
bindings/python/PySource.h
|
||||
bindings/python/PyThreadPool.h
|
||||
)
|
||||
|
||||
if(WITH_FFTW)
|
||||
list(APPEND PYTHON_SRC
|
||||
bindings/python/PyHRTF.cpp
|
||||
bindings/python/PyImpulseResponse.cpp
|
||||
)
|
||||
list(APPEND PYTHON_HDR
|
||||
bindings/python/PyHRTF.h
|
||||
bindings/python/PyImpulseResponse.h
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(audaspace-py ${LIBRARY_TYPE} ${PYTHON_SRC} ${PYTHON_HDR})
|
||||
target_link_libraries(audaspace-py audaspace ${PYTHON_LIBRARIES})
|
||||
set_target_properties(audaspace-py PROPERTIES SOVERSION ${AUDASPACE_VERSION})
|
||||
|
||||
if(AUDASPACE_STANDALONE)
|
||||
install(TARGETS audaspace-py
|
||||
RUNTIME DESTINATION ${BIN_DESTINATION}
|
||||
LIBRARY DESTINATION ${LIB_DESTINATION}
|
||||
ARCHIVE DESTINATION ${LIB_DESTINATION}
|
||||
)
|
||||
|
||||
install(FILES ${PYTHON_HDR} DESTINATION include/audaspace/python)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON_MODULE)
|
||||
set(PYTHON_SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bindings/python)
|
||||
configure_file(${PYTHON_SOURCE_DIRECTORY}/setup.py.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py ESCAPE_QUOTES @ONLY)
|
||||
|
||||
if(APPLE)
|
||||
add_custom_command(OUTPUT build COMMAND MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} ${PYTHON_EXECUTABLE} setup.py build DEPENDS ${PYTHON_SRC} ${PYTHON_HDR})
|
||||
elseif(WIN32)
|
||||
set(ENV{VS100COMNTOOLS} $ENV{VS120COMNTOOLS})
|
||||
add_custom_command(OUTPUT build COMMAND ${PYTHON_EXECUTABLE} setup.py build DEPENDS ${PYTHON_SRC} ${PYTHON_HDR})
|
||||
else()
|
||||
add_custom_command(OUTPUT build COMMAND ${PYTHON_EXECUTABLE} setup.py build DEPENDS ${PYTHON_SRC} ${PYTHON_HDR})
|
||||
endif()
|
||||
add_custom_target(pythonmodule ALL DEPENDS build SOURCES ${PYTHON_SOURCE_DIRECTORY}/setup.py.in ${PYTHON_SRC} ${PYTHON_HDR})
|
||||
add_dependencies(pythonmodule audaspace)
|
||||
|
||||
install(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} setup.py install --root=\$ENV{DESTDIR} --prefix=${CMAKE_INSTALL_PREFIX})")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# docs
|
||||
|
||||
if(WITH_DOCS)
|
||||
find_package(Doxygen ${PACKAGE_OPTION})
|
||||
|
||||
if(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
|
||||
add_custom_target(audaspace_doc ALL ${DOXYGEN_EXECUTABLE} Doxyfile COMMENT "Building C++ HTML documentation with Doxygen.")
|
||||
else()
|
||||
set(WITH_DOCS FALSE CACHE BOOL "Build C++ HTML Documentation with Doxygen" FORCE)
|
||||
message(WARNING "Doxygen (and/or dot) not found, documentation will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BINDING_DOCS)
|
||||
find_package(Sphinx ${PACKAGE_OPTION})
|
||||
|
||||
if(SPHINX_FOUND)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bindings/doc/conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY)
|
||||
|
||||
add_custom_target(bindings_doc ALL COMMAND ${PYTHON_EXECUTABLE} setup.py --build-docs ${SPHINX_EXECUTABLE} -q -b html -c "${CMAKE_CURRENT_BINARY_DIR}" -d "${CMAKE_CURRENT_BINARY_DIR}/_doctrees" "${CMAKE_CURRENT_SOURCE_DIR}/bindings/doc" "${CMAKE_CURRENT_BINARY_DIR}/doc/bindings" DEPENDS pythonmodule COMMENT "Building C/Python HTML documentation with Sphinx.")
|
||||
else()
|
||||
set(WITH_BINDING_DOCS FALSE CACHE BOOL "Build C/Python HTML Documentation with Sphinx" FORCE)
|
||||
message(WARNING "Sphinx not found, binding documentation will not be built.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_DOCS OR WITH_BINDING_DOCS)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/ DESTINATION ${DOCUMENTATION_INSTALL_PATH})
|
||||
endif()
|
107
extern/audaspace/INSTALL
vendored
107
extern/audaspace/INSTALL
vendored
@@ -1,107 +0,0 @@
|
||||
Audaspace Installation Guide
|
||||
============================
|
||||
|
||||
This document guides through the building and installation of audaspace.
|
||||
|
||||
The build system used to build audaspace is CMake and it allows very building the library for very different application scenarios from a very general shared library build with plugins that is suitable for system wide installations to building everything into a single static library to be linked into a standalone program.
|
||||
|
||||
Build Dependencies
|
||||
------------------
|
||||
|
||||
Audaspace is written in C++ 11 so a fairly recent compiler (g++ 4.8.2, clang 3.3, MSVC 2013) is needed to build it. The build system used is CMake and you need at least version 3.0. The following build dependencies are all optional, but without any it's neither possible to open sound files nor play back through the speakers. For windows a library folder called build-dependencies can be downloaded from https://github.com/audaspace/audaspace/releases.
|
||||
|
||||
- OpenAL (input/output device)
|
||||
- SDL (output device)
|
||||
- Jack (output device)
|
||||
- libsndfile (file access)
|
||||
- ffmpeg (file access)
|
||||
- Python (language binding)
|
||||
|
||||
Getting the Code
|
||||
----------------
|
||||
|
||||
The audaspace source code or binary releases can be downloaded from https://github.com/audaspace/audaspace/releases.
|
||||
|
||||
For the most recent version you can use git to get the source code.
|
||||
|
||||
git clone https://github.com/audaspace/audaspace.git
|
||||
|
||||
Plugins
|
||||
-------
|
||||
|
||||
Before diving into the exact build steps for each platform, we will have a look at plugins. There are so far two types of plugins: input and output plugins. Input plugins are for reading audio files in many different formats and output plugins are for output devices on different platforms. During the configuration audaspace's standard plugins can be enabled with their repsective `WITH_*` and `PLUGIN_*` configuration option. Plugins are built as shared libraries. By default audaspace looks in the `DEFAULT_PLUGIN_PATH` for shared libraries it can load. Building with a dependency (`WITH_*`) but without enabling the respective `PLUGIN_*` option will compile the plugin directly into the library, so the plugin always gets loaded when the plugins are initialised.
|
||||
|
||||
Building for Linux
|
||||
------------------
|
||||
|
||||
### Configuration ###
|
||||
|
||||
It is highly recommended to build audaspace outside of the actual source code in a specific build directory.
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
Configuration is then either done interactively by using ccmake
|
||||
|
||||
ccmake ../audaspace
|
||||
|
||||
__or__ it can be done by defining variables directly during the run of cmake.
|
||||
|
||||
cmake ../build \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DBUILD_DEMOS:BOOL=TRUE \
|
||||
-DSHARED_LIBRARY:BOOL=TRUE \
|
||||
-DWITH_C:BOOL=TRUE \
|
||||
-DWITH_FFMPEG:BOOL=TRUE \
|
||||
-DWITH_JACK:BOOL=TRUE \
|
||||
-DWITH_LIBSNDFILE:BOOL=TRUE \
|
||||
-DWITH_OPENAL:BOOL=TRUE \
|
||||
-DWITH_PYTHON:BOOL=TRUE \
|
||||
-DWITH_SDL:BOOL=TRUE \
|
||||
-DDEFAULT_PLUGIN_PATH:PATH=/usr/share/audaspace/plugins
|
||||
|
||||
This specific configuration is recommended for a system wide installation of audaspace where all build dependencies are required.
|
||||
|
||||
### Building ###
|
||||
|
||||
After configuration the building is as easy as running
|
||||
|
||||
make
|
||||
|
||||
### Installation ###
|
||||
|
||||
Installation is then also simple using
|
||||
|
||||
make install
|
||||
|
||||
### Using the library ###
|
||||
|
||||
When audaspace is installed to the system, the required configuration for _pkgconfig_ is also installed and pkgconfig can then be used to compile projects with audaspace.
|
||||
|
||||
It is also possible to build audaspace as a static library and use it directly in a project. For this the library has to be configured accordingly with ccmake and after building the resulting library file can be added to the project's build system.
|
||||
|
||||
Building for Windows
|
||||
--------------------
|
||||
|
||||
### Configuration ###
|
||||
|
||||
Using cmake-gui select Visual Studio 2013 or 2015 for the architecture you want to build for and choose audaspace's source directory and a build directory. It is highly recommended to build audaspace outside of the source directory. During the first configuration cmake tries to find the dependencies. Dependencies that are not installed on the system are automatically disabled. To prevent this, enable `WITH_STRICT_DEPENDENCIES`. To use the build dependencies folder from the website, set the `LIBRARY_PATH` to point to the extracted directory. Also don't forget to set the `CMAKE_INSTALL_PREFIX` to a path where your user account can install to. Finally enable the dependencies that you want to use (`WITH_*`), configure and generate.
|
||||
|
||||
### Building ###
|
||||
|
||||
Open the project in Visual Studio and set the configuration to Release. Then you can simply hit the build button.
|
||||
|
||||
### Installation ###
|
||||
|
||||
To install audaspace to your target folder, build the INSTALL target.
|
||||
Note that if you don't use the libraries folder provided on the website, the INSTALL target might fail and you need to copy the files manually, including the dlls of the dependencies.
|
||||
|
||||
### Using the library ###
|
||||
|
||||
To use audaspace in your project, configure the include path and the libraries that you need, which you can find in the include and lib directories in your installation path.
|
||||
|
||||
### Notes for plugins on windows ###
|
||||
|
||||
- FFMPEG: Due to a problem with FFMPEG's 32 bit libraries, it is necessary to disable SAFESEH for the audffmpeg build target inside Visual Studio (Properties, Linker, Advanced). This has to be done after each generate step of CMake.
|
||||
- Jack: If no jack server is running on windows and your application or one of the demos tries to use the jack plugin, this adds a long delay to the device initialisation. In case you don't need jack, make sure to disable the plugin or for the prebuilt version of audaspace simply delete audjack.dll (and any files with jack in the name to clean up).
|
202
extern/audaspace/LICENSE
vendored
202
extern/audaspace/LICENSE
vendored
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
47
extern/audaspace/README.md
vendored
47
extern/audaspace/README.md
vendored
@@ -1,47 +0,0 @@
|
||||
audaspace
|
||||
=========
|
||||
|
||||
Audaspace (pronounced "outer space") is a high level audio library written in C++ with language bindings for Python for example. It started out as the audio engine of the 3D modelling application Blender and is now released as a standalone library.
|
||||
|
||||
Documentation and Community
|
||||
---------------------------
|
||||
|
||||
The documentation including guides for building and installing, demos, tutorials as well as the API reference for C++, C and python can be found on https://audaspace.github.io.
|
||||
|
||||
Bug reports and feature requests should go to the [issue tracker](https://github.com/audaspace/audaspace/issues).
|
||||
|
||||
For any other discussions about audaspace there is a [mailing list](https://groups.google.com/forum/#!forum/audaspace) and there is also the IRC channel #audaspace on irc.freenode.net.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
The following (probably incomplete) features are supported by audaspace:
|
||||
|
||||
* input/output devices
|
||||
* input from microphones, line in, etc.
|
||||
* output devices including 3D audio support
|
||||
* file reading/writing
|
||||
* filters like low-/highpass and effects like delay, reverse or fading
|
||||
* generators for simple waveforms like silence, sine and triangle
|
||||
* respecification - this term is used for changing stream parameters which are
|
||||
* channel count - channel remapping
|
||||
* sample format - the library internally uses 32 bit floats
|
||||
* sample rate - resampling
|
||||
* simple (superposition, joining and ping-pong aka forward-reverse) and more complex (non-linear audio editing) sequencing of sounds
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
> Copyright © 2009-2015 Jörg Müller. All rights reserved.
|
||||
>
|
||||
> Licensed under the Apache License, Version 2.0 (the "License");
|
||||
> you may not use this file except in compliance with the License.
|
||||
> You may obtain a copy of the License at
|
||||
>
|
||||
> http://www.apache.org/licenses/LICENSE-2.0
|
||||
>
|
||||
> Unless required by applicable law or agreed to in writing, software
|
||||
> distributed under the License is distributed on an "AS IS" BASIS,
|
||||
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
> See the License for the specific language governing permissions and
|
||||
> limitations under the License.
|
336
extern/audaspace/bindings/C/AUD_Device.cpp
vendored
336
extern/audaspace/bindings/C/AUD_Device.cpp
vendored
@@ -1,336 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2009-2016 Jörg Müller
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
#include "devices/DeviceManager.h"
|
||||
#include "devices/I3DDevice.h"
|
||||
#include "devices/IDeviceFactory.h"
|
||||
#include "devices/ReadDevice.h"
|
||||
#include "Exception.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
using namespace aud;
|
||||
|
||||
#define AUD_CAPI_IMPLEMENTATION
|
||||
#include "AUD_Device.h"
|
||||
|
||||
static inline aud::Specs convCToSpec(AUD_Specs specs)
|
||||
{
|
||||
aud::Specs s;
|
||||
s.channels = static_cast<Channels>(specs.channels);
|
||||
s.rate = static_cast<SampleRate>(specs.rate);
|
||||
return s;
|
||||
}
|
||||
|
||||
static inline aud::DeviceSpecs convCToDSpec(AUD_DeviceSpecs specs)
|
||||
{
|
||||
aud::DeviceSpecs s;
|
||||
s.specs = convCToSpec(specs.specs);
|
||||
s.format = static_cast<SampleFormat>(specs.format);
|
||||
return s;
|
||||
}
|
||||
|
||||
AUD_API AUD_Device* AUD_Device_open(const char* type, AUD_DeviceSpecs specs, int buffersize, const char* name)
|
||||
{
|
||||
DeviceSpecs dspecs = convCToDSpec(specs);
|
||||
|
||||
if(dspecs.channels == CHANNELS_INVALID)
|
||||
dspecs.channels = CHANNELS_STEREO;
|
||||
if(dspecs.format == FORMAT_INVALID)
|
||||
dspecs.format = FORMAT_FLOAT32;
|
||||
if(dspecs.rate == RATE_INVALID)
|
||||
dspecs.rate = RATE_48000;
|
||||
if(buffersize < 128)
|
||||
buffersize = AUD_DEFAULT_BUFFER_SIZE;
|
||||
if(name == nullptr)
|
||||
name = "";
|
||||
|
||||
try
|
||||
{
|
||||
if(!type)
|
||||
{
|
||||
auto device = DeviceManager::getDevice();
|
||||
if(!device)
|
||||
{
|
||||
DeviceManager::openDefaultDevice();
|
||||
device = DeviceManager::getDevice();
|
||||
}
|
||||
return new AUD_Device(device);
|
||||
}
|
||||
|
||||
if(type == std::string("read"))
|
||||
{
|
||||
return new AUD_Device(new ReadDevice(dspecs));
|
||||
}
|
||||
|
||||
std::shared_ptr<IDeviceFactory> factory;
|
||||
if(!*type)
|
||||
factory = DeviceManager::getDefaultDeviceFactory();
|
||||
else
|
||||
factory = DeviceManager::getDeviceFactory(type);
|
||||
|
||||
if(factory)
|
||||
{
|
||||
factory->setName(name);
|
||||
factory->setSpecs(dspecs);
|
||||
factory->setBufferSize(buffersize);
|
||||
return new AUD_Device(factory->openDevice());
|
||||
}
|
||||
}
|
||||
catch(Exception&)
|
||||
{
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_lock(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
dev->lock();
|
||||
}
|
||||
|
||||
AUD_API AUD_Handle* AUD_Device_play(AUD_Device* device, AUD_Sound* sound, int keep)
|
||||
{
|
||||
assert(sound);
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
|
||||
try
|
||||
{
|
||||
AUD_Handle handle = dev->play(*sound, keep);
|
||||
if(handle.get())
|
||||
{
|
||||
return new AUD_Handle(handle);
|
||||
}
|
||||
}
|
||||
catch(Exception&)
|
||||
{
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_stopAll(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
dev->stopAll();
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_unlock(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
dev->unlock();
|
||||
}
|
||||
|
||||
AUD_API AUD_Channels AUD_Device_getChannels(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
return static_cast<AUD_Channels>(dev->getSpecs().channels);
|
||||
}
|
||||
|
||||
AUD_API AUD_DistanceModel AUD_Device_getDistanceModel(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
return static_cast<AUD_DistanceModel>(dev->getDistanceModel());
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_setDistanceModel(AUD_Device* device, AUD_DistanceModel value)
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
dev->setDistanceModel(static_cast<DistanceModel>(value));
|
||||
}
|
||||
|
||||
AUD_API float AUD_Device_getDopplerFactor(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
return dev->getDopplerFactor();
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_setDopplerFactor(AUD_Device* device, float value)
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
dev->setDopplerFactor(value);
|
||||
}
|
||||
|
||||
AUD_API AUD_SampleFormat AUD_Device_getFormat(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
return static_cast<AUD_SampleFormat>(dev->getSpecs().format);
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_getListenerLocation(AUD_Device* device, float value[3])
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
Vector3 v = dev->getListenerLocation();
|
||||
value[0] = v.x();
|
||||
value[1] = v.y();
|
||||
value[2] = v.z();
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_setListenerLocation(AUD_Device* device, const float value[3])
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
Vector3 v(value[0], value[1], value[2]);
|
||||
dev->setListenerLocation(v);
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_getListenerOrientation(AUD_Device* device, float value[4])
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
Quaternion v = dev->getListenerOrientation();
|
||||
value[0] = v.x();
|
||||
value[1] = v.y();
|
||||
value[2] = v.z();
|
||||
value[3] = v.w();
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_setListenerOrientation(AUD_Device* device, const float value[4])
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
Quaternion v(value[3], value[0], value[1], value[2]);
|
||||
dev->setListenerOrientation(v);
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_getListenerVelocity(AUD_Device* device, float value[3])
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
Vector3 v = dev->getListenerVelocity();
|
||||
value[0] = v.x();
|
||||
value[1] = v.y();
|
||||
value[2] = v.z();
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_setListenerVelocity(AUD_Device* device, const float value[3])
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
Vector3 v(value[0], value[1], value[2]);
|
||||
dev->setListenerVelocity(v);
|
||||
}
|
||||
|
||||
AUD_API double AUD_Device_getRate(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
return dev->getSpecs().rate;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Device_getSpeedOfSound(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
return dev->getSpeedOfSound();
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_setSpeedOfSound(AUD_Device* device, float value)
|
||||
{
|
||||
auto dev = device ? std::dynamic_pointer_cast<I3DDevice>(*device) : DeviceManager::get3DDevice();
|
||||
dev->setSpeedOfSound(value);
|
||||
}
|
||||
|
||||
AUD_API float AUD_Device_getVolume(AUD_Device* device)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
return dev->getVolume();
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_setVolume(AUD_Device* device, float value)
|
||||
{
|
||||
auto dev = device ? *device : DeviceManager::getDevice();
|
||||
dev->setVolume(value);
|
||||
}
|
||||
|
||||
AUD_API int AUD_Device_read(AUD_Device* device, unsigned char* buffer, int length)
|
||||
{
|
||||
assert(device);
|
||||
assert(buffer);
|
||||
|
||||
auto readDevice = std::dynamic_pointer_cast<ReadDevice>(*device);
|
||||
if(!readDevice)
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
return readDevice->read(buffer, length);
|
||||
}
|
||||
catch(Exception&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
AUD_API void AUD_Device_free(AUD_Device* device)
|
||||
{
|
||||
assert(device);
|
||||
|
||||
try
|
||||
{
|
||||
delete device;
|
||||
}
|
||||
catch(Exception&)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
AUD_API AUD_Device* AUD_Device_getCurrent()
|
||||
{
|
||||
auto device = DeviceManager::getDevice();
|
||||
|
||||
if(!device)
|
||||
return nullptr;
|
||||
|
||||
return new AUD_Device(device);
|
||||
}
|
||||
|
||||
AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time)
|
||||
{
|
||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||
if(synchronizer)
|
||||
synchronizer->seek(*reinterpret_cast<std::shared_ptr<IHandle>*>(handle), time);
|
||||
}
|
||||
|
||||
AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle)
|
||||
{
|
||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||
if(synchronizer)
|
||||
return synchronizer->getPosition(*reinterpret_cast<std::shared_ptr<IHandle>*>(handle));
|
||||
return (*reinterpret_cast<std::shared_ptr<IHandle>*>(handle))->getPosition();
|
||||
}
|
||||
|
||||
AUD_API void AUD_playSynchronizer()
|
||||
{
|
||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||
if(synchronizer)
|
||||
synchronizer->play();
|
||||
}
|
||||
|
||||
AUD_API void AUD_stopSynchronizer()
|
||||
{
|
||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||
if(synchronizer)
|
||||
synchronizer->stop();
|
||||
}
|
||||
|
||||
AUD_API void AUD_setSynchronizerCallback(AUD_syncFunction function, void* data)
|
||||
{
|
||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||
if(synchronizer)
|
||||
synchronizer->setSyncCallback(function, data);
|
||||
}
|
||||
|
||||
AUD_API int AUD_isSynchronizerPlaying()
|
||||
{
|
||||
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
|
||||
if(synchronizer)
|
||||
return synchronizer->isPlaying();
|
||||
return false;
|
||||
}
|
||||
|
258
extern/audaspace/bindings/C/AUD_Device.h
vendored
258
extern/audaspace/bindings/C/AUD_Device.h
vendored
@@ -1,258 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2009-2016 Jörg Müller
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AUD_Types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/// Possible distance models for the 3D device.
|
||||
typedef enum
|
||||
{
|
||||
AUD_DISTANCE_MODEL_INVALID = 0,
|
||||
AUD_DISTANCE_MODEL_INVERSE,
|
||||
AUD_DISTANCE_MODEL_INVERSE_CLAMPED,
|
||||
AUD_DISTANCE_MODEL_LINEAR,
|
||||
AUD_DISTANCE_MODEL_LINEAR_CLAMPED,
|
||||
AUD_DISTANCE_MODEL_EXPONENT,
|
||||
AUD_DISTANCE_MODEL_EXPONENT_CLAMPED
|
||||
} AUD_DistanceModel;
|
||||
|
||||
typedef void (*AUD_syncFunction)(void*, int, float);
|
||||
|
||||
/**
|
||||
* Opens a new sound device.
|
||||
* \param type The name of the device.
|
||||
* Can be NULL to open the default device with default settings or return the handle to the already opened one.
|
||||
* Can be "" to open the a default factory device with given settings.
|
||||
* Can be "read" to open a readable device.
|
||||
* \param specs Specification of the device parameters.
|
||||
* \param buffersize Size of the mixing buffer.
|
||||
* \param name Custom name of the device.
|
||||
* \return A handle to the opened device or NULL on failure.
|
||||
*/
|
||||
extern AUD_API AUD_Device* AUD_Device_open(const char* type, AUD_DeviceSpecs specs, int buffersize, const char* name);
|
||||
|
||||
/**
|
||||
* Locks the playback device.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_lock(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Plays back a sound file.
|
||||
* \param sound The handle of the sound file.
|
||||
* \param keep When keep is true the sound source will not be deleted but set to
|
||||
* paused when its end has been reached.
|
||||
* \return A handle to the played back sound.
|
||||
*/
|
||||
extern AUD_API AUD_Handle* AUD_Device_play(AUD_Device* device, AUD_Sound* sound, int keep);
|
||||
|
||||
/**
|
||||
* Stops all sounds playing.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_stopAll(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Unlocks the device.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_unlock(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Retrieves the channels of a device.
|
||||
* param device The device to get the channels from.
|
||||
* return The channels of the device.
|
||||
*/
|
||||
extern AUD_API AUD_Channels AUD_Device_getChannels(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Retrieves the distance model of a device.
|
||||
* param device The device to get the distance model from.
|
||||
* return The distance model of the device.
|
||||
*/
|
||||
extern AUD_API AUD_DistanceModel AUD_Device_getDistanceModel(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Sets the distance model of a device.
|
||||
* param device The device to set the distance model from.
|
||||
* param value The new distance model to set.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_setDistanceModel(AUD_Device* device, AUD_DistanceModel value);
|
||||
|
||||
/**
|
||||
* Retrieves the doppler factor of a device.
|
||||
* param device The device to get the doppler factor from.
|
||||
* return The doppler factor of the device.
|
||||
*/
|
||||
extern AUD_API float AUD_Device_getDopplerFactor(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Sets the doppler factor of a device.
|
||||
* param device The device to set the doppler factor from.
|
||||
* param value The new doppler factor to set.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_setDopplerFactor(AUD_Device* device, float value);
|
||||
|
||||
/**
|
||||
* Retrieves the format of a device.
|
||||
* param device The device to get the format from.
|
||||
* return The format of the device.
|
||||
*/
|
||||
extern AUD_API AUD_SampleFormat AUD_Device_getFormat(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Retrieves the listener location of a device.
|
||||
* param device The device to get the listener location from.
|
||||
* return The listener location of the device.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_getListenerLocation(AUD_Device* device, float value[3]);
|
||||
|
||||
/**
|
||||
* Sets the listener location of a device.
|
||||
* param device The device to set the listener location from.
|
||||
* param value The new listener location to set.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_setListenerLocation(AUD_Device* device, const float value[3]);
|
||||
|
||||
/**
|
||||
* Retrieves the listener orientation of a device.
|
||||
* param device The device to get the listener orientation from.
|
||||
* return The listener orientation of the device.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_getListenerOrientation(AUD_Device* device, float value[4]);
|
||||
|
||||
/**
|
||||
* Sets the listener orientation of a device.
|
||||
* param device The device to set the listener orientation from.
|
||||
* param value The new listener orientation to set.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_setListenerOrientation(AUD_Device* device, const float value[4]);
|
||||
|
||||
/**
|
||||
* Retrieves the listener velocity of a device.
|
||||
* param device The device to get the listener velocity from.
|
||||
* return The listener velocity of the device.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_getListenerVelocity(AUD_Device* device, float value[3]);
|
||||
|
||||
/**
|
||||
* Sets the listener velocity of a device.
|
||||
* param device The device to set the listener velocity from.
|
||||
* param value The new listener velocity to set.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_setListenerVelocity(AUD_Device* device, const float value[3]);
|
||||
|
||||
/**
|
||||
* Retrieves the rate of a device.
|
||||
* param device The device to get the rate from.
|
||||
* return The rate of the device.
|
||||
*/
|
||||
extern AUD_API double AUD_Device_getRate(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Retrieves the speed of sound of a device.
|
||||
* param device The device to get the speed of sound from.
|
||||
* return The speed of sound of the device.
|
||||
*/
|
||||
extern AUD_API float AUD_Device_getSpeedOfSound(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Sets the speed of sound of a device.
|
||||
* param device The device to set the speed of sound from.
|
||||
* param value The new speed of sound to set.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_setSpeedOfSound(AUD_Device* device, float value);
|
||||
|
||||
/**
|
||||
* Retrieves the volume of a device.
|
||||
* param device The device to get the volume from.
|
||||
* return The volume of the device.
|
||||
*/
|
||||
extern AUD_API float AUD_Device_getVolume(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Sets the volume of a device.
|
||||
* param device The device to set the volume from.
|
||||
* param value The new volume to set.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_setVolume(AUD_Device* device, float value);
|
||||
|
||||
/**
|
||||
* Reads the next samples into the supplied buffer.
|
||||
* \param device The readable device.
|
||||
* \param buffer The target buffer.
|
||||
* \param length The length in samples to be filled.
|
||||
* \return True if the reading succeeded, false if there are no sounds
|
||||
* played back currently, in that case the buffer is filled with
|
||||
* silence.
|
||||
*/
|
||||
extern AUD_API int AUD_Device_read(AUD_Device* device, unsigned char* buffer, int length);
|
||||
|
||||
/**
|
||||
* Closes a device. Handle becomes invalid afterwards.
|
||||
* \param device The device to close.
|
||||
*/
|
||||
extern AUD_API void AUD_Device_free(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Retrieves the current device of the DeviceManager.
|
||||
* \return A pointer to the current device, which needs to be freed with
|
||||
* AUD_Device_free.
|
||||
*/
|
||||
extern AUD_API AUD_Device* AUD_Device_getCurrent();
|
||||
|
||||
/**
|
||||
* Seeks sequenced sound scene playback.
|
||||
* \param handle Playback handle.
|
||||
* \param time Time in seconds to seek to.
|
||||
*/
|
||||
extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time);
|
||||
|
||||
/**
|
||||
* Returns the current sound scene playback time.
|
||||
* \param handle Playback handle.
|
||||
* \return The playback time in seconds.
|
||||
*/
|
||||
extern AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle);
|
||||
|
||||
/**
|
||||
* Starts the playback of jack transport if possible.
|
||||
*/
|
||||
extern AUD_API void AUD_playSynchronizer();
|
||||
|
||||
/**
|
||||
* Stops the playback of jack transport if possible.
|
||||
*/
|
||||
extern AUD_API void AUD_stopSynchronizer();
|
||||
|
||||
/**
|
||||
* Sets the sync callback for jack transport.
|
||||
* \param function The callback function.
|
||||
* \param data The data parameter for the callback.
|
||||
*/
|
||||
extern AUD_API void AUD_setSynchronizerCallback(AUD_syncFunction function, void* data);
|
||||
|
||||
/**
|
||||
* Returns whether jack transport is currently playing.
|
||||
* \return Whether jack transport is currently playing.
|
||||
*/
|
||||
extern AUD_API int AUD_isSynchronizerPlaying();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
144
extern/audaspace/bindings/C/AUD_DynamicMusic.cpp
vendored
144
extern/audaspace/bindings/C/AUD_DynamicMusic.cpp
vendored
@@ -1,144 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2015-2016 Juan Francisco Crespo Galán
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
#include "Exception.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
using namespace aud;
|
||||
|
||||
#define AUD_CAPI_IMPLEMENTATION
|
||||
#include "AUD_DynamicMusic.h"
|
||||
|
||||
AUD_API AUD_DynamicMusic* AUD_DynamicMusic_create(AUD_Device* device)
|
||||
{
|
||||
assert(device);
|
||||
|
||||
try
|
||||
{
|
||||
return new AUD_DynamicMusic(new DynamicMusic(*device));
|
||||
}
|
||||
catch(Exception&)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
AUD_API void AUD_DynamicMusic_free(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
delete player;
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_addScene(AUD_DynamicMusic* player, AUD_Sound* scene)
|
||||
{
|
||||
assert(player);
|
||||
assert(scene);
|
||||
|
||||
return (*player)->addScene(*scene);
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_setSecene(AUD_DynamicMusic* player, int scene)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->changeScene(scene);
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_getScene(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->getScene();
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_addTransition(AUD_DynamicMusic* player, int ini, int end, AUD_Sound* transition)
|
||||
{
|
||||
assert(player);
|
||||
assert(transition);
|
||||
|
||||
return (*player)->addTransition(ini, end, *transition);
|
||||
}
|
||||
|
||||
AUD_API void AUD_DynamicMusic_setFadeTime(AUD_DynamicMusic* player, float seconds)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
(*player)->setFadeTime(seconds);
|
||||
}
|
||||
|
||||
AUD_API float AUD_DynamicMusic_getFadeTime(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->getFadeTime();
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_resume(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->resume();
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->pause();
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->seek(position);
|
||||
}
|
||||
|
||||
AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->getPosition();
|
||||
}
|
||||
|
||||
AUD_API float AUD_DynamicMusic_getVolume(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->getVolume();
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_setVolume(AUD_DynamicMusic* player, float volume)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->setVolume(volume);
|
||||
}
|
||||
|
||||
AUD_API AUD_Status AUD_DynamicMusic_getStatus(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return static_cast<AUD_Status>((*player)->getStatus());
|
||||
}
|
||||
|
||||
AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player)
|
||||
{
|
||||
assert(player);
|
||||
|
||||
return (*player)->stop();
|
||||
}
|
145
extern/audaspace/bindings/C/AUD_DynamicMusic.h
vendored
145
extern/audaspace/bindings/C/AUD_DynamicMusic.h
vendored
@@ -1,145 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2015-2016 Juan Francisco Crespo Galán
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AUD_Types.h"
|
||||
#include "AUD_Handle.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new dynamic music player.
|
||||
* \param device The device that will be used to play sounds.
|
||||
* \return The new DynamicMusic object.
|
||||
*/
|
||||
extern AUD_API AUD_DynamicMusic* AUD_DynamicMusic_create(AUD_Device* device);
|
||||
|
||||
/**
|
||||
* Deletes a dynamic music player.
|
||||
* \param player The DynamicMusic object to be deleted.
|
||||
*/
|
||||
extern AUD_API void AUD_DynamicMusic_free(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Adds a sound scene to a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \param scene The sound to be added as a scene.
|
||||
* \return The index of the new scene.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_addScene(AUD_DynamicMusic* player, AUD_Sound* scene);
|
||||
|
||||
/**
|
||||
* Changes the current sound scene of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \param scene The index of the scene to be played.
|
||||
* \return 0 if the target scene doesn't exist.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_setSecene(AUD_DynamicMusic* player, int scene);
|
||||
|
||||
/**
|
||||
* Retrives the index of the current scene.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return The index of the current scene.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_getScene(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Adds a new transition between two scenes.
|
||||
* \param player The DynamicMusic object.
|
||||
* \param ini The origin scene for the transition.
|
||||
* \param end The end scene for the transition.
|
||||
* \param transition A sound that will be used as transition between two scenes.
|
||||
* \return 0 if the ini or end scenes don't exist.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_addTransition(AUD_DynamicMusic* player, int ini, int end, AUD_Sound* transition);
|
||||
|
||||
/**
|
||||
* Changes the fade time for the default transitions of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \param seconds The amount of secods that the crossfade transition will take.
|
||||
*/
|
||||
extern AUD_API void AUD_DynamicMusic_setFadeTime(AUD_DynamicMusic* player, float seconds);
|
||||
|
||||
/**
|
||||
* Retrieves the fade time of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return The fade time of the player.
|
||||
*/
|
||||
extern AUD_API float AUD_DynamicMusic_getFadeTime(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Resumes the current scene playback of a dynamic music player if it is paused.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return 0 if the playback wasn't resumed.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_resume(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Pauses the current scene of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return 0 if the playback wasn't paused.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Seeks the current playing scene of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \param position The new position from which to play back, in seconds.
|
||||
* \return 0 if the seeking wasn't possible.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position);
|
||||
|
||||
/**
|
||||
* Retrieves the position of the current scene of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return The position of the current playing scene.
|
||||
*/
|
||||
extern AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Retrieves the volume of the current scene of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return The volume of the current playing scene.
|
||||
*/
|
||||
extern AUD_API float AUD_DynamicMusic_getVolume(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Changes the volume of the current scene in a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \param 0 if the volume couldn't be changed.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_setVolume(AUD_DynamicMusic* player, float volume);
|
||||
|
||||
/**
|
||||
* Retrieves the status of the current scene in a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return The Status of the current playing scene.
|
||||
*/
|
||||
extern AUD_API AUD_Status AUD_DynamicMusic_getStatus(AUD_DynamicMusic* player);
|
||||
|
||||
/**
|
||||
* Stops the current scene of a dynamic music player.
|
||||
* \param player The DynamicMusic object.
|
||||
* \return 0 if the playback wasn't stopped.
|
||||
*/
|
||||
extern AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
50
extern/audaspace/bindings/C/AUD_HRTF.cpp
vendored
50
extern/audaspace/bindings/C/AUD_HRTF.cpp
vendored
@@ -1,50 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2009-2015 Juan Francisco Crespo Galán
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
#include "Exception.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
using namespace aud;
|
||||
|
||||
#define AUD_CAPI_IMPLEMENTATION
|
||||
#include "AUD_HRTF.h"
|
||||
|
||||
extern AUD_API AUD_HRTF* AUD_HRTF_create()
|
||||
{
|
||||
try
|
||||
{
|
||||
return new AUD_HRTF(new HRTF());
|
||||
}
|
||||
catch(Exception&)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
extern AUD_API void AUD_HRTF_free(AUD_HRTF* hrtfs)
|
||||
{
|
||||
assert(hrtfs);
|
||||
delete hrtfs;
|
||||
}
|
||||
|
||||
extern AUD_API void AUD_HRTF_addImpulseResponseFromSound(AUD_HRTF* hrtfs, AUD_Sound* sound, float azimuth, float elevation)
|
||||
{
|
||||
assert(hrtfs);
|
||||
assert(sound);
|
||||
|
||||
(*hrtfs)->addImpulseResponse(std::make_shared<StreamBuffer>(*sound), azimuth, elevation);
|
||||
}
|
48
extern/audaspace/bindings/C/AUD_HRTF.h
vendored
48
extern/audaspace/bindings/C/AUD_HRTF.h
vendored
@@ -1,48 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2009-2015 Juan Francisco Crespo Galán
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AUD_Types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new HRTF object.
|
||||
* \return The new HRTF object.
|
||||
*/
|
||||
extern AUD_API AUD_HRTF* AUD_HRTF_create();
|
||||
|
||||
/**
|
||||
* Deletes a HRTF object.
|
||||
* \param hrtfs The HRTF object to be deleted.
|
||||
*/
|
||||
extern AUD_API void AUD_HRTF_free(AUD_HRTF* hrtfs);
|
||||
|
||||
/**
|
||||
* Adds a new impulse response to an HRTF object.
|
||||
* \param hrtfs The HRTF object.
|
||||
* \param sound A Sound object representing an HRTF.
|
||||
* \param azimuth The azimuth angle of the HRTF.
|
||||
* \param elevation The elevation angle of the HRTF.
|
||||
*/
|
||||
extern AUD_API void AUD_HRTF_addImpulseResponseFromSound(AUD_HRTF* hrtfs, AUD_Sound* sound, float azimuth, float elevation);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
384
extern/audaspace/bindings/C/AUD_Handle.cpp
vendored
384
extern/audaspace/bindings/C/AUD_Handle.cpp
vendored
@@ -1,384 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2009-2016 Jörg Müller
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
#include "devices/I3DHandle.h"
|
||||
#include "Exception.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
using namespace aud;
|
||||
|
||||
#define AUD_CAPI_IMPLEMENTATION
|
||||
#include "AUD_Handle.h"
|
||||
|
||||
AUD_API int AUD_Handle_pause(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->pause();
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_resume(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->resume();
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_stop(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
int result = (*handle)->stop();
|
||||
delete handle;
|
||||
return result;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getAttenuation(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getAttenuation();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setAttenuation(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setAttenuation(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getConeAngleInner(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getConeAngleInner();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setConeAngleInner(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setConeAngleInner(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getConeAngleOuter(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getConeAngleOuter();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setConeAngleOuter(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setConeAngleOuter(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getConeVolumeOuter(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getConeVolumeOuter();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setConeVolumeOuter(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setConeVolumeOuter(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getDistanceMaximum(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getDistanceMaximum();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setDistanceMaximum(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setDistanceMaximum(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getDistanceReference(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getDistanceReference();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setDistanceReference(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setDistanceReference(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_doesKeep(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->getKeep();
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setKeep(AUD_Handle* handle, int value)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->setKeep(value);
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_getLocation(AUD_Handle* handle, float value[3])
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
{
|
||||
Vector3 v = h->getLocation();
|
||||
value[0] = v.x();
|
||||
value[1] = v.y();
|
||||
value[2] = v.z();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setLocation(AUD_Handle* handle, const float value[3])
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
{
|
||||
Vector3 v = Vector3(value[0], value[1], value[2]);
|
||||
return h->setLocation(v);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_getLoopCount(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->getLoopCount();
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setLoopCount(AUD_Handle* handle, int value)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->setLoopCount(value);
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_getOrientation(AUD_Handle* handle, float value[4])
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
{
|
||||
Quaternion v = h->getOrientation();
|
||||
value[0] = v.x();
|
||||
value[1] = v.y();
|
||||
value[2] = v.z();
|
||||
value[3] = v.w();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setOrientation(AUD_Handle* handle, const float value[4])
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
{
|
||||
Quaternion v(value[3], value[0], value[1], value[2]);
|
||||
return h->setOrientation(v);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getPitch(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->getPitch();
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->setPitch(value);
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getPosition(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->getPosition();
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->seek(value);
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_isRelative(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->isRelative();
|
||||
return true;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setRelative(AUD_Handle* handle, int value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setRelative(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API AUD_Status AUD_Handle_getStatus(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return static_cast<AUD_Status>((*handle)->getStatus());
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_getVelocity(AUD_Handle* handle, float value[3])
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
{
|
||||
Vector3 v = h->getVelocity();
|
||||
value[0] = v.x();
|
||||
value[1] = v.y();
|
||||
value[2] = v.z();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setVelocity(AUD_Handle* handle, const float value[3])
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
{
|
||||
Vector3 v = Vector3(value[0], value[1], value[2]);
|
||||
return h->setVelocity(v);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getVolume(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->getVolume();
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setVolume(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
return (*handle)->setVolume(value);
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getVolumeMaximum(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getVolumeMaximum();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setVolumeMaximum(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setVolumeMaximum(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API float AUD_Handle_getVolumeMinimum(AUD_Handle* handle)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->getVolumeMinimum();
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
AUD_API int AUD_Handle_setVolumeMinimum(AUD_Handle* handle, float value)
|
||||
{
|
||||
assert(handle);
|
||||
std::shared_ptr<I3DHandle> h = std::dynamic_pointer_cast<I3DHandle>(*handle);
|
||||
|
||||
if(h.get())
|
||||
return h->setVolumeMinimum(value);
|
||||
return false;
|
||||
}
|
||||
|
||||
AUD_API void AUD_Handle_free(AUD_Handle* handle)
|
||||
{
|
||||
delete handle;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user