Compare commits

..

319 Commits

Author SHA1 Message Date
a78b3ee53a Merge remote-tracking branch 'origin/master' into openvdb 2017-10-16 10:22:35 +01:00
4842cc017c Removed the deprecated OpenVDB shader node for direct loading of .vdb files.
This node was already disabled. All vdb data should eventually be loaded
through the Cycles sync procedure as object data.

Specialized nodes for accessing voxel data may eventually be added again
for convenience, but these would just be advanced attribute nodes.
2016-11-23 16:50:49 +01:00
faf74d1d2d Merge branch 'master' into openvdb 2016-11-23 09:52:33 +01:00
b095c1979f Fix double freeing of OpenVDB data from dangling pointers in device data. 2016-11-18 09:45:11 +01:00
4877e0efc9 Move registration of volumes from attributes out of the smoke sim logic.
This bit of code will be the same for every potential source of volumetric
data.
2016-11-17 13:30:11 +01:00
9b598ebc47 Cleanup of Blender sync code for OpenVDB volume attributes.
Besides removing some debug printing lines, the code should also become
easier to adapt to alternative sources of volume data beside the smoke sim.
2016-11-17 10:12:36 +01:00
c7e7038edc Use tri-linear ("box") interpolation for OpenVDB grids rather than nearest point sampling.
Cycles shading options contain a setting for tri-cubic sampling as well, but this
is not supported in OpenVDB by default (only tri-quadratic). Cubic sampling appears
a bit pointless anyway, compared to the ability to add actual geometric detail.
2016-11-16 17:05:04 +01:00
d30baf60c6 Merge branch 'master' into openvdb 2016-11-16 16:36:43 +01:00
d3947aef59 Fix voxel attribute sampling position when using VDB grids.
OpenVDB handles inverse transform from object to grid space internally.
2016-11-16 10:09:29 +01:00
ca21b0702c Removed unused util_volume files. 2016-11-13 21:59:54 +01:00
28f4388c2e Merge branch 'cvdb_ray_isect' into openvdb 2016-11-13 21:42:35 +01:00
099f7dc9dd Set the primitive type for volume samples to VOLUME.
This is so the primitive_attribute_* functions correctly look for
voxel attributes.
2016-11-13 17:59:19 +01:00
235932ba2e Fix various cleanup issues and inconsistencies.
All volumes are held in the scene volumes list now, so VolumeManager doesn't need
to free them explicitly.

The ImageManager reference in VoxelAttribute is an artifact from smoke rendering,
this should be phased out eventually and can be assumed to be NULL for Volumes.

Make sure the VolumeManager cleans up the device memory properly, in particular
the ray intersector instances must be freed.
2016-11-13 15:14:16 +01:00
736e3cd434 Proper volume data storage in Cycles when syncing from Blender data.
Previously a viewport render would continuously keep adding Volume instances
to the VolumeManager data, because there was no way to detect existing volume
data. Now the `id_map` model known from meshes and other data types is used for
volume data as well.

Note that the VolumeKey currently simply uses an Object ID pointer, thus
assuming a single Volume per object. In the future volumes could become a
real ID type in Blender, or the specific volume could be narrowed down with
additional info in the key.
2016-11-13 13:40:00 +01:00
3d04df097a Added an assert to catch non-uniform grids earlier.
OpenVDB ray intersectors only support uniform grids. This should be
checked as early as possible to allow feedback to the Cycles user
(i.e. the Blender app). For now the assert just prevents exceptions
from OpenVDB itself, until a transparent mechanism for this is implemented.
2016-11-13 11:25:49 +01:00
54318700dd Removed direct grid lists in VolumeManager, all grids should be in Volumes now. 2016-11-13 11:24:51 +01:00
947015de57 Disables VolumeManager functions that load grids directly from a filename.
These are legacy functions from the OpenVDB import node, but they don't
work with the new design any more because there is no specific Volume
instance to add the grids to.
2016-11-13 11:22:24 +01:00
dd610cb6e9 Improved thread data handling for the OpenVDB Cycles node.
OpenVDB grid accessors, samplers, and ray intersectors must be stored per thread.
Previously this data was stored in a per-thread map in each grid. This causes problems
because the pthread_id keys can become invalid, and it also creates a lot of unused
accessors.

The patch switches thread data storage around, so that thread-local data is now passed
along KernelGlobals for every work task as needed (tasks only run in one thread).
This system is much more reliable and similar to other cases of thread-local data,
such as OSL shaders.

The patch also removes the virtual base class for "volumes", which might give a minor
performance improvement. If a generic volume type for Cycles is needed it can be
abstracted from scratch.

Removed the unused thread_id list in Cycles CPU tasks, which were only needed
for the now deprecated OpenVDB grid accessor lookup.
2016-11-12 13:47:35 +01:00
f4ec58f465 Merge branch 'master' into cvdb_ray_isect 2016-11-09 12:01:30 +01:00
c6495263c6 Fix invalid default value type when constructing a default volume shader graph. 2016-11-09 11:35:11 +01:00
a7461419d8 Fix OpenVDB socket creation in the Cycles node.
Was always using the last socket name, so other grids could not be accessed.
2016-11-03 10:20:02 +01:00
d6ecf8efcd Merge branch 'master' into openvdb 2016-10-31 13:38:28 +01:00
0e15c20a00 Merge branch 'openvdb' into cvdb_ray_isect 2016-07-19 14:08:43 +02:00
485911f3b5 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/render/nodes.cpp
2016-07-19 14:08:24 +02:00
e3556f339d Comment. 2016-07-07 14:25:06 +02:00
02a07894a4 Try to sample VDB volumes through the attribute node. 2016-07-07 14:18:15 +02:00
fdc6c21d17 Fix compile error. 2016-07-07 14:06:27 +02:00
8034371106 Merge branch 'openvdb' into cvdb_ray_isect 2016-07-07 13:24:17 +02:00
fe2cfed20c Merge branch 'master' into openvdb
Conflicts:
	source/blender/blenloader/intern/writefile.c
2016-07-07 13:23:12 +02:00
af9123d3aa Merge branch 'openvdb' into cvdb_ray_isect 2016-06-22 19:26:16 +02:00
f3400ebb90 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/app/cycles_xml.cpp
2016-06-22 19:25:38 +02:00
ce659fe09e Merge branch 'openvdb' into cvdb_ray_isect
Conflicts:
	intern/cycles/kernel/kernel_textures.h
	intern/cycles/kernel/kernel_volume.h
	intern/cycles/render/attribute.cpp
	intern/cycles/render/scene.h
	intern/cycles/render/session.cpp
	intern/cycles/render/shader.cpp
	intern/cycles/util/util_task.cpp
