Compare commits

..

307 Commits

Author SHA1 Message Date
gandalf3
c24bb59a44 Handle special categories 2017-08-29 06:30:31 -07:00
gandalf3
b35e5240f6 fix utils 2017-08-29 06:11:47 -07:00
gandalf3
0a5353e853 documentation 2017-08-29 05:15:45 -07:00
gandalf3
74a19feba8 pep8-ify bpkg/types.py 2017-08-29 05:12:39 -07:00
gandalf3
0f17f1937f Use isinstance 2017-08-29 05:10:11 -07:00
gandalf3
280b80349a pep8-ify bpkg/subproc.py 2017-08-29 05:01:45 -07:00
gandalf3
8e815f4ce2 Use typing.Optional 2017-08-29 04:59:11 -07:00
gandalf3
e881a0e2a4 Document non-none types 2017-08-29 04:51:13 -07:00
gandalf3
03a4bd6132 More precise error messages 2017-08-29 04:45:14 -07:00
gandalf3
1ab4d5fec4 Document reason for dict conversion 2017-08-29 04:39:08 -07:00
gandalf3
2be8b4de2a Write own error message 2017-08-29 02:50:19 -07:00
gandalf3
1d6bcff706 Disable uninstall buttons on addons installed outside user dir 2017-08-29 02:45:10 -07:00
gandalf3
7fbb720265 Remove unneccesary None 2017-08-29 01:56:07 -07:00
gandalf3
b259a8597c Build list once 2017-08-29 01:54:54 -07:00
gandalf3
2cccd9341b Actually display progress 2017-08-29 01:50:58 -07:00
gandalf3
c2ed145322 pep8-ify bpkg/messages.py 2017-08-29 00:24:00 -07:00
gandalf3
a2301ec260 Remove unused message, make sure all errors inherit from SubprocError 2017-08-29 00:23:28 -07:00
gandalf3
688cb2d6e0 Clean up bpkg/display.py 2017-08-29 00:20:36 -07:00
gandalf3
ce0396c878 pep8-ify bpkg/actions.py 2017-08-29 00:17:10 -07:00
gandalf3
01a4ea98c5 Remove unneccesary parens 2017-08-29 00:09:43 -07:00
gandalf3
6c3786713e Split code for installing zipped and unzipped packages into separate functions 2017-08-29 00:05:41 -07:00
gandalf3
90ea56b2fb Break exception chain 2017-08-28 23:50:47 -07:00
gandalf3
b62b62d51b Remove old commented code 2017-08-28 23:43:36 -07:00
gandalf3
16da5d84c0 Wait until we've determined url is a real url to derive filenames from it 2017-08-28 23:41:54 -07:00
gandalf3
6d382129f9 Make sure classes tuple is only set when it should be 2017-08-28 23:16:52 -07:00
gandalf3
b9338dde5a Improve docstring 2017-08-28 22:54:39 -07:00
gandalf3
b42bee90f9 Improve commentation 2017-08-28 22:52:28 -07:00
gandalf3
552545d6a4 Remove old commented code 2017-08-28 22:50:21 -07:00
gandalf3
705695bf4d pep8-ify bl_operators/package.py 2017-08-28 22:46:30 -07:00
gandalf3
0c4fd02c27 pep8-ify bpkg/__init__.py 2017-08-28 22:43:11 -07:00
gandalf3
ba99e26e7f Remove fold markers 2017-08-28 22:40:04 -07:00
gandalf3
d5daa2705a Bring back sorting 2017-08-28 22:36:23 -07:00
gandalf3
6be55223dc Improve documentation and remove extraneous function 2017-08-28 22:35:54 -07:00
gandalf3
da7efd96f7 Package name is not allowed to be None, no need to check for it 2017-08-28 22:28:32 -07:00
gandalf3
1bc66c6397 Remove old OrderedDict 2017-08-28 22:25:01 -07:00
gandalf3
6058b5cbaa Clarify TODO note 2017-08-28 22:23:28 -07:00
gandalf3
233d8f2faf Remove old loggers, document refresh parameter 2017-08-28 22:20:24 -07:00
gandalf3
0415d04617 Move enable/disable into Package class 2017-08-28 22:16:39 -07:00
gandalf3
abd9c4ed11 Remove old debug logging and excess whitespace 2017-08-28 22:03:30 -07:00
gandalf3
08ce79dd85 Shorten if, remove commented code 2017-08-28 21:59:32 -07:00
gandalf3
3907c90c53 Remove commented code 2017-08-28 21:57:08 -07:00
gandalf3
ab139c834d Override _finish instead of cancel 2017-08-28 21:56:00 -07:00
gandalf3
f226dd3030 simplify if 2017-08-28 21:54:22 -07:00
gandalf3
94c48c8f92 Simplify package list refreshing
Currently no need for caching system, just regenerate it when asked
2017-08-28 21:49:16 -07:00
gandalf3
684d870dc4 Replace hardcoded 10s with constant 2017-08-28 21:10:08 -07:00
gandalf3
480060696d Remove old abort method 2017-08-28 21:02:53 -07:00
gandalf3
bfd4b73707 Remove fold markers 2017-08-28 21:00:42 -07:00
gandalf3
88756edd2a Update comment 2017-08-28 20:59:13 -07:00
gandalf3
c9ec8ba88f Add explanation for multiprocessing context 2017-08-28 20:57:24 -07:00
gandalf3
a17a32e6ef Remove commented code 2017-08-28 20:50:53 -07:00
gandalf3
65a44d64c1 Fix update display, get rid of unnecessary ifs in filters 2017-08-28 18:35:10 -07:00
gandalf3
f5428b3213 Fix a number of issues caused by new repository representation 2017-08-28 18:05:07 -07:00
gandalf3
6debd2134a remove print statement 2017-08-28 16:06:32 -07:00
gandalf3
9cec3f7212 Use EnumProperty for repository list
Make UIlist editable and move it to a dialog
2017-08-28 16:04:43 -07:00
gandalf3
956d8e790c Revert accidentally committed partial change 2017-08-28 01:07:35 -07:00
gandalf3
47c68a54ad Shorten import 2017-08-27 22:22:34 -07:00
gandalf3
dbe6331a3b Refactor Package class
* Use property decorator
* Display an error when encountering an incorrectly formatted bl_info
* General cleanup
2017-08-27 22:14:18 -07:00
gandalf3
339c51ab17 Move install/download code out of utils 2017-08-27 16:26:08 -07:00
gandalf3
9f34503f2f Un-remove accidentally removed function 2017-08-27 14:48:45 -07:00
gandalf3
fca155031f Only show enable/disable operator for installed packages 2017-08-27 14:40:40 -07:00
gandalf3
ed3eb48729 Don't rebuild package list every draw() 2017-08-27 14:36:06 -07:00
gandalf3
b0d9153dd3 Remove commented code and fix some stuff broken by de-addonification 2017-08-27 14:25:17 -07:00
gandalf3
6a21120023 Hide addons section 2017-08-26 17:18:23 -07:00
gandalf3
e34888b80d Merge branch 'master' of git.blender.org:blender into soc-2017-package_manager 2017-08-26 02:09:25 -07:00
gandalf3
0ff4627729 Move package manager code out of addon
Code from addon repository: https://developer.blender.org/diffusion/BPMA/
2017-08-26 02:07:18 -07:00
58d92cefbd [cycles/ctest] fix failing tests when output folder doesn't exist yet. 2017-08-25 17:17:49 -06:00
5121dacf9d Fix for fix (tm): Residue of the debug code 2017-08-25 21:33:44 +02:00
90110d3732 Fix mistake in previous tangent space optimization 2017-08-25 21:30:20 +02:00
12f627cd9f Cycles: Cleanup, naming of variable
Always use b_ prefix for C++ RNA data.
2017-08-25 21:30:20 +02:00
ee61a97632 Cycles: Add assert to catch possibly wrong logic 2017-08-25 21:30:20 +02:00
f9a3d01452 Cycles: Mark pixels with negative values as outliers
If a pixel has negative components, something already went wrong, so the best option is to just ignore it.

Should be good for 2.79.
2017-08-25 17:46:15 +02:00
e2ffad7823 Fix T52481: After making all local, local proxies of linked data get broken after file save and reload.
Issue was nasty hidden one, the dual status (mix of local and linked)
of proxies striking again.

Here, remapping process was considering obdata pointer of proxies as
indirect usage, hence clearing the 'LIB_TAG_EXTERN' of obdata pointer.
That would make savetoblend code not store any 'lib placeholder' for
obdata data-block, which was hence lost on next file read.

Another (probably better) solution here would be to actually consider
obdata of proxies are fully indirect usage, and simply reassign proxies
from their linked object's obdata on file read...

However, that change shall be safer for now, probably good for 2.79 too.
2017-08-25 16:16:32 +02:00
d79fa8dc4d Another optimization of tangent space calculation
Don't use quick sort for small arrays, bubble sort works way faster for small
arrays due to cache coherency. This is what qsort() from libc is doing actually.
We can also experiment unrolling some extra small arrays, for example 3 and 4
element arrays.

This reduces tangent space calculation for dragon from 3.1sec to 2.9sec.
2017-08-25 14:54:44 +02:00
49717d4971 Optimize tangent space calculation by inlining functions
Brings tangent space calculation from 4.6sec to 3.1sec for dragon model in BI.
Cycles is also somewhat faster, but it has other bottlenecks.

Funny thing, using simple `static inline` already gives a lot of speedup here.
That's just answering question whether it's OK to leave decision on what to
inline up to a compiler..
2017-08-25 14:50:04 +02:00
90299e4216 Cycles: Add utility function to query current value of scoped timer 2017-08-25 14:27:34 +02:00
12d527f327 Cycles: Correct logging of sued CPU intrisics 2017-08-25 14:27:34 +02:00
dfae3de6bd Cycles: Fix stack overflow during traversal caused by floating overflow
Would be nice to be able to catch this with assert as well, will see what would
be the best way to do this/.\

Need to verify with Mai that this solves crash for her and maybe consider
porting this to 2.79.
2017-08-25 14:27:34 +02:00
de669c3b60 WM: ensure 3D view theme is used in select-loop
Yet another case where theme could be used uninitialized.
2017-08-25 22:10:27 +10:00
16377abda8 WM: initialize WM and deps before handling events
This avoids obscure bugs where operators could run from
events that happen before the UI and depsgraph have been initialized.

See: D2809 for details.
2017-08-25 20:26:52 +10:00
2d5935a9c0 This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.

I've removed the reference to scripts in this text.

This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.

For more information; check the FAQ or consult foundation@blender.org
https://www.blender.org/support/faq/
2017-08-25 11:11:19 +02:00
738d942d29 Correct error in recent use of PyC_Long_*
Regression in 46cf33bf0
2017-08-25 02:09:23 +10:00
9662803833 Fix error using wrong theme settings w/ depth draw
Clicks events before first draw would assert,
unlikely to cause user visible errors but
would assert in UI_ThemeGetColorPtr.
2017-08-24 23:22:55 +10:00
a679457263 Fix T51907: New Depsgraph - Camera constraint is not evaluated properly
This is more a workaround for until we've got proper visibility flush, which
will likely happen in blender2.8 branch.
2017-08-24 14:35:48 +02:00
436d1b4e90 Cycles: FIx issue with -0 being considered a non-finite value 2017-08-24 14:32:56 +02:00
Dalai Felinto
1fb2637006 Cycles Bake: Fix overflow when using hundreds of images
We have a hardcored limit of 1000 images to be baked.
However anything anove 100 would be leading to overflow in the code.

Caught by warning from builder bot (my compiler doesn't even complain
about this, but it should).
2017-08-24 10:34:56 +02:00
76b74a93a8 Fix Cycles CUDA transparent shadow error after recent fix in c22b52c.
Fishy cat benchmark was rendering with wrong shadows. Cause is unclear,
adding printf or rearranging code seems to avoid this issue, possibly a
compiler bug. This reverts the fix and solves the OSL bug elsewhere.
2017-08-24 03:43:02 +02:00
b85d36d811 Code cleanup: remove shader context.
This was needed when we accessed OSL closure memory after shader evaluation,
which could get overwritten by another shader evaluation. But all closures
are immediatley converted to ShaderClosure now, so no longer needed.
2017-08-24 03:43:02 +02:00
e476298084 Docs: rename var and comment how it's used
switch_from_camera wasn't right since it was used for auto-perspective.
2017-08-24 02:11:31 +10:00
0b5b464e82 Correction to last fix 2017-08-24 01:05:20 +10:00
76d695f761 Fix T52490: NDOF orbit doesn't lock in ortho view
Regression in af3f7db caused by own fix for T51324
2017-08-24 00:51:25 +10:00
520ea73ad0 Fix bplayer (c) 2017-08-23 16:43:10 +02:00
3277bd4031 Fix T52396: Crash loading template w/o config dir 2017-08-23 22:06:42 +10:00
579edb1510 Cycles: Add maximum depth stat to bvh builder 2017-08-23 06:54:26 -04:00
2540741dee Fix implementation of atomic update max and move to a central location
While unlikely to have had any serious effects because of limited use, the
previous implementation was not actually atomic due to a data race and
incorrectly coded CAS loop. We also had duplicates of this code in a few
places, it's now been moved to a single location with all other atomic
operations.
2017-08-23 06:54:25 -04:00
5c60721c9e Fix T51805: Overlapping volumes renders incorrect on AMD GPU
We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.

Should be safe for 2.79 after extra eyes.
2017-08-23 12:35:23 +02:00
b9513706cb Cleanup: mark VA_NARGS_COUNT as public
Was already used in two other headers, remove underscore prefix.
2017-08-23 20:16:17 +10:00
37cfa44222 Cleanup: move variadic defines to their own header
So we can use in headers without pulling in many other defines.
2017-08-23 20:16:17 +10:00
1a76bc7aeb Fix T52218: Missing update when reconnecting node
If node was connected to output, we tag tree for update no matter where
the node was re-plugged to.

Should be safe for 2.79.
2017-08-23 11:49:20 +02:00
cf8d35edc8 RNA: use string-join to simplify operator register
Also sanity check macro-operator ID's.
2017-08-23 19:18:22 +10:00
81c0e643a0 BLI_string_utils: string joining utility functions
Includes a version that takes a separator and macros for convenience.
2017-08-23 19:17:27 +10:00
55861cb234 PyAPI: avoid instantiating args twice in macro
Would cause problems if args included function calls.
2017-08-23 18:48:32 +10:00
b8d77c44f1 Cleanup: remove space from filenames 2017-08-23 15:50:44 +10:00
46b9f89f5e Tests: fix incorrect check for hidden dir
Copy-pasted mistake in tests and tools.
2017-08-23 15:36:39 +10:00
1e60ac3394 RNA: report error on struct naming collision
Fixes T52463, error instead of crash.
2017-08-23 15:02:21 +10:00
4761dea573 RNA: keep structs_map valid w/ ID duplicate & free 2017-08-23 14:14:55 +10:00
8899ac1550 GHash: BLI_ghash_reinsert_key utility function
Useful when ghash keys are reallocated.
2017-08-23 13:03:35 +10:00
980a8646d8 Fix T52466: Silence search for button_context menu type.
We were showing "search for unknown menutype WM_MT_button_context" messages in terminal which were not helpful for users, so now they are disabled.

To be backported to 2.79
2017-08-22 21:35:09 +02:00
f09dee5aed Fix error in PointerProperty argument list
Regression in a7b3047
2017-08-23 02:14:33 +10:00
4d8e3b649b Fix T52483: Fill is incorrect for interpolated strokes
The recalc flag must be enabled for new interpolated strokes.
2017-08-22 17:43:20 +02:00
9f40153094 Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent 2017-08-22 16:27:33 +02:00
f3e02eb32e Depsgraph: Cleanup, make code friendlier to be edited in columns 2017-08-22 16:24:58 +02:00
c80ab62aee Depsgraph: Remove placeholder for path evaluation
Wasn't used in years, if it really needs to be dedicated operation it needs to
be revisited anyway.
2017-08-22 16:12:01 +02:00
4699799288 Fix threading conflict when doing Cycles background render
It is possible to have same image used multiple times at different frames,
which means we can not free it's buffers without any guard. From quick tests
this seems to be doing what it is supposed to.

Need more testing and port this to 2.79.
2017-08-22 15:50:05 +02:00
1155fc94fd Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Most likely needs in 2.79 final release.
2017-08-22 12:53:34 +02:00
691ed21842 PyAPI: replace PyC_FromArray with typed functions
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.

Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
2017-08-22 18:10:57 +10:00
049932c4c3 Fix panorama render crash with split kernel, due to incorrect buffer pointer.
Also some refactoring to clarify variable usage scope.
2017-08-22 00:41:07 +02:00
296d74c4b1 Cycles: reorganize Performance panel layout, move viewport BVH type to debug. 2017-08-21 19:05:17 +02:00
81a76469ca Fix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet. 2017-08-21 19:05:17 +02:00
37a5fe2d4d Fix T52479: Regression: Motion Tracking no longer works 2017-08-21 17:23:42 +02:00
0033f0e161 Cleanup: uneven/double indentation 2017-08-21 15:38:11 +10:00
592dd9dea6 Modify menu from last commit
Also correct tool-tip.
2017-08-21 15:24:40 +10:00
361c7cbbc5 Fix T52434: Restore mesh center of mass calculation
The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.
2017-08-21 15:19:08 +10:00
43a6cf1504 Cycles: attempt to recover from crashing CUDA/OpenCL drivers on Windows.
I don't know if this will actually work, needs testing. Ref T52064.
2017-08-20 23:18:25 +02:00
fc890cdae2 Fix Windows build error after recent Python changes in a10a7f42. 2017-08-20 23:15:43 +02:00
47d1f67eab Fix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
Please backport this to 2.79.
2017-08-21 00:09:16 +02:00
41e6068c76 Revert "Cycles: remove square samples option."
This reverts commit 757c24b6bc.

We'll revisit this when doing deeper sampling changes.
2017-08-20 23:46:05 +02:00
1d1ddd48db Fix T52470: cycles OpenCL hair rendering not working after recent changes. 2017-08-20 23:32:20 +02:00
ce0fce2207 Code cleanup: deduplicate some bsdf node methods. 2017-08-20 17:37:22 +02:00
146b0c6b04 Fix T52439: Crash after adjusting lenght of hair particles.
Regression from rBfed853ea78221, calling this inside thread worker was
not really good idea anyway, and we already have all the code we need in
pre-threading init function, was just disabled for vertex particles
before.

To be backported to 2.79.
2017-08-20 17:18:48 +02:00
b5f8063fb9 Cycles: support baking normals plugged into BSDFs, averaged with closure weight. 2017-08-20 16:51:53 +02:00
0b07c2c8a2 Code cleanup: remove copy of shader graph for bump, no longer needed. 2017-08-20 14:27:51 +02:00
e27a59d411 Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python
Recent inclusion caused build error with the BGE.
2017-08-20 21:14:33 +10:00
f6825d333b Fix bpy library load: invalid function signature 2017-08-20 19:04:16 +10:00
46cf33bf01 PyAPI: Make use of PyC_LongAs... API
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.

Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
a10a7f42de PyAPI: Integer conversion functions
Python's C-API doesn't provide functions to get
int's at specific integer sizes.

Leaving the caller to check for overflow,
which ended up being ignored in practice.

Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.
2017-08-20 15:39:08 +10:00
2ff9c8a3bc PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
2017-08-20 15:30:14 +10:00
07ca9860e2 [windows/make.bat] add option to automatically download libs.
The thing that most often still goes wrong for new users building blender on windows is checking out the libraries, some skip over the wiki, some check out to the wrong folder, in an effort to reduce the time i spend on this, I added detection of svn and misisng libs to make.bat .

When the user has svn installed, and the libdir is missing he'll be asked if he wants to download them

if svn is not installed, or the user chooses 'no' the current error message is shown.

Reviewers: Blendify, sergey, juicyfruit

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2782
2017-08-19 12:00:45 -06:00
c22b52cd36 Fix T52452: OSL trace broken after shadow catcher recent changes.
We should only early out with any hit in BVH traversal if the only visibility
bits used are opaque shadow. Not when opaque shadow is one of multiple bits.
2017-08-19 18:14:16 +02:00
4218b9367e Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.
2017-08-19 18:14:16 +02:00
cfa8b762e2 Code cleanup: move rng into path state.
Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.
2017-08-19 18:14:16 +02:00
1cc4033df8 PyAPI: expose matrix parsing function 2017-08-19 21:36:50 +10:00
4d428d14af Fix T52443: Cycles OpenCL build error after recent mesh lights changes. 2017-08-19 01:02:55 +02:00
d282dc04ef Cycles tests: add light type tests. 2017-08-18 17:09:12 +02:00
5cf36c0f05 Cycles tests: make page less wide, use relative URLs for serving through http. 2017-08-18 17:09:08 +02:00
4e468ceb71 PyAPI: Fix memory leak w/ empty, allocated enums 2017-08-18 18:29:27 +10:00
ac28a4fba7 Fix leak in Python BGE filter & image types 2017-08-18 00:55:16 +10:00
Stefan Werner
7a4696197d Cycles: Fix for a division by zero that could happen with solid angle triangle light sampling 2017-08-17 15:07:59 +02:00
743bacaa6f Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
To be backported.
2017-08-18 01:03:28 +12:00
Stefan Werner
8141eac2f8 Improved triangle sampling for mesh lights
This implements Arvo's "Stratified sampling of spherical triangles". Similar to how we sample rectangular area lights, this is sampling triangles over their solid angle. It does significantly improve sampling close to the triangle, but doesn't do much for more distant triangles. So I added a simple heuristic to switch between the two methods. Unfortunately, I expect this to add render time in any case, even when it does not make any difference whatsoever. It'll take some benchmarking with various scenes and hardware to estimate how severe the impact is and if it is worth the change.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: Vega-core, brecht, SteffenD

Tags: #cycles

Differential Revision: https://developer.blender.org/D2730
2017-08-17 12:44:32 +02:00
5492d2cb67 Cycles: Calculate correct remaining time when using a larger pixel size 2017-08-17 02:00:44 +02:00
9b1e0f5af6 Remove unnecessary #include "ED_transform.h" 2017-08-16 19:08:52 -03:00
85169de54d Transform: remove unused function 2017-08-16 18:55:55 -03:00
916b9b311f Transform: Move enum SnapSelect to ED_transform_snap_object_context 2017-08-16 14:16:30 -03:00
a773ac4bda Support MSVSC 2017 15.3.0 (compiler 19.11)
The compiler version has changed in the last VS2017 update to 1911 and the old 1910 version is not working anymore.
2017-08-16 09:45:08 -06:00
1f3724f7f4 Fix T52414: Blender 2.79 crash on object duplication via menu.
Caused by own recent changes in handling of verts/edges/etc. arrays storage
for raycasting (rBe324172d9ca6690e8).

Issue was actually even weirder - there is absolutely no reason at all to
release DM here, those finaldm are stored in Object or EditMesh structs and
handled by general update system, other code shall never try to release them!
2017-08-16 10:52:49 +02:00
535e83687d macOS build: simplify python install for new 10.9 libraries.
We stop using the .zip file and just have all files now in
lib/darwin/python/lib, along with numpy, numpy headers and requests.
This makes it consistent with Linux and simplifies code.

For old libraries the .zip stays, code for that gets removed when we
fully switch to new libraries.
2017-08-15 17:40:27 +02:00
477ee3a9de Fix Cycles presets after recent removal of some settings. 2017-08-15 17:40:27 +02:00
f20d7bed14 Alembic import: report object name in face color index out of bounds error 2017-08-15 12:43:17 +02:00
ac88a3942e Alembic import: fix crash when face color index is out of bounds.
This can happen with Alembic files exported from Maya. I'm unsure as to the
root cause, but at least this fixes the crash itself.

Thanks to @looch for reporting this with a test file. The test file has to
remain confidential, though, so it's on my workstation only.
2017-08-15 12:35:33 +02:00
caefe4943b [deps_build/macOS] Fix FFMPEG & VPX configure command
FFMPEG & VPX don't handle target with --build parameter, so we need to make sure use of plain configure command

Reviewed by: Brecht Van Lommel
Differential Revision: http://developer.blender.org/D2791
2017-08-15 12:26:33 +03:00
66c1b23aa1 Cycles/BI: Add a pixel size option for speeding up viewport rendering
This patch adds "Pixel Size" to the performance options, which allows to render
in a smaller resolution, which is especially useful for displays with high DPI.

Reviewers: Severin, dingto, sergey, brecht

Reviewed By: brecht

Subscribers: Severin, venomgfx, eyecandy, brecht

Differential Revision: https://developer.blender.org/D1619
2017-08-15 01:22:40 +02:00
a8eaaa21e0 [build_deps/Windows] Add numpy headers to the python include folder on windows, required for D2716 2017-08-14 15:21:36 -06:00
e79db3b2f8 [depsbuilder] fix outdated python patch on windows. 2017-08-14 15:11:44 -06:00
30e0100813 [depsbuilder] Fix broken osl flags on windows. 2017-08-14 15:11:05 -06:00
Stefan Werner
86eb8980d3 Cycles: Fixed broken camera motion blur when motion was not set to center on frame
Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2787
2017-08-14 20:24:30 +02:00
595cfd2a81 Fix T52331: Motion blur shutter length not keyable
The only reason shutter time was marked as non-animatable is because Blender
Internal render does not support such animation. But this is something what
users are keeping asking for and now Blender Internal is on it's way out.

Enabled animation of this property, but noted in tooltip that Blender Internal
does not support animation of this property.
2017-08-14 16:38:50 +02:00
3cd51c0379 Fix T52391: Crash on duplicating material.
Bug in new ID copying code, thanks once again to stupid nodetrees, we
ended up wrongly remapping MA node->id pointers to NodeTree when copying
materials using node trees...
2017-08-14 15:40:54 +02:00
03a02cd109 Cleanup: confusing naming in BKE_node_tree_copy_data(). 2017-08-14 15:40:11 +02:00
04f034abad New ID Copying code: fix node_tree_copy_data still potentially increasing usercount of its gpencil pointer.
_copy_data() functions of datablocks shall never handle that, it's done
by generic calling code in library.c.
2017-08-14 15:17:23 +02:00
4e6324dd59 Cycles: Guard memcpy to potentially re-allocating memory with lock
Basically, make re-alloc and memcpy from the same lock, otherwise one
thread might be re-allocating thread while another one is trying to
copy data there.

Reported by Mohamed Sakr in IRC, thanks!
2017-08-14 14:55:47 +02:00
f0c2f4fa91 Tracking: Fix missing checks in operator poll functions
Reported by Vuk Gardašević (lijenstina) in IRC, thanks!
2017-08-14 11:46:00 +02:00
a850235a44 Fix T51850: Motion tracking - poor performance with keyframe matching on large video
Enabled cache for frame accessor and tweaked policy so we guarantee keyframed
images to be always in the cache. The logic might fail in some real corner case
(for example, when doing multiple tracks at once on a system where we can not
fit 2 clip frames in cache) but things are much better now for regular use.
2017-08-14 11:43:19 +02:00
ba84eb0f19 Tracking: Make frame accessor cache safe for threading 2017-08-14 11:43:19 +02:00
d36579bb96 Tracking: Cleanup, newlines and comments 2017-08-14 11:43:19 +02:00
ae561855cc Tracking: Cleanup, de-duplicate code 2017-08-14 11:43:19 +02:00
725a577327 Trackign: Add some basic logging about caching in frame accessor 2017-08-14 11:43:19 +02:00
4ac019cc07 Tracking: Make frame access cache aware of region
Cache is still kept disabled, need to think of a policy for cache cleanup.
2017-08-14 11:43:19 +02:00
7dfc1ad6c1 Tracking: Correct comparison in cache keys
This code wasn't uses, but the key comparison was totally wrong.
2017-08-14 11:43:19 +02:00
87e05c152a Tracking: Cleanup and some comments 2017-08-14 11:43:19 +02:00
51643056b0 Move back master to BCon1 (aka alpha) status.
Forgot to do that the other week, master is no more 2.79 RC!
2017-08-14 10:44:19 +02:00
a8fbe991cd [build_deps/Windows] Prevent writing of any files into the source tree. 2017-08-13 13:02:15 -06:00
dc7fcebb33 Code cleanup: make L_transparent part of PathRadiance. 2017-08-13 01:19:07 +02:00
7542282c06 Code cleanup: make DebugData part of PathRadiance. 2017-08-13 01:19:07 +02:00
fce405059f Code cleanup: make it easier to test only Sobol, CMJ or Pseudorandom. 2017-08-13 01:19:07 +02:00
8f97108353 Cycles: optimize CPU split kernel data init. 2017-08-12 20:43:34 +02:00
601f94a3c2 Code cleanup: remove unused Cycles random number code. 2017-08-12 20:40:38 +02:00
6919393a51 Fix T52372: CUDA build error after recent changes. 2017-08-12 20:37:06 +02:00
b500f42700 WM: load UI for new file, even when pref disabled
Loading startup file always loads the UI now.
2017-08-13 01:09:48 +10:00
d7639d57dc Fix T52368: OSL trace() crash after recent changes. 2017-08-12 14:32:52 +02:00
60ab0b8418 Fix T52298: hidden lamps still compute shadow buffers in viewport. 2017-08-12 13:22:26 +02:00
85ad248c36 Code cleanup: fix warning and improve terminology. 2017-08-12 13:18:05 +02:00
a4bcdf5fb1 Fix T52329: Boolean with aligned shapes failed
Creating ngons with multiple axis aligned shapes in the middle of a
single face would fail in some cases.

This exposed multiple problems in BM_face_split_edgenet_connect_islands

- Islands needed to be sorted on Y axis when X was aligned.
- Checking edge intersections needed increased endpoint bias.
- BVH epsilon needed to be increased.
2017-08-12 18:35:47 +10:00
091ae0ea71 Math Lib: add isect_seg_seg_v2_point_ex
This exposes end-point bias argument, needed in rare cases.
2017-08-12 18:35:47 +10:00
b5cd89bab9 Fix width estimation for buttons with short labels in pie menus
Differential Revision: https://developer.blender.org/D2781

To be backported to 2.79 branch
2017-08-12 11:00:19 +03:00
ccb8e78d6c Cleanup: whitespace 2017-08-12 13:43:40 +10:00
4a1762f769 iFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.
'OpenGL Preview' checkbox was redundant now, just use seq_prev_type
value only.

Might be OK for 2.79, but should be double-checked first...
2017-08-11 18:02:54 +02:00
00cb352790 Fix T52149: LoopTriArray computation was not correctly protected against concurrency.
Note: this commit seems to work as expected (also with transform
snapping etc.). However, it is rather unsafe - not enough for 2.79 at
least, unless we get much more testing on it. It also depends on three
previous ones.

Note that using a global lock here is far from ideal, we should rather
have a lock per DM, but that will do for now, whole DM thing is doomed
to oblivion anyway in 2.8.

Also, we may need a `DM_DIRTY_LOOPTRIS` dirty flag at some point. Looks
like we can survive without it for now though... Probably because cached
looptris are never copied accross DM's?
2017-08-11 17:08:41 +02:00
c034193821 Cleanup: remove useless DM_ensure_looptri().
That one was doing exactly same thing as `dm->getLoopTriArray()`, no
point in having twice the same code here...
2017-08-11 17:08:41 +02:00
e324172d9c Fix transform snap code using 'allocated' flags to get verts/edges/etc. arrays again from DM.
This was... horribly wrong, CDDM will often *not* need to allocate
anything to return arrays of mesh items! Just check whether array
pointer is NULL.

Also, remove `DM_get_looptri_array`, that one is useless currently,
`dm->getLoopTriArray` will always return cached array (computing it if
needed).
2017-08-11 17:08:41 +02:00
e9cbc700ef Cleanup: deduplicate DM's getLoopTriArray() callback.
All three functions were doing exactly the same thing, simpler to only
have one in that case!
2017-08-11 17:08:41 +02:00
e6da7bb75c Fix T52346: Alt-I (Delete Keyframes) on a NlaStrip's Extrapolate property would crash 2017-08-12 01:52:51 +12:00
b6fda7fa43 Fix T52327: Entering/Exiting NLA Tweakmode disables Scene -> Only Keyframes from Selected Channels
The tweakmode flag and the selected-channels flag accidentally
used the same value, due to confusion over where these flags were
supposed to be set. The selected-channels flag has now been moved
to use a different value, so that there shouldn't be any further
conflicts.

To be ported to 2.79.
2017-08-12 01:41:22 +12:00
b2392afc50 Fix bevel clamping bugs T51247 and T50819.
Old bevel 'Clamp overlap' code was very naive: just limit amount
to half edge length. This uses more accurate (but not perfect)
calculations for the max amount before (many) geometry collisions
happen. This is not a backward compatible change - meshes that
have modifiers with 'Clamp overlap' will likely have larger allowed
bevel widths now. But that can be fixed by turning off clamp overlap
and setting the amount to the desired value.
2017-08-11 09:13:27 -04:00
30e83d58ff Object Apply Transform: option to apply properties
In some cases users may want to disable this option
to avoid changing other properties besides vertex locations.
2017-08-11 22:32:07 +10:00
31be0a6e52 Fix T52344: Softbody on Text.
Own previous fix (rBd5d626df236b) was not valid, curves are actually
supported by SoftBodies. It was rather a mere UI bug, which was not
including Surfaces and Font obect types in those valid for softbody UI.

Thanks to @brecht for the head up!

Also, fix safe for 2.79, btw.
2017-08-11 14:27:34 +02:00
2e25754ecd Cycles: Clarify new argument in PathRadiance 2017-08-11 13:49:50 +02:00
596ee4b505 Cycles tests: Draw images on top of checkerboard
This way it's easier to see alpha-channel only images, such as shadow catcher
images on transparent film.
2017-08-11 13:49:50 +02:00
bd069a89aa Fix T52229: Shadow Catcher artifacts when under transparency
Added some extra tirckery to avoid background being tinted dark with transparent
surface. Maybe a bit hacky, but seems to work fine.
2017-08-11 13:49:50 +02:00
59a52fef6c Pie menu's sub-rows ignore 'EXPAND' flag
Regression, to be backported in 2.79.
2017-08-11 13:18:30 +03:00
daa834bc11 RNA: Operators were excluded from struct map
Recent changes meant structs that were registered without a name
wouldn't get added to the map.
Now assigning identifiers manages the struct-map.
2017-08-11 20:11:01 +10:00
58ee738310 GHash: note that 'deprecated' is used for private 2017-08-11 19:10:19 +10:00
bc88ee3292 Error in last commit, problems with unregister
We can't free the identifier before its used when
removing from the ghash.
2017-08-11 19:10:19 +10:00
d5d626df23 Fix T52344: Softbody on Text.
For some reasons (c) softbody modifier was marked as compatible with
curves... Would need much more work though, so for now just removing
that flag!
2017-08-11 10:24:57 +02:00
91d882a8c9 RNA: Use hash lookups for structs
Adding structs was checking for duplicates
causing approx 75k string comparisons on startup.

While overall speedup is minimal,
Python access to `bpy.types` will now use a hash lookup
instead of a full linked list search.

See D2774
2017-08-11 18:11:25 +10:00
0398ee10a1 WM: don't load preferences on 'File -> New'
User preferences are now only loaded on...

- Initial startup.
- Factory-settings.
- Setting app-templates.
2017-08-11 09:40:28 +10:00
757c24b6bc Cycles: remove square samples option.
It doesn't seem that useful in practice, was mostly added to match some
other renderers but also seems to be causing user confusing and accidental
long render times. So let's just keep the UI simple and remove this.

Differential Revision: https://developer.blender.org/D2768
2017-08-11 01:10:56 +02:00
8a7c207f0b Cycles: change defaults for filter glossy, clamp and branched path AA.
We're adding some bias by default, which now I think is the right thing
to do from a usability point of view since you really need to use those
options anyway to get clean renders in a practical time.

Differential Revision: https://developer.blender.org/D2769
2017-08-11 01:10:50 +02:00
977e7b68cb Cycles: add denoising tests, keep new image even if no reference exists. 2017-08-11 01:09:35 +02:00
267e75158a Fix T52322: denoiser broken on Windows after recent changes.
It's not clear why this only happened on Windows, but the code
was wrong and should do a bitcast here instead of conversion.
2017-08-11 01:09:35 +02:00
c31e221d4f Fix crash checking for Blender version 10+
PyAPI could trigger this, for now just truncate.
2017-08-11 09:00:00 +10:00
535a6cde64 Cleanup: redundant 'static' variable
Also use BLI_snprintf.
2017-08-11 08:49:09 +10:00
3d677d9190 Fix OSX duplicate path in Python's sys.path
The '..' in the path caused simple comparisons to fail.

D2780 by @akitula
2017-08-11 08:42:27 +10:00
e5604a2fa4 Cleanup: whitespace 2017-08-11 08:32:05 +10:00
3895c1e57e CMake: only build msgfmt if international is used
Changes to BLI would always rebuild msgfmt.
2017-08-11 08:14:04 +10:00
aa1b35bb60 Fix install_deps usage of patches.
Who in Hell did rename those files and did not update accordingly
install_deps.sh script???
2017-08-10 15:56:13 +02:00
017b7ee273 DPI: add back option to control line width, tweak default width.
Adds thin/default/thick modes to add -1/0/1 to the auto detected line width,
while leaving the overall UI scale unchanged.

Also tweaks the default line width threshold, so thicker lines start from
slightly high UI scales.

Differential Revision: https://developer.blender.org/D2778
2017-08-10 15:54:22 +02:00
e786ea6419 Fix T52334: images with non-color data should not change color space on save. 2017-08-10 15:49:17 +02:00
33ab011ae4 Tweak and extend POV syntax hilghting.
*Changed categories of some keywords
*reordered some longer keywords that didn't appear
*Activated another color (reserved builtins) by Leonid
*added some HGPOV and UberPOV missing keywords

Patch by Maurice Raybaud (@mauriceraybaud). Thanks to Leonid for additions, feedback and Linux testing.
Related diffs: D2754 and D2755.

While not a regression, this is new feature and would be nice to have it
backported to final 2.79.
2017-08-10 15:31:47 +02:00
64a87ee843 Cleanup: make seq dupli scene operands' names match global copying convention.
Followup to rB1037b90cb831b, forgot to save that file :(
2017-08-10 15:06:53 +02:00
05be2a8c45 Cleanup: de-duplicate makefile OS checks 2017-08-10 22:37:35 +10:00
1037b90cb8 Cleanup: make seq dupli scene operands' names match global copying convention. 2017-08-10 13:00:01 +02:00
ca3f601f93 Fix T52332: crash when duplicating sequencer strips.
Bug introduced in recent ID copying refactor.

This commit basically sanitizes seq strip copying behavior, by making
destination scene pointer mandatory (and source one a const one).
Nothing then prevents you from using same pointer as source and
destination!
2017-08-10 12:56:32 +02:00
5b6ead05bd Fix T52324: Metaball disappears when deleting first metaball object.
Lost specific MBall 'need update' case here in last year's refactor.

While technically not a regression, nice to have in 2.79.
2017-08-10 12:32:50 +02:00
cf7a2c93e3 Cleanup & fix potential NULL pointer dereferencing. 2017-08-10 10:28:13 +02:00
a152743ba3 Fix T52314: New ID copy code (rBrB9da7dfa1586d) Breaks node previews in compositor.
"Just" forgot to copy data block's name in 'NO_MAIN' case... *sigh*
2017-08-10 10:28:13 +02:00
422fddab87 Cycles: Fix instanced shadow catcher objects influencing each other 2017-08-10 09:22:33 +02:00
5a618ab737 Cycles: De-duplicate trace-time object visibility calculation
We already have enough files to worry about in BVH builders. no need to add yet
another copy-paste code which is tempting to be running out of sync.
2017-08-10 09:21:02 +02:00
de3c165713 Forgot to change magicnumber of OIIO built lib in previous commit... 2017-08-09 18:21:35 +02:00
6e7e081e3e install_deps: disable PTex in our OIIO building for now, broken on newest systems. 2017-08-09 18:16:21 +02:00
cb02f5250d Fix typo in new ID copying code. 2017-08-09 14:38:24 +02:00
176ad9ecdd Cycles: Remove ulong usage
This is a bit confusing, especially when one mixes OpenCL code where ulong equals
to uint64_t with CPU side code where ulong is expected to be something else from
the naming.

This commit makes it so we use explicit name, common on all platforms.
2017-08-09 14:08:58 +02:00
45d7513f84 Fix T52240: Alembic Not Transferring Materials Per Frame
When a mesh changes its number of vertices during the animation,
Blender rebuilds the DerivedMesh, after which the materials weren't
applied any more (causing the default to the first material slot).
2017-08-09 13:59:58 +02:00
cdfeebd139 Alembic: Renamed variable assigned_name → assigned_mat
The variable is a pointer to a Material, not to a name/string.
2017-08-09 13:59:58 +02:00
422dc1ea1f Typo fix 2017-08-09 13:59:58 +02:00
8cfb9b9535 Fixed Alembic unit test
Commit b6d7cdd3ce changed how the mesh data
is deformed, which wasn't taken into account yet in this unit test.

Instead of directly reading the mesh vertices (which aren't animated any
more), we convert the modified mesh to a new one, and inspect those
vertices instead.
2017-08-09 13:59:58 +02:00
8c488cb97f Fix T52315: Crash on duplicating Scene without world.
Regression from rBa7b3047cefcbf, to be backported to 2.79.

Like... seriously... :|
2017-08-09 10:55:30 +02:00
55d28e604e Cycles: Proper fix for recent OpenCL image crash
Problem was that some code checks to see if device_pointer is null or
not and the new allocator wasn't even setting the pointer to anything
as it tracks memory location separately. Setting the pointer to non
null keeps all users of device_pointer happy.
2017-08-09 04:27:39 -04:00
06bf34227b Revert "Cycles: Fix crash changing image after recent OpenCL changes"
This reverts commit f2809ae0a6.
2017-08-09 04:24:03 -04:00
2190c0c7e5 Modules test: Don't print backtrace for files which are ignored
This could make output really polluted, where it'll be hard to see actual
issues.

It is still possible to have all backtraces printed using BLENDER_VERBOSE
environment variable.
2017-08-09 09:42:03 +02:00
f2728939df Fix T52280: The Image node in Compositing can't read Z buffer of openEXR in 2.79
As part of the fix for T51587, I removed the Depth output for non-Multilayer
images since it seemed weird that PNGs etc. that don't have a Z pass still get
a socket for it.
However, I forgot about non-multilayer EXRs, which are a special case that can
actually have a Z pass.

Therefore, this commit brings back the Depth output for non-multilayer images
just like it was in 2.78.
2017-08-09 00:29:23 +02:00
99c13519a1 Cycles: More fixes for Windows 32 bit
- Apparently MSVC does not support compound literals
  in C++ (at least by the looks of it).

- Not sure how opencl_device_assert was managing to
  set protected property of the Device class.
2017-08-08 22:32:51 +02:00
c961737d0f Cycles: Fix compilation error of filter kernels on 32 bit Windows
We don't enable global SSE optimizations in regular kernel, and we
keep those disabled on Linux 32bit.

One possible workaround would be to pass arguments by ccl_ref, but
that is quite a few of code which better be done accurately.
2017-08-08 22:01:17 +02:00
b6d7cdd3ce Fix T51701: Alembic cache screws up mesh.
Use same trick as in DataTransfer modifier e.g. to avoid modifying
existing mesh's data.
2017-08-08 18:22:24 +02:00
f2809ae0a6 Cycles: Fix crash changing image after recent OpenCL changes
Steps to reproduce:
- Create shader Image texture -> Diffuse BSDF -> Output. Do NOT select image yet!
- Start viewport render.
- Select image from the ID browser of Image Texture node.

Thing is: with the memory manager we always need to inform device that memory
was freed.
2017-08-08 17:17:04 +02:00
0e57282999 Cycles: Fix compilation error without C++11
Common folks, nobody considered master a C++11 only branch. Such decision is to
be done officially and will involve changes in quite a few infrastructure related
areas.
2017-08-08 17:02:26 +02:00
4fe1bf85af Fix fixed width box layouts
Regression, to be backported in 2.79.
2017-08-08 17:37:51 +03:00
ddfd57c0d2 Cleanup: mostly namings in make_object_duplilist_real code. 2017-08-08 16:09:01 +02:00
a78b596272 Fix T52260: Blender 2.79 Objects made duplicates real still refer armature proxy.
New code was handling correctly ID's internal references to self, but
not references between 'made real' different objects...

Regression, to be backported in 2.79.
2017-08-08 16:09:01 +02:00
90b3dba515 Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself 2017-08-08 15:27:25 +02:00
126830b56c Depsgraph: Cleanup, make it easier to debug on laptop 2017-08-08 15:27:25 +02:00
19d19add1e Cycles: Cleanup, de-duplicate function parameter list
Was only needed to sue const reference on CPU. Now it is done using ccl_ref.
2017-08-08 15:27:25 +02:00
fd397a7d28 Cycles: Add utility macro ccl_ref
It is defined to & for CPU side compilation, and defined to an empty for any GPU
platform. The idea here is to use this macro instead of #ifdef block with bunch
of duplicated lines just to make it so CPU code is efficient.

Eventually we might switch to references on CUDA as well, but that would require
some intensive testing.
2017-08-08 15:27:25 +02:00
01ee88563b Fix T46329: scene_update_{pre,post} doc needs clarification
The documentation for the bpy.app.handlers.scene_update_{pre,post}
handlers states that they're called "on updating the scenes data".
However, they're called even when the data hasn't changed. Of course
such handlers are useful, but the documentation should reflect the
current behaviour.

Reviewers: mont29, sergey

Subscribers: Blendify

Maniphest Tasks: T46329

Differential Revision: https://developer.blender.org/D1535
2017-08-08 15:16:51 +02:00
ed4707be47 Fix width estimation for empty layouts in pie menus 2017-08-08 15:52:14 +03:00
d85af2aa3f Update CUEW to latest version
Previous update pulled too much of system-wide typedefs.
2017-08-08 14:27:28 +02:00
c8a8589d4f Fix T52263: Crash When Splitting and Merging Areas with Header Text Set.
Not a regression, but safe enough to be included in 2.79.
2017-08-08 14:07:34 +02:00
12834fe0f0 Update CUDA wrangler to latest version
Brings new declarations from toolkit version 8.0, also fixes some
pointers used in function declarations.
2017-08-08 13:58:42 +02:00
ec8ae4d5e9 Cycles: Pack kernel textures into buffers for OpenCL
Image textures were being packed into a single buffer for OpenCL, which
limited the amount of memory available for images to the size of one
buffer (usually 4gb on AMD hardware). By packing textures into multiple
buffers that limit is removed, while simultaneously reducing the number
of buffers that need to be passed to each kernel.

Benchmarks were within 2%.

Fixes T51554.

Differential Revision: https://developer.blender.org/D2745
2017-08-08 07:12:04 -04:00
b53e35c655 Fix compilation error when building without Blender
Simply disabled python tests, they can't be run anyway (since blender target is
not enabled) and we don't have any player-related tests in that folder.
2017-08-08 11:32:33 +02:00
6af7d7e05e Cleanup: remove incorrect comment
enum values aren't saved in files.
2017-08-08 11:28:47 +10:00
8f6b5f1f3c Fix CMake dependencies builder issues on Linux with TBB and Python packages. 2017-08-08 02:33:37 +02:00
451ccf7396 Cycles: Cleanup, move curve intersection functions to own file
This way curve file becomes much shorter and it's also easier to write a
benchmark application to check performance before/after future changes.
2017-08-07 20:53:30 +02:00
77a7a7f455 Cycles: Cleanup, trailign whitespace 2017-08-07 20:53:30 +02:00
95fe9b2617 Cycles: Cleanup, remove bvh prefix from curve functions
Those are nothing to do with BVH, and can be used separately.
2017-08-07 20:53:30 +02:00
a4bbce8949 Cycles: Fix compilation error on NVidia OpenCL after recent refactor
Still need to verify this is proper thing to do for AMD OpenCL. At least now
i can compile OpenCL kernel on my laptop with sm21 card.
2017-08-07 20:52:24 +02:00
947040cf2b Fix compilation error when rigid body is disabled 2017-08-07 20:11:19 +02:00
3c14f02eac Build: add scripts to build dependencies for Windows and macOS.
Note these are intended for platform maintainers, we do not intend to
support users making their own builds with these. For that precompiled
libraries from lib/ should be used.