2016-06-07 12:41:54 +02:00
2ad44606a1 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/kernel_compat_cpu.h
	intern/cycles/kernel/kernel_globals.h
	intern/cycles/kernel/osl/osl_services.cpp
	intern/cycles/kernel/svm/svm_types.h
	intern/cycles/render/svm.cpp
	intern/cycles/util/util_task.cpp
2016-06-07 12:36:14 +02:00
7df993425b Fix assert failure. 2016-05-11 14:18:47 +02:00
3d56c890e8 Clear map when releasing memory, add some debug prints. 2016-05-11 13:52:36 +02:00
cf18ebba7d Fix thread_ids vector having the wrong size. 2016-05-11 13:48:04 +02:00
82aa159b85 Fix crash derefencing nullptrs. 2016-05-11 13:31:11 +02:00
1fd8c3e3f1 Merge branch 'openvdb' into cvdb_ray_isect 2016-05-11 12:48:58 +02:00
75976a24d7 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/kernel_compat_cpu.h
	intern/cycles/kernel/kernel_globals.h
	intern/cycles/util/util_task.cpp
2016-05-11 12:48:42 +02:00
fd9674e0b3 Merge branch 'openvdb' into cvdb_ray_isect 2016-03-30 04:10:10 +02:00
e5b71e1017 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/kernel_globals.h
	intern/cycles/kernel/kernel_types.h
2016-03-30 04:07:44 +02:00
45b46cfbe3 Setup a texture with volume shaders. 2016-02-28 08:31:24 +01:00
807e7fdc11 Try to set intersection information correctly. 2016-02-28 08:30:35 +01:00
ef59dba7ba Merge branch 'openvdb' into cvdb_ray_isect 2016-02-28 07:05:18 +01:00
a49ade92fe Merge branch 'master' into openvdb
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-02-28 07:04:35 +01:00
de651318e6 Fix/workarounds for a couple of crashes. 2016-02-21 08:35:20 +01:00
cc1d9c3493 Move Volume class definition to volume.h, also move some properties from
the VolumeManager there, added some more code to handle attributes.
2016-02-21 07:39:25 +01:00
e394488665 Start working on volume attributes. 2016-02-19 11:00:55 +01:00
503f0e8be6 Merge branch 'openvdb' into cvdb_ray_isect 2016-02-19 04:42:09 +01:00
74ae05cb04 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/render/nodes.cpp
	intern/cycles/util/CMakeLists.txt
2016-02-19 04:41:52 +01:00
9d77beb2c0 Merge branch 'openvdb' into cvdb_ray_isect 2016-02-10 11:07:17 +01:00
b67005b978 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/util/CMakeLists.txt
2016-02-10 11:06:48 +01:00
40517fb2e7 Added a way to get the cache filename. 2016-01-31 16:50:03 +01:00
2ca168d6f5 Merge branch 'openvdb' into cvdb_ray_isect 2016-01-31 15:59:34 +01:00
61c6cae79e A more sensible hash function for pthreads on Windows. 2016-01-31 13:21:12 +01:00
fd08905df7 Merge branch 'openvdb' into cvdb_ray_isect
Conflicts:
	intern/cycles/blender/blender_object.cpp
	intern/cycles/blender/blender_sync.h
2016-01-30 23:47:40 +01:00
2b17f0d4af Merge branch 'master' into openvdb 2016-01-30 23:44:31 +01:00
29c51dd1ed Added a method to check for sparse volumes. 2016-01-30 23:23:27 +01:00
96da223d0b Quiet some warnings. 2016-01-29 21:39:19 +01:00
65977350c5 Attempt to fix compilation on windows. 2016-01-29 21:30:50 +01:00
443dc7c414 Merge branch 'master' into openvdb 2016-01-29 20:59:18 +01:00
928a22e66e Added primitive type, some shell code. 2016-01-28 19:12:23 +01:00
fbc8eeb46c Merge branch 'openvdb' into cvdb_ray_isect 2016-01-28 16:11:32 +01:00
427718ab16 Merge branch 'master' into openvdb 2016-01-28 16:11:18 +01:00
0e9ccb3c12 Merge branch 'master' into openvdb
Conflicts:
	source/blender/makesrna/intern/rna_nodetree.c
2016-01-27 12:53:54 +01:00
a852abd9ce Merge branch 'master' into openvdb 2016-01-25 16:15:15 +01:00
8cd645d20b Merge branch 'master' into openvdb 2016-01-25 12:56:33 +01:00
e5a51d2818 Cleanup. 2016-01-25 12:52:03 +01:00
1cd6c7fcd4 Cycles: fix memory leaks due to hash collision.
Also clean the code a bit.
2016-01-25 12:43:35 +01:00
1a7e7b14b4 Cycles: fix crash when rendering a volume with non-uniform voxels. 2016-01-25 07:15:55 +01:00
cd56c473ca Merge branch 'master' into openvdb 2016-01-25 06:31:32 +01:00
adf0a12fa1 Merge branch 'openvdb' into cvdb_ray_isect 2016-01-23 09:23:55 +01:00
a48c171584 Forgot this in previous commit 2016-01-23 09:14:27 +01:00
7bb03d99f6 Merge branch 'master' into openvdb
Conflicts:
	CMakeLists.txt
	build_files/cmake/Modules/FindOpenVDB.cmake
	intern/openvdb/CMakeLists.txt
	intern/openvdb/intern/openvdb_dense_convert.cc
	intern/openvdb/intern/openvdb_dense_convert.h
	intern/openvdb/intern/openvdb_reader.cc
	intern/openvdb/intern/openvdb_reader.h
	intern/openvdb/intern/openvdb_writer.cc
	intern/openvdb/intern/openvdb_writer.h
	intern/openvdb/openvdb_capi.cc
	intern/openvdb/openvdb_capi.h
	intern/openvdb/openvdb_util.cc
	intern/openvdb/openvdb_util.h
	source/blender/blenkernel/CMakeLists.txt
	source/blender/python/intern/CMakeLists.txt
	source/blender/python/intern/bpy_app_openvdb.c
2016-01-23 09:12:43 +01:00
2ebed329ae Prepare merge with master 2016-01-23 08:59:34 +01:00
82603761bc Fix compile error wwhen building without OpenVDB 2016-01-17 22:19:13 +01:00
22e3a4ad5e Cycles: quick patch to support decoupled ray marching.
Rendering is not quite right, lots of black spots and areas, but at
least it's working.
2016-01-17 21:22:57 +01:00
7b51e97617 Cycles: avoid recomputing tread ids everytime we need them. 2016-01-17 20:35:08 +01:00
8f098b0a40 Cleanup. 2016-01-17 18:45:29 +01:00
f690c9b6ad Cycles: cleanup util_volume, move non-inline functions definition from
header to source file.