Implemented by Martijn Berger, Ray Molenkamp and Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D2753
2017-08-07 17:54:26 +02:00
fc38276d74 Fix Cycles shadow catcher objects influencing each other.
Since all the shadow catchers are already assumed to be in the footage,
the shadows they cast on each other are already in the footage too. So
don't just let shadow catchers skip self, but all shadow catchers.

Another justification is that it should not matter if the shadow catcher
is modeled as one object or multiple separate objects, the resulting
render should be the same.

Differential Revision: https://developer.blender.org/D2763
2017-08-07 17:54:26 +02:00
dc4d850d10 Fix Windows build errors with recent Cycles SIMD refactoring. 2017-08-07 17:54:26 +02:00
9da7dfa158 Refactor ID copying (and to some extent, ID freeing).
This will allow much finer controll over how we copy data-blocks, from
full copy in Main database, to "lighter" ones (out of Main, inside an
already allocated datablock, etc.).

This commit also transfers a llot of what was previously handled by
per-ID-type custom code to generic ID handling code in BKE_library.
Hopefully will avoid in future inconsistencies and missing bits we had
all over the codebase in the past.

It also adds missing copying handling for a few types, most notably
Scene (which where using a fully customized handling previously).

Note that the type of allocation used during copying (regular in Main,
allocated but outside of Main, or not allocated by ID handling code at
all) is stored in ID's, which allows to handle them correctly when
freeing. This needs to be taken care of with caution when doing 'weird'
unusual things with ID copying and/or allocation!

As a final note, while rather noisy, this commit will hopefully not
break too much existing branches, old 'API' has been kept for the main
part, as a wrapper around new code. Cleaning it up will happen later.

Design task : T51804
Phab Diff: D2714
2017-08-07 16:39:55 +02:00
580741b317 Cycles: Cleanup, space after keyword 2017-08-07 14:47:51 +02:00
771e6120c8 Cycles tests: CMake side changes to support recent files split in the SVN repo 2017-08-07 14:33:47 +02:00
0f3f093d3b Cycles: add HTML report to inspect failed test images.
Shows new, reference and diff renders, with mouse hover to flip between
new and ref for easy comparison. This generates a report.html in
build_dir/tests/cycles, stored along with the new and diff images.

Differential Revision: https://developer.blender.org/D2770
2017-08-07 14:01:24 +02:00
ee77c1e917 Code refactor: use float4 instead of intrinsics for CPU denoise filtering.
Differential Revision: https://developer.blender.org/D2764
2017-08-07 14:01:24 +02:00
a24fbf3323 Code refactor: add, remove, optimize various SSE functions.
* Remove some unnecessary SSE emulation defines.
* Use full precision float division so we can enable it.
* Add sqrt(), sqr(), fabs(), shuffle variations, mask().
* Optimize reduce_add(), select().

Differential Revision: https://developer.blender.org/D2764
2017-08-07 14:01:24 +02:00
a8cc0d707e Code refactor: split defines into separate header, changes to SSE type headers.
I need to use some macros defined in util_simd.h for float3/float4, to emulate
SSE4 instructions on SSE2. But due to issues with order of header includes this
was not possible, this does some refactoring to make it work.

Differential Revision: https://developer.blender.org/D2764
2017-08-07 14:01:24 +02:00
5e4bad2c00 Cycles: remove option to disable transparent shadows globally.
We already detect this automatically based on shading nodes and per shader
settings, and performance of this option is ok now all devices.

Differential Revision: https://developer.blender.org/D2767
2017-08-07 14:01:24 +02:00
d1752167a9 Fix T52278: 'Default' application template fails
Own error in 7398b3b7
2017-08-07 21:20:57 +10:00
2a74f36dac Fix Cycles CUDA adaptive megakernel build error. 2017-08-07 00:27:08 +02:00
f5f6f9c9ac Fix broken API doc generation: Partially revert rBa372638a76e0
Making those arrays static remove them from exported symbols, which
breaks API doc generation script.

To be backported to 2.79 branch.
2017-08-06 17:35:41 +02:00
45dcd20ca9 Cycles: CUDA split performance tweaks, still far from megakernel.
On Pabellon, 25.8s mega, 35.4s split before, 32.7s split after.
2017-08-05 14:32:59 +02:00
fa05718f27 View3D: expose normal from depth publicly 2017-08-05 07:30:28 +10:00
cd023b6cec Cycles: remove min bounces, modify RR to terminate less.
Differential Revision: https://developer.blender.org/D2766
2017-08-04 23:11:03 +02:00
1210b47a85 Tracking: Undefine temporary define
Missed this in previous commit.
2017-08-04 21:12:11 +02:00
e6daa161dd Tracking: Remove limit of 50 points of the track history
Was quite stupid reason for this: static size of array.

Now we allocate needed amount of points in heap if requested path length is
getting too big.
2017-08-04 09:11:26 +02:00
0db4dab0c3 Tracking: Cleanup of transform code 2017-08-04 08:13:38 +02:00
0c48a091f9 Tracking: Cleanup, use boolean instead of integer 2017-08-04 07:21:01 +02:00
696599edac CMake: test build configuration support
D2765 by @akitula
2017-08-04 08:11:42 +10:00
0d01cf4488 Cycles: Extra tweaks to performance of header expansion
Two main things here:

1. Replace all unsafe for #line directive characters into a single loop,
   avoiding multiple iterations and multiple temporary strings created.

2. Don't merge token char by char but calculate start and end point and
   then copy all substring at once.

This gives about 15% speedup of source processing time. At this point
(with all previous commits from today) we've shrinked down compiled
sources size from 108 MB down to ~5.5 MB and lowered processing time
from 4.5 sec down to 0.047 sec on my laptop running Linux (this was a
constant time which Blender will always spent first time loading kernel,
even if we've got compiled clbin).
2017-08-03 08:07:06 +02:00
gandalf3
d81cabbaa8 Merge branch 'master' of git.blender.org:blender into soc-2017-package_manager 2017-08-02 23:00:24 -07:00
c6c49d90dc Remove volatile, causing issues w/ GCC/ubsan
Was Cygwin workaround, no longer needed.
2017-08-03 07:10:20 +10:00
ba98f06acc mikktspace: minor optimization
Add a safe version of normalize since all uses of normalize
did zero length checks, move this into a function.

Also avoid unnecessary conversion.

Gives minor speedup here (approx 3-5%).
2017-08-03 07:03:59 +10:00
f879cac032 Cycles: Avoid some expensive operations in header expansions
Basically gather lines as-is during traversal, avoiding allocating
memory for all the lines in headers.

Brings additional performance improvement abut 20%.
2017-08-02 20:59:19 +02:00
a280697e77 Cycles: Support "precompiled" headers in include expansion algorithm
The idea here is that it is possible to mark certain include statements
as "precompiled" which means all subsequent includes of that file will
be replaced with an empty string.

This is a way to deal with tricky include pattern happening in single
program OpenCL split kernel which was including bunch of headers about
10 times.

This brings preprocessing time from ~1sec to ~0.1sec on my laptop.
2017-08-02 20:59:19 +02:00
4ad39964fd Cycles: Speed up #include expansion algorithm
The idea is to re-use files which were already processed. Gives about 4x speedup
of processing time (~4.5sec vs 1.0sec) on my laptop for the whole OpenCL kernel.

For users it will mean lower delay before OpenCL rendering might start.
2017-08-02 20:59:19 +02:00
8ff2c14015 Fix T52250: Glitch in UI in the addon panel regression 2017-08-02 17:46:04 +03:00
ab1c980914 Add a tab to user preferences
Not sure if this is fully correct; getting crashes with non-factory
settings.
2017-06-10 00:01:05 -07:00
880 changed files with 16049 additions and 65667 deletions

3
.gitignore vendored
View File

@@ -33,3 +33,6 @@ Desktop.ini
/doc/python_api/sphinx-in/
/doc/python_api/sphinx-out/
/doc/python_api/rst/bmesh.ops.rst
# in-source lib downloads
/build_files/build_environment/downloads

6
.gitmodules vendored
View File

@@ -2,7 +2,7 @@
path = release/scripts/addons
url = ../blender-addons.git
ignore = all
branch = blender-v2.79-release
branch = master
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib
url = ../blender-addons-contrib.git
@@ -12,9 +12,9 @@
path = release/datafiles/locale
url = ../blender-translations.git
ignore = all
branch = blender-v2.79-release
branch = master
[submodule "source/tools"]
path = source/tools
url = ../blender-dev-tools.git
ignore = all
branch = blender-v2.79-release
branch = master

View File

@@ -243,7 +243,6 @@ else()
endif()
option(WITH_PLAYER "Build Player" OFF)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
option(WITH_VORO "Enable Voronoi Fracture based on Voro++" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
@@ -286,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()
@@ -376,13 +374,6 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
# Freestyle
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
# Crashpad / Breakpad
option(WITH_CRASHPAD "Enable crashpad or breakpad (crash reporting)" OFF)
set(CRASHPAD_URL "http://127.0.0.1:1234" CACHE STRING "URL to report crash reports to")
mark_as_advanced(WITH_CRASHPAD)
mark_as_advanced(CRASHPAD_URL)
# Misc
if(WIN32)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
@@ -695,7 +686,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)
@@ -840,14 +830,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)
@@ -1702,7 +1684,6 @@ if(FIRST_RUN)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_OPENCOLORIO)
info_cfg_option(WITH_VORO)
info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_ALEMBIC)
@@ -1715,7 +1696,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)

View File

@@ -43,6 +43,11 @@ ifndef BUILD_DIR
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
endif
# Dependencies DIR's
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)
# Allow to use alternative binary (pypy3, etc)
ifndef PYTHON
PYTHON:=python3
@@ -86,13 +91,7 @@ ifndef NPROCS
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(OS), NetBSD)
ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
@@ -146,6 +145,27 @@ cycles: all
headless: all
bpy: all
# -----------------------------------------------------------------------------
# Build dependencies
DEPS_TARGET = install
ifneq "$(findstring clean, $(MAKECMDGOALS))" ""
DEPS_TARGET = clean
endif
deps: .FORCE
@echo
@echo Configuring dependencies in \"$(DEPS_BUILD_DIR)\"
@cmake -H"$(DEPS_SOURCE_DIR)" \
-B"$(DEPS_BUILD_DIR)" \
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
@echo
@echo Building dependencies ...
$(MAKE) -C "$(DEPS_BUILD_DIR)" -s -j $(NPROCS) $(DEPS_TARGET)
@echo
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
@echo
# -----------------------------------------------------------------------------
# Configuration (save some cd'ing around)
@@ -164,6 +184,7 @@ help: .FORCE
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * cycles - build Cycles standalone only, without Blender"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo " * deps - build library dependencies (intended only for platform maintainers)"
@echo ""
@echo " * config - run cmake configuration tool to set build options"
@echo ""

View File

@@ -1,17 +0,0 @@
# Blender Fracture Modifier
The Fracture Modifier is a system to interactively destroy and physically simulate the shards of objects in an easy, performant and
non-destructive way. This allows you to shatter and simulate the objects as you like while the original geometry of the object remains
untouched and intact.
## Support and builds
[BlenderArtists.org support forum thread](http://blenderartists.org/forum/showthread.php?343637)<br>
[BlenderPhysics Hosted Fracture Modifier Builds](http://blenderphysics.com/fracturemodifier/)<br>
[Kai Kostack Hosted Fracture Modifier Builds](http://kaikostack.com/fracture/)
## Main Documentation
[BlenderWiki page about Fracture Modifier](https://wiki.blender.org/index.php/User:Scorpion81/Fracture_Documentation)
## Useful Videos
[Development and experimental videos from the fracture modifier build & helpers addon by Dennis Fassbaender](https://www.youtube.com/playlist?list=PLyWdRVpqt5ZdQ6SdPuLQ76nShiuwXu_uC)<br>
[Simulation Videos made by Kai Kostack](https://www.youtube.com/playlist?list=PLGYnM-Mk7-OeqpCBmw6ZjFyiopkvkE6_S)

View File

@@ -45,11 +45,6 @@ cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/options.cmake)
include(cmake/versions.cmake)
#if(UNIX AND NOT APPLE)
# include(cmake/breakpad.cmake)
#endif()
include(cmake/zlib.cmake)
include(cmake/blendthumb.cmake)
include(cmake/openal.cmake)
@@ -63,6 +58,7 @@ include(cmake/openexr.cmake)
include(cmake/freetype.cmake)
include(cmake/freeglut.cmake)
include(cmake/glew.cmake)
include(cmake/hdf5.cmake)
include(cmake/alembic.cmake)
include(cmake/glfw.cmake)
include(cmake/clew.cmake)
@@ -80,11 +76,9 @@ include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/requests.cmake)
include(cmake/numpy.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
include(cmake/webp.cmake)
if(WIN32)
include(cmake/hidapi.cmake)
endif()
@@ -100,7 +94,6 @@ else()
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
@@ -114,6 +107,7 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/schroedinger.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/openjpeg.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)

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

@@ -40,33 +40,22 @@ if(WIN32)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo using python : 3.5 : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
type ${semi_path} >> "${JAM_FILE}"
)
set(BOOST_BUILD_COMMAND bjam)
#--user-config=user-config.jam
set(BOOST_BUILD_OPTIONS runtime-link=static )
#set(BOOST_WITH_PYTHON --with-python)
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/)
endif()
set(BOOST_PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/boost/src/external_boost < ${PATCH_DIR}/boost.diff)
set(BOOST_BUILD_OPTIONS runtime-link=static --user-config=user-config.jam)
set(BOOST_WITH_PYTHON --with-python)
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_OPTIONS toolset=clang cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
endif()
set(BOOST_OPTIONS
@@ -99,16 +88,12 @@ ExternalProject_Add(external_boost
URL_HASH MD5=${BOOST_MD5}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} variant=${BOOST_BUILD_TYPE} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
INSTALL_COMMAND ""
)
if(WIN32)
add_dependencies(
external_boost
Make_Python_Environment
)
add_dependencies(external_boost Make_Python_Environment)
endif()

View File

@@ -1,49 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_breakpad
GIT_REPOSITORY ${BREAKPAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BREAKPAD_MD5}
PREFIX ${BUILD_DIR}/breakpad
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/breakpad/src/external_breakpad < ${PATCH_DIR}/breakpad.diff
UPDATE_COMMAND git -c user.name=test -c user.email=test@test.test stash create
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${BREAKPAD_ENV} cd ${BUILD_DIR}/breakpad/src/external_breakpad/ && aclocal && automake && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/breakpad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/breakpad/src/external_breakpad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/breakpad/src/external_breakpad/ && make install
#INSTALL_DIR ${LIBDIR}/breakpad
)
#the new file is included in the breakpad.diff now
#set(LSS_URI https://chromium.googlesource.com/linux-syscall-support)
#set(LSS_HARVEST_COMMAND
# cd ${BUILD_DIR} &&
# git clone ${LSS_URI} &&
# mkdir ${BUILD_DIR}/breakpad/src/external_breakpad/src/third_party/lss &&
# cp ${BUILD_DIR}/linux-syscall-support/linux_syscall_support.h ${BUILD_DIR}/breakpad/src/external_breakpad/src/third_party/lss/linux_syscall_support.h)
#set(GIT_ENVIRONMENT COMMAND
# export GIT_COMMITTER_NAME="Test" &&
# export GIT_COMMITTER_EMAIL="test@test.test")
#ExternalProject_Add_Step(external_breakpad after_patch
# #COMMAND ${LSS_HARVEST_COMMAND}
# COMMAND ${GIT_ENVIRONMENT}
# DEPENDEES patch #mkdir update patch download configure build install
#)

View File

@@ -28,27 +28,8 @@ ExternalProject_Add(external_clang
URL_HASH MD5=${CLANG_HASH}
PATCH_COMMAND ${PATCH_CMD} -p 2 -N -R -d ${BUILD_DIR}/clang/src/external_clang < ${PATCH_DIR}/clang.diff
PREFIX ${BUILD_DIR}/clang
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/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/
)
endif()
ExternalProject_Add_Step(external_clang after_install
COMMAND ${CLANG_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()
add_dependencies(
external_clang
ll
)
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,12 +26,16 @@ 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
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic.lib ${HARVEST_TARGET}/zlib/lib/libz_st.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/bin/ ${HARVEST_TARGET}/zlib/bin/ &&
# Boost copy lib + rename boost_1_60 to boost
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/ &&
# jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
@@ -94,6 +98,8 @@ if(BUILD_MODE STREQUAL Release)
# tbb
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ &&
# llvm
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ &&
# opencollada
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ &&
# opensubdiv
@@ -102,20 +108,24 @@ if(BUILD_MODE STREQUAL Release)
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5 ${HARVEST_TARGET}/hdf5 &&
# BlendThumb
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/python35.tar.gz ${HARVEST_TARGET}/Release/python35.tar.gz &&
# requests
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/requests ${HARVEST_TARGET}/Release/site-packages/requests &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/python35_numpy${PYTHON_POSTFIX}_1.10.tar.gz ${HARVEST_TARGET}/Release/python35_numpy_1.10.tar.gz &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
DEPENDS
)
endif()
)
endif(BUILD_MODE STREQUAL Release)
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
@@ -144,6 +154,12 @@ if(BUILD_MODE STREQUAL Debug)
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib &&
# blosc
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib &&
# boost
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ &&
# llvm
${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/ &&
# osl
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib &&
@@ -162,12 +178,12 @@ if(BUILD_MODE STREQUAL Debug)
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/python35_numpy_1.10d.tar.gz ${HARVEST_TARGET}/Release/python35_numpy_1.10d.tar.gz &&
# 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
${CMAKE_COMMAND} -E copy ${LIBDIR}/python35_d.tar.gz ${HARVEST_TARGET}/Release/python35_d.tar.gz
DEPENDS Package_Python
)
endif()
)
endif(BUILD_MODE STREQUAL Debug)
else(WIN32)
@@ -201,8 +217,7 @@ endfunction()
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest(alembic/bin alembic/bin "*")
harvest(blosc/lib blosc/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(blosc/lib openvdb/lib "*.a")
harvest(boost/include boost/include "*")
harvest(boost/lib boost/lib "*.a")
harvest(ffmpeg/include ffmpeg/include "*.h")
@@ -227,9 +242,6 @@ harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
#harvest(breakpad/lib breakpad/lib "*.a")
#harvest(breakpad/include/breakpad breakpad/include "*.h")
#harvest(breakpad/bin breakpad/bin "*")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
@@ -277,4 +289,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

@@ -42,19 +42,3 @@ ExternalProject_Add(ll
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/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}
DEPENDEES mkdir update patch download configure build install
)
endif()

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(NUMPY_POSTFIX)
message("Python_binary = ${PYTHON_BINARY}")
message("Python_post = ${PYTHON_POSTFIX}")
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build
INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-3.5"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python35_numpy${PYTHON_POSTFIX}_1.11.tar.gz" "."
)
add_dependencies(external_numpy Make_Python_Environment)
endif()
endif()

View File

@@ -25,21 +25,19 @@ if(MSVC)
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif()
endif(BUILD_MODE STREQUAL Debug)
endif()
set(NUMPY_POSTFIX)
if(WIN32)
set(NUMPY_INSTALL
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python3.5/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-3.5${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python35_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
)
set(NUMPY_PATCH ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff )
else()
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
endif()
ExternalProject_Add(external_numpy
@@ -47,14 +45,11 @@ ExternalProject_Add(external_numpy
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install
INSTALL_COMMAND ${NUMPY_INSTALL}
)
add_dependencies(
external_numpy
Make_Python_Environment
)
add_dependencies(external_numpy Make_Python_Environment)

View File

@@ -25,7 +25,6 @@ if(BUILD_MODE STREQUAL Release)
-DALSOFT_CONFIG=Off
-DALSOFT_HRTF_DEFS=Off
-DALSOFT_INSTALL=On
-DALSOFT_BACKEND_SNDIO=Off
)
if(UNIX)
@@ -39,6 +38,5 @@ if(BUILD_MODE STREQUAL Release)
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
endif()

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

@@ -32,35 +32,12 @@ endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
endif()
if(WITH_WEBP)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOPENJPEG_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}
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
@@ -82,7 +59,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_OPENJPEG=OFF
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
@@ -90,7 +67,6 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
@@ -102,7 +78,6 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
@@ -116,7 +91,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
${OIIO_SIMD_FLAGS}
)
@@ -125,28 +101,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_webp external_opencolorio)
if(NOT WIN32)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
add_dependencies(external_openimageio external_opencolorio_extra)
endif()

View File

@@ -38,27 +38,6 @@ ExternalProject_Add(external_openjpeg
INSTALL_DIR ${LIBDIR}/openjpeg
)
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openjpeg_msvc after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
DEPENDEES install
)
endif()
endif()
set(OPENJPEG_LIBRARY 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

@@ -19,20 +19,19 @@
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
message("BuildMode = ${BUILD_MODE}")
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)
@@ -56,27 +55,24 @@ if(WIN32)
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
# TODO FIXME highly MSVC specific
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
@@ -119,24 +115,19 @@ else()
set(LIBPREFIX "lib")
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.9)
set(OSX_SDK_VERSION 10.12)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
set(OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-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}/python35${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python35${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python35${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python35${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python3.5 &&
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python3.5/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
@@ -89,7 +87,7 @@ endif()
if(MSVC)
add_custom_command(
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
OUTPUT ${LIBDIR}/python35${PYTHON_POSTFIX}.tar.gz
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
@@ -114,10 +112,10 @@ if(MSVC)
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python35${PYTHON_POSTFIX}.tar.gz" "."
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python35${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
if(MSVC12)
set(PYTHON_DISTUTIL_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/run/lib/distutils < ${PATCH_DIR}/python_runtime_vc2013.diff)
@@ -129,12 +127,12 @@ if(MSVC)
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python35${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python35.lib #missing postfix on purpose, distutils is not expecting it
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python35${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
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

@@ -1,41 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
)
else()
set(HARVEST_CMD echo .)
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
)
add_dependencies(
external_python_site_packages
Make_Python_Environment
)

View File

@@ -0,0 +1,37 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
if(WIN32)
set(REQUESTS_INSTALL_DIR ${LIBDIR}/requests)
else()
set(REQUESTS_INSTALL_DIR ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION}/site-packages/requests)
endif()
ExternalProject_Add(external_requests
URL ${REQUESTS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${REQUESTS_HASH}
PREFIX ${BUILD_DIR}/requests
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/requests/src/external_requests/requests ${REQUESTS_INSTALL_DIR}
)
add_dependencies(external_requests Make_Python_Environment)
endif(BUILD_MODE STREQUAL Release)

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

@@ -216,3 +216,4 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -216,3 +216,4 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -21,16 +21,6 @@ set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(UNIX)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
@@ -38,8 +28,7 @@ ExternalProject_Add(external_sndfile
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} --enable-static --disable-shared --prefix=${mingw_LIBDIR}/sndfile
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
INSTALL_DIR ${LIBDIR}/sndfile
@@ -49,14 +38,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

@@ -16,15 +16,12 @@
#
# ***** END GPL LICENSE BLOCK *****
set(BREAKPAD_URI https://chromium.googlesource.com/breakpad/breakpad)
set(ZLIB_VERSION 1.2.8)
set(ZLIB_URI https://netcologne.dl.sourceforge.net/project/libpng/zlib/${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 44d667c142d7cda120332623eab69f40)
set(OPENAL_VERSION 1.17.2)
#set(OPENAL_URI http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_URI https://www.openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_URI http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 1764e0d8fec499589b47ebc724e0913d)
set(PNG_VERSION 1.6.21)
@@ -37,14 +34,12 @@ set(JPEG_HASH f9804884c1c41eb7f4febb9353a2cb27)
set(BOOST_VERSION 1.60.0)
set(BOOST_VERSION_NODOTS 1_60_0)
#set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
#set(BOOST_MD5 5d8b4503582fffa9eefdb9045359c239)
set(BOOST_URI http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_NODOTS}.tar.bz2/download)
set(BOOST_MD5 65a840e1a0b13a558ff19eeb2c4f0cbe)
set(BLOSC_VERSION 1.7.0)
set(BLOSC_VERSION 1.7.1)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.zip)
set(BLOSC_HASH 397f724c2834cee86b09ac0848e8e787)
set(BLOSC_HASH ff5cc729a5a25934ef714217218eed26)
set(PTHREADS_VERSION 2-9-1)
set(PTHREADS_URI ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PTHREADS_VERSION}-release.tar.gz)
@@ -109,14 +104,11 @@ set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c
set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
set(LLVM_VERSION 3.4.2)
#set(LLVM_VERSION 6.0.1)
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz) #3.4.2 uses tar.gz, same with clang
set(LLVM_URI http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
set(LLVM_HASH a20669f75967440de949ac3b1bad439c)
#set(LLVM_HASH c88c98709300ce2c285391f387fecce0)
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(CLANG_HASH 4e419bd4e3b55aa06d872320f754bd85)
set(OPENIMAGEIO_VERSION 1.7.15)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.zip)
@@ -136,44 +128,29 @@ set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_biso
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
set(OSL_VERSION 1.7.5)
#set(OSL_VERSION 1.9.9)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.zip)
set(OSL_HASH 6924dd5d453159e7b6eb106a08c358cf)
#set(OSL_HASH 1c34112d8f3cf81f2fc415424bd38ae8)
set(PYTHON_VERSION 3.5.3)
set(PYTHON_SHORT_VERSION 3.5)
set(PYTHON_SHORT_VERSION_NO_DOTS 35)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 57d1f8bfbabf4f2500273fb0706e6f21)
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)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH af1c799fe754924de7d5b00a6fb5f514)
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)
set(OPENVDB_HASH 30a7e9571a03ab7bcf1a39fb62aa436f)
set(IDNA_VERSION 2.6)
set(CHARDET_VERSION 3.0.2)
set(URLLIB3_VERSION 1.22)
set(CERTIFI_VERSION 2017.7.27.1)
set(REQUESTS_VERSION 2.18.4)
set(REQUESTS_VERSION v2.10.0)
set(REQUESTS_URI https://github.com/kennethreitz/requests/archive/${REQUESTS_VERSION}.zip)
set(REQUESTS_HASH 6ebefdf0210c7f0933f61501334e46c3)
set(NUMPY_VERSION v1.10.1)
set(NUMPY_SHORT_VERSION 1.10)
set(NUMPY_URI https://files.pythonhosted.org/packages/a5/2e/5412784108f5dc0f827fb460ccdeaa9d76286979fe5ddd070d526d168a59/numpy-1.10.1.zip)
set(NUMPY_URI https://pypi.python.org/packages/a5/2e/5412784108f5dc0f827fb460ccdeaa9d76286979fe5ddd070d526d168a59/numpy-1.10.1.zip)
set(NUMPY_HASH 6f57c58bc5b28440fbeccd505da63d58)
set(LAME_VERSION 3.99.5)
@@ -215,11 +192,9 @@ set(XVIDCORE_VERSION 1.3.4)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f)
#this has to be in sync with the version in blenders /extern folder
set(OPENJPEG_VERSION 1.5.2)
set(OPENJPEG_SHORT_VERSION 1.5)
set(OPENJPEG_VERSION 1.5)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/version.${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d)
set(OPENJPEG_HASH 60662566595e02104c0f6d1052f8b1669624c646e62b6280d5fd5a66d4e92f8d)
set(FAAD_VERSION 2-2.7)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.bz2)
@@ -241,9 +216,9 @@ set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
set(LAPACK_HASH f2f6c67134e851fe189bb3ca1fbb5101)
set(SNDFILE_VERSION 1.0.28)
set(SNDFILE_VERSION 1.0.26)
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
set(SNDFILE_HASH ec810a0c60c08772a8a5552704b63393)
#set(HIDAPI_VERSION 0.8.0-rc1)
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_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 @@ ExternalProject_Add(external_x264
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf

View File

@@ -37,3 +37,4 @@ endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

View File

@@ -761,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" )
@@ -1262,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
}
@@ -1781,7 +1777,7 @@ compile_LLVM() {
cd $_src
# XXX Ugly patching hack!
patch -p1 -i "$SCRIPT_DIR/install_deps_patches/llvm.patch"
patch -p1 -i "$SCRIPT_DIR/patches/install_deps_llvm.diff"
cd $CWD
@@ -1887,7 +1883,7 @@ compile_OSL() {
git reset --hard
# XXX Ugly patching hack!
patch -p1 -i "$SCRIPT_DIR/install_deps_patches/osl.patch"
patch -p1 -i "$SCRIPT_DIR/patches/install_deps_osl.diff"
fi
# Always refresh the whole build!

View File

@@ -1,11 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
set(LLVM_VERSION_MINOR 4)
if (NOT PACKAGE_VERSION)
- set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
+ set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
endif()
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)

View File

@@ -1,12 +0,0 @@
--- a/src/shaders/CMakeLists.txt
+++ b/src/shaders/CMakeLists.txt
@@ -27,7 +27,7 @@ macro (osl_compile oslsrc objlist headers)
message (STATUS "cmd: ${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc ${oslsrc}")
endif ()
add_custom_command (OUTPUT ${osofile}
- COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" ${oslsrc}
+ COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" "-o" ${osofile} ${oslsrc}
MAIN_DEPENDENCY ${oslsrc}
DEPENDS ${${headers}} ${oslsrc} "${CMAKE_CURRENT_BINARY_DIR}/stdosl.h" "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

View File

@@ -1,37 +0,0 @@
--- a/boost/config/compiler/visualc.hpp 2015-12-08 11:55:19 -0700
+++ b/boost/config/compiler/visualc.hpp 2018-03-17 10:29:52 -0600
@@ -287,12 +287,3 @@
# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
#endif
-//
-// last known and checked version is 19.00.23026 (VC++ 2015 RTM):
-#if (_MSC_VER > 1900)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# else
-# pragma message("Unknown compiler version - please run the configure tests and report the results")
-# endif
-#endif
--- a/boost/type_traits/has_nothrow_assign.hpp 2015-12-13 05:49:42 -0700
+++ b/boost/type_traits/has_nothrow_assign.hpp 2018-05-27 11:11:02 -0600
@@ -24,7 +24,7 @@
#include <boost/type_traits/remove_reference.hpp>
#endif
#endif
-#if defined(__GNUC__) || defined(__SUNPRO_CC)
+#if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__clang__)
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_volatile.hpp>
#include <boost/type_traits/is_assignable.hpp>
--- a/boost/type_traits/has_nothrow_constructor.hpp 2015-12-13 05:49:42 -0700
+++ b/boost/type_traits/has_nothrow_constructor.hpp 2018-05-27 11:11:02 -0600
@@ -17,7 +17,7 @@
#if defined(BOOST_MSVC) || defined(BOOST_INTEL)
#include <boost/type_traits/has_trivial_constructor.hpp>
#endif
-#if defined(__GNUC__ ) || defined(__SUNPRO_CC)
+#if defined(__GNUC__ ) || defined(__SUNPRO_CC) || defined(__clang__)
#include <boost/type_traits/is_default_constructible.hpp>
#endif

File diff suppressed because it is too large Load Diff

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,46 +36,46 @@ 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 )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
@@ -89,164 +89,160 @@ 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")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
endif()
endif()
endif()
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,150 +86,148 @@ 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")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()
endif()
endif()
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

@@ -6,7 +6,7 @@
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
# and basename_LIBRARY_RELEASE will be set to the release value. If only
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
#
# If the generator supports configuration types, then basename_LIBRARY and
# basename_LIBRARIES will be set with debug and optimized flags specifying the
@@ -49,14 +49,14 @@ 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 )
set( ${basename}_LIBRARY
set( ${basename}_LIBRARY
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
set( ${basename}_LIBRARIES
set( ${basename}_LIBRARIES
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
@@ -67,15 +67,16 @@ macro( select_library_configurations basename )
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
"The ${basename} library" )
if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE )
endif( ${basename}_LIBRARY )
mark_as_advanced( ${basename}_LIBRARY
mark_as_advanced( ${basename}_LIBRARY
${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro( select_library_configurations )

View File

@@ -8,7 +8,7 @@ project(OpenVDB)
# --------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
# --------------------------------------------------------------------------------

View File

@@ -88,14 +88,6 @@ elseif(WIN32)
set(DISABLE_RTTI "/EHs- /GR- ")
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-flifetime-dse=1" SUPPORTS_FLIFETIME)
if (SUPPORTS_FLIFETIME)
add_definitions(-flifetime-dse=1)
endif()
endif()
# Linker export definitions
if (WIN32)
add_custom_command(OUTPUT tbb.def

View File

@@ -1,13 +0,0 @@
diff -Naur external_openal_original/CMakeLists.txt external_openal/CMakeLists.txt
--- external_openal_original/CMakeLists.txt 2016-01-24 20:12:39 -0700
+++ external_openal/CMakeLists.txt 2018-06-02 12:16:52 -0600
@@ -885,7 +885,8 @@
OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF)
IF(HAVE_WINDOWS_H)
# Check MMSystem backend
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
+ set(CMAKE_REQUIRED_FLAGS "-D_WIN32_WINNT=0x0502")
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
IF(HAVE_MMSYSTEM_H)
CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
IF(HAVE_LIBWINMM)

View File

@@ -1,11 +1,10 @@
--- CMakeLists.txt 2016-11-01 01:03:44 -0600
+++ CMakeLists.txt 2016-12-01 09:20:12 -0700
@@ -454,7 +454,7 @@
@@ -454,7 +454,6 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
- add_definitions (-DOPENEXR_DLL)
+ add_definitions (-DOPJ_STATIC)
if (LINKSTATIC)
add_definitions (-DBoost_USE_STATIC_LIBS=1)
else ()

View File

@@ -10,29 +10,3 @@ diff -Naur osl/src/external_osl/src/cmake/flexbison.cmake osl_bak/src/external_o
MAIN_DEPENDENCY ${flexsrc}
DEPENDS ${${compiler_headers}}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
--- osl/src/external_osl/src/include/OSL/oslconfig.h 2016-10-31 16:48:19 -0600
+++ osl/src/external_osl/src/include/OSL/oslconfig.h 2018-05-27 11:18:08 -0600
@@ -44,12 +44,18 @@
// same if another packages is compiling against OSL and using these headers
// (OSL may be C++11 but the client package may be older, or vice versa --
// use these two symbols to differentiate these cases, when important).
-#if (__cplusplus >= 201402L)
-# define OSL_CPLUSPLUS_VERSION 14
-#elif (__cplusplus >= 201103L)
-# define OSL_CPLUSPLUS_VERSION 11
+
+// Force C++03 for MSVC in blender since svn the libraries are build with that
+#if !defined(_MSC_VER)
+ #if (__cplusplus >= 201402L)
+ # define OSL_CPLUSPLUS_VERSION 14
+ #elif (__cplusplus >= 201103L)
+ # define OSL_CPLUSPLUS_VERSION 11
+ #else
+ # define OSL_CPLUSPLUS_VERSION 3 /* presume C++03 */
+ #endif
#else
-# define OSL_CPLUSPLUS_VERSION 3 /* presume C++03 */
+ # define OSL_CPLUSPLUS_VERSION 3 /* presume C++03 */
#endif
// Symbol export defines

View File

@@ -1,45 +1,3 @@
--- Include/Python.h 2017-07-07 21:33:27 -0600
+++ Include/Python.h 2017-09-19 10:36:10 -0600
@@ -2,6 +2,10 @@
#define Py_PYTHON_H
/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
+#if _MSC_VER < 1900
+#define inline __inline
+#endif
+
/* Include nearly all Python header files */
#include "patchlevel.h"
--- Include/pydtrace.h 2017-07-07 21:33:27 -0600
+++ Include/pydtrace.h 2017-09-19 10:32:31 -0600
@@ -2,6 +2,11 @@
#ifndef Py_DTRACE_H
#define Py_DTRACE_H
+
+#if _MSC_VER < 1900
+#define inline __inline
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
--- Modules/_blake2/impl/blake2.h 2017-07-07 21:33:27 -0600
+++ Modules/_blake2/impl/blake2.h 2017-09-19 10:22:41 -0600
@@ -19,6 +19,10 @@
#include <stddef.h>
#include <stdint.h>
+#if _MSC_VER < 1900
+#define inline __inline
+#endif
+
#ifdef BLAKE2_NO_INLINE
#define BLAKE2_LOCAL_INLINE(type) static type
#endif
--- pcbuild/build.bat 2016-05-21 09:53:55 -0600
+++ pcbuild/build.bat 2016-05-21 09:56:16 -0600
@@ -59,6 +59,7 @@
@@ -50,19 +8,19 @@
if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts
if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts
if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts
@@ -120,7 +120,7 @@
@@ -126,7 +126,7 @@
:Kill
echo on
-%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^
+%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose% /p:PlatformToolset=%vs_toolset%^
-msbuild "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^
+msbuild "%dir%\pythoncore.vcxproj" /t:KillPython %verbose% /p:PlatformToolset=%vs_toolset%^
/p:Configuration=%conf% /p:Platform=%platf%^
/p:KillPython=true
@@ -130,7 +130,7 @@
@@ -95,7 +96,7 @@
rem batch is, shall we say, "lackluster"
echo on
%MSBUILD% "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^
msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^
- /p:Configuration=%conf% /p:Platform=%platf%^
+ /p:Configuration=%conf% /p:Platform=%platf% /p:PlatformToolset=%vs_toolset%^
/p:IncludeExternals=%IncludeExternals%^

View File

@@ -1,5 +1,28 @@
--- pyconfig.h.in 2017-09-19 14:41:01.000000000 +0300
+++ pyconfig.h.in 2017-09-19 14:43:18.000000000 +0300
--- Modules/expat/expat_external.h 2016-12-17 06:51:30 -0500
+++ Modules/expat/expat_external.h 2016-12-17 06:55:29 -0500
@@ -7,9 +7,17 @@
/* External API definitions */
-/* Namespace external symbols to allow multiple libexpat version to
- co-exist. */
-#include "pyexpatns.h"
+/*
+
+ HACK: Fix build breakage on MacOS:
+ *** WARNING: renaming "pyexpat" since importing it failed: dlopen(build/lib.macosx-10.6-i386-3.3/pyexpat.so, 2): Symbol not found: _XML_ErrorString
+ This reverts c242a8f30806 from the python hg repo:
+ restore namespacing of pyexpat symbols (closes #19186)
+ See http://bugs.python.org/issue19186#msg214069
+ The recommendation to include Modules/inc at first broke the Linux build...
+ So do it this way, as it was before. Needs some realignment later.
+
+*/
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
--- pyconfig.h.in 2017-04-05 02:47:52.000000000 +0200
+++ pyconfig.h.in 2017-04-05 02:51:33.000000000 +0200
@@ -119,12 +119,6 @@
/* Define to 1 if you have the `clock' function. */
#undef HAVE_CLOCK
@@ -10,10 +33,10 @@
-/* Define to 1 if you have the `clock_gettime' function. */
-#undef HAVE_CLOCK_GETTIME
-
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
/* Define if the C compiler supports computed gotos. */
#undef HAVE_COMPUTED_GOTOS
@@ -369,9 +363,6 @@
@@ -338,9 +332,6 @@
/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
#undef HAVE_GETC_UNLOCKED

View File

@@ -1,42 +0,0 @@
--- src/Makefile.in 2017-09-26 01:28:47.000000000 +0300
+++ src/Makefile.in 2017-09-26 01:19:06.000000000 +0300
@@ -513,7 +513,7 @@
libcommon_la_SOURCES = common.c file_io.c command.c pcm.c ulaw.c alaw.c \
float32.c double64.c ima_adpcm.c ms_adpcm.c gsm610.c dwvw.c vox_adpcm.c \
interleave.c strings.c dither.c cart.c broadcast.c audio_detect.c \
- ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
+ ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
windows.c id3.c $(WIN_VERSION_FILE)
@@ -719,10 +719,10 @@
$(AM_V_CCLD)$(LINK) $(GSM610_libgsm_la_OBJECTS) $(GSM610_libgsm_la_LIBADD) $(LIBS)
libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) $(EXTERNAL_XIPH_LIBS)
libsndfile.la: $(libsndfile_la_OBJECTS) $(libsndfile_la_DEPENDENCIES) $(EXTRA_libsndfile_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libsndfile_la_LINK) -rpath $(libdir) $(libsndfile_la_OBJECTS) $(libsndfile_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(libsndfile_la_LINK) -rpath $(libdir) $(libsndfile_la_OBJECTS) $(libsndfile_la_LIBADD) $(LIBS) $(EXTERNAL_XIPH_LIBS)
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -924,7 +924,7 @@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -c -o libsndfile_la-dwd.lo `test -f 'dwd.c' || echo '$(srcdir)/'`dwd.c
libsndfile_la-flac.lo: flac.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -MT libsndfile_la-flac.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-flac.Tpo -c -o libsndfile_la-flac.lo `test -f 'flac.c' || echo '$(srcdir)/'`flac.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) $(EXTERNAL_XIPH_CFLAGS) -MT libsndfile_la-flac.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-flac.Tpo -c -o libsndfile_la-flac.lo `test -f 'flac.c' || echo '$(srcdir)/'`flac.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsndfile_la-flac.Tpo $(DEPDIR)/libsndfile_la-flac.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='flac.c' object='libsndfile_la-flac.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@@ -1092,7 +1092,7 @@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -c -o libsndfile_la-rf64.lo `test -f 'rf64.c' || echo '$(srcdir)/'`rf64.c
libsndfile_la-ogg_vorbis.lo: ogg_vorbis.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -MT libsndfile_la-ogg_vorbis.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-ogg_vorbis.Tpo -c -o libsndfile_la-ogg_vorbis.lo `test -f 'ogg_vorbis.c' || echo '$(srcdir)/'`ogg_vorbis.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) $(EXTERNAL_XIPH_CFLAGS) -MT libsndfile_la-ogg_vorbis.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-ogg_vorbis.Tpo -c -o libsndfile_la-ogg_vorbis.lo `test -f 'ogg_vorbis.c' || echo '$(srcdir)/'`ogg_vorbis.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsndfile_la-ogg_vorbis.Tpo $(DEPDIR)/libsndfile_la-ogg_vorbis.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogg_vorbis.c' object='libsndfile_la-ogg_vorbis.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@

View File

@@ -14,18 +14,10 @@ if NOT "%1" == "" (
set BuildDir=VS14
goto par2
)
if "%1" == "2017" (
echo "Building for VS2017"
set VSVER=15.0
set VSVER_SHORT=15
set BuildDir=VS15
goto par2
)
)
:usage
Echo Usage build_deps 2013/2015/2017 x64/x86
Echo Usage build_deps 2013/2015 x64/x86
goto exit
:par2
if NOT "%2" == "" (
@@ -39,10 +31,6 @@ if NOT "%2" == "" (
if "%1" == "2015" (
set CMAKE_BUILDER=Visual Studio 14 2015
)
if "%1" == "2017" (
set CMAKE_BUILDER=Visual Studio 15 2017
)
goto start
)
if "%2" == "x64" (
@@ -55,10 +43,6 @@ if NOT "%2" == "" (
if "%1" == "2015" (
set CMAKE_BUILDER=Visual Studio 14 2015 Win64
)
if "%1" == "2017" (
set CMAKE_BUILDER=Visual Studio 15 2017 Win64
)
goto start
)
)
@@ -117,8 +101,8 @@ cd %Staging%\%BuildDir%%ARCH%R
echo %DATE% %TIME% : Start > %StatusFile%
cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
echo %DATE% %TIME% : Release Configuration done >> %StatusFile%
msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal
msbuild /m "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log
msbuild /m "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log
echo %DATE% %TIME% : Release Build done >> %StatusFile%
cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
echo %DATE% %TIME% : Release Harvest done >> %StatusFile%
@@ -127,8 +111,8 @@ mkdir %STAGING%\%BuildDir%%ARCH%D
cd %Staging%\%BuildDir%%ARCH%D
cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal
msbuild /m "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log
msbuild /m "BlenderDependencies.sln" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps.log
echo %DATE% %TIME% : Debug Build done >> %StatusFile%
cmake --build . --target Harvest_Debug_Results> Harvest_Debug.txt
echo %DATE% %TIME% : Debug Harvest done >> %StatusFile%

View File

@@ -70,7 +70,7 @@ set(FFMPEG_LIBRARIES
)
# SndFile libraries
set(SNDFILE_LIBRARY "/usr/lib${MULTILIB}/libsndfile.a;/usr/lib${MULTILIB}/libFLAC.a" CACHE STRING "" FORCE)
set(SNDFILE_LIBRARY "/usr/lib/libsndfile.a;/usr/lib/libFLAC.a" CACHE STRING "" FORCE)
# OpenAL libraries
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)

View File

@@ -1,72 +0,0 @@
# - Find Blosc library
# Find the native Blosc includes and library
# This module defines
# BLOSC_INCLUDE_DIRS, where to find blosc.h, Set when
# Blosc is found.
# BLOSC_LIBRARIES, libraries to link against to use Blosc.
# BLOSC_ROOT_DIR, The base directory to search for Blosc.
# This can also be an environment variable.
# BLOSC_FOUND, If false, do not try to use Blosc.
#
# also defined, but not for general use are
# BLOSC_LIBRARY, where to find the Blosc library.
#=============================================================================
# Copyright 2018 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If BLOSC_ROOT_DIR was defined in the environment, use it.
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
ENDIF()
SET(_blosc_SEARCH_DIRS
${BLOSC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/blosc
)
FIND_PATH(BLOSC_INCLUDE_DIR
NAMES
blosc.h
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(BLOSC_LIBRARY
NAMES
blosc
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
IF(BLOSC_FOUND)
SET(BLOSC_LIBRARIES ${BLOSC_LIBRARY})
SET(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIR})
ELSE()
SET(BLOSC_BLOSC_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
BLOSC_INCLUDE_DIR
BLOSC_LIBRARY
)

View File

@@ -1,72 +0,0 @@
# - Find JPEG library
# Find the native JPEG includes and library
# This module defines
# JPEG_INCLUDE_DIRS, where to find jpeg.h, Set when
# JPEG is found.
# JPEG_LIBRARIES, libraries to link against to use JPEG.
# JPEG_ROOT_DIR, The base directory to search for JPEG.
# This can also be an environment variable.
# JPEG_FOUND, If false, do not try to use JPEG.
#
# also defined, but not for general use are
# JPEG_LIBRARY, where to find the JPEG library.
#=============================================================================
# Copyright 2018 Martin Felke
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If JPEG_ROOT_DIR was defined in the environment, use it.
IF(NOT JPEG_ROOT_DIR AND NOT $ENV{JPEG_ROOT_DIR} STREQUAL "")
SET(JPEG_ROOT_DIR $ENV{JPEG_ROOT_DIR})
ENDIF()
SET(_jpeg_SEARCH_DIRS
${JPEG_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/jpeg
)
FIND_PATH(JPEG_INCLUDE_DIR
NAMES
jpeglib.h
HINTS
${_jpeg_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(JPEG_LIBRARY
NAMES
jpeg
HINTS
${_jpeg_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG
JPEG_LIBRARY JPEG_INCLUDE_DIR)
IF(JPEG_FOUND)
SET(JPEG_LIBRARIES ${JPEG_LIBRARY})
SET(JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR})
ELSE()
SET(JPEG_JPEG_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
JPEG_INCLUDE_DIR
JPEG_LIBRARY
)

View File

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

@@ -338,10 +338,6 @@ function(SETUP_LIBDIRS)
link_directories(${HDF5_LIBPATH})
endif()
if(WITH_CRASHPAD)
link_directories(${CRASHPAD_LIBPATH})
endif()
if(WIN32 AND NOT UNIX)
link_directories(${PTHREADS_LIBPATH})
endif()
@@ -353,7 +349,6 @@ function(setup_liblinks
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS_RELEASE}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
@@ -381,15 +376,6 @@ function(setup_liblinks
endif()
endif()
if(WITH_CRASHPAD)
target_link_libraries(${target} ${CRASHPAD_LIBRARIES})
if(APPLE)
find_library(BSM_LIB NAMES bsm)
find_library(SECURITY_LIB NAMES Security)
target_link_libraries(${target} ${SECURITY_LIB} ${BSM_LIB})
endif()
endif()
if(WITH_LZO AND WITH_SYSTEM_LZO)
target_link_libraries(${target} ${LZO_LIBRARIES})
endif()
@@ -433,7 +419,7 @@ function(setup_liblinks
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
endif()
if(WITH_OPENVDB)
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES})
endif()
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES})
@@ -765,10 +751,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
list(APPEND BLENDER_SORTED_LIBS bf_intern_gpudirect)
endif()
if(WITH_VORO)
list(APPEND BLENDER_SORTED_LIBS extern_voro)
endif()
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
list(APPEND BLENDER_SORTED_LIBS bf_intern_opensubdiv)
endif()

View File

@@ -93,7 +93,11 @@ if(WITH_PYTHON)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
if(WITH_CXX11)
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a)
else()
set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
endif()
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
@@ -113,6 +117,9 @@ if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
# needed for Audaspace, numpy is installed into python site-packages
set(NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include")
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
endif()
@@ -410,26 +417,6 @@ if(WITH_CYCLES_OSL)
endif()
endif()
if(WITH_CRASHPAD)
set(CRASHPAD_DIR ${LIBDIR}/crashpad)
find_library(CRASHPAD_LIB_CLIENT NAMES client PATHS ${CRASHPAD_DIR}/lib)
find_library(CRASHPAD_LIB_BASE NAMES base PATHS ${CRASHPAD_DIR}/lib)
find_library(CRASHPAD_LIB_UTIL NAMES util PATHS ${CRASHPAD_DIR}/lib)
list(APPEND CRASHPAD_LIBRARIES ${CRASHPAD_LIB_CLIENT} ${CRASHPAD_LIB_BASE} ${CRASHPAD_LIB_UTIL})
find_path(CRASHPAD_INCLUDE_DIRS build/build_config.h PATHS ${CRASHPAD_DIR}/include)
if(CRASHPAD_INCLUDE_DIRS AND CRASHPAD_LIBRARIES)
set(WITH_CRASHPAD TRUE)
else()
message(STATUS "Crashpad not found")
set(WITH_CRASHPAD FALSE)
endif()
endif()
if(WITH_OPENMP)
execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE COMPILER_VENDOR)
string(SUBSTRING "${COMPILER_VENDOR}" 0 5 VENDOR_NAME) # truncate output

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})
@@ -44,28 +31,11 @@ macro(find_package_wrapper)
endif()
endmacro()
find_package_wrapper(JPG REQUIRED)
find_package_wrapper(JPEG REQUIRED)
find_package_wrapper(PNG REQUIRED)
find_package_wrapper(ZLIB REQUIRED)
find_package_wrapper(Freetype REQUIRED)
if(WITH_CRASHPAD)
set(CRASHPAD_DIR ${LIBDIR}/breakpad)
find_library(CRASHPAD_LIB_CLIENT NAMES libbreakpad_client.a PATHS ${CRASHPAD_DIR}/lib)
find_library(CRASHPAD_LIB NAMES libbreakpad.a PATHS ${CRASHPAD_DIR}/lib)
list(APPEND CRASHPAD_LIBRARIES ${CRASHPAD_LIB_CLIENT} ${CRASHPAD_LIB})
find_path(CRASHPAD_INCLUDE_DIRS client/linux/handler/exception_handler.h PATHS ${CRASHPAD_DIR}/include)
if(CRASHPAD_INCLUDE_DIRS AND CRASHPAD_LIBRARIES)
set(WITH_CRASHPAD TRUE)
else()
message(STATUS "Crashpad not found")
set(WITH_CRASHPAD FALSE)
endif()
endif()
if(WITH_LZO AND WITH_SYSTEM_LZO)
find_package_wrapper(LZO)
if(NOT LZO_FOUND)
@@ -171,15 +141,8 @@ if(WITH_CODEC_SNDFILE)
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)
@@ -254,14 +217,10 @@ endif()
if(WITH_OPENVDB)
find_package_wrapper(OpenVDB)
find_package_wrapper(TBB)
find_package_wrapper(Blosc)
if(NOT OPENVDB_FOUND OR NOT TBB_FOUND)
set(WITH_OPENVDB OFF)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "OpenVDB not found, disabling it")
elseif(NOT BLOSC_FOUND)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "Blosc not found, disabling it")
endif()
endif()
@@ -370,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)
@@ -407,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})
@@ -453,6 +400,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
# CLang is the same as GCC for now.
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
# Solaris CC
elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro")
set(PLATFORM_CFLAGS "-pipe -features=extensions -fPIC -D__FUNCTION__=__func__")
# Intel C++ Compiler
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
# think these next two are broken