Also de-duplicate loop to free memory from the various maps.
2016-01-17 16:48:48 +01:00
2c5f878ba1 Cycles: create per-thread utils before the actual rendering starts.
Previously, those were created on the fly as needed, but wasn't thread
safe at all, since multiple threads could write to the maps at the same
time.
2016-01-17 16:27:21 +01:00
59a47ae091 Merge branch 'master' into openvdb
Conflicts:
	source/blender/windowmanager/WM_api.h
2016-01-17 14:45:33 +01:00
786e81fd18 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/CMakeLists.txt
2016-01-14 23:34:42 +01:00
e7aa07c616 Fix compile error. 2016-01-10 13:55:12 +01:00
7278cb3428 Merge branch 'openvdb' into cvdb_ray_isect 2016-01-10 12:30:01 +01:00
01ff9adea5 Merge branch 'master' into openvdb 2016-01-10 12:19:00 +01:00
8c1a2bc2b3 Merge branch 'master' into openvdb 2016-01-09 13:35:48 +01:00
0422e12517 Remove leftover scons files. 2016-01-09 13:35:17 +01:00
a862cebfd4 Bring in refactor from other (private) branch.
Now the system behaves a bit more like the pointcache.

It's about time I merge the changes.
2016-01-09 06:16:03 +01:00
5c00edab94 Merge branch 'master' into openvdb
Conflicts:
	source/blender/blenkernel/intern/smoke.c
2016-01-09 05:55:15 +01:00
fd0a2d4eb4 Merge branch 'master' into openvdb 2016-01-07 03:35:31 +01:00
2b0d63be79 Merge branch 'master' into openvdb
Conflicts:
	SConstruct
	build_files/scons/config/darwin-config.py
	build_files/scons/config/linux-config.py
	build_files/scons/config/win32-mingw-config.py
	build_files/scons/config/win32-vc-config.py
	build_files/scons/config/win64-mingw-config.py
	build_files/scons/config/win64-vc-config.py
	build_files/scons/tools/Blender.py
	build_files/scons/tools/btools.py
	intern/SConscript
	intern/cycles/SConscript
	source/blender/blenkernel/SConscript
	source/blender/editors/object/SConscript
	source/blender/editors/space_view3d/SConscript
	source/blender/nodes/SConscript
	source/blender/python/SConscript
2016-01-05 00:48:25 +01:00
142abe0b4a Merge branch 'master' into openvdb 2016-01-04 02:01:01 +01:00
0850165a5a Always initialize cache path. 2015-12-31 01:10:01 +01:00
f1f0e12f82 Merge branch 'master' into 'cvdb_ray_isect' 2015-12-30 18:51:39 +01:00
a072bc47cb Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/render/svm.cpp
	intern/cycles/render/svm.h
2015-12-30 18:40:17 +01:00
407c9fc9d6 Various cleanups. 2015-12-29 00:53:32 +01:00
6a595bfa66 Merge branch 'master' into openvdb
Conflicts:
	intern/cycles/kernel/osl/osl_services.cpp
2015-12-28 01:47:29 +01:00
dd4e198636 Cycles: fix memory leaks.
They were all pretty obvious...
2015-12-10 13:56:57 +01:00
3930356970 Merge branch 'master' into openvdb 2015-12-10 12:56:11 +01:00
f52720d204 Merge branch 'master' into openvdb 2015-12-05 04:39:53 +01:00
a09a7f022c Fix possible null pointer dereferencing.
When copy-pasting goes bad, though it's unlikely they'll be null.
2015-12-05 04:24:34 +01:00
ecd5904962 Cleanup: self assignement/initialization. 2015-12-05 04:16:04 +01:00
753b6b3c47 Cleanups:
- rework includes order in intern/openvdb: first include should be the
source file's header, then other header in the same directory, following
by system/library headers and finally other local headers.

- move ScopeTimer cdtor definitions to openvdb_util.cc, no reason for
them to be in a header.