View File

@@ -97,20 +97,15 @@ add_definitions(-D_WIN32_WINNT=0x600)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
if(WITH_CRASHPAD)
set(PDB_INFO_OVERRIDE_FLAGS "/Zi")
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF")
endif()
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 ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MT ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT ${PDB_INFO_OVERRIDE_FLAGS}")
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")
@@ -128,7 +123,6 @@ else()
endif()
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
set(PLATFORM_LINKFLAGS_RELEASE "${PLATFORM_LINKFLAGS} ${PDB_INFO_OVERRIDE_LINKER_FLAGS}")
if(NOT DEFINED LIBDIR)
@@ -140,7 +134,10 @@ if(NOT DEFINED LIBDIR)
message(STATUS "32 bit compiler detected.")
set(LIBDIR_BASE "windows")
endif()
if(MSVC_VERSION GREATER 1909)
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)
@@ -165,20 +162,6 @@ foreach(child ${children})
endif()
endforeach()
if(WITH_CRASHPAD)
set(CRASHPAD ${LIBDIR}/crashpad)
set(CRASHPAD_INCLUDE_DIRS ${CRASHPAD}/include)
set(CRASHPAD_LIBPATH ${CRASHPAD}/lib)
set(CRASHPAD_LIBRARIES
debug ${CRASHPAD_LIBPATH}/baseD.lib
debug ${CRASHPAD_LIBPATH}/crashpad_clientD.lib
debug ${CRASHPAD_LIBPATH}/crashpad_utilD.lib
optimized ${CRASHPAD_LIBPATH}/base.lib
optimized ${CRASHPAD_LIBPATH}/crashpad_client.lib
optimized ${CRASHPAD_LIBPATH}/crashpad_util.lib
)
endif()
set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)

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

File diff suppressed because it is too large Load Diff

View File