- add a DEBUG_TIME macro to switch Timer macro on and off instead of
using NDEBUG macro (doesn't make much sense to time in debug mode)
2015-11-29 22:07:33 +01:00
7bacb0080e Merge branch 'master' into openvdb 2015-11-29 21:50:26 +01:00
069c867eb7 Merge branch 'master' into openvdb 2015-11-24 12:49:53 +01:00
d3cd113ab0 Merge branch 'openvdb' into cvdb_ray_isect 2015-11-23 09:13:57 +01:00
e971f0a47e Merge branch 'master' into openvdb 2015-11-23 09:09:46 +01:00
a2e51eb66a Merge branch 'master' into openvdb 2015-11-11 18:02:25 +01:00
b387d7fb47 Merge branch 'openvdb' into cvdb_ray_isect 2015-11-01 13:48:30 +01:00
f5a0a3b66f Merge branch 'master' into openvdb 2015-11-01 13:40:36 +01:00
cc22f1b571 Merge branch 'openvdb' into cvdb_ray_isect 2015-09-23 03:59:54 +02:00
99fd1603eb Merge branch 'master' into openvdb 2015-09-23 03:59:14 +02:00
ec26830776 Initial work to perform volume ray intersection next to the bvh intersection 2015-09-18 01:20:36 +02:00
1aeac7c0c4 Merge branch 'master' into openvdb 2015-09-17 00:04:48 +02:00
8d89417778 Remove 'OPENVDB_USE_BLOSC' from SConscripts as well 2015-09-16 23:31:06 +02:00
f628b5f843 Merge branch 'master' into openvdb 2015-09-11 12:19:12 +02:00
6d13143b89 OpenVDB 3.1 update.
This commit makes it so OpenVDB 3.1 is to used for compilation (the
current dev version at the time of the commit).

Changes are as follows:

- remove OPENVDB_USE_BLOSC, as this was due to a bug which "required"
client code to define this when it was also defined on OpenVDB's side.
- Cycles: make use of floating-point precision rays and volume
intersectors.
2015-08-29 03:11:23 +02:00
4ed92d8b31 Merge branch 'master' into openvdb 2015-08-29 02:17:56 +02:00
7b6a841cde Merge branch 'master' into openvdb 2015-08-16 10:27:04 +02:00
dd67538178 Merge branch 'master' into openvdb 2015-08-06 00:52:38 +02:00
e3ed51deba Cleanups: unnecessary includes, small de-duplication, accidental/
unwanted changes, ...
2015-08-06 00:25:26 +02:00
44ba08d147 Merge branch 'master' into openvdb 2015-08-03 22:04:27 +02:00
12649fbc21 Use openvdb::Name for passing strings around.
Although openvdb::Name is just a typedef for std::string, this change is
for two reasons:
- it makes it a bit more consistent API wise
- it sort of documents we are passing a name and not just a string
(which could be anything: a password, a brand, a poem...)
2015-08-03 21:55:53 +02:00
c17ccb165e Definitely remove the exception safety code.
It was first included as a safety net, but after close inspection of
where exceptions are used in the OpenVDB library, it appears that about
half of them are not used at all whilst the others are fairly dumb and
can be avoided gracefully (e.g. openvdb::ValueError is thrown in some
place if a negative value is passed, so don't pass a negative value ;).

Also the only place where it was used could hardly result in an
exception (only happens if the file is not a .vdb file, so let's trust
the user on that).
2015-08-03 21:38:46 +02:00
b9f6757cdb Viewport: always draw the voxel along the grid, not just when using
adaptive domain.
2015-08-03 18:29:28 +02:00
89dc5469d5 Cleanup: make API a bit more consistent. 2015-08-03 17:47:40 +02:00
fb7fd2fcea Merge branch 'master' into openvdb 2015-08-03 16:42:20 +02:00
23627f717d Add an operator to free the cache and delete the cached files. 2015-08-03 16:35:26 +02:00
36ea543f82 Also disable checkboxes in panel headers when the simulation was cached. 2015-08-03 16:11:58 +02:00
09aef78229 Fix for previous commit not taking into account the possibility that there is no cache. 2015-08-03 15:45:31 +02:00
af730061f2 Disable UI is there is cache, similar to what the pointcache is doing. 2015-08-03 15:30:48 +02:00
86dd099619 Cleanup: remove dead code. 2015-08-03 15:00:02 +02:00
df67565ae0 User feedback: merge pointcache and openvdb cache panel together so it's
easier to work with, and avoids potential issues between vdb and point
caches.

Also finally separate the pointcache and openvdb cache code for the
smokeModifier_process function.
2015-08-02 19:08:55 +02:00
024d59ca31 Merge branch 'master' into openvdb 2015-08-02 17:16:41 +02:00
a7b4e8a75c Merge branch 'master' into openvdb 2015-07-28 15:48:46 +02:00
2ee0301554 Merge branch 'master' into openvdb 2015-07-23 11:31:40 +02:00
bdb12bf045 Merge branch 'master' into openvdb 2015-07-17 20:21:27 +02:00
1efa1d82e6 Rename C++ file extensions.
This is to be more consistent with what is used in the OpenVDB library.
Also my OCD sense was tingling.
2015-07-17 20:15:02 +02:00
8008daba75 Cleanup: reduce scopes of 'using namespace' declarations. 2015-07-17 19:59:49 +02:00
a950ae6090 Cleanup. 2015-07-17 19:53:46 +02:00
3ff45ef48f A simple utility class to time functions. 2015-07-17 19:24:25 +02:00
b32acadfd3 Export UI: forgot to remove those in a previous commit. 2015-07-17 18:44:34 +02:00
8a7d0559f5 Fix compile error (tm). 2015-07-17 18:41:23 +02:00
a788a91830 OpenVDBReader: small de-duplication. 2015-07-17 18:20:36 +02:00
eae5f5b7d7 Merge branch 'master' into openvdb 2015-07-16 05:00:23 +02:00
9351a3b650 Merge branch 'master' into openvdb 2015-07-11 20:26:53 +02:00
26782fa350 Cleanup: redundant metadata value read/write. 2015-07-10 19:33:55 +02:00
950abc655e Remove (test) code dealing with an OpenVDB primitive and drawing the VDB
tree and its values.
2015-07-10 19:23:44 +02:00
ae0ea8c937 Activate reading of exported files (+ cleanup). 2015-07-10 18:57:53 +02:00
387cd2eb4f Merge branch 'master' into openvdb 2015-07-10 17:46:57 +02:00
5c43695f4d Merge branch 'master' into openvdb 2015-07-05 09:44:42 +02:00
802f40c499 Remove anything which deals with transforming a grid.
This needs to be done in a more sensible way.
2015-07-02 12:59:28 +02:00
fe354606a2 Remove dead code. 2015-07-02 12:42:28 +02:00
1fcfb0b9e7 Revert "Cycles: add support for transforming the grid (pos, rot, scale)."
This reverts commit 9514191b0c.
2015-07-02 12:18:43 +02:00
dde162d760 Cycles: take radius of the sampling kernel into account for ray
intersection.

As the samplers are hidden in a single class, the radius is set to the
largest.
2015-07-02 12:01:39 +02:00
e3bafa8f50 Merge branch 'master' into openvdb 2015-07-01 02:28:49 +02:00
39d66bf1a4 Merge branch 'master' into openvdb 2015-06-23 11:30:39 +02:00
2719f51a70 Cleanup: colors and gl calls 2015-06-23 11:29:33 +02:00
0cd4b39f58 Cleanup: reorder operations in the loop over the vdb tree nodes. 2015-06-23 00:13:39 +02:00
45c287d009 Visualization: compute normals for voxel box drawing. 2015-06-22 21:49:17 +02:00
c571e5989d Visualization: draw full boxes for voxels.
Also avoid creating several instances of the same vertex.
2015-06-22 21:15:58 +02:00
7bd3b34e02 Exporter: option to write grids as 16-bit half floats.
This is just for storing on disk, the grids are converted back to full
float format upon reading. Also this affects all grids to be written for
now.
2015-06-22 18:09:41 +02:00
1428324717 Merge branch 'master' into openvdb 2015-06-18 07:00:34 +02:00
8f6e7e5565 Add a function to allocate and set default values for the drawing
properties.
2015-06-17 18:33:22 +02:00
b91aecc017 One more de-duplication. 2015-06-17 18:16:23 +02:00
ee5b2d3765 Rework the UI for displaying the OpenVDB data. 2015-06-17 18:13:16 +02:00
f750a48cda Cleanup: de-duplicate drawing code. 2015-06-17 18:12:25 +02:00
6a91edb8e0 Add a level of detail scheme to reduce the number of voxels to be drawn. 2015-06-17 17:50:39 +02:00
198fa023c1 Add possibility to draw voxels as boxes.
The colors are set to be the same as the VDB paper, just like for the
tree. They are drawn perfectly, but that'll for the moment.
2015-06-17 16:49:30 +02:00
f2e1284f05 Move draw settings to its own struct and add some more options.
For now the options control the tolerance for drawing voxels and their
size in the viewport.
2015-06-17 15:56:55 +02:00
35476f588f Use vertex arrays to draw the VDB tree and its values. 2015-06-17 12:58:57 +02:00
435def9bdc Merge branch 'master' into openvdb 2015-06-15 13:35:00 +02:00
e11aead9e6 Several fixes and cleanups to the compile process:
- disable exceptions in tbb for cycles due to typeid usage
- cleanup SConscript in intern/openvdb, and make others align with
CMakeLists
- import fixes from gooseberry branch by sergey
- fix compilation error when cycles logging is disabled
- avoid unnecessary includes if building without openvdb
2015-06-15 13:31:05 +02:00
bc802ead98 A simple UI for the VDB tree visualization. 2015-06-14 03:49:43 +02:00
8a11c45a09 Merge branch 'master' into openvdb 2015-06-13 03:45:44 +02:00
10d6ad0798 Add extra metadatas to the grids:
- set vector type for scalar grids as well
- set vector grids class to GRID_STAGGERED, this might become an option/
function parameter at some point.
2015-06-13 03:20:31 +02:00
6364ceea30 Cycles: add support for sampling staggered vector grids. 2015-06-13 03:07:05 +02:00
fc05d9603f Cycles: rename openvdb.* files to volume.* 2015-06-13 02:38:24 +02:00
28f88d2076 Cycles: style cleanup. 2015-06-13 02:15:53 +02:00
c2196395d6 Cycles: do not consider level set grids. 2015-06-13 01:51:48 +02:00
ef264e1bb0 Cleanup: deduplicate check to see if a given grid exists in the file. 2015-06-13 01:16:55 +02:00
d9b70e40df Support for drawing the grid values in the viewport. 2015-06-13 00:27:15 +02:00
04af059f57 Cleanup: warning. 2015-06-13 00:27:15 +02:00
9fa6a753c8 Cleanup: magic number. 2015-06-13 00:27:15 +02:00
600a7cd2bf Fix for own commit: cycles volume slots are not the same as the index
in the openvdb grids array.
2015-06-12 12:04:19 +02:00
a9158140f7 Fix for undefined density slot when using OpenVDB nodes without
connecting the density socket.

The density grid is used for the primary intersection tests, so it needs
to be identified among others. The slot index used before was not
initialized when the density node socket is not connected. Further and
invalid index (-1) is not recognized and leads to buffer underrun.
2015-06-12 11:27:05 +02:00
aaa43e2b84 Fix for missing boost dependency when OpenVDB is disabled. 2015-06-12 10:25:32 +02:00
c5d0084606 Fix compilation error when WITH_OPENVDB is off (again). 2015-06-11 16:36:37 +02:00
1aeb676c2b OpenVDB has a dependency on boost-iostreams lib.
Blender needs to link this for static OpenVDB libraries.
2015-06-11 16:07:19 +02:00
24e3db2302 Fix for bad level function implementation.
Was declared in BKE, but implemented in editors, giving undefined
references in the player.
2015-06-11 12:40:40 +02:00
e4126ec9c1 Gooseberry: Fix compilation error with OpenVDB disabled 2015-06-11 12:22:06 +02:00
5086decb80 Initial support for drawing the VDB tree in the viewport.
To make it possible an OpenVDBPrimitive onject is introduced which hides
a shared pointer to an openvdb::GridBase so it's a bit generic, but by
far not final.

The drawing code is a bit hackish on the side, but at least it works and
here's an example: http://www.pasteall.org/pic/show.php?id=89278

NOTE: This only works when the simulation is imported back in.
2015-06-11 12:19:19 +02:00
fbf4aebfda Move exported flag from SmokeDomainSettings to OpenVDBCache 2015-06-11 12:19:19 +02:00
6ecafc57f1 Merge branch 'master' into openvdb 2015-06-11 10:47:33 +02:00
a9e9e9cbc9 OpenVDB: Disable it for blenderplayer buildbot target 2015-06-10 16:55:03 +02:00
706a0e2139 OpenVDB: Tweaksfor scons and buildbot 2015-06-10 16:52:34 +02:00
90dc21ce27 Fix typo in writefile.c resulting in undefined nodes. 2015-06-09 14:53:43 +02:00
6ec3656e97 Generalized node function for mapping existing inputs/outputs on a
dynamically changing socket layout.

This is used for a couple of nodes which create a custom set of inputs
or outputs based on internal data (e.g. image or cache files with
arbitrary data layers). The task is to take existing connections to the
node and relink them to the new socket layout, usually based on socket
names. This keeps node trees working as much as possible even when the
user changes the node.

Multilayer image nodes were already doing this, now OpenVDB shader nodes
can share the same function. If it can be represented in the RNA, the
OSL script node might use the same method (currently not feasible due
to callbacks).
2015-06-09 12:03:52 +02:00
77246e2b93 More flexible feedback function for reading header and metadata from
OpenVDB files.

Instead of fixed-size arrays (risking overrun) the function now uses a
callback, which allows callers to store the info in their own data
structures as needed. Nodes use this to create a list of grid info
structs and adding node sockets accordingly.
2015-06-09 12:03:51 +02:00
99f79338d8 Handle grid name lookups from cycles nodes as weak references and
prevent exceptions.

The shader output names are not guaranteed to match the VDB grid names.
The grid info in nodes can get outdated, files can be manipulated
externally etc., so a failure of grid lookup from Cycles should be
handled gracefully.
2015-06-09 11:59:11 +02:00
0a689d3cae Fix compile error. 2015-06-09 07:36:23 +02:00
2560e49c4e Merge branch 'master' into openvdb 2015-06-09 02:02:41 +02:00
c2cdb38376 Cycles: use vdb ray intersectors for shadow rays as well. 2015-06-09 01:54:55 +02:00
442748dfcd Fix for crash on NULL pointer if using the high density grid for
rendering.
2015-06-08 22:22:10 +02:00
3c69a62f22 Store grids' informations in the node.
Patch by @lukastoenne, with minor edits.
2015-06-08 22:09:28 +02:00
1c580e3a73 Exporter: decrease tolerance yet again. 2015-06-08 22:08:40 +02:00
3dcb158f05 Cycles: disable -Wfloat-conversion and -Wdouble-promotion for OpenVDB
for now, and quiet warning.
2015-06-07 20:14:59 +02:00
5cb2c01ca5 Cycles: de-duplicate ray march loops.
The main logic was split up in a separate function which has quite a
number of arguments, could be worth looking into that matter at some
point. Also it seems like dense volume are slower to render now.
2015-06-07 19:50:02 +02:00
3f941ab8f5 Somewhat improve behaviour of the vdb file reader:
- it now stores a pointer to an io::File to avoid deleting and
reallocating the reader itself for each frame when importing.
- if a file is inder 10 Mb a private copy of it should be made by VDB to
ensure it is not modified while reading. This could become a user
setting at some point.
2015-06-07 04:29:50 +02:00
0f6959d797 Correct UI names and tooltips. 2015-06-07 03:10:12 +02:00
c064bc2202 Add a dedicated poll function for the cache operators. 2015-06-07 02:40:01 +02:00
0267ae96a2 Cleanups:
- automatically add an underscore to the filename before the frame
number in the filename instead.
- rename "string" -> "r_filename" argument
- removed useless NULL check
2015-06-07 02:29:40 +02:00
a80ff6214e Ask user to overwrite files if they already exist.
Only checks for the frame though.
2015-06-07 02:02:51 +02:00
2214eae4d7 Fix for recent clip change: ensure fluid matrices are computed for the
export.
2015-06-07 01:33:24 +02:00
4e4e2940eb Ensure cache directory exists. 2015-06-07 01:27:22 +02:00
2d3d984be4 Clip some low res grids based on the high res density.
Rationale is that in some cases the high resolution density is larger
than the low resolution one, so here we ensure there's enough data for
lookup during rendering for instance.
2015-06-07 00:57:28 +02:00
13e49e487e Decrease tolerance for vector grids due to possible loss of data. 2015-06-07 00:52:18 +02:00
5406dfef8e Increase tolerance value used for copying a dense array to a sparse
grid.

This doesn't affect low resolution grids much but makes a real
difference for high res grids, as it only considers values real close to
the actual smoke or fire.

Although it might be a bit high of a value, it gives some nice file
sizes going from 106.6 Mb down to 37.7 Mb (pointcache: 264.3 Mb) in a
simple simulation with a base res of 128 and a high res of 2.
2015-06-06 14:59:47 +02:00
feb8e91665 Merge branch 'master' into openvdb 2015-06-05 22:24:55 +02:00
ba9800d1e3 Fix grid clipping resulting in empty trees.
Issue was that the grids didn't have a transform set when clipping was
happening. As the clip operator copies the transform (here an invalid
one) from the grid to the mask if their tranforms mismatch, the
operation resulted in an invalid/empty tree.

(Best explanation I can give so far.)

Also for some reason exporting the obstacles field doesn't work anymore,
so it is disabled for now, and so is clipping for it as it doesn't make
sense to clip the obstacles based on the density field.
2015-06-05 22:24:07 +02:00
bb62246eb7 Draw a voxel in the viewport along with the smoke domain.
This helps a bit choosing a good resolution. Might be for development/
debug only, but it wouldn't hurt leaving it to help users.
2015-06-05 22:24:07 +02:00
af2ae46fbb Use multithreading when doing an export. 2015-06-05 22:24:07 +02:00
75eea19d02 Cycles: first pass at using VDB ray intersectors for ray marching.
The idea behind them is to avoid unnecessary ray marching by frog
leaping empty space. The only requirement for it to work is to have a
grid whose voxels are uniform, otherwise Cycles' default ray marching is
used.

For now the code has a some issues and dark sides to it:
- it only works if there is a single object containing vdb volumes in
the scene
- for a given file, only the grid named "density" (case insensitive) is
used for intersection, it's not clear how to handle multiple grids in
this case (maybe we coiuld let the user set which one to use?)
- the ray march loop is a total duplicate of the default one, this will
be addressed later on
- some leaf nodes are missing when using large volumes, the issue might
be the early exit due to the check to see if light was totally absorbed
or not

Here's some render tests:
Dense volume: http://www.pasteall.org/pic/89090
VDB with intersection: http://www.pasteall.org/pic/89092
2015-06-05 22:24:07 +02:00
83752e2b40 Fixed incorrect macro for testing build settings. 2015-06-05 14:50:03 +02:00
fbc95426b9 Small cleanup.
- Remove unnecessary forward declarations
- Use MEM_callocN to initialize memory for new caches, would assert due
to OpenVDBCache.filename not being initialized.
2015-06-05 13:52:24 +02:00
623b8bcc9b Exporter: clip grids based on the density field to save on file size.
Patch by @lukastoenne.
2015-06-05 13:47:59 +02:00
d0effe8683 Add an 'is_color' metadata to set an rgba socket for color grids 2015-06-04 16:34:36 +02:00
5ca5009e15 Merge branch 'master' into openvdb_smoke 2015-06-03 20:57:50 +02:00
e6517c1fd7 Various cleanup. 2015-06-03 20:34:28 +02:00
eeb5b5411f Quick fix for data corruption happening when changing scene frame in
separate threads.

Patch by @lukastoenne.
2015-06-03 19:53:14 +02:00
db695688e9 Quick fix for openvdb::ArithmeticError being thrown on frame 1.
Issue is that the smoke simulator stores a zero'd object matrix on frame
1 which makes OpenVDB throw because the matrix is then non-affine.

Patch by @lukastoenne.
2015-06-03 19:43:18 +02:00
ac22acaec3 Quiet compile warning when WITH_OPENVDB is off. 2015-06-03 19:38:54 +02:00
68ec6efa76 Fix memory leak when creating new sockets. 2015-06-01 15:10:51 +02:00
b82b176f9b Move node socket creation to the C-code. 2015-06-01 15:05:14 +02:00
ac131ea551 Relink outputs when opening a file after one was already open in the
node.
2015-06-01 13:55:21 +02:00
4ce8a1bf25 Ensure filename is absolute in the vdb node. 2015-06-01 13:26:56 +02:00
cdbca9c018 Small fix for previous commit.
We might have MOD_SMOKE_VIEW_SHOWBIG flag on without high resolution on.
2015-06-01 09:04:51 +02:00
bd30d25e40 Only load the array in memory when needed.
It doesn't account for cases when we reach a frame where nothing was
simulated, this will be handled later on.
2015-06-01 08:26:33 +02:00
4e9d5d1727 Merge branch 'master' into openvdb_smoke 2015-06-01 07:04:12 +02:00
ca2f5cc466 Merge branch 'master' into openvdb_smoke 2015-05-29 05:06:15 +02:00
2beb654d69 Fix compile issue when WITH_OPENVDB 2015-05-29 05:02:39 +02:00
0d51aadbfe Cleanup: use madd_v3_v3fl to avoid unnecessary steps and local variable. 2015-05-28 23:38:39 +02:00
f456cc75f2 Fix grid not being in the proper place (transform).
Basically the smoke simulator uses the MAC grid approach meaning that
the fields (like density, heat...) are cell centered. On the other hand
VDB uses a node center storage; this implies that we have to offset the
position of the grid by half a voxel in each direction.
2015-05-28 15:40:43 +02:00
543ee7961b Cycles: fix typos (crashers) in vector grid allocation and sampling
code.
2015-05-28 15:37:17 +02:00
7135e17df9 Cleanup: unnecessary includes. 2015-05-28 14:42:22 +02:00
e669eefae0 Fix check to see if a frame is out of range.
Was doing AND instead of OR...
2015-05-28 14:41:21 +02:00
7e03c74c53 Add OPENVDB_USE_BLOSC definition.
Due to a bug in OpenVDB we have to set this. Though this is fixed in the
current development version, and once the next stable release is out
those defines will be removed.
2015-05-28 14:40:35 +02:00
edf73ab96b Simplify matrix computation. 2015-05-28 11:48:19 +02:00
a2e3b7d48a Remove dead code. 2015-05-28 08:21:34 +02:00
8c8b54b601 Import grids for playback now works.
It is still commented out due to the need of a good cache (reading)
system.
2015-05-28 02:41:10 +02:00
2a040825cb Fix typos in metadata reading. 2015-05-28 01:36:32 +02:00
e189fe46e1 Set vector type when converting a grid. 2015-05-27 22:22:20 +02:00
8d6e1f3139 Set caches' reader and writer to NULL when reading a file. 2015-05-27 22:21:56 +02:00
1fd5f9f004 Fix grids' names mismatch when reading a file. 2015-05-27 21:49:48 +02:00
17fe79b228 Cleanup/fix: put 'using namespace' inside ifdef block. 2015-05-26 03:47:43 +02:00
d5551729bf Wrap volume sampling call in a macro. 2015-05-26 03:38:44 +02:00
fdc051b3ac Merge branch 'master' into openvdb_smoke 2015-05-25 04:03:48 +02:00
6a0854e04a Get rid of FluidDomainDescription struct. 2015-05-23 12:02:26 +02:00
29fa4b9138 Move some files and functions around. 2015-05-23 11:36:08 +02:00
ce2b57ea91 VolumeManager: put OpenVDB related routines in their own functions. 2015-05-23 08:25:29 +02:00
788ecf29a7 Don't construct default samplers, rather just store pointers to
accessors and transforms.
2015-05-23 08:23:47 +02:00
2016c92ef1 Fix segault when closing Blender.
The cache was freed after the smoke domain...
2015-05-23 05:58:11 +02:00
76b5f3d1f7 Avoid recalculating the object's data when a new cache is added. 2015-05-23 05:19:45 +02:00
f01afd7e2e Fix for cache not being set as current when deleting the first in the
list.
2015-05-23 05:18:25 +02:00
74ecf0432b Merge branch 'master' into openvdb_smoke 2015-05-23 04:28:57 +02:00
a11e61a3c7 Cleanup: indent 2015-05-23 03:59:31 +02:00
46d4cb86b6 Move source/blender/openvdb folder to intern/openvdb 2015-05-23 03:36:36 +02:00
3e4d053a16 Cycles: style cleanup. 2015-05-23 02:39:57 +02:00
dabc9d1ee9 Cycles: rename OpenVDBManager -> VolumeManager, et simili. 2015-05-23 02:28:47 +02:00
e656d07cbc Implementation of VDB ray intersectors.
They are not used yet though.
2015-05-23 02:17:48 +02:00
f6fe6759d0 Cycles: subclass the grid samplers and make them thread-safe.
Thread-safety wasn't a requirement before but as they are now thread-
safe, they use ValueAccessors for faster sampling.
2015-05-22 21:23:58 +02:00
344de9ca95 Fix typos in smoke exporter. 2015-05-22 21:20:01 +02:00
09da26d720 Expose file compression types.
By default files are compressed based on their active values, with zip
compression optionnaly added to it. We can as an option, enable blosc
compression, through a build flags. This flag is only to be enbaled if
OpenVDB was built with blosc. Otherwise -> crash.
2015-05-22 20:09:23 +02:00
6c2727e08e Initialize the VDB writer when creating a new cache. 2015-05-22 05:49:43 +02:00
cd301995cc A new function to split a vector grid into three scalar grids. 2015-05-22 05:27:16 +02:00
e0504bf9bb Move fluid matrices to SmokeDomainSettings. 2015-05-22 04:41:08 +02:00
41f4ea4454 A new function to create a sparse vector grid from three scalar dense
grids.
2015-05-22 04:01:31 +02:00
1b1566af98 Redesign the VDB API a bit. 2015-05-22 02:44:33 +02:00
1341109c70 Tackle some of the review points. 2015-05-20 18:40:26 +02:00
cc220c34ad Various cleanups. 2015-05-20 00:15:55 +02:00
091ef60e48 Initial support for rendering vdb file sequences. 2015-05-19 20:41:41 +02:00
9514191b0c Cycles: add support for transforming the grid (pos, rot, scale).
This makes it easier to incorporate external VDB files in the Cycles
scene (at least in Blender).
2015-05-19 14:29:48 +02:00
ddd36a24a9 Cleanup. 2015-05-18 22:17:00 +02:00
a1bb117dac Cycles, OpenVDBManager: split routines into separate functions. 2015-05-18 22:11:43 +02:00
5e82b837d9 Cycles: add OpenVDBManager::delete_sampler convenience function. 2015-05-18 21:43:55 +02:00
8366d1de70 Cycles: move routine to find an exiting grid slot to its own function. 2015-05-18 21:34:02 +02:00
c465f9f729 Cycles: add grid memory usage to logging. 2015-05-18 21:10:08 +02:00
9e892c6035 Cycles: use ccl_fetch to get the shading point position. 2015-05-18 20:34:19 +02:00
2cf7efff36 WIP patch for OpenVDB integration in Blender and Cycles
As requested by a handfull, here's some code :)

(NOTE:) you'll need to disable compilation with OSL and install OpenVDB separately.

Reviewers: dingto, lukastoenne, sergey

Subscribers: levon, #cycles

Differential Revision: https://developer.blender.org/D1308
2015-05-18 17:23:47 +02:00
997f2009c0 Export: take adaptive domain into account (still a bit off but seems to
work)
2015-05-18 14:06:27 +02:00
bd65b12398 Support compilation with SCons (only tested on Linux). 2015-05-18 02:18:06 +02:00
96054b23ec Modification to the node's UI:
- avoid drawing properties' names
- give it a default size
- warn about OpenVDB not being available on the GPU
2015-05-17 23:50:57 +02:00
4634178396 Correction to some CMakeLists.txt (missed those in some previous commit) 2015-05-17 23:49:38 +02:00
579d88551c Improvements to compilation with CMake: set flags to be able to build
with or without OpenVDB.

Scons support should follow.
2015-05-17 21:04:26 +02:00
9d1bdd9647 Add OpenVDB version to the system info file 2015-05-17 19:17:45 +02:00
d5c17b2c92 Properly set the fluid transformation matrix.
This time for real, though we need to account for adaptive domain, but
that's for another commit I guess.
Also add metadata to the grid to mark it as in local space.
2015-05-17 18:53:49 +02:00
7b6deb2a46 Make OpenVDB cache properties its own struct/linked list, including some
operators to add caches to, move caches around and remove caches from
the list.
2015-05-17 15:33:18 +02:00
3b9b59a9db Quiet warning. 2015-05-17 15:17:22 +02:00
02f307baf6 Cleanup: unessecary use of Object in get_fluid_description, also make it
static.
2015-05-17 01:10:11 +02:00
4eb69ba90f Cycles: missing break in GridDescription loop. 2015-05-17 01:08:53 +02:00
fc49fc69d3 Correct update in RNA and send notifier. 2015-05-16 18:59:06 +02:00
bdaf887654 Cycles: remove grid name print. 2015-05-16 18:17:21 +02:00
2d5bd5638f Cycles: tag OpenVDBManager as needing an update when connecting node
sockets during preview rendering.
2015-05-16 18:12:55 +02:00
0cd3e5e72c Cycles: early exit add_volume if we already have a sampler allocated.
This is done by means of a vector of structs which stores the grids'
information, including the grid slot, which is returned if we have a
match.
2015-05-16 18:11:31 +02:00
fb71b93b43 Fix crash happening when exporting the simulation right after resetting
it (by enabling adaptive domain, high resolution or whatever).

The fluid description should be set after the simulation was
initialiazed as it contains information taken from fields which wouldn't
exist otherwise.
2015-05-16 17:10:27 +02:00
e810dabf73 Fix compile issue. 2015-05-16 13:29:55 +02:00
df9d4f4bff Add an operator to update the transformation matrices of the grids. 2015-05-16 11:20:29 +02:00
9a9b2f5b98 Cleanup: grid naming, use CFRA, quiet warning, unused include. 2015-05-16 11:15:55 +02:00
d758a73a74 Fluid transform cleanup (avoid reinventing the wheel). 2015-05-16 11:10:00 +02:00
51dceb32a8 Cycles: add some quick logging. 2015-05-14 19:45:24 +02:00
d6d7297b74 Fix missing object drawing update when done exporting. 2015-05-14 19:42:20 +02:00
b464dd4862 Fix fluid transformation matrix.
There's a little bit of float precision issue, but I'll call it a day
for now...
2015-05-14 17:09:29 +02:00
9d1652e843 Merge branch 'master' into openvdb_smoke 2015-05-14 08:01:14 +02:00
9fe8f6e291 Dynamically add sockets to the node based on the grids available in the
file.
2015-05-11 14:28:13 +02:00
Kévin Dietrich
abaa8617d7 Move openvdb utilities into their own files/directory. 2015-05-11 08:19:21 +02:00
Kévin Dietrich
8066346267 Cycles: only store a single float for scalar outputs. 2015-05-11 01:31:53 +02:00
Kévin Dietrich
a75a5d3987 Cycles OpenVDB node: add output sockets based on Blender's node outputs.
In a later commit, the Blender ones will be dynamically added based on
the grids contained in the file so any grid can be accessible for
shading purposes.
2015-05-11 01:24:37 +02:00
Kévin Dietrich
bd96249455 Apply patch in a new branch, to clean the history a bit 2015-05-10 15:53:34 +02:00
2875 changed files with 118155 additions and 280802 deletions

View File

@@ -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
View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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)

View File

@@ -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()

View File

@@ -37,4 +37,4 @@ ExternalProject_Add(external_fftw3
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
endif()
endif(MSVC)

View File

@@ -29,4 +29,4 @@ ExternalProject_Add(external_flac
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif()
endif(MSVC)

View File

@@ -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)

View File

@@ -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
)

View File

@@ -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}

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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")

View File

@@ -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)

View File

@@ -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

View File

@@ -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()

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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
)

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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 ""

View File

@@ -32,6 +32,7 @@ SET(_blosc_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/blosc
)

View File

@@ -32,6 +32,7 @@ SET(_cppunit_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/cppunit
)

View File

@@ -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)

View File

@@ -32,6 +32,7 @@ SET(_logc4plus_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/logc4plus
)

View File

@@ -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)

View File

@@ -32,6 +32,7 @@ SET(_tbb_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/tbb
)

View File

@@ -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 )

View File

@@ -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

View File

@@ -30,6 +30,7 @@ SET(_alembic_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/alembic
)

View File

@@ -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

View File

@@ -28,6 +28,7 @@ SET(_eigen3_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(EIGEN3_INCLUDE_DIR

View File

@@ -32,6 +32,7 @@ SET(_fftw3_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(FFTW3_INCLUDE_DIR

View File

@@ -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)

View File

@@ -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).

View File

@@ -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

View File

@@ -29,6 +29,7 @@ SET(_hdf5_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/hdf5
)

View File

@@ -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...

View File

@@ -32,6 +32,7 @@ SET(_jack_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(JACK_INCLUDE_DIR

View File

@@ -32,6 +32,7 @@ SET(_jemalloc_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/jemalloc
)

View File

@@ -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

View File

@@ -65,6 +65,7 @@ SET(_opencollada_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/opencollada
)

View File

@@ -38,6 +38,7 @@ SET(_opencolorio_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/ocio
)

View File

@@ -50,6 +50,7 @@ SET(_openexr_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/openexr
)

View File

@@ -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)

View File

@@ -32,6 +32,7 @@ SET(_openjpeg_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(OPENJPEG_INCLUDE_DIR

View File

@@ -38,6 +38,7 @@ SET(_osl_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/osl
)

View File

@@ -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
)

View File

@@ -32,6 +32,7 @@ SET(_openvdb_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/openvdb
/opt/lib/openvdb
)

View File

@@ -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

View File

@@ -32,6 +32,7 @@ SET(_pugixml_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/oiio
)

View File

@@ -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

View File

@@ -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
)

View File

@@ -32,6 +32,7 @@ SET(_spacenav_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(SPACENAV_INCLUDE_DIR

View File

@@ -32,6 +32,7 @@ SET(_tbb_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/tbb
)

View File

@@ -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

View File

@@ -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()

View File

@@ -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()

View File

@@ -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

View File

@@ -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()

View File

@@ -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})

View File

@@ -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)

View 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/"
)

View File

@@ -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 = []

View File

@@ -220,10 +220,6 @@
* \ingroup editors
*/
/** \defgroup edscene scene
* \ingroup editors
*/
/** \defgroup edsculpt sculpt and paint
* \ingroup editors
*/

View File

@@ -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')

View File

@@ -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)

View File

@@ -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,

View File

@@ -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),

View File

@@ -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()

View File

@@ -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>

View File

@@ -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.

View File

@@ -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()

View File

@@ -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).

View File

@@ -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.

View File

@@ -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.

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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();
}

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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