@@ -417,28 +417,19 @@ MODULE_GROUPING = {
# -------------------------------BLENDER----------------------------------------
blender_version_strings = [str(v) for v in bpy.app.version]
is_release = bpy.app.version_cycle in {"rc", "release"}
# converting bytes to strings, due to T30154
BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8')
BLENDER_DATE = str(bpy.app.build_date, 'utf_8')
if is_release:
# '2.62a'
BLENDER_VERSION_DOTS = ".".join(blender_version_strings[:2]) + bpy.app.version_char
else:
# '2.62.1'
BLENDER_VERSION_DOTS = ".".join(blender_version_strings)
BLENDER_VERSION_DOTS = ".".join(blender_version_strings) # '2.62.1'
if BLENDER_REVISION != "Unknown":
# '2.62a SHA1' (release) or '2.62.1 SHA1' (non-release)
BLENDER_VERSION_DOTS += " " + BLENDER_REVISION
BLENDER_VERSION_DOTS += " " + BLENDER_REVISION # '2.62.1 SHA1'
if is_release:
BLENDER_VERSION_PATH = "_".join(blender_version_strings) # '2_62_1'
if bpy.app.version_cycle in {"rc", "release"}:
# '2_62a_release'
BLENDER_VERSION_PATH = "%s%s_release" % ("_".join(blender_version_strings[:2]), bpy.app.version_char)
else:
# '2_62_1'
BLENDER_VERSION_PATH = "_".join(blender_version_strings)
# --------------------------DOWNLOADABLE FILES----------------------------------

View File

@@ -94,10 +94,6 @@ if(WITH_X11 AND WITH_GHOST_XDND)
add_subdirectory(xdnd)
endif()
if(WITH_VORO)
add_subdirectory(voro++)
endif()
if(WITH_LIBMV)
add_subdirectory(ceres)
endif()
@@ -107,7 +103,6 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
add_subdirectory(gflags)
endif()
add_subdirectory(glog)
endif()
if(WITH_GTESTS)

View File

@@ -130,7 +130,6 @@ set(SRC
src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
src/BulletDynamics/Character/btKinematicCharacterController.cpp
src/BulletDynamics/ConstraintSolver/btCompoundConstraint.cpp
src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp
src/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp
@@ -149,9 +148,7 @@ set(SRC
src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
src/BulletDynamics/Dynamics/Bullet-C-API.cpp
src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
src/BulletDynamics/Dynamics/btFractureDynamicsWorld.cpp
src/BulletDynamics/Dynamics/btRigidBody.cpp
src/BulletDynamics/Dynamics/btFractureBody.cpp
src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
src/BulletDynamics/Featherstone/btMultiBody.cpp
src/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
@@ -317,7 +314,6 @@ set(SRC
src/BulletDynamics/Character/btCharacterControllerInterface.h
src/BulletDynamics/Character/btKinematicCharacterController.h
src/BulletDynamics/ConstraintSolver/btCompoundConstraint.h
src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
src/BulletDynamics/ConstraintSolver/btContactConstraint.h

View File

@@ -80,11 +80,6 @@ class btUnionFind
void unite(int p, int q)
{
if (p == -1 && q == -1) {
//error case... should not happen but happens ?
return;
}
int i = find(p), j = find(q);
if (i == j)
return;

View File

@@ -1,8 +0,0 @@
#include "btCompoundConstraint.h"
btCompoundConstraint::btCompoundConstraint(btRigidBody& rbA, btRigidBody& rbB)
:btTypedConstraint(static_cast<btTypedConstraintType>(COMPOUND_CONSTRAINT_TYPE), rbA, rbB)
{
}

View File

@@ -1,20 +0,0 @@
#ifndef BTCOMPOUNDCONSTRAINT_H
#define BTCOMPOUNDCONSTRAINT_H
#include "btTypedConstraint.h"
#define COMPOUND_CONSTRAINT_TYPE (MAX_CONSTRAINT_TYPE+1)
ATTRIBUTE_ALIGNED16(class) btCompoundConstraint : public btTypedConstraint
{
public:
btCompoundConstraint(btRigidBody& rbA,btRigidBody& rbB);
virtual void getInfo1(btConstraintInfo1* info) {}
virtual void getInfo2(btConstraintInfo2* info) {}
virtual btScalar getParam(int num, int axis) const { return 0;}
virtual void setParam(int num, btScalar value, int axis) {}
int m_objectId;
};
#endif // BTCOMPOUNDCONSTRAINT_H

View File

@@ -1,239 +0,0 @@
#include "btFractureBody.h"
#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
#include "BulletCollision/CollisionShapes/btCompoundShape.h"
#include "BulletDynamics/Dynamics/btDynamicsWorld.h"
#include "BulletDynamics/Dynamics/btFractureDynamicsWorld.h"
class btConnectionSortPredicate
{
public:
bool operator() ( const btConnection& lhs, const btConnection& rhs ) const
{
btVector3 locLhsA = lhs.m_parent->getWorldTransform().inverse() * lhs.m_obA->getWorldTransform().getOrigin();
btVector3 locLhsB = lhs.m_parent->getWorldTransform().inverse() * lhs.m_obB->getWorldTransform().getOrigin();
btVector3 locRhsA = rhs.m_parent->getWorldTransform().inverse() * rhs.m_obA->getWorldTransform().getOrigin();
btVector3 locRhsB = rhs.m_parent->getWorldTransform().inverse() * rhs.m_obB->getWorldTransform().getOrigin();
btVector3 locLhs = (locLhsA + locLhsB) * 0.5f;
btVector3 locRhs = (locRhsA + locRhsB) * 0.5f;
//lhs.parent should match rhs.parent... same object
btAssert(lhs.m_parent == rhs.m_parent);
btScalar dLhs = lhs.m_parent->getWorldTransform().getOrigin().distance(locLhs);
btScalar dRhs = rhs.m_parent->getWorldTransform().getOrigin().distance(locRhs);
//btTransform id = btTransform::getIdentity();
//btScalar dLhs = id.getOrigin().distance(locLhs);
//btScalar dRhs = id.getOrigin().distance(locRhs);
return dLhs < dRhs;
}
};
void btFractureBody::recomputeConnectivity(btCollisionWorld* world)
{
m_connections.clear();
//@todo use the AABB tree to avoid N^2 checks
if (getCollisionShape()->isCompound())
{
btCompoundShape* compound = (btCompoundShape*)getCollisionShape();
for (int i=0;i<compound->getNumChildShapes();i++)
{
for (int j=i+1;j<compound->getNumChildShapes();j++)
{
struct MyContactResultCallback : public btCollisionWorld::ContactResultCallback
{
bool m_connected;
btScalar m_margin;
MyContactResultCallback() :m_connected(false),m_margin(0.05)
{
}
virtual btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap,int partId0,int index0,const btCollisionObjectWrapper* colObj1Wrap,int partId1,int index1)
{
if (cp.getDistance()<=m_margin)
m_connected = true;
return 1.f;
}
};
MyContactResultCallback result;
btCollisionObject obA;
obA.setWorldTransform(compound->getChildTransform(i));
obA.setCollisionShape(compound->getChildShape(i));
btCollisionObject obB;
obB.setWorldTransform(compound->getChildTransform(j));
obB.setCollisionShape(compound->getChildShape(j));
world->contactPairTest(&obA,&obB,result);
if (result.m_connected)
{
btConnection tmp;
tmp.m_childIndex0 = i;
tmp.m_childIndex1 = j;
tmp.m_childShape0 = compound->getChildShape(i);
tmp.m_childShape1 = compound->getChildShape(j);
tmp.m_strength = 1.f;//??
m_connections.push_back(tmp);
}
}
}
}
}
void btFractureBody::recomputeConnectivityByConstraints(btCollisionWorld *world1)
{
btFractureDynamicsWorld *world = (btFractureDynamicsWorld*)world1;
if (world->m_idCallback != NULL)
{
int i, size = world->m_compoundConstraints.size();
m_connections.clear();
for (i=0; i<size;i++)
{
btCompoundConstraint *con = world->m_compoundConstraints[i];
if (con->isEnabled())
{
int obIdA, shardIdA, obIdB, shardIdB;
btFractureBody *obA = (btFractureBody*)&con->getRigidBodyA();
btFractureBody *obB = (btFractureBody*)&con->getRigidBodyB();
//if (this == obA || this == obB)
{
int *index0 = NULL, *index1 = NULL;
world->m_idCallback(obA->getUserPointer(), &obIdA, &shardIdA);
world->m_idCallback(obB->getUserPointer(), &obIdB, &shardIdB);
index0 = world->m_childIndexHash->find(to_str(obIdA, shardIdA));
index1 = world->m_childIndexHash->find(to_str(obIdB, shardIdB));
if ((obIdA == obIdB) && (shardIdA != shardIdB) &&
index0 && index1 && *index0 > -1 && *index1 > -1)
{
btConnection tmp;
tmp.m_childIndex0 = *index0;
tmp.m_childIndex1 = *index1;
tmp.m_childShape0 = obA->getCollisionShape();
tmp.m_childShape1 = obB->getCollisionShape();
tmp.m_strength = con->getBreakingImpulseThreshold();
tmp.m_obA = obA;
tmp.m_obB = obB;
tmp.m_parent = this;
tmp.m_id = i;
m_connections.push_back(tmp);
}
//break;
}
}
}
m_connections.quickSort(btConnectionSortPredicate());
//build a connection map
m_connection_map->clear();
size = m_connections.size();
for (i=0; i < size; i++)
{
btConnection& con = m_connections[i];
btAlignedObjectArray<int> *adjacents = m_connection_map->find(con.m_childIndex0);
if (!adjacents) {
btAlignedObjectArray<int> adj;
adj.push_back(con.m_childIndex1);
m_connection_map->insert(con.m_childIndex0, adj);
}
else
{
if (adjacents->size() != adjacents->findLinearSearch(con.m_childIndex1))
adjacents->push_back(con.m_childIndex1);
}
}
}
}
btCompoundShape* btFractureBody::shiftTransformDistributeMass(btCompoundShape* boxCompound,btScalar mass,btTransform& shift)
{
btVector3 principalInertia;
btScalar* masses = new btScalar[boxCompound->getNumChildShapes()];
for (int j=0;j<boxCompound->getNumChildShapes();j++)
{
//evenly distribute mass
masses[j]=mass/boxCompound->getNumChildShapes();
}
return shiftTransform(boxCompound,masses,shift,principalInertia);
}
btCompoundShape* btFractureBody::shiftTransform(btCompoundShape* boxCompound,btScalar* masses,btTransform& shift, btVector3& principalInertia)
{
btTransform principal;
boxCompound->calculatePrincipalAxisTransform(masses,principal,principalInertia);
///create a new compound with world transform/center of mass properly aligned with the principal axis
///non-recursive compound shapes perform better
#ifdef USE_RECURSIVE_COMPOUND
btCompoundShape* newCompound = new btCompoundShape();
newCompound->addChildShape(principal.inverse(),boxCompound);
newBoxCompound = newCompound;
//m_collisionShapes.push_back(newCompound);
//btDefaultMotionState* myMotionState = new btDefaultMotionState(startTransform);
//btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,newCompound,principalInertia);
#else
#ifdef CHANGE_COMPOUND_INPLACE
newBoxCompound = boxCompound;
for (int i=0;i<boxCompound->getNumChildShapes();i++)
{
btTransform newChildTransform = principal.inverse()*boxCompound->getChildTransform(i);
///updateChildTransform is really slow, because it re-calculates the AABB each time. todo: add option to disable this update
boxCompound->updateChildTransform(i,newChildTransform);
}
bool isDynamic = (mass != 0.f);
btVector3 localInertia(0,0,0);
if (isDynamic)
boxCompound->calculateLocalInertia(mass,localInertia);
#else
///creation is faster using a new compound to store the shifted children
btCompoundShape* newBoxCompound = new btCompoundShape();
for (int i=0;i<boxCompound->getNumChildShapes();i++)
{
btTransform newChildTransform = principal.inverse()*boxCompound->getChildTransform(i);
///updateChildTransform is really slow, because it re-calculates the AABB each time. todo: add option to disable this update
newBoxCompound->addChildShape(newChildTransform,boxCompound->getChildShape(i));
}
#endif
#endif//USE_RECURSIVE_COMPOUND
shift = principal;
return newBoxCompound;
}

View File

@@ -1,115 +0,0 @@
#ifndef BT_FRACTURE_BODY
#define BT_FRACTURE_BODY
class btCollisionShape;
class btDynamicsWorld;
class btCollisionWorld;
class btCompoundShape;
class btManifoldPoint;
#include "LinearMath/btAlignedObjectArray.h"
#include "LinearMath/btHashMap.h"
#include "BulletDynamics/Dynamics/btRigidBody.h"
#define CUSTOM_FRACTURE_TYPE (btRigidBody::CO_USER_TYPE+1)
struct btConnection
{
bool operator==(const btConnection& con)
{
return this->m_childIndex0 == con.m_childIndex0 &&
this->m_childIndex1 == con.m_childIndex1 &&
this->m_childShape0 == con.m_childShape0 &&
this->m_childShape1 == con.m_childShape1 &&
this->m_strength == con.m_strength;
}
btCollisionShape* m_childShape0;
btCollisionShape* m_childShape1;
int m_childIndex0;
int m_childIndex1;
btScalar m_strength;
//btVector3 m_location; //this must be local to the "Parent" compound
//better calc this "live" from the objects themselves, so also keep ob pointers here
btCollisionObject* m_obA;
btCollisionObject* m_obB;
btCollisionObject* m_parent;
btScalar m_id;
};
struct btPropagationParameter
{
btScalar m_impulse_dampening;
btScalar m_directional_factor;
btScalar m_minimum_impulse;
btScalar m_stability_factor;
};
class btFractureBody : public btRigidBody
{
//connections
public:
btDynamicsWorld* m_world;
btAlignedObjectArray<btScalar> m_masses;
btAlignedObjectArray<btConnection> m_connections;
btHashMap<btHashInt, btAlignedObjectArray<int> > *m_connection_map;
btPropagationParameter m_propagationParameter;
btFractureBody( const btRigidBodyConstructionInfo& constructionInfo, btPropagationParameter parameter)
:btRigidBody(constructionInfo),
m_world(0),
m_connection_map(NULL),
m_propagationParameter(parameter)
{
m_masses.push_back(constructionInfo.m_mass);
m_internalType=CUSTOM_FRACTURE_TYPE+CO_RIGID_BODY;
}
///btRigidBody constructor for backwards compatibility.
///To specify friction (etc) during rigid body construction, please use the other constructor (using btRigidBodyConstructionInfo)
btFractureBody( btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia, btScalar* masses, int numMasses, btDynamicsWorld* world, btPropagationParameter parameter)
:btRigidBody(mass,motionState,collisionShape,localInertia),
m_world(world),
m_propagationParameter(parameter)
{
for (int i=0;i<numMasses;i++)
m_masses.push_back(masses[i]);
m_internalType=CUSTOM_FRACTURE_TYPE+CO_RIGID_BODY;
m_connection_map = new btHashMap<btHashInt, btAlignedObjectArray<int> >();
}
void setWorld(btDynamicsWorld *world)
{
m_world = world;
}
void recomputeConnectivity(btCollisionWorld* world);
void recomputeConnectivityByConstraints(btCollisionWorld* world);
static btCompoundShape* shiftTransform(btCompoundShape* boxCompound,btScalar* masses,btTransform& shift, btVector3& principalInertia);
static btCompoundShape* shiftTransformDistributeMass(btCompoundShape* boxCompound,btScalar mass,btTransform& shift);
static bool collisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1);
~btFractureBody()
{
delete m_connection_map;
}
};
void fractureCallback(btDynamicsWorld* world, btScalar timeStep);
void glueCallback(btDynamicsWorld* world, btScalar timeStep);
#endif //BT_FRACTURE_BODY

File diff suppressed because it is too large Load Diff

View File

@@ -1,82 +0,0 @@
#ifndef _BT_FRACTURE_DYNAMICS_WORLD_H
#define _BT_FRACTURE_DYNAMICS_WORLD_H
#include "btBulletDynamicsCommon.h"
#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
#include "LinearMath/btAlignedObjectArray.h"
#include "LinearMath/btHashMap.h"
#include <string>
#include <sstream>
class btFractureBody;
class btCompoundShape;
class btTransform;
struct btPropagationParameter;
//callback to retrieve id from user application (blender)
typedef void (*IdCallback)(void *userPtr, int* object_id, int* shard_id);
typedef btRigidBody* (*ShapeBodyCallback)(void *userPtr);
char *to_str(int objectId, int shardId);
///The btFractureDynamicsWorld class enabled basic glue and fracture of objects.
///If/once this implementation is stablized/tested we might merge it into btDiscreteDynamicsWorld and remove the class.
class btFractureDynamicsWorld : public btDiscreteDynamicsWorld
{
btFractureBody* addNewBody(const btTransform& oldTransform, btScalar* masses, btCompoundShape* oldCompound, btPropagationParameter &param);
bool m_addBroadPhaseHandle;
public:
btFractureDynamicsWorld ( btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration, IdCallback callback, ShapeBodyCallback shapebodycallback);
~btFractureDynamicsWorld();
btAlignedObjectArray<btCompoundConstraint*> m_compoundConstraints;
btAlignedObjectArray<btFractureBody*> m_fractureBodies;
bool m_fracturingMode;
IdCallback m_idCallback;
ShapeBodyCallback m_shapeBodyCallback;
btHashMap<btHashString, int> *m_childIndexHash;
virtual void addRigidBody(btRigidBody* body);
virtual void removeRigidBody(btRigidBody* body);
void solveConstraints(btContactSolverInfo& solverInfo);
virtual void addConstraint(btTypedConstraint *constraint, bool disableCollisionsBetweenLinkedBodies);
virtual void removeConstraint(btTypedConstraint *constraint);
///either fracture or glue (!fracture)
void setFractureMode(bool fracture)
{
m_fracturingMode = fracture;
}
bool getFractureMode() const { return m_fracturingMode;}
///normally those callbacks are called internally by the 'solveConstraints'
void glueCallback();
///normally those callbacks are called internally by the 'solveConstraints'
void fractureCallback();
void updateBodies();
void propagateDamage(btFractureBody *body, btScalar *impulse, int connection_index, bool *needsBreakingCheck,
const btVector3 &direction, int *depth);
void breakNeighborhood(btFractureBody *body, int connection_index);
void breakDisconnectedParts( btFractureBody* fracObj);
virtual void updateAabbs();
};
#endif //_BT_FRACTURE_DYNAMICS_WORLD_H

View File

@@ -183,7 +183,7 @@ public:
{
//No constraints should point to this rigidbody
//Remove constraints from the dynamics world before you delete the related rigidbodies.
// btAssert(m_constraintRefs.size()==0);
btAssert(m_constraintRefs.size()==0);
}
protected:

View File

@@ -34,7 +34,6 @@ subject to the following restrictions:
#include "BulletDynamics/ConstraintSolver/btHinge2Constraint.h"
#include "BulletDynamics/ConstraintSolver/btGearConstraint.h"
#include "BulletDynamics/ConstraintSolver/btFixedConstraint.h"
#include "BulletDynamics/ConstraintSolver/btCompoundConstraint.h"
#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"

View File

@@ -568,22 +568,6 @@ void cleanupFaceEdgeAttrsCallback(const MeshSet<3> *left,
&descr->orig_face_edge_mapping);
}
void copyVertexAttrsCallback(const carve::mesh::MeshSet<3>::vertex_t *orig_vert,
const carve::mesh::MeshSet<3>::vertex_t *new_vert,
void *descr_v)
{
CarveMeshDescr *descr = (CarveMeshDescr *) descr_v;
if (!descr->orig_vert_mapping.hasAttribute(orig_vert)) {
return;
}
if (descr->orig_vert_mapping.hasAttribute(new_vert)) {
return;
}
OrigIndex attr = descr->orig_vert_mapping.getAttribute(orig_vert);
descr->orig_vert_mapping.setAttribute(new_vert, attr);
descr->orig_vert_mapping.removeAttribute(orig_vert);
}
} // namespace
CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
@@ -767,7 +751,6 @@ bool carve_performBooleanOperation(CarveMeshDescr *left_mesh,
// done properly. The only way to make such situations working is to
// union intersecting meshes of the same operand.
carve_unionIntersections(&csg, &left, &right,
copyVertexAttrsCallback,
cleanupFaceEdgeAttrsCallback,
(void *) output_descr);

View File

@@ -141,11 +141,6 @@ void carve_getRescaleMinMax(const MeshSet<3> *left,
namespace {
struct UnionIntersectionContext {
VertexAttrsCallback vertex_attr_callback;
void *user_data;
};
void copyMeshes(const std::vector<MeshSet<3>::mesh_t*> &meshes,
std::vector<MeshSet<3>::mesh_t*> *new_meshes)
{
@@ -159,73 +154,24 @@ void copyMeshes(const std::vector<MeshSet<3>::mesh_t*> &meshes,
}
}
struct NewMeshMapping {
std::map<const MeshSet<3>::edge_t*, MeshSet<3>::vertex_t*> orig_edge_vert;
};
void prepareNewMeshMapping(const std::vector<MeshSet<3>::mesh_t*> &meshes,
NewMeshMapping *mapping)
{
for (size_t m = 0; m < meshes.size(); ++m) {
MeshSet<3>::mesh_t *mesh = meshes[m];
for (size_t f = 0; f < mesh->faces.size(); ++f) {
MeshSet<3>::face_t *face = mesh->faces[f];
MeshSet<3>::edge_t *edge = face->edge;
do {
mapping->orig_edge_vert[edge] = edge->vert;
edge = edge->next;
} while (edge != face->edge);
}
}
}
void runNewMeshSetHooks(UnionIntersectionContext *ctx,
NewMeshMapping *mapping,
MeshSet<3> *mesh_set)
{
for (size_t m = 0; m < mesh_set->meshes.size(); ++m) {
MeshSet<3>::mesh_t *mesh = mesh_set->meshes[m];
for (size_t f = 0; f < mesh->faces.size(); ++f) {
MeshSet<3>::face_t *face = mesh->faces[f];
MeshSet<3>::edge_t *edge = face->edge;
do {
const MeshSet<3>::vertex_t *orig_vert = mapping->orig_edge_vert[edge];
const MeshSet<3>::vertex_t *new_vert = edge->vert;
ctx->vertex_attr_callback(orig_vert, new_vert, ctx->user_data);
edge = edge->next;
} while (edge != face->edge);
}
}
}
MeshSet<3> *newMeshSetFromMeshesWithAttrs(
UnionIntersectionContext *ctx,
std::vector<MeshSet<3>::mesh_t*> &meshes)
{
NewMeshMapping mapping;
prepareNewMeshMapping(meshes, &mapping);
MeshSet<3> *mesh_set = new MeshSet<3>(meshes);
runNewMeshSetHooks(ctx, &mapping, mesh_set);
return mesh_set;
}
MeshSet<3> *meshSetFromMeshes(UnionIntersectionContext *ctx,
const std::vector<MeshSet<3>::mesh_t*> &meshes)
MeshSet<3> *meshSetFromMeshes(const std::vector<MeshSet<3>::mesh_t*> &meshes)
{
std::vector<MeshSet<3>::mesh_t*> new_meshes;
copyMeshes(meshes, &new_meshes);
return newMeshSetFromMeshesWithAttrs(ctx, new_meshes);
return new MeshSet<3>(new_meshes);
}
MeshSet<3> *meshSetFromTwoMeshes(UnionIntersectionContext *ctx,
const std::vector<MeshSet<3>::mesh_t*> &left_meshes,
MeshSet<3> *meshSetFromTwoMeshes(const std::vector<MeshSet<3>::mesh_t*> &left_meshes,
const std::vector<MeshSet<3>::mesh_t*> &right_meshes)
{
std::vector<MeshSet<3>::mesh_t*> new_meshes;
copyMeshes(left_meshes, &new_meshes);
copyMeshes(right_meshes, &new_meshes);
return newMeshSetFromMeshesWithAttrs(ctx, new_meshes);
return new MeshSet<3>(new_meshes);
}
bool checkEdgeFaceIntersections_do(Intersections &intersections,
@@ -403,8 +349,7 @@ void getIntersectedOperandMeshes(std::vector<MeshSet<3>::mesh_t*> *meshes,
}
}
MeshSet<3> *getIntersectedOperand(UnionIntersectionContext *ctx,
std::vector<MeshSet<3>::mesh_t*> *meshes,
MeshSet<3> *getIntersectedOperand(std::vector<MeshSet<3>::mesh_t*> *meshes,
const MeshSet<3>::aabb_t &otherAABB,
RTreeCache *rtree_cache,
IntersectCache *intersect_cache)
@@ -415,14 +360,13 @@ MeshSet<3> *getIntersectedOperand(UnionIntersectionContext *ctx,
if (operandMeshes.size() == 0)
return NULL;
return meshSetFromMeshes(ctx, operandMeshes);
return meshSetFromMeshes(operandMeshes);
}
MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
MeshSet<3> *poly,
const MeshSet<3> *other_poly,
const MeshSet<3>::aabb_t &otherAABB,
VertexAttrsCallback vertex_attr_callback,
UnionIntersectionsCallback callback,
void *user_data)
{
@@ -436,12 +380,7 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
RTreeCache rtree_cache;
IntersectCache intersect_cache;
UnionIntersectionContext ctx;
ctx.vertex_attr_callback = vertex_attr_callback;
ctx.user_data = user_data;
MeshSet<3> *left = getIntersectedOperand(&ctx,
&orig_meshes,
MeshSet<3> *left = getIntersectedOperand(&orig_meshes,
otherAABB,
&rtree_cache,
&intersect_cache);
@@ -452,8 +391,7 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
}
while (orig_meshes.size()) {
MeshSet<3> *right = getIntersectedOperand(&ctx,
&orig_meshes,
MeshSet<3> *right = getIntersectedOperand(&orig_meshes,
otherAABB,
&rtree_cache,
&intersect_cache);
@@ -484,9 +422,7 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
catch (carve::exception e) {
std::cerr << "CSG failed, exception " << e.str() << std::endl;
MeshSet<3> *result = meshSetFromTwoMeshes(&ctx,
left->meshes,
right->meshes);
MeshSet<3> *result = meshSetFromTwoMeshes(left->meshes, right->meshes);
callback(result, other_poly, user_data);
@@ -512,9 +448,7 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
// Append all meshes which doesn't have intersection with another operand as-is.
if (orig_meshes.size()) {
MeshSet<3> *result = meshSetFromTwoMeshes(&ctx,
left->meshes,
orig_meshes);
MeshSet<3> *result = meshSetFromTwoMeshes(left->meshes, orig_meshes);
delete left;
left = result;
@@ -530,7 +464,6 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
void carve_unionIntersections(carve::csg::CSG *csg,
MeshSet<3> **left_r,
MeshSet<3> **right_r,
VertexAttrsCallback vertex_attr_callback,
UnionIntersectionsCallback callback,
void *user_data)
{
@@ -544,9 +477,9 @@ void carve_unionIntersections(carve::csg::CSG *csg,
MeshSet<3>::aabb_t rightAABB = right->getAABB();;
left = unionIntersectingMeshes(csg, left, right, rightAABB,
vertex_attr_callback, callback, user_data);
callback, user_data);
right = unionIntersectingMeshes(csg, right, left, leftAABB,
vertex_attr_callback, callback, user_data);
callback, user_data);
if (left != *left_r) {
delete *left_r;

View File

@@ -70,10 +70,6 @@ void carve_getRescaleMinMax(const carve::mesh::MeshSet<3> *left,
carve::geom3d::Vector *min,
carve::geom3d::Vector *max);
typedef void (*VertexAttrsCallback) (const carve::mesh::MeshSet<3>::vertex_t *orig_vert,
const carve::mesh::MeshSet<3>::vertex_t *new_vert,
void *userdata);
typedef void (*UnionIntersectionsCallback) (const carve::mesh::MeshSet<3> *left,
const carve::mesh::MeshSet<3> *right,
void *userdata);
@@ -81,7 +77,6 @@ typedef void (*UnionIntersectionsCallback) (const carve::mesh::MeshSet<3> *left,
void carve_unionIntersections(carve::csg::CSG *csg,
carve::mesh::MeshSet<3> **left_r,
carve::mesh::MeshSet<3> **right_r,
VertexAttrsCallback vertex_attr_callback,
UnionIntersectionsCallback callback,
void *user_data);
@@ -153,13 +148,6 @@ namespace carve {
void setAttribute(const meshset_t::vertex_t *v, const attr_t &attr) {
attrs[v] = attr;
}
void removeAttribute(const meshset_t::vertex_t *v) {
typename attrmap_t::iterator it = attrs.find(v);
if (it != attrs.end()) {
attrs.erase(it);
}
}
};
template<typename attr_t>

View File

@@ -1,5 +1,5 @@
Project: Cuda Wrangler
URL: https://github.com/CudaWrangler/cuew
License: Apache 2.0
Upstream version: 63d2a0f
Upstream version: cbf465b
Local modifications: None

View File

@@ -27,7 +27,7 @@ extern "C" {
#define CUEW_VERSION_MAJOR 1
#define CUEW_VERSION_MINOR 2
#define CUDA_VERSION 7050
#define CUDA_VERSION 8000
#define CU_IPC_HANDLE_SIZE 64
#define CU_STREAM_LEGACY ((CUstream)0x1)
#define CU_STREAM_PER_THREAD ((CUstream)0x2)
@@ -51,6 +51,8 @@ extern "C" {
#define CU_LAUNCH_PARAM_BUFFER_POINTER ((void*)0x01)
#define CU_LAUNCH_PARAM_BUFFER_SIZE ((void*)0x02)
#define CU_PARAM_TR_DEFAULT -1
#define CU_DEVICE_CPU ((CUdevice)-1)
#define CU_DEVICE_INVALID ((CUdevice)-2)
/* Functions which changed 3.1 -> 3.2 for 64 bit stuff,
* the cuda library has both the old ones for compatibility and new
@@ -114,12 +116,30 @@ extern "C" {
#define cuGLGetDevices cuGLGetDevices_v2
/* Types. */
#ifdef _MSC_VER
typedef unsigned __int32 cuuint32_t;
typedef unsigned __int64 cuuint64_t;
#else
#include <stdint.h>
typedef uint32_t cuuint32_t;
typedef uint64_t cuuint64_t;
#endif
#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64) || defined (__aarch64__)
typedef unsigned long long CUdeviceptr;
#else
typedef unsigned int CUdeviceptr;
#endif
#ifdef _WIN32
# define CUDAAPI __stdcall
# define CUDA_CB __stdcall
#else
# define CUDAAPI
# define CUDA_CB
#endif
typedef int CUdevice;
typedef struct CUctx_st* CUcontext;
typedef struct CUmod_st* CUmodule;
@@ -180,6 +200,53 @@ typedef enum CUevent_flags_enum {
CU_EVENT_INTERPROCESS = 0x4,
} CUevent_flags;
typedef enum CUstreamWaitValue_flags_enum {
CU_STREAM_WAIT_VALUE_GEQ = 0x0,
CU_STREAM_WAIT_VALUE_EQ = 0x1,
CU_STREAM_WAIT_VALUE_AND = 0x2,
CU_STREAM_WAIT_VALUE_FLUSH = (1 << 30),
} CUstreamWaitValue_flags;
typedef enum CUstreamWriteValue_flags_enum {
CU_STREAM_WRITE_VALUE_DEFAULT = 0x0,
CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 0x1,
} CUstreamWriteValue_flags;
typedef enum CUstreamBatchMemOpType_enum {
CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1,
CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2,
CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3,
} CUstreamBatchMemOpType;
typedef union CUstreamBatchMemOpParams_union {
CUstreamBatchMemOpType operation;
struct CUstreamMemOpWaitValueParams_st {
CUstreamBatchMemOpType operation;
CUdeviceptr address;
union {
cuuint32_t value;
cuuint64_t pad;
};
unsigned int flags;
CUdeviceptr alias;
} waitValue;
struct CUstreamMemOpWriteValueParams_st {
CUstreamBatchMemOpType operation;
CUdeviceptr address;
union {
cuuint32_t value;
cuuint64_t pad;
};
unsigned int flags;
CUdeviceptr alias;
} writeValue;
struct CUstreamMemOpFlushRemoteWritesParams_st {
CUstreamBatchMemOpType operation;
unsigned int flags;
} flushRemoteWrites;
cuuint64_t pad[6];
} CUstreamBatchMemOpParams;
typedef enum CUoccupancy_flags_enum {
CU_OCCUPANCY_DEFAULT = 0x0,
CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 0x1,
@@ -299,6 +366,12 @@ typedef enum CUdevice_attribute_enum {
CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83,
CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84,
CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85,
CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86,
CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87,
CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88,
CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89,
CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90,
CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91,
CU_DEVICE_ATTRIBUTE_MAX,
} CUdevice_attribute;
@@ -360,11 +433,26 @@ typedef enum CUmemorytype_enum {
typedef enum CUcomputemode_enum {
CU_COMPUTEMODE_DEFAULT = 0,
CU_COMPUTEMODE_EXCLUSIVE = 1,
CU_COMPUTEMODE_PROHIBITED = 2,
CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3,
} CUcomputemode;
typedef enum CUmem_advise_enum {
CU_MEM_ADVISE_SET_READ_MOSTLY = 1,
CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2,
CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3,
CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4,
CU_MEM_ADVISE_SET_ACCESSED_BY = 5,
CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6,
} CUmem_advise;
typedef enum CUmem_range_attribute_enum {
CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1,
CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2,
CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3,
CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4,
} CUmem_range_attribute;
typedef enum CUjit_option_enum {
CU_JIT_MAX_REGISTERS = 0,
CU_JIT_THREADS_PER_BLOCK,
@@ -381,6 +469,8 @@ typedef enum CUjit_option_enum {
CU_JIT_LOG_VERBOSE,
CU_JIT_GENERATE_LINE_INFO,
CU_JIT_CACHE_MODE,
CU_JIT_NEW_SM3X_OPT,
CU_JIT_FAST_COMPILE,
CU_JIT_NUM_OPTIONS,
} CUjit_option;
@@ -397,6 +487,10 @@ typedef enum CUjit_target_enum {
CU_TARGET_COMPUTE_37 = 37,
CU_TARGET_COMPUTE_50 = 50,
CU_TARGET_COMPUTE_52 = 52,
CU_TARGET_COMPUTE_53 = 53,
CU_TARGET_COMPUTE_60 = 60,
CU_TARGET_COMPUTE_61 = 61,
CU_TARGET_COMPUTE_62 = 62,
} CUjit_target;
typedef enum CUjit_fallback_enum {
@@ -490,6 +584,7 @@ typedef enum cudaError_enum {
CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 217,
CUDA_ERROR_INVALID_PTX = 218,
CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219,
CUDA_ERROR_NVLINK_UNCORRECTABLE = 220,
CUDA_ERROR_INVALID_SOURCE = 300,
CUDA_ERROR_FILE_NOT_FOUND = 301,
CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302,
@@ -521,8 +616,14 @@ typedef enum cudaError_enum {
CUDA_ERROR_UNKNOWN = 999,
} CUresult;
typedef void* CUstreamCallback;
typedef size_t* CUoccupancyB2DSize;
typedef enum CUdevice_P2PAttribute_enum {
CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 0x01,
CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 0x02,
CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 0x03,
} CUdevice_P2PAttribute;
typedef void (CUDA_CB *CUstreamCallback)(CUstream hStream, CUresult status, void* userData);
typedef size_t (CUDA_CB *CUoccupancyB2DSize)(int blockSize);
typedef struct CUDA_MEMCPY2D_st {
size_t srcXInBytes;
@@ -654,7 +755,8 @@ typedef struct CUDA_TEXTURE_DESC_st {
float mipmapLevelBias;
float minMipmapLevelClamp;
float maxMipmapLevelClamp;
int reserved[16];
float borderColor[4];
int reserved[12];
} CUDA_TEXTURE_DESC;
typedef enum CUresourceViewFormat_enum {
@@ -736,21 +838,16 @@ typedef enum {
NVRTC_ERROR_INVALID_OPTION = 5,
NVRTC_ERROR_COMPILATION = 6,
NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8,
NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9,
NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10,
NVRTC_ERROR_INTERNAL_ERROR = 11,
} nvrtcResult;
typedef struct _nvrtcProgram* nvrtcProgram;
#ifdef _WIN32
# define CUDAAPI __stdcall
# define CUDA_CB __stdcall
#else
# define CUDAAPI
# define CUDA_CB
#endif
/* Function types. */
typedef CUresult CUDAAPI tcuGetErrorString(CUresult error, const char* pStr);
typedef CUresult CUDAAPI tcuGetErrorName(CUresult error, const char* pStr);
typedef CUresult CUDAAPI tcuGetErrorString(CUresult error, const char** pStr);
typedef CUresult CUDAAPI tcuGetErrorName(CUresult error, const char** pStr);
typedef CUresult CUDAAPI tcuInit(unsigned int Flags);
typedef CUresult CUDAAPI tcuDriverGetVersion(int* driverVersion);
typedef CUresult CUDAAPI tcuDeviceGet(CUdevice* device, int ordinal);
@@ -786,26 +883,26 @@ typedef CUresult CUDAAPI tcuCtxAttach(CUcontext* pctx, unsigned int flags);
typedef CUresult CUDAAPI tcuCtxDetach(CUcontext ctx);
typedef CUresult CUDAAPI tcuModuleLoad(CUmodule* module, const char* fname);
typedef CUresult CUDAAPI tcuModuleLoadData(CUmodule* module, const void* image);
typedef CUresult CUDAAPI tcuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void* optionValues);
typedef CUresult CUDAAPI tcuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues);
typedef CUresult CUDAAPI tcuModuleLoadFatBinary(CUmodule* module, const void* fatCubin);
typedef CUresult CUDAAPI tcuModuleUnload(CUmodule hmod);
typedef CUresult CUDAAPI tcuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name);
typedef CUresult CUDAAPI tcuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* bytes, CUmodule hmod, const char* name);
typedef CUresult CUDAAPI tcuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name);
typedef CUresult CUDAAPI tcuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name);
typedef CUresult CUDAAPI tcuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void* optionValues, CUlinkState* stateOut);
typedef CUresult CUDAAPI tcuLinkAddData_v2(CUlinkState state, CUjitInputType type, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void* optionValues);
typedef CUresult CUDAAPI tcuLinkAddFile_v2(CUlinkState state, CUjitInputType type, const char* path, unsigned int numOptions, CUjit_option* options, void* optionValues);
typedef CUresult CUDAAPI tcuLinkComplete(CUlinkState state, void* cubinOut, size_t* sizeOut);
typedef CUresult CUDAAPI tcuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut);
typedef CUresult CUDAAPI tcuLinkAddData_v2(CUlinkState state, CUjitInputType type, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues);
typedef CUresult CUDAAPI tcuLinkAddFile_v2(CUlinkState state, CUjitInputType type, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues);
typedef CUresult CUDAAPI tcuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut);
typedef CUresult CUDAAPI tcuLinkDestroy(CUlinkState state);
typedef CUresult CUDAAPI tcuMemGetInfo_v2(size_t* free, size_t* total);
typedef CUresult CUDAAPI tcuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize);
typedef CUresult CUDAAPI tcuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes);
typedef CUresult CUDAAPI tcuMemFree_v2(CUdeviceptr dptr);
typedef CUresult CUDAAPI tcuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr);
typedef CUresult CUDAAPI tcuMemAllocHost_v2(void* pp, size_t bytesize);
typedef CUresult CUDAAPI tcuMemAllocHost_v2(void** pp, size_t bytesize);
typedef CUresult CUDAAPI tcuMemFreeHost(void* p);
typedef CUresult CUDAAPI tcuMemHostAlloc(void* pp, size_t bytesize, unsigned int Flags);
typedef CUresult CUDAAPI tcuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags);
typedef CUresult CUDAAPI tcuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags);
typedef CUresult CUDAAPI tcuMemHostGetFlags(unsigned int* pFlags, void* p);
typedef CUresult CUDAAPI tcuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags);
@@ -863,8 +960,12 @@ typedef CUresult CUDAAPI tcuMipmappedArrayCreate(CUmipmappedArray* pHandle, cons
typedef CUresult CUDAAPI tcuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level);
typedef CUresult CUDAAPI tcuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray);
typedef CUresult CUDAAPI tcuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr);
typedef CUresult CUDAAPI tcuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream);
typedef CUresult CUDAAPI tcuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device);
typedef CUresult CUDAAPI tcuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count);
typedef CUresult CUDAAPI tcuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count);
typedef CUresult CUDAAPI tcuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr);
typedef CUresult CUDAAPI tcuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void* data, CUdeviceptr ptr);
typedef CUresult CUDAAPI tcuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr);
typedef CUresult CUDAAPI tcuStreamCreate(CUstream* phStream, unsigned int Flags);
typedef CUresult CUDAAPI tcuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority);
typedef CUresult CUDAAPI tcuStreamGetPriority(CUstream hStream, int* priority);
@@ -881,10 +982,13 @@ typedef CUresult CUDAAPI tcuEventQuery(CUevent hEvent);
typedef CUresult CUDAAPI tcuEventSynchronize(CUevent hEvent);
typedef CUresult CUDAAPI tcuEventDestroy_v2(CUevent hEvent);
typedef CUresult CUDAAPI tcuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd);
typedef CUresult CUDAAPI tcuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags);
typedef CUresult CUDAAPI tcuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags);
typedef CUresult CUDAAPI tcuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags);
typedef CUresult CUDAAPI tcuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc);
typedef CUresult CUDAAPI tcuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config);
typedef CUresult CUDAAPI tcuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config);
typedef CUresult CUDAAPI tcuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void* kernelParams, void* extra);
typedef CUresult CUDAAPI tcuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra);
typedef CUresult CUDAAPI tcuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z);
typedef CUresult CUDAAPI tcuFuncSetSharedSize(CUfunction hfunc, unsigned int bytes);
typedef CUresult CUDAAPI tcuParamSetSize(CUfunction hfunc, unsigned int numbytes);
@@ -910,6 +1014,7 @@ typedef CUresult CUDAAPI tcuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter
typedef CUresult CUDAAPI tcuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias);
typedef CUresult CUDAAPI tcuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp);
typedef CUresult CUDAAPI tcuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso);
typedef CUresult CUDAAPI tcuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor);
typedef CUresult CUDAAPI tcuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags);
typedef CUresult CUDAAPI tcuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef);
typedef CUresult CUDAAPI tcuTexRefGetArray(CUarray* phArray, CUtexref hTexRef);
@@ -921,6 +1026,7 @@ typedef CUresult CUDAAPI tcuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexr
typedef CUresult CUDAAPI tcuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef);
typedef CUresult CUDAAPI tcuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef);
typedef CUresult CUDAAPI tcuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef);
typedef CUresult CUDAAPI tcuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef);
typedef CUresult CUDAAPI tcuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef);
typedef CUresult CUDAAPI tcuTexRefCreate(CUtexref* pTexRef);
typedef CUresult CUDAAPI tcuTexRefDestroy(CUtexref hTexRef);
@@ -935,6 +1041,7 @@ typedef CUresult CUDAAPI tcuSurfObjectCreate(CUsurfObject* pSurfObject, const CU
typedef CUresult CUDAAPI tcuSurfObjectDestroy(CUsurfObject surfObject);
typedef CUresult CUDAAPI tcuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject);
typedef CUresult CUDAAPI tcuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev);
typedef CUresult CUDAAPI tcuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice);
typedef CUresult CUDAAPI tcuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags);
typedef CUresult CUDAAPI tcuCtxDisablePeerAccess(CUcontext peerContext);
typedef CUresult CUDAAPI tcuGraphicsUnregisterResource(CUgraphicsResource resource);
@@ -944,7 +1051,7 @@ typedef CUresult CUDAAPI tcuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDe
typedef CUresult CUDAAPI tcuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags);
typedef CUresult CUDAAPI tcuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream);
typedef CUresult CUDAAPI tcuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream);
typedef CUresult CUDAAPI tcuGetExportTable(const void* ppExportTable, const CUuuid* pExportTableId);
typedef CUresult CUDAAPI tcuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId);
typedef CUresult CUDAAPI tcuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags);
typedef CUresult CUDAAPI tcuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags);
@@ -961,13 +1068,15 @@ typedef CUresult CUDAAPI tcuGLUnmapBufferObjectAsync(GLuint buffer, CUstream hSt
typedef const char* CUDAAPI tnvrtcGetErrorString(nvrtcResult result);
typedef nvrtcResult CUDAAPI tnvrtcVersion(int* major, int* minor);
typedef nvrtcResult CUDAAPI tnvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char* headers, const char* includeNames);
typedef nvrtcResult CUDAAPI tnvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames);
typedef nvrtcResult CUDAAPI tnvrtcDestroyProgram(nvrtcProgram* prog);
typedef nvrtcResult CUDAAPI tnvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char* options);
typedef nvrtcResult CUDAAPI tnvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options);
typedef nvrtcResult CUDAAPI tnvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet);
typedef nvrtcResult CUDAAPI tnvrtcGetPTX(nvrtcProgram prog, char* ptx);
typedef nvrtcResult CUDAAPI tnvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet);
typedef nvrtcResult CUDAAPI tnvrtcGetProgramLog(nvrtcProgram prog, char* log);
typedef nvrtcResult CUDAAPI tnvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression);
typedef nvrtcResult CUDAAPI tnvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name);
/* Function declarations. */
@@ -1085,6 +1194,10 @@ extern tcuMipmappedArrayCreate *cuMipmappedArrayCreate;
extern tcuMipmappedArrayGetLevel *cuMipmappedArrayGetLevel;
extern tcuMipmappedArrayDestroy *cuMipmappedArrayDestroy;
extern tcuPointerGetAttribute *cuPointerGetAttribute;
extern tcuMemPrefetchAsync *cuMemPrefetchAsync;
extern tcuMemAdvise *cuMemAdvise;
extern tcuMemRangeGetAttribute *cuMemRangeGetAttribute;
extern tcuMemRangeGetAttributes *cuMemRangeGetAttributes;
extern tcuPointerSetAttribute *cuPointerSetAttribute;
extern tcuPointerGetAttributes *cuPointerGetAttributes;
extern tcuStreamCreate *cuStreamCreate;
@@ -1103,6 +1216,9 @@ extern tcuEventQuery *cuEventQuery;
extern tcuEventSynchronize *cuEventSynchronize;
extern tcuEventDestroy_v2 *cuEventDestroy_v2;
extern tcuEventElapsedTime *cuEventElapsedTime;
extern tcuStreamWaitValue32 *cuStreamWaitValue32;
extern tcuStreamWriteValue32 *cuStreamWriteValue32;
extern tcuStreamBatchMemOp *cuStreamBatchMemOp;
extern tcuFuncGetAttribute *cuFuncGetAttribute;
extern tcuFuncSetCacheConfig *cuFuncSetCacheConfig;
extern tcuFuncSetSharedMemConfig *cuFuncSetSharedMemConfig;
@@ -1132,6 +1248,7 @@ extern tcuTexRefSetMipmapFilterMode *cuTexRefSetMipmapFilterMode;
extern tcuTexRefSetMipmapLevelBias *cuTexRefSetMipmapLevelBias;
extern tcuTexRefSetMipmapLevelClamp *cuTexRefSetMipmapLevelClamp;
extern tcuTexRefSetMaxAnisotropy *cuTexRefSetMaxAnisotropy;
extern tcuTexRefSetBorderColor *cuTexRefSetBorderColor;
extern tcuTexRefSetFlags *cuTexRefSetFlags;
extern tcuTexRefGetAddress_v2 *cuTexRefGetAddress_v2;
extern tcuTexRefGetArray *cuTexRefGetArray;
@@ -1143,6 +1260,7 @@ extern tcuTexRefGetMipmapFilterMode *cuTexRefGetMipmapFilterMode;
extern tcuTexRefGetMipmapLevelBias *cuTexRefGetMipmapLevelBias;
extern tcuTexRefGetMipmapLevelClamp *cuTexRefGetMipmapLevelClamp;
extern tcuTexRefGetMaxAnisotropy *cuTexRefGetMaxAnisotropy;
extern tcuTexRefGetBorderColor *cuTexRefGetBorderColor;
extern tcuTexRefGetFlags *cuTexRefGetFlags;
extern tcuTexRefCreate *cuTexRefCreate;
extern tcuTexRefDestroy *cuTexRefDestroy;
@@ -1157,6 +1275,7 @@ extern tcuSurfObjectCreate *cuSurfObjectCreate;
extern tcuSurfObjectDestroy *cuSurfObjectDestroy;
extern tcuSurfObjectGetResourceDesc *cuSurfObjectGetResourceDesc;
extern tcuDeviceCanAccessPeer *cuDeviceCanAccessPeer;
extern tcuDeviceGetP2PAttribute *cuDeviceGetP2PAttribute;
extern tcuCtxEnablePeerAccess *cuCtxEnablePeerAccess;
extern tcuCtxDisablePeerAccess *cuCtxDisablePeerAccess;
extern tcuGraphicsUnregisterResource *cuGraphicsUnregisterResource;
@@ -1190,6 +1309,8 @@ extern tnvrtcGetPTXSize *nvrtcGetPTXSize;
extern tnvrtcGetPTX *nvrtcGetPTX;
extern tnvrtcGetProgramLogSize *nvrtcGetProgramLogSize;
extern tnvrtcGetProgramLog *nvrtcGetProgramLog;
extern tnvrtcAddNameExpression *nvrtcAddNameExpression;
extern tnvrtcGetLoweredName *nvrtcGetLoweredName;
enum {

View File

@@ -184,6 +184,10 @@ tcuMipmappedArrayCreate *cuMipmappedArrayCreate;
tcuMipmappedArrayGetLevel *cuMipmappedArrayGetLevel;
tcuMipmappedArrayDestroy *cuMipmappedArrayDestroy;
tcuPointerGetAttribute *cuPointerGetAttribute;
tcuMemPrefetchAsync *cuMemPrefetchAsync;
tcuMemAdvise *cuMemAdvise;
tcuMemRangeGetAttribute *cuMemRangeGetAttribute;
tcuMemRangeGetAttributes *cuMemRangeGetAttributes;
tcuPointerSetAttribute *cuPointerSetAttribute;
tcuPointerGetAttributes *cuPointerGetAttributes;
tcuStreamCreate *cuStreamCreate;
@@ -202,6 +206,9 @@ tcuEventQuery *cuEventQuery;
tcuEventSynchronize *cuEventSynchronize;
tcuEventDestroy_v2 *cuEventDestroy_v2;
tcuEventElapsedTime *cuEventElapsedTime;
tcuStreamWaitValue32 *cuStreamWaitValue32;
tcuStreamWriteValue32 *cuStreamWriteValue32;
tcuStreamBatchMemOp *cuStreamBatchMemOp;
tcuFuncGetAttribute *cuFuncGetAttribute;
tcuFuncSetCacheConfig *cuFuncSetCacheConfig;
tcuFuncSetSharedMemConfig *cuFuncSetSharedMemConfig;
@@ -231,6 +238,7 @@ tcuTexRefSetMipmapFilterMode *cuTexRefSetMipmapFilterMode;
tcuTexRefSetMipmapLevelBias *cuTexRefSetMipmapLevelBias;
tcuTexRefSetMipmapLevelClamp *cuTexRefSetMipmapLevelClamp;
tcuTexRefSetMaxAnisotropy *cuTexRefSetMaxAnisotropy;
tcuTexRefSetBorderColor *cuTexRefSetBorderColor;
tcuTexRefSetFlags *cuTexRefSetFlags;
tcuTexRefGetAddress_v2 *cuTexRefGetAddress_v2;
tcuTexRefGetArray *cuTexRefGetArray;
@@ -242,6 +250,7 @@ tcuTexRefGetMipmapFilterMode *cuTexRefGetMipmapFilterMode;
tcuTexRefGetMipmapLevelBias *cuTexRefGetMipmapLevelBias;
tcuTexRefGetMipmapLevelClamp *cuTexRefGetMipmapLevelClamp;
tcuTexRefGetMaxAnisotropy *cuTexRefGetMaxAnisotropy;
tcuTexRefGetBorderColor *cuTexRefGetBorderColor;
tcuTexRefGetFlags *cuTexRefGetFlags;
tcuTexRefCreate *cuTexRefCreate;
tcuTexRefDestroy *cuTexRefDestroy;
@@ -256,6 +265,7 @@ tcuSurfObjectCreate *cuSurfObjectCreate;
tcuSurfObjectDestroy *cuSurfObjectDestroy;
tcuSurfObjectGetResourceDesc *cuSurfObjectGetResourceDesc;
tcuDeviceCanAccessPeer *cuDeviceCanAccessPeer;
tcuDeviceGetP2PAttribute *cuDeviceGetP2PAttribute;
tcuCtxEnablePeerAccess *cuCtxEnablePeerAccess;
tcuCtxDisablePeerAccess *cuCtxDisablePeerAccess;
tcuGraphicsUnregisterResource *cuGraphicsUnregisterResource;
@@ -289,6 +299,8 @@ tnvrtcGetPTXSize *nvrtcGetPTXSize;
tnvrtcGetPTX *nvrtcGetPTX;
tnvrtcGetProgramLogSize *nvrtcGetProgramLogSize;
tnvrtcGetProgramLog *nvrtcGetProgramLog;
tnvrtcAddNameExpression *nvrtcAddNameExpression;
tnvrtcGetLoweredName *nvrtcGetLoweredName;
static DynamicLibrary dynamic_library_open_find(const char **paths) {
@@ -486,6 +498,10 @@ int cuewInit(void) {
CUDA_LIBRARY_FIND(cuMipmappedArrayGetLevel);
CUDA_LIBRARY_FIND(cuMipmappedArrayDestroy);
CUDA_LIBRARY_FIND(cuPointerGetAttribute);
CUDA_LIBRARY_FIND(cuMemPrefetchAsync);
CUDA_LIBRARY_FIND(cuMemAdvise);
CUDA_LIBRARY_FIND(cuMemRangeGetAttribute);
CUDA_LIBRARY_FIND(cuMemRangeGetAttributes);
CUDA_LIBRARY_FIND(cuPointerSetAttribute);
CUDA_LIBRARY_FIND(cuPointerGetAttributes);
CUDA_LIBRARY_FIND(cuStreamCreate);
@@ -504,6 +520,9 @@ int cuewInit(void) {
CUDA_LIBRARY_FIND(cuEventSynchronize);
CUDA_LIBRARY_FIND(cuEventDestroy_v2);
CUDA_LIBRARY_FIND(cuEventElapsedTime);
CUDA_LIBRARY_FIND(cuStreamWaitValue32);
CUDA_LIBRARY_FIND(cuStreamWriteValue32);
CUDA_LIBRARY_FIND(cuStreamBatchMemOp);
CUDA_LIBRARY_FIND(cuFuncGetAttribute);
CUDA_LIBRARY_FIND(cuFuncSetCacheConfig);
CUDA_LIBRARY_FIND(cuFuncSetSharedMemConfig);
@@ -533,6 +552,7 @@ int cuewInit(void) {
CUDA_LIBRARY_FIND(cuTexRefSetMipmapLevelBias);
CUDA_LIBRARY_FIND(cuTexRefSetMipmapLevelClamp);
CUDA_LIBRARY_FIND(cuTexRefSetMaxAnisotropy);
CUDA_LIBRARY_FIND(cuTexRefSetBorderColor);
CUDA_LIBRARY_FIND(cuTexRefSetFlags);
CUDA_LIBRARY_FIND(cuTexRefGetAddress_v2);
CUDA_LIBRARY_FIND(cuTexRefGetArray);
@@ -544,6 +564,7 @@ int cuewInit(void) {
CUDA_LIBRARY_FIND(cuTexRefGetMipmapLevelBias);
CUDA_LIBRARY_FIND(cuTexRefGetMipmapLevelClamp);
CUDA_LIBRARY_FIND(cuTexRefGetMaxAnisotropy);
CUDA_LIBRARY_FIND(cuTexRefGetBorderColor);
CUDA_LIBRARY_FIND(cuTexRefGetFlags);
CUDA_LIBRARY_FIND(cuTexRefCreate);
CUDA_LIBRARY_FIND(cuTexRefDestroy);
@@ -558,6 +579,7 @@ int cuewInit(void) {
CUDA_LIBRARY_FIND(cuSurfObjectDestroy);
CUDA_LIBRARY_FIND(cuSurfObjectGetResourceDesc);
CUDA_LIBRARY_FIND(cuDeviceCanAccessPeer);
CUDA_LIBRARY_FIND(cuDeviceGetP2PAttribute);
CUDA_LIBRARY_FIND(cuCtxEnablePeerAccess);
CUDA_LIBRARY_FIND(cuCtxDisablePeerAccess);
CUDA_LIBRARY_FIND(cuGraphicsUnregisterResource);
@@ -593,6 +615,8 @@ int cuewInit(void) {
NVRTC_LIBRARY_FIND(nvrtcGetPTX);
NVRTC_LIBRARY_FIND(nvrtcGetProgramLogSize);
NVRTC_LIBRARY_FIND(nvrtcGetProgramLog);
NVRTC_LIBRARY_FIND(nvrtcAddNameExpression);
NVRTC_LIBRARY_FIND(nvrtcGetLoweredName);
}
result = CUEW_SUCCESS;
@@ -630,6 +654,7 @@ const char *cuewErrorString(CUresult result) {
case CUDA_ERROR_PEER_ACCESS_UNSUPPORTED: return "Peer access unsupported";
case CUDA_ERROR_INVALID_PTX: return "Invalid ptx";
case CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: return "Invalid graphics context";
case CUDA_ERROR_NVLINK_UNCORRECTABLE: return "Nvlink uncorrectable";
case CUDA_ERROR_INVALID_SOURCE: return "Invalid source";
case CUDA_ERROR_FILE_NOT_FOUND: return "File not found";
case CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND: return "Link to a shared object failed to resolve";

View File

@@ -1,40 +0,0 @@
set (INC
src
)
set (INC_SYS
)
set (SRC
src/c_loops.cc
src/cell.cc
src/cmd_line.cc
src/common.cc
src/container_prd.cc
src/container.cc
src/pre_container.cc
src/unitcell.cc
src/v_base.cc
src/v_compute.cc
# src/voro++.cc
src/wall.cc
src/c_interface.cc
src/c_loops.hh
src/cell.hh
src/common.hh
src/config.hh
src/container_prd.hh
src/container.hh
src/pre_container.hh
src/rad_option.hh
src/unitcell.hh
src/v_base.hh
src/v_compute.hh
# src/voro++.hh
src/wall.hh
src/worklist.hh
src/c_interface.hh
)
blender_add_lib(extern_voro "${SRC}" "${INC}" "${INC_SYS}")

39
extern/voro++/LICENSE vendored
View File

@@ -1,39 +0,0 @@
Voro++ Copyright (c) 2008, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from the U.S. Dept. of Energy). All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
(1) Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
(3) Neither the name of the University of California, Lawrence Berkeley
National Laboratory, U.S. Dept. of Energy nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to Lawrence Berkeley National
Laboratory, without imposing a separate written license agreement for such
Enhancements, then you hereby grant the following license: a non-exclusive,
royalty-free perpetual license to install, use, modify, prepare derivative
works, incorporate into other computer software, distribute, and sublicense
such enhancements or derivative works thereof, in binary and source code form.

341
extern/voro++/NEWS vendored
View File

@@ -1,341 +0,0 @@
Version 0.4.6 (October 17th 2013)
=================================
* Fixed an issue with template instantiation in wall.cc that was causing
compilation problems with new versions of Apple Xcode. Thanks to Barend
Thijsse (Delft University of Technology) and Juan Pablo Cruz Pérez (Instituto
de Física y Matemáticas) for pointing this out.
* Added routines to the container classes to compute a ghost Voronoi cell at
any given location, as though an extra particle was inserted at that
location
* Removed unused private variable in c_loops.hh
* Updated Doxyfile to 1.8.5
Version 0.4.5 (July 27th 2012)
==============================
* Removed "using namespace std" from the header files and added extra "std::"
qualifiers on STL vectors and queues. This is to prevent naming conflicts
with other libraries. Thanks to Florian Hoffmann (University of Luxembourg)
for pointing this out.
* Fixed an error in the check_facets diagnostic routine. Thanks to Tristan
Carrier-Baudouin (Université catholique de Louvain) for pointing this out.
* Fixed a memory leak in the new container_periodic class. Thanks to Massimo
Marchi (Commissariat á l'Energie Atomique) for pointing this out.
* Removed some duplicate or unnecessary #include statements of the standard C++
header files
* Fix small naming mismatch between cell.cc and cell.hh in plane_intersects
and nplane routines, which would give a warning with Doxygen
* More changes for older MS Visual C++ compatability
* Updated Doxyfile to 1.8.1.1
Version 0.4.4 (January 17th 2012)
=================================
* Fixed an error in pointer arithmetic that was introduced in version 0.4,
which would occur in cases where the delete stack was extended when a large
number of vertices were being removed. Thanks to Jeff Johnson (Lawrence
Berkeley Laboratory) and Matt Freeman (Texas A&M University) for pointing
this out.
Version 0.4.3 (November 12th 2011)
==================================
* Removed spurious Gnuplot output line from torus.cc example
* More changes for better Visual C++ compatibility
* Fixed indexing error in worklist generation routine. This had no effect
on the generated worklists, but would become apparent in other situations.
* Added rad_option.hh to the list of files included by voro++.hh for
completeness
* Fix errors in Gnuplot commands in the basic examples README file. Thanks to
William-Fernando Oquendo (National University of Colombia) for pointing this
out.
* Fixed memory allocation issue in face_freq_table routine - thanks to Lingti
Kong for pointing this out
* Minor cleanups and optimizations to wall classes
Version 0.4.2 (September 23rd 2011)
===================================
* Fixed a bug in the put_remap routine where a z periodic boolean was
switched to an x periodic boolean. This would only be noticed when using
mixed periodic boundary conditions and importing particles that need to be
remapped.
* The pid function in the c_loop_base class was mistakenly labeled as double
instead of int - this is now fixed. Thanks to William-Fernando Oquendo
(National University of Colombia) for pointing this out.
* Fixed an extremely subtle bounds checking issue that would only materialize
for the radical Voronoi tessellation with large particle radii. Thanks to
Richard Martin and Maciej Haranczyk (Lawrence Berkeley Laboratory) for
pointing out the original problem.
* Fixed other problems with the radical tessellation. Originally, the
algorithms were concieved for with hard spheres in mind, where the particles
would not overlap, and an assumption was used in the cutoff procedure that
made use of this, but would not be true in general.
* Removed more bracket initializations like "double a(3);" for better
consistency, and more compatibility with older versions of MS Visual C++.
Thanks to Martin Brehm for help with this.
* Factored out the regular/radical inline routines into separate classes, so
that they don't have to be duplicated in the container_periodic classes
* Fixed problems with the container_periodic classes referencing the wrong
loop classes. Thanks to Wang Chuncheng (Nanyang Technological University) for
pointing this out.
* Added c_loop_order_periodic class for doing ordered loops with the periodic
container classes
* Updated the README file in the src directory. The detailed description of
each file has been removed since this is difficult to maintain and this
information is already present in the class reference manual.
* Fixed an error in the pre_container selection of the optimal computational
grid size
* Code comment cleanups, particularly in wall.hh
* Minor man page reformatting
* Updated Doxyfile to version 1.7.5.1
Version 0.4.1 (September 7th 2011)
==================================
* Fixed bug in command-line utility that would give incorrect results when
using the "-c" option for custom output. Thanks to Prof. Aldo Romero
(CINVESTAV-Unidad Queretaro) for pointing this out.
* Added some additional documentation about neighbor information
Version 0.4 (August 30th 2011)
==============================
* New classes called container_periodic and container_periodic_poly that carry
out Voronoi computations in 3D periodic parallelepiped unit cells have been
added. This adds significant complexity to the computation, and the memory
organization of these classes is different, requiring allocation for ghost
regions. Currently these classes cannot be accessed by the command-line
utility, but will be integrated further in future releases. These classes are
currently mainly exploited by a sister software project Zeo++ for chemical
informatics (Maciej Haranczyk, Chris Rycroft, Thomas Willems, Richard Martin)
to be released in late 2011.
* As part of the new container_periodic classes, a new class called unitcell
has been added, which will compute the Voronoi cell for a single particle in
a 3D periodic parallelepiped class. The Voronoi cell is formed by the
influences of the periodic images of itself only. This turns out to be an
important component of the calculations done by the container_periodic
classes but can also be used independently.
* The container classes now have a routine called find_voronoi_cell that will
take a given position vector and return the Voronoi cell which is contained
within. For the regular Voronoi tessellation, this is just the Voronoi cell
corresponding to the closest particle (by definition). For the radical
Voronoi tessellation, this is weighted by the particle radii.
* The library is now enclosed within the "voro" namespace. This requires
specifying "using namespace voro;" in the preamble of codes or prepending
"voro::" to access functions. This greatly minimizes the possiblity of naming
conflicts when using multiple libraries, particularly since many of the
classes iin the library have fairly generic names (eg. "container"). Thanks to
Allan Johns (Dr. D Studios) for suggesting this.
* Voro++ can now be built as a static library that can be installed and linked
to. As part of this, the .cc and .hh files have been significantly revised
with some small inline functions and template code being written into the
header files.
* Previously, all of the voronoicell output routines sent data to an output
stream. However, input and output are now carried out using the STL vector
class, allowing for programs to directly link to and use Voro++ output. The
STL vector class has been chosen since it the simplest and most standard
mechanism for returning a variable amount of data. Several new examples are
provided to demonstrate this functionality, for both the voronoicell class
and the container class.
* A common issue has been that the order of particles in the output file does
not match the input file, since Voro++ internally sorts particles according
to their position. A new class called voro_order has been provided, which can
link to particles as they are stored, allowing for the Voronoi computation to
be carried out in the same order as the input file. The core computation
routines can be run with a variety of different loops, and a new example
"loops.cc" is provided to demonstrate this.
* The order of parameters to certain functions have been changed to take
advantage of the C++ default parameter mechanism wherever possible
* The container and container_poly classes are now derived from a base class,
rather than being different instances of a template. This simplifies the code
and stops common routines from being duplicated. The core Voronoi computation
routine is now held within a voro_compute class, which can be instantiated on
any container with the correct access functions.
* The voronoicell and voronoicell_neighbor classes are now derived from a
common base class, rather than being different instances of a template. This
simplifies the code and stops common routines from being duplicated. The core
nplane routine is now a function template that can be instantiated on the
parent class itself.
* All output routines have been switched from using C++ iostreams to using the C
cstdio library. This has been done for increased performance. In general the
cstdio routines run significantly faster than the comparable iostream
routines: for one file import test, using fscanf from cstdio was five times
as fast as the comparable << operator from iostream. As another example,
the program "cylinder.cc", which uses both file import and export, runs
approximately twice as fast before. Since many people use Voro++ to batch
process large numbers of input files, this increase in input/output speed
seemed desirable.
* The Gnuplot output routines now merge individual lines into contiguous paths
wherever possible, resulting in a ~15% reduction in their file size and a
noticeable improvement in rendering speed
* Previously, the POV-Ray output routines could create cylinders where the start
and end points matched. This was a benign problem, due to the fact the vertex
positions within Voro++ were held to higher precision than the POV-Ray output
file, meaning that distinct vertices could appear to be at the same position;
a perl script was provided to post-process and remove these. However, Voro++
now scans each cylinder before saving to file to automatically remove these
cases from consideration.
* Pointer arithmetic is now used within a number of critical cell computation
routines, and gives a speedup of 10%-20% in many cases. On some typical
problems on typical machines, Voro++ currently computes around 50,000
cells/second. New machines can achieve upwards of 70,000 cells/second.
* A new pre-container mechanism is provided, which can read in a file of
unknown length, and then make a guess at the correct computational grid size
to use. This removes the need for specifying a length scale with the
command-line utility. However, a length scale or grid decomposition can still
be manually specified.
* Removed the option to compile in single-precision. This was a highly
specialized feature, and it appears better to allow users who wish to do this
to make their own modifications. This option also conflicted with building
Voro++ as a standard static library.
* Fixed a benign bug in the block computation list that would cause it to get
extended prematurely
* Numerous small improvements to memory allocation routines
* Added routines to copy a Voronoi cell
* Created a new wall_list class to handle a list of walls. This simplifies the
command-line utility code.
* Labels in the worklist that are used in the transition from the radius search
to the block search have been optimized
* The command-line utility can now produce POV-Ray output. Also, the main loop
in the utility has been combined so that the Voronoi tessellation is only
carried out once, even if POV-Ray and Gnuplot output is also required.
* The command-line utility does range checking on the filename to prevent
buffer overruns
* The routines that put particles into a container now do so more reliably for
periodic cases, remapping them into the primary domain if necessary
* A number of the POV-Ray header files have been altered to directly make use
of a right-handed coordinate system in which the z axis points upwards. This
matches the Gnuplot style, and the style used in many scientific simulations.
It avoids the need for a rotation or matrix transformation when rendering
many of the particle packings. Some of the test particle packings have been
transformed to ensure consistency with previous renderings.
* Some POV-Ray files have been cleaned up and there are additional comments
* Fixed a bug in the print_all_custom() routine, affecting "%P" output. Thanks
to David Waroquiers (Université Catholique de Louvain, Belgium) for pointing
this out.
* Fixed a bug that caused the neighbor list not to be outputted in the same
order as the other plane diagnostic routines. Thanks to Olufemi Olorode
(Texas A&M University) for pointing this out.
* Removed the add_vertex() and init_test() routines, which were mainly used for
debugging
* Updated Doxyfile to version 1.7.4
Version 0.3.1 (September 29, 2009)
==================================
* Carried out a major overhaul of the source code comments that are used by
Doxygen. Several errors in the documentation were fixed.
* Additional comments in the Makefiles, and added the "phony target" keyword
* Many code cleanups and standardizations. Some double and triple loops
were concatenated into one to reduce the amount of indentation.
* Fixed the import.cc example program
* Updated Doxyfile to version 1.6.1
Version 0.3 (August 17, 2009)
=============================
* In response to feedback from several people, the routines for computing
statistics about computed Voronoi cells have been significantly revised,
extended, and put within a common framework. The voronoicell class now has a
large number of routines of the form output_...() that will print cell
information to an output stream. There are also a number of new, simple
routines for computing basic statistics such as the number of edges and faces
of each cell. All of these routines can now be used during the container
analysis, by making use of the new print_custom() routine, which can output
according to a given format string, that uses control sequences similar to
the standard C printf() routine.
* Renamed the "radical" example directory to "custom", and added two
new programs called "cell_statistics.cc" and "custom_output.cc" for
demonstrating the new output routines for the voronoicell and container
classes respectively
* Added a routine for computing the centroid of a Voronoi cell
* Added new routines for computing neighbor normals, in response to a
request from Dave Greenwood
* Removed unnecessary trailing tabs and spaces in the source code
* Fixed a few text justification problems, and altered some of the comments
in the example programs
* Improved the command-line utility, allowing it to specify custom information
in the output. Implemented better error checking on command-line arguments.
* Removed the facets() routine, since this has been superseded by the new
output_...() routines. This also rendered some functions in the neighbor_none
and neighbor_track classes obsolete, and they have also been removed.
* Some reorganization of the cell.hh and container.hh header files to group
similar functions together
* Added torus.cc example that shows how to write custom walls as derived
classes
* Updated Doxyfile to version 1.5.9
Version 0.2.7 (March 25, 2009)
==============================
* Added some missing cstdlib and cstring header files that cause compilation
errors on some systems
* Some text cleanups in the main README file and cmd_line.cc
* The worklist_gen.pl script was in DOS format. It has been switched to Unix
format to match the rest of the code.
* Fixed some incorrect inequalities in degenerate2.cc
* Improved some error messages in container.cc
Version 0.2.6 (March 23, 2009)
==============================
* Significantly improved the error messages generated by the code. It now
makes use of the exit() routine rather than throwing errors, and it returns
various status codes (defined in config.hh) for different types of abnormal
behavior.
* Changed two occurences of "cin" to "cout" in the draw_particles routines
* Corrected error in comment in the tetrahedron example
* Minor comment cleanups of the worklist_gen.pl script
* Updated Doxyfile to version 1.5.8
* Added a routine print_facet_information() in response to a problem
from Hengxing Lan
* Many of the cell based statistics routines (like number_of_faces() and
facets()) internally track their progress by temporarily flipping the edge
table entries to negative values, so that they know where they have already
been. The common code that was used at the end of each of these functions for
resetting the edges back to positive has now been made into a private inline
function called reset_edges().
* Fixed a missing initialization of max_radius to zero in the radius_poly
class. This should not have ever caused any errors, as max_radius would
always have been big enough. However if max_radius was initially set to a
large value, it could have potentially made the code run slower.
* Fixed the code layout in the suretest class header
* Added some additional checks in the command-line utility to screen out
invalid command-line arguments. Switched the test on the number of
computational blocks to use floating point arithmetic, because integers
could potentially overflow and become negative.
* Included several more of the POV-Ray header files that were used to create
the example images on the website
* Removed a "cout" statement in the wall_cone class
* Cleanup of the README files for the basic examples and the wall examples
Version 0.2.5 (January 1, 2009)
===============================
* Added the DOE acknowledgements to the code overview document
Version 0.2.4 (December 14, 2008)
=================================
* Added the code overview PDF document to the package, in the docs directory
* Fixed some spelling errors in the comments
* Many more documentation updates
Version 0.2.3 (December 9, 2008)
================================
* Removed an unused variable that was reported by the Portland C compiler
* Documentation updates
* Added the import.pov script
* Added some simple functions to solve the problem from Stefan Eibl of counting
faces
* Renamed the facets_loop to voropp_loop
Version 0.2.2 (November 19, 2008)
=================================
* Main README file updated
Version 0.2.1 (November 3, 2008)
================================
* Much more documentation
* Brief Doxygen class comments
* Updated Doxyfile to version 1.5.7
Version 0.2 (October 31, 2008)
==============================
* Updated some occurrences of char* with const char* for compatability with
version 4.2 of the GNU C++ compiler
* Making use of default parameters in the wall classes
* The command-line utility can now add walls
Version 0.1 (August 22, 2008)
=============================
* Initial version uploaded to the web

153
extern/voro++/README2 vendored
View File

@@ -1,153 +0,0 @@
Voro++, a 3D cell-based Voronoi library (http://math.lbl.gov/voro++/)
By Chris H. Rycroft (UC Berkeley / Lawrence Berkeley Laboratory)
================================================================
Voro++ is a software library for carrying out three-dimensional computations
of the Voronoi tessellation. A distinguishing feature of the Voro++ library
is that it carries out cell-based calculations, computing the Voronoi cell
for each particle individually, rather than computing the Voronoi
tessellation as a global network of vertices and edges. It is particularly
well-suited for applications that rely on cell-based statistics, where
features of Voronoi cells (eg. volume, centroid, number of faces) can be
used to analyze a system of particles
Voro++ comprises of several C++ classes that can be built as a static library
and linked to. A command-line utility is also provided that can analyze text
files of particle configurations and use most of the features of the code.
Numerous examples are provided to demonstrate the library's features and all of
these are discussed in detail on the library website.
Compilation - Linux / Mac OS / Windows with Cygwin
==================================================
The code is written in ANSI C++, and compiles on many system architectures. The
package contains the C++ source code, example files, miscellaneous utilities
and documentation. On Linux, Mac OS, and Windows (using Cygwin), the
compilation and installed can be carried out using GNU Make.
To begin, the user should review the file "config.mk" in the top level
directory, to make sure that the compilation and installation settings are
appropriate for their system. Typing "make" will then compile the static
library, command-line utility, and examples. The command-line utility and
library will appear within the "src" directory.
Following successful compilation, the library, command-line utility, and
documentation can be installed by typing "sudo make install". By default, the
program files are installed into /usr/local, and it may be necessary to modify
your environment variables in order to access the installed files:
- to use the command-line utility, the variable PATH should contain
/usr/local/bin.
- to access the Voro++ man page, the variable MANPATH should contain
/usr/local/man.
- to access the Voro++ header files, code compilation should include
the flag '-I/usr/local/include/voro++'.
- to link to the static library, code compilation should include the
flags '-L/usr/local/lib' to tell the linker where to look, and then
'-lvoro++' to link to the library.
The library website contains additional notes on setting environment variables,
and many guides are available on the Internet.
The code can later be uninstalled with "sudo make uninstall". It is also
possible to use the library and command-line utility without installation by
calling the files directly once they have been compiled. On systems where the
user does not have root privileges to install into /usr/local, the "config.mk"
file can be modified to install into the user's home directory by setting
PREFIX=$(HOME). Voro++ supports parallel compilation by using the "make -j <n>"
command where n is the number of threads.
Compilation - Windows without Cygwin
====================================
On a Windows machine without a terminal environment like Cygwin, it is possible
to import and compile the library in many standard C++ development
environments. Users have reported success in building the library with
Microsoft Visual C++ Express and Code::Blocks.
Related programs
================
No external dependencies are required to compile and run the code, but several
programs may be useful for analyzing the output:
- The freeware plotting program Gnuplot (available at www.gnuplot.info) can be
used for rapid 2D and 3D visualization of the program output.
- The freeware raytracer POV-Ray (available at www.povray.org) can be used for
high-quality renderings of the program output.
- The reference manual is generated from comments in the source code using
Doxygen (available at www.doxygen.org). This package is only required if the
library files are being developed and the reference manuals need to be
regenerated. The complete reference manual to the current code is available
online at http://math.lbl.gov/voro++/doc/refman/
Contents
========
examples - many documented examples making use of the library
html - an HTML-based reference manual (generated by Doxygen)
man - contains the man page that is installed with the program
scripts - miscellaneous helper scripts
src - source code files
Usage
=====
Voro++ is released as free software through the Lawrence Berkeley National
Laboratory - a detailed copyright notice is provided below, and the complete
terms of the license can be found in the LICENSE file.
I am very interested to hear from users of the software, so if you find this
useful, please email me at chr@alum.mit.edu. Also, if you plan to publish an
academic paper using this software, please consider citing one of the following
publications:
- Chris H. Rycroft, "Voro++: A three-dimensional Voronoi cell library in C++",
Chaos 19, 041111 (2009).
- Chris H. Rycroft, Gary S. Grest, James W. Landry, and Martin Z. Bazant,
"Analysis of Granular Flow in a Pebble-Bed Nuclear Reactor",
Phys. Rev. E 74, 021306 (2006).
- Chris H. Rycroft, "Multiscale Modeling in Granular Flow", PhD thesis
submitted to the Massachusetts Institute of Technology, September 2007.
(http://math.berkeley.edu/~chr/publish/phd.html)
The first reference contains a one-page overview of the library. The second
reference contains some of the initial images that were made using a very early
version of this code, to track small changes in packing fraction in a large
particle simulation. The third reference discusses the use of 3D Voronoi cells,
and describes the algorithms that were employed in the early version of this
code. Since the publication of the above references, the algorithms in Voro++
have been significantly improved, and a paper specifically devoted to the
current code architecture will be published during 2012.
Copyright Notice
================
Voro++ Copyright (c) 2008, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software,
please contact Berkeley Lab's Technology Transfer Department at TTD@lbl.gov.
NOTICE. This software was developed under partial funding from the U.S.
Department of Energy. As such, the U.S. Government has been granted for itself
and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide
license in the Software to reproduce, prepare derivative works, and perform
publicly and display publicly. Beginning five (5) years after the date
permission to assert copyright is obtained from the U.S. Department of Energy,
and subject to any subsequent five (5) year renewals, the U.S. Government is
granted for itself and others acting on its behalf a paid-up, nonexclusive,
irrevocable, worldwide license in the Software to reproduce, prepare derivative
works, distribute copies to the public, perform publicly and display publicly,
and to permit others to do so.
Acknowledgments
===============
This work was supported by the Director, Office of Science, Computational and
Technology Research, U.S. Department of Energy under Contract No.
DE-AC02-05CH11231.

View File

@@ -1,12 +0,0 @@
#!/usr/bin/python
import os
Import ('env')
sources = env.Glob('src/*.cc')
sources.remove('src'+os.sep+'voro++.cc')
sources.remove('src'+os.sep+'v_base_wl.cc')
defs = []
incs = ['src']
env.BlenderLib ('extern_voro++', Split(sources), incs, defs, libtype=['extern'], priority=[40] )

Some files were not shown because too many files have changed in this diff Show More