1
1

Compare commits

..

723 Commits

Author SHA1 Message Date
a70f3ee631 Counteract numerical errors in distance constraint evaluation (drift).
With large steps in hair editing strokes the solution to distance-constrained
hair displacement becomes inaccurate, leading to a gradual lengthening of strands.
To counteract this the length constraints can enforce a velocity relative to the
constant target length of each segment. This results in an overall constant
length, even when the constraint solution is inaccurate for nonlinear constraints.

Note that the result would become much better with backward Euler integration,
currently there is a noticable 1-step lag between strokes and the distance fix.
2016-08-09 17:21:31 +02:00
e37b91f413 Tentative "stiffness" forces for resisting hair bending.
This is not really nice yet, but just serves as a test for internal forces.
2016-08-09 16:44:34 +02:00
851728d574 Merge branch 'object_nodes' into strand_nodes 2016-08-09 16:42:49 +02:00
4a801f6c6f Merge branch 'master' into object_nodes 2016-08-09 16:37:15 +02:00
e73f56a15a Merge branch 'master' into strand_nodes 2016-08-09 16:26:38 +02:00
e303e23d56 Implementation of a basic constraint solver for strand length and root velocity.
This uses the Lagrange multiplier method for correcting the "velocity" of
vertex displacements as described in
"Linear-Time Dynamics using Lagrange Multipliers" (Baraff, 1996)

Future additions would include stiffness forces for creating more natural
hair shapes, and handling of collisions (deflection).
2016-08-07 10:35:48 +02:00
d8db153767 Switch combing tool back to using vertex displacement rather than edge rotation (tentatively).
This method is more straightforward and easier to predict when testing constraint solving.
2016-08-05 11:02:50 +02:00
632f2afa6c New (stub) method for solving constrained hair editing with Lagrange multipliers. 2016-08-02 14:12:40 +02:00
b908fa3fda Always cache the original strand vertex locations during editing.
True constraint resolving for length and contacts will need this information.
2016-08-02 13:55:36 +02:00
683caa32db Only generate hair contacts for points that actually penetrate the mesh. 2016-07-29 16:35:10 +02:00
e82364a1a8 Clear debug drawing when creating new contacts. 2016-07-29 16:35:10 +02:00
077a9c7621 Enable debug drawing of hair contacts. 2016-07-29 16:35:10 +02:00
a2787c1f74 Simple contact detection method for hair editing, using the typical BVH closest point method.
This method is just a placeholder, in the future it would be worthwhile to use Bullet collision
detection with ghost objects for this.

Also the code should eventually be abstracted a bit to make it agnostic to mesh formats, so it
can be used for BMesh as well as DNA strand data or physics simulation.
2016-07-29 16:35:10 +02:00
89713f09f4 Hair edit tool settings for enabling and controlling deflection.
Unused settings, deflection is not yet implemented.
2016-07-29 16:35:10 +02:00
a307027565 Add a cache structure for collision contact points.
This should serve as a universal interface between possible collision
detection systems (BVH, Bullet) and the various collision response systems.
Using an new data structure means that the two sides of a collision
handling feature (detection and response) can be treated independently,
reducing code dependencies and complexity.

The properties of contact points are modeled after btManifoldPoint from
Bullet and may need to be adjusted in the future.
2016-07-29 16:35:10 +02:00
8a027ce573 Fix for frequent unnecessary shader recompilation during hair editing.
The depsgraph component node for invalidating the strand shader was located in
the GEOMETRY component of the object. This component by default gets tagged along
with every other object part during editing. Only standardized way of avoiding this
would be putting it in a different datablock, but the shader is very much tied to
the particular object due to the displacement function from its node tree.

For now the solution is a new component GEOMETRY_SHADER, which does not get tagged
when the ID node is tagged. It still gets regular updates from node tree changes.
This seems to be the least invasive way of avoiding unnecessary performance drops,
and can be removed and replaced easily later on without disrupting other code work.
2016-07-29 16:34:52 +02:00
8407771c52 Use a "pass" concept for strand shader organization, like the GPUMaterial system.
This will allow easier addition of other shader features later on. The system
should be merged with the GPUMaterial code, but currently the material system
is too unwieldy to integrate the strand displacement code easily. With the 2.8
viewport rewrite all of this will have to be rewritten as well anyway.
2016-07-27 13:39:09 +02:00
522ad146a0 Removed deprecated modifier settings for static hair effects. 2016-07-27 12:22:38 +02:00
a3d9b2736f Removed leftover enum from static effects definition. 2016-07-27 11:39:56 +02:00
78585819f2 Merge branch 'strand_editmode' into strand_nodes 2016-07-27 10:19:19 +02:00
5a7efaf287 Added "show_brush" option for hair edit settings, expected by common paint UI.
This setting has no effect yet for hair editing, but the UI script expects it.
2016-07-27 09:50:45 +02:00
49c63d46db Merge branch 'master' into object_nodes 2016-07-25 09:35:03 +02:00
e0333d54d4 Merge branch 'master' into strand_nodes 2016-07-25 09:34:49 +02:00
f3bc942370 Merge branch 'master' into strand_editmode 2016-07-25 09:33:48 +02:00
c2e2e93152 Merge branch 'object_nodes' into strand_nodes 2016-07-24 13:11:34 +02:00
be12e7a42e Added a number of addition matrix manipulation nodes. 2016-07-24 13:09:35 +02:00
6a151c1866 Removed the "effects" settings for statically defined fiber displacement effects.
These things will now be possible using nodes.
2016-07-24 09:52:19 +02:00
3047d36d72 Fix shader updating, needs a tag reset after invalidating the shader. 2016-07-24 09:51:49 +02:00
125abd4a94 Fix debug geometry shader for strands.
This geometry shader must be used regardless of the "use geometry shader" setting
for the primary shader.
2016-07-24 09:31:26 +02:00
546d12cee1 Fallback displacement function for the strands shader if no nodetree is available. 2016-07-24 09:23:32 +02:00
bb3c8afb77 Depsgraph integration for hair strand nodes (horrible).
The depsgraph now invalidates the strand shader when the nodes are changed.
As mentioned in the previous commit, this happens through an operation in
the object GEOMETRY component for each strand modifier. This is messy, only
useful until we have truly granular modifier integration in the depsgraph.

Invalidating the shader is currently done just by setting a flag. The actual
freeing and subsequent lazy-rebuild of the shader is done in the drawing
thread, because during the threaded depsgraph update we don't have a valid
OpenGL context. This needs to be sorted out for future viewport recode.
2016-07-23 17:24:35 +02:00
bcc3cc8c8f Revert "Remove redundant dependency declaration from pynodes, which creates a circular dependency."
This reverts commit ca85cb436d.

Reverting the commit will break depsgraph updates for regular bvm functions again, but is necessary
for making shader updates working. The problem here is that the update operations for _dependent_
data (bvm functions, shaders, etc.) should not actually be part of the node tree, but of the
respective dependent data components! So the previous method of invalidating shaders as part
of the node tree operations is incorrect and the operation should be moved to some other place.
Perhaps we need a dedicated depsnode for the bvm function cache, since there is no single "owner"
of these functions that could take care of invalidation in the depsgraph.
2016-07-23 14:30:40 +02:00
19ad6a4570 Implementation of basic math functions for GLSL code generation from nodes. 2016-07-23 09:03:52 +02:00
01f5b367cf Each node gets expanded to two function calls for autodiff.
The value is calculated without any derivative inputs (this is not a differential equation).
The derivatives in both variables also depend on the partial derivatives of the inputs.
2016-07-21 20:16:58 +02:00
f53dc5a34b Incorporate the generated GLSL code for hair displacement into the strands vertex shader. 2016-07-21 18:32:19 +02:00
74e21867ff Emit function calls for each node.
Base functions are yet to be defined.
2016-07-21 18:03:16 +02:00
831a4a3f96 Support dual values for autodiff'ing in GLSL codegen right from the start.
Note that for the hair displacement function we would only be interested
in a single derivative (the tangent). For now we just use the existing
2-variable duals, later on this can be generalized to avoid unnecessary
and confusing code emission.
2016-07-21 17:38:33 +02:00
878c339cde First steps for the GLSL code generator and hair displacement nodes. 2016-07-21 15:33:01 +02:00
b044546587 Node API for generating hair deformation GLSL code.
This is just a stub atm. The BVM system will use nodes to generate
a GLSL function, which can then be inserted into and compiled with
a framework shader. The deformation function itself is just a simple
expression (with autodiff for tangents), so it doesn't need to know
about the topology of index buffers and the like.
2016-07-20 12:15:54 +02:00
454cae8361 Smarter handling of debug_mode enum in the debugging utility script. 2016-07-20 12:14:07 +02:00
c4f85627c3 New code generator for GLSL code.
This can be used as part of shaders.
2016-07-20 12:13:44 +02:00
89dd3022d1 Merge branch 'strand_gpu' into strand_nodes 2016-07-20 10:36:04 +02:00
dac67e2fed Merge branch 'strand_editmode' into strand_gpu 2016-07-20 09:45:22 +02:00
07cffae7ea Fix for uninitialized v_mirr variable when using edge strokes with mirroring. 2016-07-20 09:44:39 +02:00
a655c3520b Merge branch 'strand_gpu' into strand_nodes 2016-07-19 17:13:10 +02:00
3467f8fb82 Fix unfreed memory due to incorrect pointer checks. 2016-07-19 17:12:08 +02:00
28e06bbe61 Handle replacement of the shader cache for strands outside the creation function.
This makes it easier to run preparation code outside the gpu module conditionally.
2016-07-19 17:10:13 +02:00
99c1b7b5f4 Added new node tree type for hair nodes. 2016-07-19 13:25:33 +02:00
571c9d7520 Merge branch 'master' into strand_nodes 2016-07-19 11:43:27 +02:00
dcb4ca500f Merge branch 'master' into object_nodes 2016-07-19 11:43:07 +02:00
e7855556e1 Merge branch 'master' into strand_gpu 2016-07-19 11:42:59 +02:00
1b431c3cfe Merge branch 'master' into strand_editmode 2016-07-19 11:42:52 +02:00
ecebe940e0 Merge branch 'strand_gpu' into strand_nodes 2016-07-19 11:09:26 +02:00
41cc366010 Merge branch 'master' into object_nodes 2016-07-19 10:53:34 +02:00
e226318e03 Merge branch 'master' into strand_gpu 2016-07-19 10:32:35 +02:00
dd1211ecb8 Merge branch 'master' into strand_editmode 2016-07-19 10:32:23 +02:00
44efcddec5 Fix incorrect tangent calculations for the "curl" effect.
The result for tangents under a mix transformation is essentially a mix
of the original and target tangents, plus a shape correction term.
2016-07-18 17:16:19 +02:00
b05fb30614 Better fix for uninitialized variables.
The previous one probably only works because there are currently no more
than 3 valid control curves for each fiber, so the 4th one resets the
cumulative values to 0.0.
2016-07-17 17:28:39 +02:00
01725d4d52 Fix some uninitialized variables, leading to incorrect tangents for strands shading. 2016-07-17 17:04:23 +02:00
065b1d06e3 Fix for strand curve interpolation length.
The shader was overshooting the actual strand length by one segment.
2016-07-17 14:02:26 +02:00
e7ff0f2e86 Removed unused utility function. 2016-07-17 12:40:40 +02:00
f59f6553cc Fix for calculation of the view vector in strand shading.
The product with the model-view matrix must take translation into account.
2016-07-17 12:37:39 +02:00
71fce3c784 Augmentation of the strand shader with a debugging shader.
The debug shader shares most code with the regular shader. It uses a
geometry shader pass to create extra vector lines.
2016-07-17 11:46:40 +02:00
7c244008ee Cleanup for nicer code structure in the strand vertex shader. 2016-07-17 08:55:32 +02:00
9f69daff40 Use a converter class for handling differences between DNA and BMesh strands data.
This moves most of the data access logic for this data out of the GPU code and into
the respective BKE files. The concept is similar to how DerivedMesh is used in other
GPU code.
2016-07-16 12:19:02 +02:00
58f732231f Deduplication of strand drawing functions.
The two variants for object and edit mode are the same, except for
setting the edit data in the parameters.
2016-07-15 12:51:07 +02:00
66f8e8734b Removed deprecated editmode drawing code.
The only real missing feature from this code is drawing points and
selection state, which can be reimplemented quite easily.
2016-07-15 12:44:45 +02:00
060617232d New option for selecting a fiber rendering primitive.
Currently lines and ribbons (triangle strips) are supported.
The ribbon width can be controlled with a parameter. Ribbons are
oriented toward the camera, similar to billboards, but shaded like lines
with the Kajiya shader imitating a reflective tube.
2016-07-15 12:30:04 +02:00
5a3fabdfce Removed a couple of unused fiber curve attribute buffers. 2016-07-14 17:04:43 +02:00
7ba393651f More detailed invalidation function for strand draw data.
Currently only used in its broadest form for freeing the whole buffer,
but could be used in the future to selectively invalidate parts of the
data, to avoid costly uploading of large but static buffers.
2016-07-14 16:46:58 +02:00
8d77fe834b Cleanup: Move code for strand drawing buffers into its own file.
The gpu_buffers.c file is becoming too large, and incorporates all the logic
from meshes and now strands, which should be separate from the API.

Making the strands buffer code separate also allows much more control,
e.g. for partially invalidating draw data and avoiding unnecessary buffer
uploads to the GPU.
2016-07-14 12:38:04 +02:00
a685642e54 Merge branch 'strand_editmode' into strand_gpu 2016-07-14 10:00:07 +02:00
1d28579daf Merge branch 'mesh_samples' into strand_editmode 2016-07-14 09:59:52 +02:00
48fc8b76b2 Merge branch 'master' into strand_editmode 2016-07-14 09:57:38 +02:00
bd4ca21b54 Merge branch 'master' into mesh_samples 2016-07-14 09:56:58 +02:00
28270f0953 Replace the deprecated TessFace usage for mesh sampling by LoopTri.
Also make sure a valid generator instance for random sampling is always
returned, regardless of triangle counts.
2016-07-14 09:55:18 +02:00
813a6568aa Fix crashes when generating fibers without any control curves present. 2016-07-13 18:38:35 +02:00
c88dcfbdf1 Fix crash when adding a strands modifier and the fiber vertex/edge buffer is NULL.
The NULL buffer pointer is expected, just needs a sanity check.
2016-07-13 18:27:54 +02:00
a7a07c1e67 Merge branch 'strand_editmode' into strand_gpu 2016-07-13 16:50:38 +02:00
2f596756b7 Merge branch 'master' into strand_editmode 2016-07-13 16:50:23 +02:00
3c336bb41f Fix for incorrect buffer size calculation.
The fiber vertex buffer was calculated more than 10x bigger than necessary ...
2016-07-13 15:00:20 +02:00
1942c2c2cf Implementation of Curl effect for vertex displacement. 2016-07-13 14:01:01 +02:00
b0ba1328b4 Ensure correct storage of curve normals and tangents with edit BMesh curves. 2016-07-13 05:33:18 +02:00
007a2e09c0 Common control curve interpolation utility function. 2016-07-12 13:00:46 +02:00
08f18a52c2 Store buffer textures for the rotating frame on control curves.
This frame will allow better deformation effects for bent curves.
2016-07-12 11:50:42 +02:00
26ceb98ced Use DynString to "include" shared code in the strand vert/geom/frag shaders.
This way we can avoid duplicate code for effects without going out of sync.
2016-07-12 08:09:08 +02:00
062e52b8ee Alternative implementation for strand fiber interpolation without a geometry shader.
Geometry shaders easily become performance bottlenecks, for in-depth explanation see e.g.

http://gamedev.stackexchange.com/a/48434
http://rastergrid.com/blog/2010/09/history-of-hardware-tessellation/

The geometry shader was used so far for generating the fiber geometry (line strips)
from just the root vertices. Without a geometry shader every vertex has to be put into
a buffer and uploaded to the GPU (we could use a tesselation shader to cut down on size,
but that remains to be decided later if OpenGL 4.x is available).

To limit the size of this vertex buffer, the vertices contain only minimal necessary
information: an index for the fiber curve, and an interpolation curve parammeter in [0.0, 1.0].
The locations of vertices are interpolated in the vertex shader using texture lookups.
A range of textures encode all the necessary per-fiber attributes, in particular the
interpolation indices and weights wrt. control curves. These control curves are stored in
yet another texture (as is the case with the geometry shader too).

Initial performance seems to improve drastically without the geometry shader.
2016-07-11 21:08:14 +02:00
fd603e4f21 Added "effects" to the hair modifier for testing deformation of the hair in the shader.
These features will ultimately be implemented through nodes, but they are quite useful
for testing the shading itself and the performance.
2016-07-11 09:22:22 +02:00
10e4fb01f5 A couple of additional per-fiber attributes, for deforming strand fibers.
The orientation of the hair root ("root space") as well as a parametric
distance on the scalp to the primary deforming hair are passed to the
vertex shader. These value will allow deformation modifiers to be applied
for things like noise and clumping.
2016-07-10 09:47:50 +02:00
0ba42d944b Fix broken attribute disabling when some of the attributes are implicit.
The vertex attributes for the fiber buffer use the gl_Vertex builtin variable
of GLSL instead of an explicit named attribute input. The corresponding index
then is -1. The following attributes still need to be disabled however.
2016-07-09 18:25:14 +02:00
ed2e8f59a7 Enum property for selecting among the available hair shader models.
Available choices are the "classic" particle shading (bogus, but useful
for comparison), Kajiya, and Marschner. The Marschner model is not yet
implemented.
2016-07-09 14:41:04 +02:00
56ad4520cd Merge branch 'master' into strand_editmode 2016-07-09 09:09:47 +02:00
08ad6e5ad6 Merge branch 'master' into strand_gpu 2016-07-09 09:01:50 +02:00
1bf602dcd2 Fix unfreed curve cache in edit mode drawing. 2016-07-08 16:26:34 +02:00
bbe11e3949 Unified buffer creation for drawing strands in object and edit mode.
Control strands are now drawn without subdivision. Control and fiber
strands get their own vertex buffers for this purpose.

The intermediate StrandData has been removed, because it is just
redundant storage of the draw data buffers. The results in StrandData
are not used for further editing, so there is really no point in
keeping them around.
2016-07-08 16:22:21 +02:00
fa1abf564e update "bound" flag of GPU strand shaders
Not sure how useful it is to track this. Just making it consistent.

"bound" only stays in sync with GL if we are careful to use the
GPU_strand_shader_bind/unbind functions. Rogue calls to GPU_shader_bind
update GL's state without updating strand shader's "bound" flag.
2016-07-07 20:22:13 -04:00
f037fdfa53 initialize variables before use
Now builds with MSVC 2015 (was treating warning as error).

Strand root returned from this function is safer: NULL when len <= 0.
2016-07-07 19:20:57 -04:00
3b9a513068 Subdivision for strand fibers.
This is not supported for the edit mode fibers yet. Unifying the buffer creation
here would help a great deal.
2016-07-07 20:33:46 +02:00
50dc534f0e Implementation of the Kajiya-Kay shading model for hair strands.
This is a common simple shading model defined by Kajiya and Kay in
"Rendering fur with three dimensional textures." (1989)

This model in particular defines specular highlights for reflective
thin cylinders (strands), which gives a much more hair-like appearance
in the viewport. More advanced models (Marschner et. al.) improve this
further, in particular the diffuse term.
2016-07-07 11:17:11 +02:00
20eb199285 Fragment shader emulation of the current particle hair shading method.
This is a terrible shading method, using the curve tangent as a "normal" vector.
With the old particle hair this was a compromise, because line drawing does not
support nicer shading in the fixed-function pipeline. With GLSL shaders this
is just a quick starting point, and useful for comparison with the old shading.
2016-07-07 09:30:32 +02:00
0d6c8dd8e9 Refactoring: Renamed the "StrandRoot" arrays to "StrandFiber" for clarity.
The strand system contains 2 levels of curve geometry:
- "Strands" are the abstract control strands, editable by the user and thus few in number.
- "Fibers" are renderable curves, generated based on those strands.

"Roots" now is used exclusively for hair follicles, which are attached to
the scalp mesh, i.e. follow the mesh deformation.
2016-07-07 07:50:51 +02:00
d9589a5304 Enable render strand display during hair edit mode. 2016-07-06 16:48:16 +02:00
6621546d0c Store a copy of the strand roots array in the strand edit data.
This will allow the edit mode to display render strands as well.
The roots may later be re-scattered or otherwise modified during editing,
and are eventually copied back to the Strands data when applying edits.
2016-07-06 16:34:12 +02:00
48da262d05 Clear the edit draw data on updates, to make edit mode changes visible. 2016-07-06 12:00:22 +02:00
3f052c6ab3 GPU buffer functions for drawing a strand edit BMesh.
Now the object mode and edit mode for strands use the same drawing code.
Derived render strands are not yet supported (they may need re-scattering
during editing) and the tool settings have no effect yet.
2016-07-06 11:47:43 +02:00
0f0d1ee005 Renamed BMesh strand functions to replace deprecated particle term 'keys' by 'vertex'. 2016-07-06 11:18:03 +02:00
aea3c65160 Do strand and editstrand drawing in the same place, so they are not shown both. 2016-07-06 09:12:10 +02:00
db145f8ec6 Support for the Strand data structure in the hair editmode. 2016-07-05 20:41:26 +02:00
5ad6ab98cd Merge branch 'strand_editmode' into strand_gpu_editmode 2016-07-05 10:47:24 +02:00
01791b6956 Merge branch 'master' into strand_gpu 2016-07-05 10:04:19 +02:00
4e95617769 Merge branch 'master' into strand_editmode 2016-07-05 09:53:24 +02:00
dd02fbddf5 Use consistent checks for valid attribute index. 2016-07-05 08:45:33 +02:00
a556f2f5ec Argument for enabling integer buffers when setting attributes.
Mesh attributes seem to be using float buffers for everything.
2016-07-05 08:43:04 +02:00
7e77787e77 Removed the deprecated curve-loop shader variant. 2016-07-05 08:11:25 +02:00
20e94fd1ba Removed debug shader code. 2016-07-05 07:21:21 +02:00
ca8da1d303 Working interpolation code for strands. 2016-07-04 17:32:56 +02:00
a7ce29b412 Various fixes for GL state and some basic texture lookups in the strand geometry shader. 2016-07-04 10:04:29 +02:00
0f5b6bdbc1 Fix for integer attribute uploading in gpu code.
OpenGL has a separate function for integer attribute pointers.
If the float attribute version is used, the attribute data will be
interpreted and floats and converted to integer values, which
garbles the content of any true int/uint buffer.
2016-07-04 10:02:10 +02:00
9fdf0cf086 Increase soft limit for control strand number for testing. 2016-07-04 10:00:42 +02:00
4fbebd6c09 Use an additional texture buffer for storing curve indices.
The geometry shader will need to do 2 texture lookups per control,
first for getting the control curve start and length, then for
reading the appropriate curve vertices.
2016-07-02 14:46:18 +02:00
6a210450fd Use the correct buffer for the control points texture.
Also a bit of cleanup renaming to use "control" consistently instead
of "guide".
2016-07-02 14:32:19 +02:00
ef8c8a8b66 Modified the guide strand creation operator to allow shorter-than-max strands.
The guide strand format may change, but it should allow varying numbers of control
points.
2016-07-02 14:16:46 +02:00
f2eb589201 Calculate barycentric interpolation weights using a simple kdTree method.
This method uses the 3 closest points on the scalp for defining interpolation
weights. This method has drawbacks in cases of thin geometry, but it is
simple to implement.
2016-07-02 12:15:04 +02:00
976c0cd42d Vertex attributes for the strand root points.
These attributes carry information for interpolating guide strands
in the geometry shader. Each strand can have up to 4 guide strands
(identified by index) with a normalized weight for each.
2016-07-02 10:32:04 +02:00
31298b7549 Generate a buffer texture for passing the control strand locations to the shader.
This should enable the strand geometry shader to interpolate control strands
with appropriate vertex attributes for indices and weights.
2016-07-01 17:12:12 +02:00
3754083e74 Use separate buffers for control strand and root vertices.
This is important so we can put control strands into a buffer texture,
and pass it to the geometry shader for generating strands.
2016-07-01 12:43:46 +02:00
6aeb5fc1f4 Start off with some very simple own code for vert/frag/geom strand shader. 2016-07-01 12:28:44 +02:00
fe6a447b24 Draw render strands as simple point primitives.
The geometry shader will eventually turn these points into full strand curves.
2016-07-01 11:04:47 +02:00
068aa21e12 Generate a number of "roots" for render hairs on the mesh surface.
These root points will be used as input for the strand shader to generate
the interpolated render strands.
2016-07-01 10:00:07 +02:00
c2491f0d8f Use the show_control_strands toggle for switching control hair display on/off.
Also use the basic edge shader for control hairs, the generated GLSL shader is
only needed for drawing render strands.
2016-07-01 08:58:56 +02:00
87b65f1324 Intermediate struct StrandData for storing base data for drawing.
This is equivalent to the DerivedMesh stage in the Mesh -> DM -> GPUBuffer
pipeline. The Strands struct is the base editable user data, StrandsData
is preprocessed data with evaluated root matrices and applied for object
space drawing.
2016-06-30 18:37:45 +02:00
666fe947af GPU code for vertex and edge buffers of strands.
This is a modification of the DerivedMesh code, which relies too much
on the DerivedMesh data structure to be used directly.
2016-06-30 13:12:21 +02:00
9fe691934f Test operator for quickly initializing the strands data.
This is just a temporary test operator, to be removed later when
edit mode and other mechanisms exist to generate useful strands.
2016-06-29 18:55:50 +02:00
7b7cef9863 Use plain vertex and curve arrays in Strands data, so that they can be used as OpenGL buffers. 2016-06-29 18:02:42 +02:00
e3781b3ab3 Own file for strand drawing code to avoid polluting drawobject.c even more. 2016-06-29 17:37:04 +02:00
90761e3e75 Skeleton GPU code for creating a special hair shader.
This will include a geometry shader as well as vertex/fragment shaders,
for efficiently generating strand geometry based on control strands.
2016-06-29 17:23:32 +02:00
328eacc5f1 Flag for enabling control strand display.
Currently still unused.
2016-06-29 11:08:23 +02:00
e96c24fea3 Use the Strands modifier as a simple container for strand control curves.
These curves are NOT intended for final rendering! They are abstract
editable data (control strands) from which the "actual" visible strands
have to be generated in some way.

This is largely equivalent to the parent/child dichotomy in old particles,
but enforces the separation right from the start (control curves are never
rendered).
2016-06-29 10:40:20 +02:00
b0bbde6791 Stub modifier for testing strand geometry generation.
Modifier is not ideal, but easiest way to test code due to lack of
infrastructure in Object for node-generated data.
2016-06-28 18:03:01 +02:00
548dfdbd31 Merge branch 'master' into mesh_samples 2016-06-28 11:17:44 +02:00
73140ca283 Merge branch 'master' into strand_editmode 2016-06-27 10:52:10 +02:00
794cbb2790 Minor whitespace fix. 2016-06-26 12:45:51 +02:00
0dbafd1fe5 Added object nodes for looking up an object and transform from global data. 2016-06-24 16:19:23 +02:00
c97a25b206 LLVM TypeBuilder and copy function for node_counted_ptr.
Using a DerivedMesh directly for mesh data isn't so great because
the lifetime of a DM is not necessarily known at compile time, depending
on branching. node_counted_ptr is basically a simplified shared_ptr variant.
2016-06-24 14:45:53 +02:00
af27ce2497 Use a hash table to register external functions with the LLVM engine.
This will allow using BLI/BKE code for complex data types, such as DerivedMesh.
2016-06-24 10:23:30 +02:00
0f868ea6b6 Include mesh opcode functions in modules.
Modifier functions with variable expression inputs are disabled,
until DerivedMesh handling through LLVM is implemented.
2016-06-24 10:23:03 +02:00
0f9c5bdb5c Fix graph return values: Not all value types are returned as duals. 2016-06-23 19:16:40 +02:00
11bbcce929 Fix for graph function signature: use pointers also for aggregate and struct types. 2016-06-23 18:36:10 +02:00
0be2c2a89a Use the LLVM backend for modifier nodes.
This currently fails, because the actual mesh nodes are not yet implemented
in the LLVM backend.
2016-06-23 13:43:25 +02:00
cf27fdb659 Reduce repetitive code in the C API by defining static node graph signatures.
Node graph inputs/outputs are now defined statically and graph instances
can be constructed by passing these as ArrayRefs. The code for compiling
various node graph types can then be unified.
2016-06-23 12:36:05 +02:00
48038ee8a5 More codegen implementations for basic functions.
* float/int conversion
* float3/float4 getters and setters
2016-06-22 18:25:37 +02:00
d86efe5830 Removed unused source file. 2016-06-22 12:35:57 +02:00
d2e2ec766f Use load/store for float3 and float4 to generate a bit nicer code.
It's unclear if the same can be done for larger aggregate types like matrix44.
2016-06-21 17:42:27 +02:00
13a84fcb33 Define names for most values in generated LLVM code.
These are purely for debugging the code, they help a lot in reading
LLVM dumps.
2016-06-21 16:50:04 +02:00
e4dea76bdd New CodeGenerator implementation for replacing the old BVM compiler. 2016-06-20 17:38:37 +02:00
075f60c6f5 Moved old bvm codegen and function files into bvm module.
The intern and compile modules are now truly independent from backends (llvm and bvm).
2016-06-19 14:50:05 +02:00
ff3c066324 Refactor of the node graph compiler class, to have a backend-agnostic base.
The main compiler class is now itself independent of LLVM and can be used for
future backends. The implementation of specific behavior (values, statements, etc.)
happens through a CodeGenerator implementation. This also uses aggregation rather
than inheritance on the compiler class part (which is not a virtual class itself).
2016-06-18 12:41:06 +02:00
e197ce618b Merge branch 'master' into object_nodes 2016-06-16 09:18:40 +02:00
926819d82f Use a Scope concept for avoiding codegen for existing nodes.
Rather than a single socket value map, use a "scope" to keep track of which
nodes are already generated. This reintroduces the "block" idea from earlier
versions, but at the later codegen stage rather than the node graph.

Describing scope on the level of nodes becomes quite clumsy and ambiguous,
and moves nodes further away from the UI representation. The compiler can
handle this more elegantly without requiring persistent data.

Scopes can be nested. This is not used yet, but will allow scoped variables
later on, where the variables being used for a node path depend on its scope.
2016-06-16 09:10:35 +02:00
5963c56967 Removed/Disabled some deprecated code. 2016-06-12 14:50:54 +02:00
989810f312 Disabled compiling and eval of broken BVM functions, to simplify debugging until they can be reimplemented. 2016-06-10 11:07:55 +02:00
6666b84182 Use persistent pass managers for optimization, rather than creating them every time. 2016-06-09 16:11:18 +02:00
c590f30623 Set a target triple and data layout for modules.
According to the site below, this is necessary for proper optimization.

http://llvm.org/docs/Frontend/PerformanceTips.html
2016-06-09 15:44:39 +02:00
6d4dd66d1f Generalized code generation for nodes to support more complex control flow in the future.
The basic idea is that a node represents a function F, without assuming anything about
how the input expressions are evaluated:

F = F()

In most common case this function can be decomposed and defined in terms of concrete values,
which are given by the input expressions:

F = F'(G1(), G2(), ...), where Gn are the respective inputs of the node

This is a first *very* naive implementation. It would rely heavily on common-subexpression-
elimination (CSE) to avoid generating the same code paths over and over again. There should
probably be some initial optimization on the BVM node level instead of relying just on LLVM passes.

The purpose of this generalization is to allow more complicated control flow inside node functions.
Nodes would then also be able to take additional variable arguments (e.g. an index), which can
be modified before being used as internal arguments for input expressions.
2016-06-09 12:29:27 +02:00
a6fdd7d876 Merge branch 'master' into object_nodes 2016-06-08 09:41:04 +02:00
95a603c607 Basic Gabor noise implementation for BLI_noise and blenvm.
This is just the very basic version of the sparse convolution noise
with a Gabor kernel. It does not yet have derivatives or anisotropic
filtering. The only frequency spectrum implemented atm is isotropic
band-limited noise.
2016-06-08 09:14:07 +02:00
ee58ba226e Removed cmake macro entry for deleted bf_blenvm_llvm_modules. 2016-06-03 10:24:14 +02:00
570bbf680a Support for image sampling in the LLVM backend.
This reintroduces the "globals" concept for mapping ID datablocks with
a consistent permanent identifier key.
2016-06-02 17:30:33 +02:00
8fda725b18 Fix invalid function signature when passing derivatives for types that don't support them. 2016-06-02 14:58:19 +02:00
de09b75175 Unify code generation through the llvm API.
Also standard functions for copying and zeroing values are now
implemented per type rather than relying on a simple load/store.
This will become more important with larger aggregate types such as matrix44.
2016-06-01 16:36:17 +02:00
318201968f Removed the unused "simple" (without derivatives) compiler implementation.
As long as the compiler class is WIP the two implementations go out of sync too
easily. Better to make a copy of the dual version and then reduce it when the
compiler class is reasonably stable.
2016-05-31 10:33:30 +02:00
926bdb8a05 Removed the WITH_IRMODULES option, used previously for loading IR code from text files.
This approach suffers from difficulty of generating machine-independent IR code
and is better generated using the C++ API directly. The llc tool can be used to suggest
implementations with C++ API usage, see for example
http://fdiv.net/2012/11/16/llvm-generates-code-that-generates-code
2016-05-31 10:09:35 +02:00
37db749fa6 Merge branch 'master' into object_nodes 2016-05-30 16:36:07 +02:00
d8e0006237 Generate names for formal function parameters to make LLVM output more readable.
Note that these names are not identifiers and don't have to be unique, their only
purpose is to aid in understanding the generated LLVM code.
2016-05-29 13:34:02 +02:00
bdd9bff0b3 Replace function signature for dual values with a flattened sequence of basic types.
This avoids the allocation of aggregate struct space for duals and allows better
optimizations.
2016-05-29 11:29:02 +02:00
ded2b507a1 Move the node-output-to-value map into compiler subclasses.
This is in preparation for specializing the value types of compiler implementations,
so that we can replace dual struct types with independent llvm values.
2016-05-28 11:29:01 +02:00
ac7d221734 Rename NodeValue to NodeConstant, to make it more consistent with LLVM naming. 2016-05-28 08:22:11 +02:00
b7bb0a0c4d Cleanup: use argument pointers for aggregate base types. 2016-05-27 17:20:52 +02:00
d8aaed17eb Merge branch 'master' into object_nodes 2016-05-27 16:01:49 +02:00
e6777be1d1 Derivatives for all the basic math node functions. 2016-05-27 12:26:05 +02:00
61b728a199 Small fixes for compiler errors in VS2013. 2016-05-27 11:01:37 +02:00
f40b79378c Use a more consistent naming scheme for value and derivative functions with prefixes. 2016-05-27 09:37:24 +02:00
d5408d7b13 Another depsgraph fix, internal texture relations need to be built explicitly.
Like node trees, textures are only optionally constructed in the depsgraph when something
uses them. When a modifier (or other potential future user of the "handle" system)
declares a texture dependency, the internal relations of that texture are not necessarily built -
this only happens when the texture is part of a material texture stack. So we need to also
construct the internal texture relations (lazy init) in addition to the external modifier->texture
dependency.
2016-05-27 09:06:39 +02:00
2b9d5205e6 Fix for node group updates: need to force-update the group node because of crappy node update system. 2016-05-26 15:17:40 +02:00
ce8c882509 Fix node tree group relations.
Recent commits removed an important depsgraph relation between a node group and its tree.
2016-05-26 14:52:26 +02:00
ae8bde9f09 Fix for pynode group registration.
Because pynode groups now use the bl_idname of tree types rather than
expecting a python class attribute, these tree types need to be registered
*before* generating node group classes. Messy stuff, needs some rewriting.
2016-05-26 09:01:49 +02:00
3960e5671d Fix for depsgraph building of modifiers, missing nodes for ID blocks (textures).
The updateDepsgraph callback for modifiers needs to be used in both passes of
depsgraph building, once for creating nodes and then for relations. Without the
initial node building pass some datablocks like textures can be missing, if they
are not incidentally built by other means such as a render texture.
2016-05-26 08:45:50 +02:00
8478d4127e Use (1,0,0) and (0,1,0) as derivatives of texvec when no explicit derivatives are given.
This is a bit stupid, but allows testing the system without major changes
to old textures or the displacement modifier.
2016-05-25 17:34:46 +02:00
0e30440080 New node "Get Derivative" for using a derivative as the value.
This is mostly a debugging feature for getting visual feedback about
the derivatives. The function doesn't work in the regular scheme of
decomposing a function into the value and derivative parts, so it is
only implemented in the internal IR (making it directly inlineable).
2016-05-25 17:20:50 +02:00
cabcfb0062 Use the common BVM_DEFINE_ALL_OPCODES macro to simplify node->opcode mapping. 2016-05-25 12:10:58 +02:00
09385dcda0 Fix for uninitialized variable and removed some unused code. 2016-05-25 11:58:09 +02:00
f8ef1f0d09 Straightforward texture eval function in BKE for getting texture results with derivatives. 2016-05-25 10:35:37 +02:00
2030217042 Use derivative functions for calculating dual values using the forward accumulation method.
Only a few functions have derivatives defined yet.
2016-05-24 18:14:11 +02:00
3dae50bc4c Cleanup: Remove the unnecessary compiler subclasses for final instantiation. 2016-05-24 12:07:31 +02:00
f19a6f39c5 Cleanup: renamed "codegen" files to "compiler" and split the implementation. 2016-05-24 11:36:16 +02:00
0e8cd49e3b Move IR function implementations using the LLVM api into modules.h. 2016-05-24 10:58:31 +02:00
ee9797808c Generate wrapper functions in LLVM for converting dual types to primitives.
Currently Dual2 arguments are structs with the main value and 2 derivatives
in x and y. Node functions will generally be implemented using the base types,
so the value and derivatives have to be extracted and later combined using
the chain rule.
2016-05-23 15:07:44 +02:00
fd6a3c863f Generate dual values for input constants to match the declared function signatures.
Note that actual functions currently don't use Dual2<> values, but because they
only read/write the 'value' field it works anyway ...
2016-05-20 08:00:38 +02:00
cdda6bd19a Fix module linking: initialize the node graph module right away to avoid repeating code. 2016-05-19 18:34:08 +02:00
d98433c467 Leave the decision about passing arguments by pointer to the compiler class too.
This removes the last "global" type function, so all the details of types are now
decided in the compiler implementation subclass.
2016-05-19 18:22:53 +02:00
8a790c2b86 Removed unused codegen_begin/end functions. 2016-05-19 18:06:56 +02:00
bf007badbf Define a separate node function module for every compiler type.
This means we can have differing implementations for every potential use
of nodes, such as plain value functions vs. dual values with derivatives.

Node functions for each compiler type are stored in a static map and are
lazy-initialized on the first node graph compilation.
2016-05-19 18:04:21 +02:00
d54b4d2532 Pass texture arguments and return values as dual values.
Currently only the value part is actually accessed. Using dual values
allows the node graph to handle input/output arguments are single a
single llvm::Value instance.
2016-05-19 11:52:48 +02:00
030a327f40 Preparatory changes for differing node compiler implementations.
Uses some virtual functions of the node compiler to allow different
implementation of values. This will be used for calculating values
and partial derivatives in texture nodes.
2016-05-18 17:40:55 +02:00
ce022f4506 Use a TypeSpec pointer for structure fields rather than direct storage. 2016-05-18 11:28:50 +02:00
2ade7d5815 Type system refactor: Use a global type definition map instead of defining each type locally. 2016-05-18 08:03:47 +02:00
076564e5bd Merge branch 'master' into object_nodes 2016-05-16 12:45:24 +02:00
82fc0e02ab Cleanup: removed some unused code. 2016-05-16 12:44:25 +02:00
a601d5d18f Enable the new depsgraph by default.
The blenvm system depends on the new depsgraph, so it doesn't make sense
to have to enable it every time.

The legacy depsgraph can still be switched back on by the --enable-legacy-depsgraph option.
2016-05-16 12:37:14 +02:00
97681db89f Internal definition of commonly used node functions, so that LLVM can optimize better.
This currently includes just a few 'value' nodes, but should be extended as much as feasible.
In particular many vector functions can be split component-wise.
2016-05-14 19:49:57 +02:00
be79a6886b Implemented common procedural texture patterns for LLVM. 2016-05-14 12:44:35 +02:00
df2a739a86 Include all module functions in a single header for convenience. 2016-05-14 10:25:56 +02:00
b9ad0b94c0 Simple coordinate input node for texture nodes. 2016-05-14 09:55:20 +02:00
939810add5 Handle all node type kinds appropriately.
The LLVM backend also supports PASS nodes, even though these are usually
removed from the node graph in a preprocessing step for clarity.

ARG nodes have their output values mapped in advance, so no extra code
needs to be generated for them.
2016-05-14 09:53:33 +02:00
2d9bad03b7 Fix incorrect argument order for vector/color constructor functions. 2016-05-14 09:52:38 +02:00
d435274887 Replaced mix of bool type flags for node types with a single enum for special kinds of nodes. 2016-05-14 09:09:05 +02:00
83b1b3417b Implemented math functions for the LLVM backend. 2016-05-13 18:08:02 +02:00
da70902731 Fix for missing notifier application on texture node trees.
The pynodes tree does not have the static NTREE_TEXTURE type set.
2016-05-13 15:48:24 +02:00
9616b72e57 Fix node socket update callbacks exiting early because of missing output connection.
Outputs are currently identified in the nodes via the DO_OUTPUT flag. This is not
nicely accessible for pynodes and needs to be reimplemented in a proper way.
Until then this optimization for node recalculation should just be ignored for texnodes,
so nodes now have a callback for checking usage, and will always be considered used by default.
2016-05-13 15:46:15 +02:00
ca85cb436d Remove redundant dependency declaration from pynodes, which creates a circular dependency.
Previously the "parameters" depsnode was the POST operation for node trees, but has now
been supplanted by the cache invalidation node. Making an explicit dependency on the component
thus creates a cycle.
2016-05-13 11:22:00 +02:00
464505174b Switch texture nodes to a pynodes implementation.
This also removes the static bNodeTree type definition C, because
BVM requires some functions that are best defined in python (and it
would have been switched eventually anyway).
2016-05-13 11:15:54 +02:00
545413d8e8 Removed texture nodes.
The node tree type is left alone for now, only the node types are removed.
2016-05-13 07:53:03 +02:00
0e974d6e91 Define the base opcode functions for LLVM and use util_ files for types. 2016-05-12 19:26:03 +02:00
0e7c9a93ae Split opcode macro into thematic sections to make it easier to handle them in parts. 2016-05-12 18:17:32 +02:00
2d3f526403 More meaningful dependencies between node tree parameters and cache-invalidation operations, and textures that use them. 2016-05-12 17:56:54 +02:00
894511d568 Fix for regenerating functions with MCJIT.
LLVM was reusing old machine code, apparently regenerating it explicitly
with EE->generateCodeForModule() fixes this.
2016-05-12 17:51:54 +02:00
436e84a12c Fix for node function invalidation through the depsgraph.
We have two separate caches for bvm and llvm backend, both of them
might contain a function for the node tree.
2016-05-12 16:50:43 +02:00
50a244951b Merge branch 'master' into object_nodes 2016-05-12 09:56:05 +02:00
f49b698e87 Merge branch 'master' into object_nodes 2016-05-11 11:47:42 +02:00
e23c508f1c Fix the module.cc file. 2016-05-11 10:15:50 +02:00
38c5bf5f63 Small fix for llvm file includes. 2016-05-11 10:14:41 +02:00
c3888a6eaf Silence a few (false positive) compiler warnings about uninitialized variables. 2016-05-11 08:48:54 +02:00
948e0cfea8 Cleanup: removed unused code for struct return values and pointer arguments. 2016-05-10 11:24:33 +02:00
2556262f6c Implemented external C function linking and change of function signature convention.
The general signature layout for node functions is

void foobar(out1_t *out1, out2_t *out2, ..., in1_t in1, in2_t in2, ...);

All outputs are passed as pointers or references (using references in C code for clarity).
Inputs can be passed by-value or as const pointers/references (for structs and arrays).

In the future we may also support single value return types for convenience.
2016-05-10 11:14:50 +02:00
b220c9e5c6 Moved type definition functions for LLVM types into own file. 2016-05-09 09:12:37 +02:00
24b78398cf Disable IR module loading for blenvm by default (with a compile option).
Base modules for nodes will instead be declared as external functions with regular
linkage through C code. This means some potential for low-level optimization might be lost,
but this shouldn't be a big problem as long as node functions don't get too complex
(which means they should be split up in the first place).

IR module loading is not the real issue, but generating the IR code from C/C++ code
in a generic way is not so easy. In the future we may actually generate most code for
basic operators and types directly inside blenvm and only use precompiled modules
for more complex functions.
2016-05-09 08:17:30 +02:00
c5fd1aeff2 Merge branch 'master' into object_nodes 2016-05-08 11:15:48 +02:00
32455e230a Fix unused function warning. 2016-04-20 12:34:04 +02:00
af594b7b85 Fix meamleak from unfreed edit data when exiting in hair edit mode. 2016-04-19 14:19:54 +02:00
5f67ac83bf Fix unfreed temporary buffers in strand relaxation. 2016-04-19 14:05:35 +02:00
b2cb4c448e Define BMEditStrands struct as an extension of BMEditMesh.
The advantage is that we can now use this struct in the (rather involved)
process of generating a display DerivedMesh and apply modifiers to it.
2016-04-19 14:01:41 +02:00
216aacbcba Disable regular mesh drawing in hair edit mode. 2016-04-19 13:27:20 +02:00
ec51e83798 Proof-of-concept: Hair edit data from regular meshes.
This adds the possibility to edit a regular mesh like strand data.
It's more of a test for independence from particles than a real use case,
but could come in handy anyway.
2016-04-18 18:13:26 +02:00
9a20f68295 Check mesh samples for zero weights on eval to detect invalid/unusable samples. 2016-04-18 17:48:25 +02:00
a85c9b241a Corrected implementation of the strand relaxation method ported from particles.
This is still the same algorithm as in particle edit mode, but cleaned up
some unnecessary complications and use much more meaningful variable names.
2016-04-17 15:08:46 +02:00
07221e980b Merge branch 'master' into strand_editmode 2016-04-16 18:10:37 +02:00
318ffd8e3c Remove the unordered_map cmake monstrosity from subdirectory build files.
Doing this in the top-level cmake file for blenvm is enough.
2016-04-12 10:27:01 +02:00
d42a384296 Extended debug printing modes to the LLVM code.
The LLVM IR code can be dumped either in raw form or optimized.
It is stored as a raw text file.
2016-04-12 10:12:19 +02:00
9edebfb9ab Minor fixes for compiling without LLVM. 2016-04-11 17:21:20 +02:00
103ecf7aca Fix expression result use as function arguments and add RGBA color mix node. 2016-04-11 16:51:45 +02:00
2c16ec47ed Inlining of base node functions in LLVM IR code.
This requires a somewhat hackish stub function to force linking of inlined
functions in the modules, so that clang doesn't just omit them when
producing IR code. Not very nice, but also not directly related to the
actual Blender code.
2016-04-11 09:16:05 +02:00
4828cf2313 Optimization passes for the generated LLVM code. 2016-04-09 15:47:29 +02:00
50410d1ce5 Completed basic expression tree code generation.
The code uses a pointer-based signature convention for node functions,
which helps to avoid issues with type coercion through clang.
In the future we could either find a more reliable way to produce llvm IR
for the nodes, or use node functions as external functions without inlining.
2016-04-08 17:28:42 +02:00
2205d2870d Use annotation attributes on module functions to avoid name mangling issues.
Names in C++ code tend to get mangled by the clang compiler according to the
respective target ABI. This is unfortunate because it makes it difficult to
map functions to nodes by name. For now we use a function attribute in the module
C++ code to pass on the "true" name of the function and map them internally.
2016-04-07 17:54:53 +02:00
3c30c96850 Make LLVM module compilation depend on header files to force recompile when headers change. 2016-04-07 17:53:14 +02:00
d02c7eeacb Generate function calls for every node, using code defined in precompiled modules.
Note that this is currently not quite working: The clang compiler call used
tentatively for generating the LLVM IR code for modules uses a lowering pass to
coerce struct data types (such as float3) according to the target ABI. This should
be avoided and is unnecessary for our purposes, since we stitch together and optimize
these code fragments ourselves. In principle we could avoid using a C compiler altogether
and write this stuff by hand, but the point of using the compiler is to avoid this tedious
work. More info:
http://stackoverflow.com/questions/22776391/why-does-clang-coerce-struct-parameters-to-ints
2016-04-06 17:52:34 +02:00
37477ffa1c Ported over code from previous llvm branch for loading IR modules and linking runtime code. 2016-04-05 17:57:29 +02:00
3346568b01 Initial code for mapping node sockets to llvm values. 2016-04-05 16:58:21 +02:00
fa1f852381 Cleanup: Fixed deprecated docstrings for file location. 2016-04-05 16:32:16 +02:00
1fc5680442 Cleanup: Renamed Value class to NodeValue, to distinguish from llvm::Value easier. 2016-04-05 16:26:38 +02:00
1ddfdfa31d With the proper formal function parameters for node functions they can now actually be called. 2016-04-05 11:37:43 +02:00
6392e8885a Use getFunctionAddress instead of deprecated getFunctionPointer. 2016-04-05 11:30:30 +02:00
baf585cdc5 Retain functions both for storage in the cache as well as keeping the pointer during eval.
Otherwise the function is freed immediately after each use, making the cache pointless.
2016-04-05 11:04:44 +02:00
1761091ce6 Only insert functions into the function cache when use_cache argument is true. 2016-04-05 10:26:59 +02:00
ff6673d8b8 Type generation for LLVM based on node socket types.
Currently every socket stores a complete and unique type definition.
This should be changed to module-level type declarations and referencing by name.
2016-04-05 10:16:57 +02:00
7658c6cf0d Implement bvm internal function caching and spin lock (missing from previous commit). 2016-04-05 09:17:14 +02:00
7a57a4f871 Use function caching in the same way for BVM as for LLVM.
The previous way of acquiring functions from the cache was actually not threadsafe.
To do this efficiently the cache locking, lookup and potential update is now done
inside the API functions to prevent race conditions on the cache.
2016-04-04 19:28:04 +02:00
72fd685f2f Experimental (and very messy) code for JIT compiling and running a simple stub function for texnodes on the LLVM backend. 2016-04-04 17:34:08 +02:00
84407d57c0 Use a _bvm postfix to distinguish the "gen_XXX_function" and "eval" API methods by backend. 2016-04-01 10:22:12 +02:00
9032c2ae96 Generalization of the function cache feature to support both bvm and llvm backends.
This code is not very elegant atm, but it does the job. Have to see how internal code
management of LLVM (modules) plays into this, the function cache then could become
redundant.
2016-04-01 09:23:35 +02:00
a9cdbda687 Partial revert: Use only BVMFunction stub type as a handle for all backends.
API functions are still distinguished by backend.
2016-03-31 16:39:21 +02:00
15684cda57 Use the BVM postfix to distinguish 'Function' in bvm backend from future LLVM functions. 2016-03-31 16:35:36 +02:00
c25ca841fb Fix incorrect stub type name for texnodes. 2016-03-31 16:14:09 +02:00
05cdeb6745 Added llvm_engine files for managing global LLVM initialization and ExecutionEngine. 2016-03-31 13:00:53 +02:00
038e45de62 Rename BVMFunction to BVMFunctionBVM in the C API.
The awkward double shorthand "BVM" has two meanings here:
 * BVM*** is short prefix for "BlenVM" (to be changed later?).
 * ***FunctionBVM means a function in the bvm backend implementation (see FunctionLLVM etc.)

This should be cleaned up later, by chosing a more sensible name for the overall code module.
2016-03-30 17:08:46 +02:00
d8b97405d1 Cleanup: replace namespace bvm with namespace blenvm in comments. 2016-03-30 16:41:36 +02:00
5415e884f6 Own file for function cache API. 2016-03-30 16:22:34 +02:00
09a8d6794b Moved the modules directory to the blenvm base level, so modules can be shared code.
The idea is to use modules code for all the various backends to avoid lots of duplicate code.
This is similar to how the same code is used in Cycles for CPU and CUDA backends.
2016-03-30 15:07:10 +02:00
cf7c185dc1 Added blenvm_llvm submodule for implementing the LLVM backend to the blenvm node system. 2016-03-30 13:48:50 +02:00
07d3c2c317 Support LLVM header includes.
These were not needed by Blender yet, because LLVM is only used indirectly
through dependencies, which use their own build settings for LLVM include paths.
2016-03-30 12:10:39 +02:00
b5a454f6cf Renamed bvm_typedesc to typedesc: It's not actually specific to the bvm backend. 2016-03-30 09:54:45 +02:00
f56be79da6 Restructuring: Remove the 'bvm' prefix from files that are not directly concerned with the bvm backend.
The naming here is a bit confusing: BlenVM is the name used for the overall code module. BVM can be a shorthand
for BlenVM, but is also the name of the backend for SVM-like code interpreter. General purpose code (such as
node graph and util files) should avoid the bvm prefix. BlenVM as the overall name for the code module is kept
for now, but may be replaced at a later point.

Note that currently one bad-level-include from non-bvm to bvm code remains, for the Value class used in nodes.
Values should ultimately be a backend-agnostic class for storing literal values (node inputs).
2016-03-29 18:48:41 +02:00
245d7a08d0 Merge branch 'master' into object_nodes 2016-03-29 16:45:12 +02:00
39af860e6d Cleanup: Moved value class into own file, away from pure type declarations. 2016-03-09 17:25:58 +01:00
94b4a06c53 Merge branch 'master' into object_nodes 2016-03-06 15:48:32 +01:00
a168e65f1b Merge branch 'master' into object_nodes 2016-02-28 16:12:25 +01:00
f232d7a599 Merge branch 'master' into object_nodes 2016-02-08 10:21:41 +01:00
843e0d1f3a Fix for use of TypeDesc.base_type as a plain value rather than a function call. 2016-02-01 12:38:27 +01:00
c98b02495b New buffer type 'Image' for 2-dimensional arrays. 2016-01-30 13:34:15 +01:00
1c5340de2d Removed the 'Iteration' node, the main index is now an implicit variable. 2016-01-30 11:22:32 +01:00
239c864318 Updated codegen for handling variables and expressions.
Note that kernel nodes now don't have explicit 'function' inputs
any more. Any expression input can be a separate block. Eventually
this should be handled by creating true loops, branches, etc. in the
generated code, rather than reading a jump address from the instructions
and passing it to a blackbox method as a "function pointer".

For the time being the kernel nodes simply prepend a jump address before
*every* input, using BVM_JMP_INVALID in case the input node is not in a
separate block.
2016-01-29 14:31:59 +01:00
067dfb3e52 Adapted the node blockify procedure to the new concept of expressions and variables.
The internal bvm nodes now can contain (implicit) cyclic connections, owing to the
connection of variable inputs to local variable outputs of kernel nodes. These link
cycles are never created explicitly by the node parser (pynodes), but are a result
of the semi-functional programming nature of the nodes: each node constitutes a
function of the local variables defined inside a kernel block. When the nodes are first
constructed from the user-level nodes these inputs are left unbound, and are then
resolved backwards as the individual node functions are inlined.
2016-01-29 11:56:15 +01:00
a4108eba7f Redefinition of the meaning of "value type" for sockets (intermediate commit).
The use of "expressions" for node inputs must be generalized to support array-like
data and a level of functional programming. Inputs are now expressions *by default*.

A node can also have "variables" as inputs, which are implicitly defined in the base node
graph and should not be bounded in the first compiler step (i.e. are not defined by
pynodes). Variables instead are defined as outputs of other nodes (currently still called
"kernel" nodes), which would mostly constitute loops over such variables.

The concepts being worked on here are loosely based on those found in the Halide language
http://halide-lang.org/index.html
2016-01-26 11:51:40 +01:00
9cbdfdbdfa Merge branch 'master' into object_nodes 2016-01-24 14:43:59 +01:00
cb96f9d568 Mockup Nodes: Dummy pynodes for smoke and rigidbody simulations.
These have no implementation yet, they are just meant to test concepts.
2016-01-22 10:56:54 +01:00
dd6a0dc910 Basic image sampling node for reading interpolated color values from an Image datablock. 2016-01-19 23:29:51 +01:00
0b2b29ba56 Cleanup: Simplify depsgraph API by using the same depsnode type for each ID.
This means the user might use an invalid component key for generating dependencies,
but the only consequence is that no relation is created.
2016-01-19 16:41:16 +01:00
a31609a6be Two-level use-count system for bvm pointer variables.
The rationale for this change is that copying variables on the bvm stack
will become necessary for compound variables (structs). In order to
efficiently keep pointers on the stack without making deep copies every
time such a variable is copied, the pointer must be a kind of shared_ptr
concept. In addition to this the stack variable itself must also be counted,
so that we have a way of detecting when it "goes out of scope", i.e. all
nodes using it have finished.

The node_counted_ptr is not a full C++ shared_ptr, because the user counting
is handled explicitly by the compiled bvm instructions. Using a std::shared_ptr
would be difficult due to the mixed levels of evaluation (compile-time constants,
storing shared_ptr on the opaque stack), and because of difficult interfacing
with C code (returning persistent plain pointers).
2016-01-18 13:05:36 +01:00
0549e0eeaf Cleanup: use size_t (i.e. size in bytes) for data types, rather than explicit stack size.
The stack size is calculated during codegen by an int-ceil division,
currently padding to int size (probably later to be changed to int4 for
better SSE support).
2016-01-16 17:44:33 +01:00
e44d648779 Cleanup: Use an real type 'EvalStack' for passing the value stack around.
This should avoid possible confusion of values (floats) with the more
abstract value stack.
2016-01-16 17:25:07 +01:00
40150c9e6e Extended TypeDesc to support compound type definitions (structures). 2016-01-15 11:10:03 +01:00
9b22c3854d New util file for structure type implementations in C/C++. 2016-01-15 10:08:09 +01:00
475c13a7d2 Rename: POINTER base type to "RNAPOINTER".
This is so the POINTER type can be used for general struct pointers and arrays.

RNA pointers should eventually be replaced with more specific types for
data that can be accessed in the bvm system.
2016-01-14 15:38:30 +01:00
0df953fb92 Fix for incorrect pointer type in smoke effector updates. 2016-01-14 09:42:31 +01:00
d9d9c97106 Moved util_typedesc file into the compile module. 2016-01-13 19:32:24 +01:00
66070ec814 Split off from the bvm::Function class the basic instruction list functionality.
The point of this is to keep type definitions out of the core bvm eval code.
TypeDesc is only used for the outermost layer of bvm::Function in order to
copy arguments to and results from the eval stack. OpCodes themselves are
agnostic to higher type definitions and just work with raw data.
2016-01-13 19:26:17 +01:00
04f9286c07 TypeDesc registration in NodeGraph for reusable type definitions.
Eventually this could allow actual user typedefs (through the API),
but primarily this is to make complex type definitions possible without
having to do a full definition every time, and simply use the type name.
2016-01-13 14:54:46 +01:00
431b90c969 Merge branch 'master' into object_nodes 2016-01-13 12:19:32 +01:00
326255d080 Fix a memleak of the return value user counter from mesh_ptr.
The returned mesh_ptr result needs to be cleared to ensure the user
counter is also freed. To avoid deleting the mesh data as well a new
function 'reset' was added, which frees the user counter but only resets
the data pointer without freeing it.
2016-01-13 11:02:00 +01:00
0937f5baa3 Another geometry node for loading another objects 'final derived' mesh.
Modifiers should be able to work on meshes directly as much as possible,
without direct reference to an object. The space transform should
ultimately be passed along with the DM (TODO, currently requires explicit
inputs).
2016-01-12 14:48:10 +01:00
29daf7dedb Prepend a value node on all (non-constant) node inputs without a link.
In principle the input value could be used directly in codegen, but this
approach means one less condition to check and has the same effect.
2016-01-12 14:46:33 +01:00
71747fa395 Fix for incorrect output type displace element.index. 2016-01-12 14:39:15 +01:00
af0215918e Added a simple operator and panel for one-click debug display of bvm node visualizations.
This was formerly part of an addon, but is useful enough to include directly in the branch
for debugging purposes. It uses the existing graphviz dump functions to write into a
temp dot file, then runs graphviz on it and opens the resulting image in the standard
system image viewer.

This is tailored for linux systems, but that shouldn't be a big issue since most developers
(who are the target audience) use this platform anyway.
2016-01-12 12:22:15 +01:00
9fccaadb84 Use the new node block structure in code generation, to determine dependencies of symbols. 2016-01-12 11:40:35 +01:00
97642e0c96 More elegant construction of implicit node blocks, by copying argument node first. 2016-01-11 15:24:36 +01:00
f918012866 Represent nested node blocks in the graphviz debug dump. 2016-01-09 17:40:19 +01:00
65b4da0cc3 Cleanup: class for debug dumping functions for node graphs. 2016-01-09 15:01:30 +01:00
d5707b9a05 Moved the block definition from codegen to the node graph optimization.
This now involves making actual copies of nodes, so that each block has
a unique instance of each node and ambiguity is avoided.
2016-01-09 14:07:58 +01:00
c882d15626 Generalized algorithm for constructing node blocks based on local arguments.
Nodes can have expression inputs and override argument nodes with local
variables. This means that a local block must be created for each expression
input. The boundaries of such blocks are defined implicitly by upstream nodes
which define their own local arguments (or ultimately by the graph arguments).

The current version is still not quite generic enough to allow arbitrary
nesting of blocks, but it should ensure that expressions don't include all
the parent nodes which don't depend on local arguments and therefore should
be calculated in the parent block (a form of constant folding).
2016-01-08 17:31:46 +01:00
3598ef2536 Use a global node index assignment to enable sorted sets for nodes.
This simplifies code generation because we can use a set with efficient
lookup which also keeps a valid ordering of nodes as dictated by links.
Since any generated code uses only subsets of nodes, the ordering still
is valid for any BasicBlock.
2016-01-07 12:11:15 +01:00
5eaabb9aac Moved BasicBlock out of the Compiler struct. 2016-01-07 11:11:22 +01:00
8796a997d6 Fix for missing stack indices in expression blocks.
When creating an expression block, the parent block stack indices must
initialize the local index map, so that external variables can be accessed.
2016-01-07 10:41:35 +01:00
a16ff1f568 New node for finding the closest point on a mesh.
This will be useful for shrinkwrap-type modifier behavior.
2016-01-06 13:46:37 +01:00
9121c804a7 Cleanup: Moved some classes out of the typedesc utility file. 2016-01-06 11:29:16 +01:00
6858b1fd81 Fix incorrect header naming. 2016-01-06 11:25:08 +01:00
72878c26a2 Cleanup: Use node/socket pair keys more consistently instead of pointers. 2016-01-04 15:21:14 +01:00
01f7d71fa7 Strict separation of input and output socket keys for clarity.
This avoids confusion regarding what socket keys are stored in maps etc.
2016-01-04 13:47:03 +01:00
0313128207 Merge branch 'master' into object_nodes 2016-01-04 10:48:52 +01:00
289493c74f Added basic semantics to the debug compiler by accessing node types. 2016-01-04 00:39:55 +01:00
1313440c59 Debug representation of generated bvm code.
A specialized compiler variant is added that turns generated code
into a graphviz diagram of the instruction lists.
2016-01-03 23:59:29 +01:00
8b5cae92c5 Abstract virtual base for the BVMCompiler class.
This will allow different implementations of the compiler depending
on the intended target. This could be other bytecode formats (LLVM, SPIR),
but most imminently would be used for debugging.
2016-01-03 12:55:14 +01:00
a7da96ad1b Merge branch 'master' into object_nodes 2016-01-03 10:57:26 +01:00
97e00d6091 Fix for broken pynodes: BVM functions in NodeTree must be optional. 2016-01-03 10:55:30 +01:00
37875dc003 Renamed map of basic blocks used for expressions. 2016-01-01 17:41:41 +01:00
4ca0309f13 Renamed the FUNCTION input value type to EXPRESSION for clarity.
'Function' is a more general term, the input is specifically an
'expression' because it returns a single value.
2016-01-01 17:41:41 +01:00
4c6b05322c Renamed FunctionInfo to BasicBlock, because that's what it is generally called in compilers. 2016-01-01 17:41:41 +01:00
acd4b54f91 Implement more texture types.
This adds support for marble, magic, stucci, distorted noise, musgrave
and wood textures.
2016-01-01 17:27:00 +01:00
8331fceec6 New vector math mode for vector length, patch by Philipp Oeser (lichtwerk). 2016-01-01 13:42:13 +01:00
7335106206 Output values in node graphs are unused, removed.
In fact there is no per-output data in node instances at all, so the
OutputInstance data was removed entirely. All the connectivity and
value information is in the inputs.
2015-12-31 15:05:25 +01:00
08530c7eea Fix memleaks in refcounted data pointers on the bvm stack. 2015-12-31 14:56:54 +01:00
8c5041be5c Fix for memleaks caused by un-freed Value instances, kudos to Kevin Dietrich!
These values are heap-allocated virtual classes, because general node code is
largely agnostic to data types. After adding values to a node (either as
default input values or per instance), care must be taken to free them when
the node type or instance is destroyed.
2015-12-31 13:11:19 +01:00
bb0e1375b1 Merge branch 'master' into object_nodes 2015-12-31 12:04:51 +01:00
8e0489442f Reusable functions for copying a set of nodes and calculating node bounds. 2015-12-29 09:12:40 +01:00
77ae38677c Added an optional update callback for the configurable object node ID property. 2015-12-28 11:27:34 +01:00
e26d7a72fd 'Make Group' operator (ctrl+g) to easily create a node group from selected nodes. 2015-12-27 18:39:48 +01:00
397e1aeccb Use a unified list for simplifying socket identifiers and matching RNA struct types. 2015-12-27 17:17:43 +01:00
48e0785dc5 Fix compiler warning from illegal zero-initialization in C++0x. 2015-12-27 14:42:37 +01:00
f036fa079c ID.flag has been split to put runtime tags in a separate field (rB3fcf535d). 2015-12-27 14:35:06 +01:00
ad072beb68 Merge branch 'master' into object_nodes
Conflicts:
	source/blender/depsgraph/intern/depsgraph_build_nodes.cc
	source/blender/depsgraph/intern/depsgraph_build_relations.cc
2015-12-27 14:21:03 +01:00
898d2ac36c List existing node groups in 'Group' categories for easy instancing.
This includes polling by type and recursion level to ensure groups
are only added in appropriate tree types, and don't create cyclic
dependencies.
2015-12-27 10:29:30 +01:00
36c6cbb902 Poll node groups based on node tree datablocks rather than node instances.
There is a redundancy in the nodetree/node relationship, since each nodes
is part of exactly one node tree. This means we can test for either trees
or nodes to detect cycles, and because we usually poll for node trees
rather than nodes that would be the natural choice.
2015-12-27 07:28:10 +01:00
d3b626711f Automatically create a new node tree when making an object component node. 2015-12-25 18:19:29 +01:00
6a82c17c10 Create a default minimal node setup when creating new trees or groups. 2015-12-25 17:06:21 +01:00
842a138071 Duplicate enum values lead to creating mesh instead of dupli sockets in node groups. 2015-12-23 18:46:04 +01:00
c92dc52f34 Fix for empty dupli list defaults, these must be neither NULL nor static. 2015-12-23 18:34:13 +01:00
e339326621 Use dedicated functions for producing graphviz debug output.
This allows creating unoptimized node graph output dumps without
causing crashes, because the codegen step is not performed when
just producing debug output.
2015-12-23 18:10:22 +01:00
894c9f3f85 Added RNA function for debugging dupli bvm nodes. 2015-12-23 17:35:54 +01:00
a51fc1b993 Fix for node groups: operator for creating a new tree was hard-wired to geometry nodes. 2015-12-23 17:12:09 +01:00
3e2fa696bf Added missing bf_blenvm linking for blenderplayer. 2015-12-23 15:21:35 +01:00
f0860367f1 Use dynamic socket lists for mesh and dupli output nodes for convenience. 2015-12-23 14:45:33 +01:00
a2f5fc297f Generalization of the dynamic socket list feature, currently used by mesh-combine. 2015-12-23 14:38:59 +01:00
70e84dc17a Use default node input value for constants. 2015-12-23 14:37:27 +01:00
92f55bcf87 BVM node for combining dupli lists. 2015-12-23 13:18:45 +01:00
d0949254da Extended notifiers from node value editing to include instancing trees.
The use of notifiers from node trees is very unsatisfactory atm.
Notifiers should be integrated into the depsgraph, so that changes
to data automatically trigger appropriate UI redrawing.
2015-12-23 13:00:29 +01:00
562bcb4d36 Implementation of the "make dupli" node to generate a single dupli object. 2015-12-23 12:46:36 +01:00
aacff41363 Use a std::vector for storing Dupli instances in bvm for efficiency. 2015-12-23 12:24:00 +01:00
1a37890ac0 Return duplis from a bvm node evaluation, just like DerivedMesh. 2015-12-22 14:30:09 +01:00
9af1dfb91d Fix for default values of array types.
Now an array can be passed directly to the add_input functions to
construct an ArrayValue.
2015-12-22 13:55:26 +01:00
9f1165c8aa New opaque type 'DUPLIS' for storing a dupli list.
This works just like the MESH type, but wraps a ListBase instead of
a DerivedMesh. Using this type the duplis can be generated internally
and returned as a result.

All such data types should be handled in a generalized way eventually.
2015-12-22 13:30:17 +01:00
5c9ccf04a4 Correct types for array 'pass' nodes. 2015-12-22 12:40:19 +01:00
13329d9a63 Reordered data types a bit, so mesh and other complex types are at the end. 2015-12-22 12:02:19 +01:00
674bb4b6a4 PASS nodes for array types. 2015-12-22 11:07:41 +01:00
66a41f2e9f Array types for node sockets.
These are an extension of the type description to support contiguous
arrays of base values. They effectively form a second set of types,
mirroring the 'single' base types. Socket connections will have to
strictly match between these types as well, i.e. any dereferencing and
array access will have to be explicit.
2015-12-22 11:07:41 +01:00
ab25e2f6c6 Sqrt math node mode, patch by lichtwerk. 2015-12-21 12:09:28 +01:00
bb96d3d29b Removed unused function declaration. 2015-12-20 11:42:39 +01:00
031c14e123 New dupli mode for use of BVM node trees to generate duplis.
Not yet functional, as it doesn't have opcodes yet.
2015-12-20 10:07:48 +01:00
83ca36a6e9 Object pointer should not be needed for constructing modifier node functions. 2015-12-18 16:27:52 +01:00
9f766ea134 Merge branch 'master' into object_nodes 2015-12-18 13:31:25 +01:00
fe3657a575 Use the bvm function cache for modifier nodes, to avoid recompiling all the time. 2015-12-16 13:43:36 +01:00
5353ae384d Separation of dependencies of node trees and their users for compiling vs. evaluation.
So far any change in a node tree would cause both a recompile of bvm functions
as well as a re-evaluation of any users of that function. This is quite inefficient
and should be separated to allow caching of the bvm functions independent from
their users.

To this end the nodes now have 2 callbacks: one for getting compile deps, the other
for getting eval deps.
* Compile dependencies are typically other node trees (node groups). In the future
  this could also be Text datablocks, similar to how OSL script nodes work.
* Eval dependencies are all the blend_data blocks that a function might access.
  For modifier nodes these could typically be meshes, curves; for shaders could
  be images, textures; and so forth.

Separating these dependencies means the bvm functions will have to be recompiled
only when the actual bNodes change (add/remove, linking, socket values).
Conversely when some modifier input data changes (editing, cfra) the modifier
function will be re-evaluated.
2015-12-16 13:25:46 +01:00
d736d8073b Use C callbacks for implementation of DepsNodeHandle.
This makes it possible to create generic dependency functions to
handle dependencies in various ways, using the same reporting callback.
Currently used for depsgraph building in 2 passes (nodes & relations).
2015-12-16 09:01:20 +01:00
69687b7c5c Removed default case for the opcode switch, all opcodes should be handled explicitly. 2015-12-15 07:58:38 +01:00
3cb01d1409 Merge branch 'master' into object_nodes 2015-12-14 13:58:32 +01:00
caec65686f Explicit depsgraph tagging for object nodetree is not necessary any more. 2015-12-14 13:56:51 +01:00
929324995f Extension of depsgraph API to handle the relations between node trees.
This allows node groups and similar nodes with a node tree ID pointer
to register in the depsgraph.

In addition to defining relations, the builder must also make sure
that the node tree depsnodes are created first, because, unlike objects,
node trees depsnodes have no direct scene connection and are not generated
in advance. Since the build process has two distinct steps for creating
nodes and relations, the same API is used for both to simplify the code.
2015-12-14 12:19:14 +01:00
6b97c36df3 Generalization of function caching to avoid unnecessary recompilation.
The function cache allows callers to store functions in a cache (hash table).
The functions also have a reference count, so replacing the function
in the cache (when the node tree changes) does not immediately delete
the current instance. This allows background threads to keep using the
old function until they can cleanly return (tasks should be restarted
when the nodes become outdated, but this is up to the caller system).
2015-12-14 08:16:35 +01:00
e6bf664d78 New data type for constant (!) strings.
The const-ness is very important: strings are only stored as const char*
on the stack, which point to memory inside the instructions list.
The instructions contain the actual char array, with a null terminator.

This does not allow allocating new strings during eval, but it makes
it possible to use static strings as identifiers and keys for global data.
Eventually we could allow string operations through an allocation system
similar to DerivedMesh handling, with init/release nodes to manage
alloc/free.
2015-12-12 12:40:30 +01:00
465327ff9f Merge branch 'master' into object_nodes 2015-12-12 11:56:39 +01:00
434123a6ea Use the relative transform of target objects and the modified object to adjust modifiers.
This affects modifiers which use an external target object (currently
boolean and curve path). The modified object is a graph input argument,
which the target object is looked up via its key. The relative transform
means the values calculated from external geometry are always in the
modified object's local space.

Note that transform and its inverse are provided explicitly to nodes.
This will allow optimization for constants later on.
2015-12-11 18:30:25 +01:00
9f01d87ddf Merge branch 'master' into object_nodes 2015-12-11 16:24:16 +01:00
6bb58ce842 Boolean modifier node, based on the new bmesh boolean operations. 2015-12-11 16:11:17 +01:00
5dd13527b9 Merge branch 'master' into object_nodes 2015-12-11 10:55:12 +01:00
6f11cf2400 Clamp the curve parameter in the curve path eval, because where_on_path is touchy about it. 2015-12-11 09:46:36 +01:00
e94400084c Reenabled the depsgraph relations for nested node trees, for the time being.
This should also work through the API! However, it requires building the nodetree
depsnodes before making relations which is not well supported yet.
The forced relations are currently needed to make updates inside the component
node trees trigger object recalc.
2015-12-11 09:44:41 +01:00
9f584095d7 Minimal RNA API of the depsgraph for registering object node dependencies.
This simply reflects the existing C API for the depsgraph, as already used
by modifiers. The object nodes gain two callbacks, one for depsgraph
relations and one for registering globals. Since both of these should
require the same objects and other ID blocks to be registered, they share
a common `relations_update` function on the pynode level for convenience.
2015-12-11 09:16:34 +01:00
99e998483b New node "Curve Path" for reading interpolated curve data.
This introduces an improved way of handling ID relations inside the
node tree. Instead of storing simple indices to an object array,
the nodes now generate a 'key' (currently just ID name + lib name).
At eval time this key is then looked up from a hash table in globals,
to produce the actual pointer to the object.

Currently the node will not work, because the curve is not yet registered
in the globals map. This should happen in conjunction with depsgraph
updates.
2015-12-10 20:26:56 +01:00
9d3dc3d57b Merge branch 'master' into object_nodes 2015-12-10 15:21:58 +01:00
b08c193d14 EvalData is now deprecated and unused, removed it. 2015-12-10 15:20:25 +01:00
bed76fe570 Removed global data from the compile process, this should only be needed for eval.
Global data is used primarily for blend_data pointers (objects primarily).
These should not be stored directly inside the function instructions,
but should be stored by a key (hash value) and resolved at eval time.
2015-12-10 15:17:54 +01:00
87cf7d85f5 A number of actual value nodes for simple input constants in the UI. 2015-12-10 14:23:26 +01:00
d5d35d5b15 Moved debugging code output node graph into a utility file. 2015-12-10 12:51:47 +01:00
2e3f780118 Represent local output behavior in the graphviz debug by showing additional links. 2015-12-10 12:37:33 +01:00
e839d2f39a Fix for graph debug: input arguments refer to outputs, can just use the ARG nodes themselves. 2015-12-10 12:01:49 +01:00
2bf4d8f1ae Partial revert: need to allow pointer/mesh value nodes and constants.
These are generated automatically as terminators in pass node chains.
No pointer/mesh values will be stored in instructions though, the
sockets are just dummies to ensure a consistent value node signature.
2015-12-10 11:51:29 +01:00
a30a863a54 Removed 'Value' node types for pointer and mesh data, and disallow hardcoding them as constants.
Pointers in the instruction lists are bound to be invalid most of the time. They should only be
supplied externally via graph input arguments.

Note that opcodes still exist for POINTER/MESH, but these always store a NULL/empty DM
default value, rather than reading from instructions. They are only used by the code generator
as fallbacks if such sockets are not connected.
2015-12-10 11:23:31 +01:00
8432aac5f6 'Value' nodes are actually regular function nodes, not pass-type nodes. 2015-12-10 11:21:51 +01:00
61e5f39eb8 Removed unused code. 2015-12-10 11:13:29 +01:00
5fc8222bab Basic randomization node, producing PRNG values based on either int or float input. 2015-12-10 09:40:50 +01:00
d551b56680 Use a different variable name to prevent shadowing. 2015-12-09 16:29:09 +01:00
61d847f101 Displacement modifier is always expected to affect mesh normals. 2015-12-09 16:27:41 +01:00
8e6177520c Have to ensure correct normals after running modifier nodes. 2015-12-09 16:27:19 +01:00
a50dfeade6 Added procedural Clouds and Voronoi texture nodes to python for general use. 2015-12-09 16:23:00 +01:00
fd2b0e1365 Added vector multiply/divide modes to the vector math node.
In combination with implicit float->vector conversion these can also
be used for simple scalar multiplication. This is not quite ideal
because of the conversion, but math nodes have to be redesigned at
some point anyway.
2015-12-09 15:50:33 +01:00
7b83720817 Some simplifying python functions for copying existing enum properties. 2015-12-09 15:44:14 +01:00
10387fa3ae Added missing draw functions for euler angle nodes. 2015-12-09 15:24:21 +01:00
aa6d62132d New modifier node for generic vertex displacement. 2015-12-09 14:52:31 +01:00
c2722fbc5e Use 'local' output values to override input argument nodes.
This reenables the iteration input used by the array modifier node.
2015-12-09 13:02:30 +01:00
9b1456ba37 Unified handling of both the main function and expression functions. 2015-12-09 11:02:57 +01:00
c7f44335fa Splitting the codegen function into a 'symbol resolve' part and a 'codegen' part.
This basically introduces a linker step which will allow the proper use of function calls.
2015-12-09 10:45:12 +01:00
31e7eb9a13 'Local' value type for outputs to indicate their use as local function arguments. 2015-12-08 21:31:02 +01:00
32becc1813 Use two distinctive structs for node type inputs and outputs.
This helps clarity, and also we need to start using different
value types for inputs and outputs.
2015-12-08 17:26:23 +01:00
be82139b91 Renamed ValueType to InputValueType, because we will need to also have an OutputValueType. 2015-12-08 16:58:28 +01:00
de0933f0aa Replaced EvalData for node evaluation with graph inputs.
Warning: this disabled the iteration input for mesh arrays. To make it
work again the mesh array kernel needs to overwrite the input argument.
2015-12-08 14:50:55 +01:00
306235fa70 Use formal node graph inputs to create formal function arguments and initialize the stack. 2015-12-08 14:21:07 +01:00
079ecfde22 Graph inputs/outputs need an explicit type, since they may not have a node after optimizing. 2015-12-08 12:45:09 +01:00
e493f2039e Keep a list of input arguments of a function in addition to return values. 2015-12-08 12:36:16 +01:00
0b80bb6bb8 Get rid of the extra list of "outputs" for subgraph codegen.
Instead we now pass a socket index map directly to subgraph codegen,
and then read out the final output indices externally.
2015-12-08 12:09:02 +01:00
bc91cba012 Pass input arguments as const void* when calling bvm functions.
This is not used yet, but will replace the EvalData pointer.
2015-12-08 11:11:39 +01:00
00d9beda03 New set of node types for 'arguments' which will act as stack entry placeholders.
These are like value nodes in that an output socket stack entry is reserved for them.
However, like 'pass' nodes they don't actually perform an operation. Their purpose is
to provide a place on the stack for input arguments that other nodes can then read from.
2015-12-08 10:24:16 +01:00
d17a937e89 Expose the get_input function of the node graph just like get_output. 2015-12-08 10:15:20 +01:00
7ec91558f8 Bump the BVM stack size to 4095.
Currently there is no optimization for stack usage, which would ultimately
reduce the required stack size dramatically. 255 is still very low though.
2015-12-07 17:12:58 +01:00
7ef782f1a7 Use individual node types for constructing transform matrices.
Transforms can be created as translations, rotations (euler and axis/angle)
and scale.

The UI nodes include and automatic multiplication node for convenience.
2015-12-07 17:08:36 +01:00
d103f7daab Use an explicit transform input in the array modifier node.
Transforms can only be created from translations atm.
2015-12-07 13:50:03 +01:00
794e16591b Fix for mismatching socket type identifiers.
Have to be careful about distinguishing socket type identifiers
and bvm type identifiers.
2015-12-07 13:49:02 +01:00
3f770bcfeb Fix for ugly socket color because of swapped G and B ... 2015-12-07 13:19:01 +01:00
026ad8d2f9 Merge branch 'master' into object_nodes 2015-12-07 12:37:16 +01:00
17d6b2f158 Some basic math operations for 4x4 matrices. 2015-12-07 12:24:11 +01:00
b985176b57 Moved math eval functions to a dedicated file. 2015-12-07 11:43:38 +01:00
6f99c84123 Introduced a UI node socket type for affine transforms.
This matches the matrix44 internal bvm type. It is useful particulary
for describing rotations.
2015-12-07 09:31:48 +01:00
0665d467ad Fixed and improved the socket conversion function. 2015-12-07 08:47:15 +01:00
02c3eccc31 Cleanup: Renamed socket type utility functions for clarity. 2015-12-06 17:59:41 +01:00
063b5351df Moved the socket converter function into the socket_type module. 2015-12-06 17:25:56 +01:00
d67aab6467 Fix for re-entrant update problems, using a base class with a context manager. 2015-12-06 15:23:52 +01:00
37ac434577 Make node groups work by linking proxy nodes to the external sockets of the parent node graph. 2015-12-06 13:43:32 +01:00
b3bfc8915e Leave the creation of proxies for bNode inputs/outputs to the node compiler. 2015-12-06 13:01:32 +01:00
c6e593d269 New utility module for socket types. 2015-12-06 12:55:10 +01:00
37b980565a Node compiler function for adding proxy nodes. 2015-12-06 12:49:16 +01:00
36e09d2a4e Generalize the node compiler functions a bit to prepare for node groups. 2015-12-06 12:10:37 +01:00
084265454e Moved type conversion utility functions to the common_node module. 2015-12-06 11:37:43 +01:00
19d44991f8 Use update callbacks to sync sockets of group input/output nodes to the interface items. 2015-12-06 11:26:07 +01:00
7c421555bf Use a general update function to update all the nodes that are affected by a group interface.
This is not particularly nice, because it relies on every interface variable to call the
update explicitly. Eventually such things should work via the depsgraph, but this is
currently not easy to do.
2015-12-05 17:14:13 +01:00
57b63e66b5 Register node trees only after creating associated group types.
That way the node group definition can update the node tree type before.
2015-12-05 16:44:02 +01:00
a4ab2d71d6 Added lists of inputs and outputs to node trees for defining the group interface. 2015-12-05 16:09:23 +01:00
6b55e29baf Rudimentary node group classes for an instance node and inputs/outputs.
The node group instance prevents recursive groups by disallowing nested
node trees, both when selecting a different group tree for an existing
node instance, and when adding an existing node to a tree (copy/paste).
2015-12-05 11:32:34 +01:00
0b6ddb5112 Fix for keymap quirk not resetting default property values.
Keymap entries have to use explicit values for properties if they
are modified in any of the variants. Otherwise the value is not
reset to the default in subsequent calls once it gets changed.
2015-12-05 11:29:41 +01:00
10157551be Object node id property poll function should be a regular function rather that a classmethod. 2015-12-05 11:27:59 +01:00
051706bf95 Restrict the ObjectNodeEdit operator to only work on the object nodes.
We want to keep this separate from shader/compo/tex nodes which have
their own node group operators.
2015-12-05 08:36:30 +01:00
f57cfa892f Reorganize python scripts for object nodes into their own script directory. 2015-12-04 18:08:11 +01:00
31d0960734 Merge branch 'master' into object_nodes
Conflicts:
	source/blender/makesrna/intern/rna_nodetree.c
2015-12-04 17:17:52 +01:00
2bac0260a6 Removed useless pass statement. 2015-12-04 13:42:32 +01:00
15689a42fb Better implementation of socket updates for list-style node.
The previous implementation was based on recreating links and did not work
very well when reordering connections, because the insert_link callback does
not allow changing the link target.
2015-12-04 13:35:20 +01:00
3d9fc9016e List behavior for the mesh-combine node.
This is primarily a python implementation for UI convenience.
It makes the list of input sockets behave dynamically for typical list operations:
* adding an element at the end
* inserting an element
* removing an element

Each of these keeps the list compact and shifts remaining sockets, so users don't
have to move each individual connection every time.

Internally it still uses the simple binary combine operation, adding as many
nodes as necessary.
2015-12-04 11:39:36 +01:00
22b2698243 Merge branch 'master' into object_nodes 2015-12-04 10:26:16 +01:00
b475180a57 Merge branch 'master' into object_nodes 2015-12-04 09:20:30 +01:00
8b5af7f3ca Disable explicit update calls _while_ the modal node link operator is running.
These update calls can have bad consequences such as removing node sockets,
which should not happen until after the operator is finished. This was already
questionable in the past. At some point all update handling for nodes should go
through the depsgraph rather than the current fragile update flag/callback system.
2015-12-03 15:33:30 +01:00
fb1ddcc7c1 Merge branch 'master' into object_nodes 2015-12-03 13:04:54 +01:00
48ee73d500 Simple node for concatenating 2 meshes into one. 2015-12-02 17:41:12 +01:00
3675a0fedf Ignore nodes that don't have the 'compile' method, to allow frames. 2015-12-02 17:40:24 +01:00
5ab6b6bbac Added back automatic type conversion.
Now automatic type conversion for sockets happens in the python code.
2015-12-02 13:05:25 +01:00
343c1e3006 Fix for refcounting in the mesh value node.
This node was overwriting the entire stack pointer (incl. the refcount)
but should only store the DM itself.
2015-12-02 12:04:29 +01:00
fe2c73db61 Make sure invalid node connections are rejected at the basic level.
The internal bvm nodes require strict type matching. Any implicit
automatic type conversions should be added on the level of DNA->bvm
conversion. This keeps the bvm nodes simple, and also allows for
semantics on the DNA node level that could not be properly implemented
in bvm.
2015-12-02 11:48:39 +01:00
120ea1179e Improved python API for constructing the internal node graph.
Socket connections can now be handled consistently through single py objects,
so the compilation code becomes more concise and readable.
2015-12-02 11:29:44 +01:00
3f71a178e1 Fix for dangling root sockets when skipping 'pass' nodes.
This can happen when proxies are created, and should always create
a 'value' node to act as a clean root terminator.
2015-12-02 11:28:35 +01:00
d53946ad7e Improved RNA API for bvm node graphs.
Now there are actual collections of inputs/outputs to perform proper checks
on valid names/indices and types.
2015-12-01 18:16:35 +01:00
723c51313c Sanity check for array count <= 0, otherwise CDDM keeps spewing warnings about empty mesh. 2015-12-01 11:04:24 +01:00
e431c5bde6 Added an "Iteration" node as a general-purpose input for expressions.
This is used by the Array modifier node to give a meaningful per-instance
input to calculate a transform from.
2015-12-01 09:52:07 +01:00
91a0b2a8ea Use the jump address in the array modifier to evaluate a transform function per copy. 2015-12-01 08:52:45 +01:00
d125723719 Codegen: for function inputs store the entry point in the instructions. 2015-11-30 16:16:45 +01:00
962478523e Generate instructions for a subgraph in a separate codegen function.
This will be useful for separately generating kernel functions, which
are to be stored as own code blocks so kernels can call them repeatedly
as needed.
2015-11-28 17:07:11 +01:00
dbd3d6d55c Fix for API changes in pynodes. 2015-11-26 14:12:50 +01:00
276b533ffe Fix for stack index assignment to graph outputs. 2015-11-26 14:12:30 +01:00
6db9c275f3 Use a simple value node for graph outputs that are only connected to pass nodes. 2015-11-26 12:47:12 +01:00
11c34a0934 Changing graph output mechanism to use proxy nodes. 2015-11-26 11:13:11 +01:00
1254009072 Distinguish 'function' and 'kernel' node types.
Only kernel nodes will be allowed to have function inputs. This is
necessary because any kernel node will define the boundaries of
node subtrees used for function inputs.
2015-11-25 13:55:20 +01:00
803f7f208c Node inputs now have a 'value type' to specify how input connections are treated.
VALUE_CONSTANT inputs can not have connections, their values are known at compile time.
bvm stores these values directly in the instruction list.

VALUE_VARIABLE inputs store values at evaluation time. bvm stores a stack index for them
which is used to load and store from/to the evaluation stack.

VALUE_FUNCTION inputs are passed to kernels to be called internally when needed.
bvm stores an instruction index and allows a jump to this instruction (TODO).
2015-11-25 12:29:39 +01:00
60779ad90e Added an 'entry point' instruction number to functions.
This is currently always 0, but will be used in the future to allow
storing per-element functions along with the main code. These can then
be called within kernels.
2015-11-25 11:27:37 +01:00
9d0ffa84ce Enabled generic math nodes for modifier node trees. 2015-11-25 11:12:05 +01:00
458ba77ff7 Fix for static empty mesh variable, used as default value of meshes on the stack.
This creates a (minor) mem leak when statically creating the mesh. Instead it
should be constructed in a init/free pair of functions.

Because this variable is used in all different compile units, each of them has
to create their own global 'empty_mesh' variable.
2015-11-25 10:51:28 +01:00
ca6f1efe5d Fixed missing delete call for unused nodes. 2015-11-25 10:01:36 +01:00
527f7d5088 Free the modifier bvm function after use.
Note that eventually these should be cached to avoid unnecessary
recompilation, but for now they get compiled on every modifier eval.
2015-11-25 09:58:10 +01:00
d54eca15d6 Use the guardedalloc new/delete overloads for relevant classes. 2015-11-25 09:53:01 +01:00
044cb7eaf0 Fixed overzealous assert for input stack assignments in codegen.
For constant inputs no stack index is needed. Previous to node pruning
this did not trigger the assert because there were still pass nodes
allocating the stack indices.
2015-11-25 09:29:39 +01:00
170f158b80 Node tree pruning function for removing unused nodes.
This also removes the placeholder 'pass' nodes, which were already
being skipped and made unused.
2015-11-25 09:28:48 +01:00
df9f633da2 Changed node instance storage in the node graph to pointers.
This makes it much easier to optimize the graph by removing and reconnecting nodes.
2015-11-25 09:09:30 +01:00
124bc03035 Merge branch 'master' into object_nodes
Conflicts:
	source/blender/blenkernel/intern/softbody.c
2015-11-24 09:40:33 +01:00
8c17d8e462 Use the base mesh as a fallback result in case no geometry nodes exist. 2015-11-23 12:50:18 +01:00
d4e67dfe37 Fix for store/load of mesh_ptr on the stack.
Most actual mesh operations should only store the data pointer itself
but not modify the refcount.
2015-11-23 12:29:18 +01:00
591e485054 Fix for wrong index in codegen.
Was using the socket instance map sizes rather than the overall number
of sockets of the node type.
2015-11-23 11:42:11 +01:00
71402ca5d9 Added a matrix compose/decompose node for loc/rot/scale. 2015-11-23 11:07:07 +01:00
b1c8112980 Horrible fix for depsgraph/notifier updates through property changes in geometry nodes.
This is really awful, but we don't have a good generic way of defining node tree relations
in the dependency graph yet. More importantly, the notifier system is not up to the task -
putting the responsibility for notifying into operators requires anticipating their effects,
which is not good at all for node operators which affect geometry through complex processing.
The depsgraph really should be handling this.
2015-11-23 10:14:53 +01:00
59080a1d81 Implementation of a simple 'Array' modifier node. 2015-11-22 15:24:07 +01:00
66bb6de449 Fix for invalid comparison operator of SocketPair. 2015-11-22 11:18:35 +01:00
f375f6e6dc Notifier from node changes to redraw the viewport when geometry nodes are updated.
This is a hack! The nodes are defined in python and the notifier is currently
triggered far to broadly, but currently there is no nicer way of doing it.
2015-11-22 10:05:25 +01:00
148ac78b4a Extension of the new dependency graph relations to support object nodes.
This generally triggers a mesh data recalc when *anything* inside the
object node tree is changed. Eventually it should be more specific to
changes in a geometry node tree, but the current design of deps nodes
does not reflect such internal node semantics nicely (although new
depsgraph will allow us to do it properly in the future).
2015-11-22 10:03:01 +01:00
5956bed117 Revert "Fix for unfreed memory of the default empty mesh."
This reverts commit 0ab9e4848d.
2015-11-21 17:20:23 +01:00
0ab9e4848d Fix for unfreed memory of the default empty mesh.
When using a static variable for this it needs to be destroyed explicitly.
2015-11-21 17:00:27 +01:00
6fb22ddfed Reference counting for mesh_ptr variables on the stack.
Any extensive data stored as a pointer on the stack should be ref-counted,
so that it stays alive only as long as used by some node.

The way this works is by enclosing instructions that access the stack
entry with 'init'/'release' opcodes. These are added automatically based
on output socket types (nodes don't have to be created explicitly for them).
2015-11-21 11:56:01 +01:00
9188ac0896 Merge branch 'master' into object_nodes 2015-11-21 11:35:30 +01:00
cc31a5696d Extended graphviz debug printing to also show the graph input/output connections. 2015-11-20 17:37:02 +01:00
1074abc470 Node graph optimization: skip over 'pass' nodes.
These nodes don't have opcodes any more, they are merely placeholders
to simplify node graph construction. Ultimately they will be removed
in the 'finalize' function, along with any other unreachable nodes.
2015-11-20 17:01:43 +01:00
6ee2d69201 Removed unused function declaration get_node_type_from_opcode 2015-11-20 16:03:58 +01:00
5d99ad37ea Use a single geometry subtree also for the graphviz debug function. 2015-11-20 10:22:41 +01:00
4aaa1bed74 Use the geometry subtree in object nodes rather than the toplevel node tree.
This is currently a hack, since only a single geotree is used. Eventually
all geometry subtree result should just be combined.
2015-11-20 10:12:35 +01:00
73bbfe5711 Removed unused code. 2015-11-20 09:58:33 +01:00
da90b8ef79 Added a 'PASS_MESH' node. 2015-11-19 17:19:43 +01:00
07a30be179 Make an extra copy of the resulting node DM after eval.
This is necessary unfortunately because of the unreliable nature of dm->needsFree.
Without it the BKE_object_free_derived_caches function can destroy our static
empty DM at any point.
2015-11-19 17:18:11 +01:00
79dcd08a8a Added an assertion to make sure we don't add invalid node instances with unknown types. 2015-11-19 17:01:46 +01:00
a30be36030 Added a graphviz debug dump function for the object modifier node tree. 2015-11-19 16:42:03 +01:00
8a4fbdcbb4 Use the default output value for graph returns in case they remain unlinked.
In case of meshes this will always be an empty mesh, but it at least gives a valid return value.
2015-11-19 16:12:36 +01:00
ceb9eba6bd Foundations for a mesh data type in bvm 2015-11-19 15:50:36 +01:00
950e2644e8 Mesh type for storing DerivedMesh as a temporary storage on the node eval stack. 2015-11-19 09:59:30 +01:00
a7bfdb0cdf Use a full TypeDesc in node sockets.
For the time being this is synonymous with the base type, but in future
it could allow (fixed-size) arrays and vector semantics.
2015-11-18 10:21:16 +01:00
0c2cfb44f0 Set of basic node classes for representing modifiers in pynodes. 2015-11-18 10:20:49 +01:00
5de05567f9 Simple integration of object nodes into the modifier stack evaluation. 2015-11-18 10:20:19 +01:00
88dcc8566c Merge branch 'master' into object_nodes 2015-11-18 09:27:08 +01:00
6d9406453a Removed an unconventional typename use that causes problems with MSVC. 2015-11-10 10:59:59 +01:00
1e84d69d72 Refactor: renamed 'Expression' to 'Function'. 2015-11-09 16:16:42 +01:00
fbdaaa72e9 Removed unused deprecated code parts. 2015-11-09 13:22:01 +01:00
dec5472349 Disabled some unused function args. 2015-11-08 12:20:26 +01:00
f37d7ed83b Merge branch 'master' into object_nodes 2015-11-08 09:35:20 +01:00
238e2389c0 Add support for texture node trees in new dependency graph. 2015-11-07 17:15:28 +01:00
b03095919a Added clouds noise pattern node. 2015-11-06 17:04:41 +01:00
1d67149c59 Use the material blending function for the RGB mix node for the time being. 2015-11-06 11:47:45 +01:00
d3bc6dcb67 Added the RGB mix node (unfinished). 2015-11-05 17:56:55 +01:00
151ed70fc0 Fix for debug output to avoid backward links when inputs/outputs share a name. 2015-11-05 11:09:41 +01:00
7e50fc041d Added some more opcodes for scalar multiplication and division. 2015-11-04 17:39:20 +01:00
2330dae3ef Added optional automatic datatype conversion for nodes.
This only applies to a handful of common types that can be unambiguously converted.
In any other case the link is considered invalid (proper error handling still needed).
2015-11-04 14:08:59 +01:00
06c957fc70 Made node name arguments optional.
Node names are only used for identifying them in debugging, but
can just be autogenerated as well.
2015-11-04 13:43:39 +01:00
c64c3e41e3 Make the compose/decompose and scalar math nodes work for textures. 2015-11-04 11:39:59 +01:00
84ab551f35 Missing C header for the vfprintf function. 2015-11-04 11:22:33 +01:00
255edd977f Merge branch 'master' into object_nodes 2015-11-04 11:05:49 +01:00
fd1a206f92 Added explicit vector input socket to the procedural texture nodes. 2015-11-04 11:03:02 +01:00
498ca41b8a Added graphviz debug output for parsed bvm node graphs. 2015-11-03 13:51:32 +01:00
6bb619039b Cleanup for the texture node compiler API functions. 2015-11-03 11:02:51 +01:00
965cae5a7b Removed unused code. 2015-11-02 14:27:22 +01:00
3561b4ca36 Use an object pointer from the evaluation data, rather than storing just indices. 2015-11-02 14:23:44 +01:00
09f875e164 Pointer type for passing opaque DNA references and the like through the VM. 2015-11-02 12:44:12 +01:00
e98a35220d Moved the conversion of bNodeTree (DNA/pynodes) to python code for simplicity.
This has several advantages over doing the same in C/C++ code:

- The two parts of the code are clearly separate (parsing DNA settings vs. building and evaluating)
- UI constructs with modes, special cases, etc. can be done in py, heavy lifting still happens in C
- Scripters can easily add own nodes without having to deal with internals
2015-11-01 12:41:49 +01:00
1591616e37 Added first procedural texture node (voronoi). 2015-10-30 10:23:32 +01:00
175e041ddf Texture coordinates node. 2015-10-29 12:31:06 +01:00
846a7c7467 Invalidate the texture bvm program cache when the Tex datablock is updated. 2015-10-29 12:13:07 +01:00
d86fae6d84 Start of a texture node replacement using the bvm system. 2015-10-29 11:19:44 +01:00
a067dccf65 Staged construction of node graphs from bNodeTrees through a "parser".
This wraps mapping of sockets and links in a nice small API.
2015-10-28 17:52:04 +01:00
3692460b5c Added a float4 type for rgba colors mostly. 2015-10-27 12:32:34 +01:00
e0f6b915e8 Internal support for 4x4 matrices in the bvm types. 2015-10-27 10:16:23 +01:00
e5bb9709e6 Renamed 'effector' data to 'point' data. 2015-10-26 13:08:16 +01:00
73de04b202 More vector math node modes. 2015-10-26 12:22:31 +01:00
e3ea07adc4 Effector closest-point node for mesh-based for fields. 2015-10-26 11:32:54 +01:00
2394fe7fbf Merge branch 'master' into object_nodes 2015-10-26 09:34:42 +01:00
5f70cc6c8d Added globals as a distinct argument to the eval function. 2015-10-22 22:52:10 +02:00
bd9f26871e Support for constants as internal node socket inputs.
Constants should never be linked to other nodes (will be ignored).
2015-10-22 14:14:04 +02:00
b229fac8a0 Added an integer type for node sockets. 2015-10-22 13:45:35 +02:00
c9803d3a29 Cleanup: removed unused test code. 2015-10-21 17:24:04 +02:00
abb8eba2ab Fix for multiplicity of internal socket mapping.
A Blender bNode input socket can represent multiple internal node inputs,
so mapping for links must use a set rather than a single socket.
2015-10-21 13:00:38 +02:00
a9f47080d8 First input node: getting basic properties of the "effected" point. 2015-10-21 11:47:26 +02:00
f9f2acfce1 Complementary separate/combine nodes for vectors. 2015-10-21 10:33:42 +02:00
b6e821ee72 Added all the scalar math modes. 2015-10-20 13:57:52 +02:00
76890d8285 Cleanup: Separate folders for compiling nodes and for executing the resulting bvm programs. 2015-10-20 10:46:10 +02:00
8ea69ffbc7 Use a map to ensure proper links between internal nodes.
Socket names usually don't match the internal nodes exactly.
2015-10-19 18:11:29 +02:00
d47b643874 Added a topological sorting pass to make sure nodes are compiled in the right order. 2015-10-19 16:38:05 +02:00
6a890c568e Some simple math nodes to test node connections. 2015-10-19 16:18:05 +02:00
0d751648f8 Test of node conversion from bNodes to internal instruction graph. 2015-10-19 12:16:48 +02:00
e1a6f41fc9 Next compiler step: convert internal node graph to opcode instructions. 2015-10-19 11:17:49 +02:00
e20e6e49ef init/free functions for blenvm to have a place for global initializations. 2015-10-18 16:45:48 +02:00
18815cfaaf First test of the VM evaluation function. 2015-10-18 15:48:09 +02:00
56d8228713 Merge branch 'master' into mesh_samples 2015-10-11 15:51:07 +02:00
522295f4f7 Create expression return values based on node tree outputs. 2015-10-11 15:02:47 +02:00
b8a4646856 Invoke the BVM expression eval for effectors. 2015-10-11 12:24:55 +02:00
4a239bc2ff Integration of BVM into the effector system for using programmable expressions there. 2015-10-10 10:48:59 +02:00
ec314ae15f Use a dedicated struct EffectorContext for storing results of effector
lookup rather than a plain ListBase.

This paves the way for future inclusion of evaluation context info in
the EffectorContext struct, and hides some of the annoying details of
the ListBase double dereferencing.
2015-10-10 10:26:18 +02:00
bbb5ed35b1 Function for converting a bNodeTree into the internal low-level bvm node graph. 2015-10-09 15:33:08 +02:00
80b6a5e29c Merge branch 'master' into object_nodes 2015-10-09 15:04:09 +02:00
5a5dcc509d Copied the nodegraph classes from the llvm test branch. 2015-10-08 15:11:16 +02:00
f99359418c Added "expressions" as a reduced definition of a function for evaluating instruction lists. 2015-10-08 10:36:30 +02:00
892529029f Port over the improved mesh sampling API from the mesh_samples branch. 2015-09-19 17:33:37 +02:00
d820eb1265 Merge branch 'master' into mesh_samples 2015-09-19 16:59:26 +02:00
3aaca08aad Merge branch 'master' into strand_editmode
Conflicts:
	source/blender/editors/sculpt_paint/paint_ops.c
2015-09-19 16:29:04 +02:00
84485606a7 Merge branch 'master' into object_nodes 2015-09-19 08:51:48 +02:00
0590430509 Fix minor error from strict pointer casts. 2015-09-17 10:12:27 +02:00
a358a5734f API for adding and deleting BVM functions. 2015-09-11 14:26:09 +02:00
849b5aec20 New bf library 'BlenVM' ("Blender Virtual Machine", BVM), as a general purpose runtime node backend.
This library provides a way to register modules and functions. Functions are simple
opcode-based descriptions of functionality (programs). They can be evaluated with
a simple interpreter using monolithic kernels, or could be compiled into more
optimized languages via LLVM or OpenCL.
2015-09-11 13:53:34 +02:00
bb5da70b5d Fixed categories for nodes, so only the appropriate nodes for each tree
type are used.
2015-09-11 10:27:28 +02:00
a565324f15 Use the familiar tab/ctrl+tab keymap for opening/closing nodes. 2015-09-11 10:27:28 +02:00
80a149c1eb Some basic nodes for nesting force fields inside the object nodes. 2015-09-11 10:27:28 +02:00
d2442ac1cf Registering an id property type for ObjectNode subclasses is optional. 2015-09-11 10:27:28 +02:00
347e2152db Added an optional poll function for the generic id property of
ObjectNodes.

This allows more detailed polling of ID blocks, beside the basic type.
2015-09-11 10:27:28 +02:00
3694a7bdfc Fix for registering RNA classes with registered parent functions.
The recursive registration for functions uses a simple int array for
flagging found functions. This is shared with the parent, so any child
functions will overwrite parent function flags for the same index
(this is not overloading).

The patch now requires using a larger array that can accomodate all
registerable functions from parents and children. It puts flags for
parents first, then children.
2015-09-11 10:26:06 +02:00
d868990224 A new base type for object nodes.
This includes a generic 'id' pointer for a single ID datablock pointer
in the node. The ID type can be defined using the `bl_id_property_type`
registerable attribute.
2015-09-11 10:25:49 +02:00
4cc10122f2 Context function for getting the object nodes in the node editor. 2015-09-11 10:25:38 +02:00
0cd3fef301 A basic Object node tree pointer property for use as component nodes. 2015-09-11 10:24:59 +02:00
5f6d9e301e Implementation of Volume Sampling on meshes.
Based on the ray casting technique described here: http://www.joesfer.com/?p=84

Volume samples currently are not bound to mesh deformation in any way, they are
simple object-space locations. Potentially a harmonic weight approach as in
mesh cages could be used.
2015-08-21 16:45:36 +02:00
05281abca1 Merge branch 'master' into mesh_samples
Conflicts:
	release/datafiles/locale
	release/scripts/addons
	source/blender/blenkernel/CMakeLists.txt
2015-08-21 15:07:47 +02:00
38d9301674 Another fix for mirror editing of strand data.
Currently strand edit mode tool use the object data 'x mirror' flag.
This flag is only available on mesh objects, but the strand editing
can be used for dupli override caches etc. as well. Eventually strand
editing should get it's own independent flag to avoid this problem.
2015-05-05 14:27:44 +02:00
fbc70fa51c Fix for call to mirror functions when mirroring is not enabled, giving
warnings.
2015-05-05 14:03:59 +02:00
d52bdb6d3d Moved particle related functions of the strands edit mode into a
separate file.

This may seem a bit like overkill, but it helps ensure that no particle
depedencies messes up the strand editing code. The same will be done for
other use cases of the strand editing code in the future.
2015-05-04 18:37:45 +02:00
16b6d6c676 Added missing CD layer type name for MSurfaceSample. 2015-05-04 17:52:13 +02:00
bf7e8b42fa Merge branch 'master' into strand_editmode
Conflicts:
	source/blender/bmesh/bmesh_class.h
	source/blender/bmesh/intern/bmesh_mesh_conv.h
2015-05-04 17:14:25 +02:00
20e960215a Particle shapekey code is only in the gooseberry branch, disabled here. 2015-04-20 12:59:01 +02:00
9cafd3ae56 SimDebugData is now global, for easier usage and less intrusive code. 2015-04-20 12:58:16 +02:00
0dccffb7aa Fix for CustomDataType syntax error from merging. 2015-04-20 12:37:21 +02:00
7719a6365a Use the X mirror option in new strand edit stroke brush tools.
Note that currently this has virtually no effect, because the mirror
option relies on exact positions of vertices, which does not happen with
random hair placement (the add brush has no mirror option yet).

Eventually topological mirroring should help with this case, but is not
implemented for either old or new strand edit yet.
2015-04-20 12:25:18 +02:00
3a3327dcd5 Cleanup: rename function argument for consistency. 2015-04-20 12:25:18 +02:00
8ffcd1f434 Utility methods for mirrored strand editing.
These are a modified version of their BMEditMesh counterparts.

use_topology is not yet implemented for strands. Native strand topology
is not very useful for this. Instead, the topology of the scalp mesh
should be used for finding mirrored strand roots, then the arc- or
parametric length of a vertex from the root to find mirrored verts.

Conflicts:
	source/blender/blenkernel/BKE_editstrands.h
2015-04-20 12:25:15 +02:00
ed1dc43657 Fix for strands undo creating an invalid BMesh.
When copying mesh data to bmesh the MVERT and similar customdata types
have to be omitted. Otherwise the bmesh instance ends up with NULL
pointers in customdata layers, but entries in the typemap != -1. The
effect was that when storing new steps after one or more undo, the
resulting original data would be copied, and subsequent undo steps
are ignored.
2015-04-20 12:24:34 +02:00
5b9b779cab Minor code reshuffling. 2015-04-20 12:24:34 +02:00
4798464e8b Extended Mesh <-> BMesh copy function versions for specifying custom
data masks explicitly.

A dummy mesh is used for strand edit undo storage like in mesh edit
to prevent unnecessary code duplication. However, when copying from/to
BMesh only the mesh data layers are copied by default, omitting the new
data layers for strands (currently only MSurfaceSample hair root data).
2015-04-20 12:24:33 +02:00
299859e40b Sanity check: if there is no edited/active object for an undo step,
consider it invalid and clean up.
2015-04-20 12:24:33 +02:00
5e42aff397 Basic undo support in the new strand edit mode.
This uses the generalized undo stack system which is also used for
object data edit. An extension is necessary to tell the undo functions
which object is specifically used for generating undo data and
identifying the stack, since strand editing does not edit the obdata
itself.
2015-04-20 12:24:33 +02:00
3f539c987f Removed deprecated UI button for the hair debug flag. 2015-04-20 12:24:33 +02:00
6146b90312 Select Linked operator for hair edit mode (select all vertices of a
strand).
2015-04-20 12:24:03 +02:00
8b2ec99f57 Lasso Select operator for hair edit mode. 2015-04-20 12:24:03 +02:00
410998cdc6 Border Select operator for hair edit mode. 2015-04-20 12:24:03 +02:00
b6f4e0932d Mouse Select operator for hair edit mode. 2015-04-20 12:24:03 +02:00
62fa5c4a84 Select/Deselect All operator for hair edit mode. 2015-04-20 12:24:03 +02:00
2cddc3cda8 Disabled the partial IK strand relaxation for the time being.
First goal is to reproduce current particle edit tools in the strand
edit mode, then make improvements.
2015-04-20 12:24:03 +02:00
9120df6cb3 Missing bmesh include path in scons files. 2015-04-20 12:24:02 +02:00
48a86af388 IK solver for hair strands that provides a better solution for keeping
consistent segment lengths when transforming vertices.

Warning: The implementation is not correct yet, but all the steps should
be there.

The main idea is to treat strands as a sequence of joints that are
displaced out of their original locations by a transform or other tool.
The solver then tries to find a global per-strand solution that keeps
the segment lengths unmodified, with a minimum change in angles from
the original starting shape. Such a solution is much more usable and
efficient than the current O(n^2) attempt of "spreading the error"
across the strand.

The inverse kinematics method is very flexible. It can also include
stretching, which would be very welcome for features like the length
tool. Different parts of the strand could be weighted separately using
scaling factors for the angle/stretch parameters.

Conflicts:
	source/blender/physics/intern/implicit.h
2015-04-20 12:24:00 +02:00
eacc24ccf1 Ported over the relaxation method for hair vertices from particle edit
mode.

This method is simple, but not really very usable. It works by
successively relaxing segments that are too long or too short, moving
both vertices along the edge between them. This is repeated N^2 times
(N: number of vertices on the strand).

A true IK solver could give a lot better results, as well as providing
many opportunities to apply weighting for targets (e.g. preferring to
move non-selected over selected vertices). Many different methods for
simple IK solvers exist, so there should be one that works well for
large number of simple strands. See e.g.
http://www.math.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf
2015-04-20 12:23:49 +02:00
ac54ded29b Primitive transform operator support for strand vertices.
This does not yet prevent root transforms and/or length changes.
2015-04-20 12:23:49 +02:00
f7511b3d01 Improved hair combing tool, adjusting edge directions instead of
vertex positions.

This works a lot better with strokes perpendicular to the general hair
strand direction. With the previous comb tool such strokes would only
make a small dent in the hair curve and then vertices would slip out
of the tool circle. The edge combing affects the local direction of
strands, which acts as a kind of grabbing functionality by moving
further vertices in front of the tool circle. The result is that
drawing a curvy hair shape with the comb becomes much easier.

In addition, the new tool also uses edge filtering and weighting rather
than vertices. This means that small brushes also work well, instead
of having no effect when hitting the edge segments between vertices.

Further improvement could be achieved later by using a global strand
solver, which adjusts vertex positions based on an error metric along
the whole of the strand.
2015-04-20 12:23:48 +02:00
208ddcde2c Use a simple low-pass filter to generate a smoother, more stable
direction vector for the hair stroke tool.

This is necessary for directional tools such as combing, where the
stroke direction can lead to unwanted results if it changes too
abruptly.
2015-04-20 12:23:48 +02:00
f3b22c5769 Support for sim_debug drawing in hair edit mode (dev feature). 2015-04-20 12:23:48 +02:00
b70c815ac2 Renamed the edithair files in BKE to editstrands.
The rationale behind this is that the BKE code could be used for
modeling hair and fur as well as a number of other features such as
grass. The primary addition to BMesh is the limitation to strand-like
topology (simple vertex chains, optionally rooted on a mesh surface).

The editor code OTOH is quite hair specific, since the result should
be suitable for hair simulation, and the workflow should mimick actual
hair grooming intuitively. Eventually the hair edit mode could become
a generalized strand edit mode with slightly different tool sets for
various purposes, but for now it is quite specifically built for hair.

Conflicts:
	source/blender/blenkernel/CMakeLists.txt
	source/blender/blenkernel/intern/particle.c
2015-04-20 12:23:46 +02:00
d0a1fc8bb0 Sanity check for strand root/tip checks, now supports single vertices. 2015-04-20 12:23:23 +02:00
2d1d909817 MSVC compiler cannot handle standard C code.
Conflicts:
	source/blender/editors/physics/particle_edit.c
2015-04-20 12:23:20 +02:00
e9737da5f2 Fix scons build files for new hair edit code parts. 2015-04-20 12:23:16 +02:00
1e047231c6 Fix for hair-to-particle export: need to set weight=1.0 for hair roots,
since the particle system uses this for pinning them to the mesh.
2015-04-20 12:23:16 +02:00
142ef0b2e9 Fixed lib-linking for hair edit settings brush and object pointers. 2015-04-20 12:23:15 +02:00
56a09434c5 Basic Add tool for creating new strands in hair edit mode. 2015-04-20 12:23:15 +02:00
8672304e30 Fix for uninitialized return value. 2015-04-20 12:23:15 +02:00
f95dde244e Better feedback about valid sample from mesh sampling methods.
Conflicts:
	source/blender/editors/object/object_shapekey.c
2015-04-20 12:23:15 +02:00
79e649a3bf New simple storage method for single sample values. 2015-04-20 12:23:15 +02:00
e5b25e3c07 Generic raycast method for generating mesh surface samples.
Conflicts:
	source/blender/blenkernel/intern/mesh_sample.c
2015-04-20 12:23:15 +02:00
a4664ef88d New mesh sample evaluation function for shape key data. 2015-04-20 12:23:15 +02:00
be312b1399 First selection operator implementation for hair edit: circle select. 2015-04-20 12:23:14 +02:00
3edc512888 Show selection state of hair vertices with the usual theme colors. 2015-04-20 12:23:14 +02:00
b2ea8c1022 Added back different selection modes (strands, verts, tips) for hair
editing.
2015-04-20 12:23:14 +02:00
339a8b7521 Fix for OpenlGL state restoration after strand drawing, disable color
material option.
2015-04-20 12:23:14 +02:00
77da317cb1 Apply the same weight profile in the comb tool as in particle edit mode.
The comb tool will likely get a complete overhaul, but until then it
should just behave like the old tool.
2015-04-20 12:23:14 +02:00
2c0616b034 Support for common operators, keymap entries and radial controls for
hair brush settings.
2015-04-20 12:23:14 +02:00
a9fbd3b23b Fix for brush radius, the Brush.size property is actually the radius and
not the diameter.
2015-04-20 12:23:14 +02:00
687b5a1ec0 Implemented basic cursor drawing for hair edit mode brushes. 2015-04-20 12:23:13 +02:00
59efe23830 Primitive hair lighting in OpenGL solid shading, cleanup of strands
drawing code for edit mode.

The lighting uses the same method as the particle hair, interpreting
strand direction as the normal. This is nowhere near realistic hair
shading, but doing this with line shading alone in the fixed-function
pipeline is probably not possible. A GLSL shader could be used instead
for a more realistic alternative as part of the viewport project. At
least this simple shading mode gives some orientation feedback while
editing hair.
2015-04-20 12:23:13 +02:00
d16599ea04 Display basic brush properties in the toolbar for hair edit mode. 2015-04-20 12:23:13 +02:00
37d3a3331e Use the "official" brush size calculated by blenkernel and subdivide
the stroke step to avoid tunneling.
2015-04-20 12:23:13 +02:00
5254df30ba Filter affected hair vertices in edit mode based on the brush size and
z depth.
2015-04-20 12:23:13 +02:00
2590231315 Constrain hair root vertices to their mesh location after applying tools.
Conflicts:
	source/blender/bmesh/intern/bmesh_interp.c
	source/blender/bmesh/intern/bmesh_interp.h
2015-04-20 12:23:11 +02:00
83b20c7ddf Enforce hair constraints (constant segment length) after applying a tool.
Currently uses the same approach as old particle edit mode (rescale
hair segments from the root on). A more sophisticated approach using
least-square error minimization of the displacement could yield better
results.
2015-04-20 12:22:10 +02:00
0e06a60168 Make sure tool input data is in object space. 2015-04-20 12:22:10 +02:00
121677d7c8 Nicer vector math for mouse coordinates. 2015-04-20 12:22:10 +02:00
1615da133f Simplified first version of the hair stroke combing functionality.
Stroke tools will be categorized by the hair elements they operate on:
vertices, segments or strands (roots). In addition to that a filter
function defines the influence of the brush. This should be defined by
the other brush settings and be largely independent of the main tool
mode.
2015-04-20 12:22:10 +02:00
7ae6492c85 Lots of small fixes for paint system quirks to make hair brushes work
in the UI.

Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
	source/blender/editors/transform/manipulator_widget.c
2015-04-20 12:21:58 +02:00
7779166313 Define hair edit settings and brush types in the RNA, similar to paint
and sculpt settings.

Conflicts:
	source/blender/makesdna/DNA_brush_types.h
2015-04-20 12:19:28 +02:00
833a11f891 New image file icons for hair brush tools and an according tool enum in
the Brush RNA.
2015-04-20 12:17:16 +02:00
79959152e6 Calculate some basic info about mouse strokes and context and pass it
on to a general hair tool function.
2015-04-20 12:17:16 +02:00
4fd6a7a696 Revert previous hair edit operator scaffolding and port over the old
operator for strokes instead.

The paint system is much too complicated and does not add any real
advantage at this point.
2015-04-20 12:17:16 +02:00
98b15d9a7c Copied high-level operator code from the paint/sculpt system as a basis
for brush-stroke operators in hair edit mode.

Hopefully this can help avoid some redundant code and ensure consistent
keymapping etc.
2015-04-20 12:17:16 +02:00
a889a1458c Missing bmesh include folder for hair editor in scons. 2015-04-20 12:17:16 +02:00
7b6332f634 Apply the hair matrices when converting from particle keys to bmesh,
so the edit data is consistently in object space.
2015-04-20 12:17:16 +02:00
0a27e97fb7 Fix for GL buffer size for edges, needs to 2x for two vertex indices. 2015-04-20 12:17:16 +02:00
eb5257002b New drawing code for hair edit mode.
Conflicts:
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/space_view3d/view3d_intern.h
2015-04-20 12:17:14 +02:00
23b284348b Removed deprecated code. 2015-04-20 12:15:17 +02:00
2d79994e39 Free strand edit memory after use. 2015-04-20 12:15:17 +02:00
fd34e3efbc Fix for verts-of-strand iterator: This requires a second pointer in
addition to the edge, otherwise the last point is omitted.
2015-04-20 12:15:17 +02:00
dc43df89cd CustomData layer for storing hair root locations as MSurfaceSamples.
This requires converting the old messy particle num/num_dmcache/fuv/foffset
data into the new mesh samples, which can potentially introduce floating
point errors and inaccuracies due to lack of face index mapping in the
new system. However, in any well-constructed particle system the hair
roots should be nearest to their num face, so mapping would be accurate
enough. If necessary face index data could be added to samples as a
legacy code hack, but probably it's best to eventually replace the
hair system as a whole anyway.
2015-04-20 12:15:17 +02:00
4e47239de2 Store the hair key weight in edit mode.
Currently particles only have a single weight value, controlling
pinning in the simulation (for root and virtual root verts) and goal
force scaling. This will be replaced by a full vertex group weight
system eventually.
2015-04-20 12:15:17 +02:00
991ee8a570 First customdata layer for particle mass.
This is more for testing purposes, since currently there is only a
single mass property for the psys as a whole. This should change in the
future though, to allow variable mass per strand or vertex.

Conflicts:
	source/blender/bmesh/intern/bmesh_interp.c
2015-04-20 12:15:15 +02:00
e43ef55e7f Basic particle data reconstruction when exiting edit mode. 2015-04-20 12:14:34 +02:00
1afd5be044 Fix for verts-of-strand iterator: After last edge step has to set the
edge to NULL to avoid infinite looping over the same edge (1-elem disk).
2015-04-20 12:14:34 +02:00
d550a29558 Fix for particle-to-bmesh: only was looping over totvert instead of
pa->totkey.
2015-04-20 12:14:34 +02:00
5f44f4a2ff Intermediate commit: switching strand edit data to BMesh.
Hair/Strand editing will only use a subset of the bmesh topology and
expect a specific topology that needs to be verified and enforced.
However, this extra requirement is much less work than reimplementing a
whole edit data system with the same feature set as bmesh and avoids
much redundant code.

Conflicts:
	source/blender/blenkernel/intern/customdata.c
	source/blender/makesdna/DNA_customdata_types.h
2015-04-20 12:14:30 +02:00
b0a9e48a19 New customdata type for mesh surface samples.
Conflicts:
	source/blender/makesdna/DNA_customdata_types.h
2015-04-20 12:14:23 +02:00
afb947c00c Switched the hair edit data to a bmesh-like structure for consistency.
This means using mempools to store curve and vertex data, which allows
arbitrary addition and removal of data more easily. Also this includes
an iterator system similar to bmesh iterators (although the simpler
topology makes it a lot less complex).

Conflicts:
	source/blender/blenkernel/intern/customdata.c
	source/blender/makesdna/DNA_customdata_types.h
2015-04-20 12:13:35 +02:00
f1e4d35489 Reconstruct most basic particle data when applying the hair edit, so
particle hairs remain visible.

Note that currently the hair root location (num/num_dmcache, fuv, foffset)
is not stored from edit data, so all hairs end up in a default location.
2015-04-20 12:12:01 +02:00
1c7053f7a0 Store hair edit data in particle systems and manage it in the operator
for entering/exiting the edit mode.

Conflicts:
	source/blender/blenkernel/intern/particle.c
2015-04-20 12:11:59 +02:00
7bb90a06e1 Moved code for the hair edit data structures to blenkernel.
This makes it work more like editmesh, and avoid the awkward and
basically bad-level approach in particles, where the edit data is an
anonymous pointer in particle systems together with a callback for
freeing.

Conflicts:
	source/blender/blenkernel/CMakeLists.txt
2015-04-20 12:11:44 +02:00
a9001adbb4 New edit mode for hair.
Conflicts:
	source/blender/blenloader/intern/readfile.c
2015-04-20 12:11:05 +02:00
dd69a3dbcf Finished the particle-to-edit conversion function. 2015-04-20 12:10:33 +02:00
c65f1b2e15 More work on particle conversion methods for hair edit mode. 2015-04-20 12:10:33 +02:00
09a7dbc29a New editor library for hair edit mode. 2015-04-20 12:10:33 +02:00
6078e79cea Minor syntax fix. 2015-04-20 12:10:33 +02:00
6783b15453 Shifted the dispatch from the algorithm side to the storage side of the
sampling system to keep the code simple.

Now there is a MSurfaceSampleStorage struct that encodes the storage
details, which the algorithms don't have to care about.
2015-04-20 12:10:33 +02:00
82132fc5b0 Added generalized method for creating an array of mesh samples with
arbitrary stride.
2015-04-20 12:10:32 +02:00
4b4f24607e Changed mesh sample definition to use 3 vertex weights instead of a
face index. This is easier to sample uniformly and avoids the need for
tesselation for evaluating.
2015-04-20 12:10:32 +02:00
fe48c353f1 Normalize the normal vector after sample eval to account for
interpolation.
2015-04-20 12:10:32 +02:00
308af3bfb3 Added a bool return to the eval function to give feedback on invalid
samples.
2015-04-20 12:10:32 +02:00
3f7d66ece4 Added a basic RNA definition for the mesh sampling system. 2015-04-20 12:10:32 +02:00
a952800ffc Eval function to get a location and normal vector from mesh samples. 2015-04-20 12:10:32 +02:00
71e34dad2b Usable random distribution algorithm.
Does not include area weighting yet.
2015-04-20 12:10:32 +02:00
24b77359ae Skeleton code for sampling meshes.
Conflicts:
	source/blender/blenkernel/CMakeLists.txt
2015-04-20 12:10:29 +02:00
62aabdd550 Merge remote-tracking branch 'github_lukastoenne/mesh_samples' into mesh_samples 2014-12-05 12:17:53 +01:00
2204bb092b Merge branch 'master' into mesh_samples 2014-12-05 11:23:38 +01:00
8374e08894 Mesh sampling system for unified point-on-mesh handling.
This code is not yet used by any feature in master, but has proved very useful in the Gooseberry branch and several WIP patches. Inclusion into master was requested to avoid diverging code in branches and get part of the Gooseberry code merged early on.

The core idea is to have a common way of identifying points on mesh surfaces. Efficient evaluation of such points after deformation and mappable modifiers (e.g. subdivision) tracks positions, normals and other surface attributes. This is used extensively in the particle/hair systems and could be useful for certain tools, duplicators, etc.. Currently the particle systems in particular are very fragile and succeptible to mesh changes because of the unreliable way mesh surface mapping is stored. While the new system at this point uses essentially the same method, it at least provides a centralized DNA type that can be improved easily without too much effort and compatiblity issues.

In addition to evaluating surface samples the system also provides a central place to implement surface sampling algorithms, such as random sampling, ray casting, paint-like tools, etc.

Differential Revision: https://developer.blender.org/D922
2014-12-01 15:10:16 +01:00
822949a3e2 Fix for uninitialized return value. 2014-12-01 14:42:18 +01:00
a86869af8f Better feedback about valid sample from mesh sampling methods.
Conflicts:
	source/blender/editors/object/object_shapekey.c
2014-12-01 14:41:02 +01:00
ca31ce144e New simple storage method for single sample values. 2014-12-01 14:38:03 +01:00
f61f7e2d57 Generic raycast method for generating mesh surface samples. 2014-12-01 14:36:10 +01:00
3036cedd90 New mesh sample evaluation function for shape key data. 2014-12-01 14:34:59 +01:00
cc5b3c2ff7 Merge branch 'mesh_samples' of github.com:lukastoenne/blender into mesh_samples 2014-12-01 14:29:41 +01:00
a30f9ffa87 Merge branch 'master' into mesh_samples
Conflicts:
	release/datafiles/locale
	release/scripts/addons
2014-12-01 14:29:09 +01:00
3361788b1c Merge branch 'master' into mesh_samples
Conflicts:
	release/datafiles/locale
	release/scripts/addons
2014-11-30 10:08:09 +01:00
21ab9ac9e3 Minor syntax fix. 2014-09-24 17:35:41 +02:00
18c6bb2436 Shifted the dispatch from the algorithm side to the storage side of the
sampling system to keep the code simple.

Now there is a MSurfaceSampleStorage struct that encodes the storage
details, which the algorithms don't have to care about.
2014-09-24 17:04:41 +02:00
a93841e3d4 Added generalized method for creating an array of mesh samples with
arbitrary stride.
2014-09-24 15:58:53 +02:00
728b6ed8e6 Merge branch 'master' into mesh_samples 2014-09-24 15:54:21 +02:00
fa0163b8c7 Changed mesh sample definition to use 3 vertex weights instead of a
face index. This is easier to sample uniformly and avoids the need for
tesselation for evaluating.
2014-03-04 15:39:48 +01:00
7112a531b2 Normalize the normal vector after sample eval to account for
interpolation.
2014-03-04 13:42:51 +01:00
60cde6ca4a Added a bool return to the eval function to give feedback on invalid
samples.
2014-03-04 13:42:06 +01:00
717db95210 Added a basic RNA definition for the mesh sampling system. 2014-03-03 17:57:56 +01:00
a944cf8450 Eval function to get a location and normal vector from mesh samples. 2014-03-03 14:10:58 +01:00
a1dd14c764 Usable random distribution algorithm.
Does not include area weighting yet.
2014-03-03 12:36:02 +01:00
47d024c2b0 Merge branch 'master' into mesh_samples 2014-03-03 11:56:02 +01:00
30e02b9a19 Skeleton code for sampling meshes. 2014-03-03 10:59:36 +01:00
10110 changed files with 1895955 additions and 2449539 deletions

View File

@@ -2,6 +2,5 @@
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "master"
"arc.land.update.default" : "rebase"
}

View File

@@ -1,250 +0,0 @@
# Configuration of clang-format
# =============================
#
# Tested to work with versions: 6 to 8.
# This causes parameters on continuations to align to the opening brace.
#
# like_this_long_name(parameter_one,
# parameter_two,
# parameter_three);
#
AlignAfterOpenBracket: 'Align'
# Disallow short functions on one line; break them up.
AllowShortBlocksOnASingleLine: false
# These two settings trigger stacking of parameters in most cases; this is
# easier to read and also makes diffs easier to read (since an added or removed
# parameter is obvious). For example, function calls will look like this:
#
# like_this_long_name(parameter_one,
# parameter_two,
# parameter_three,
# parameter_four,
# parameter_five,
# parameter_six);
#
# Instead of:
#
# like_this_long_name(parameter_one, parameter_two, parameter_three, parameter_four,
# parameter_five, parameter_six);
#
BinPackArguments: false
BinPackParameters: false
# Line width (don't exceed 100).
ColumnLimit: 99
# Cause initializer lists to have one member initialized per line, in the case
# that all initializers can't fit on a single line.
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Indent the : after a constructor. For example:
#
# explicit foo_class ()
# : member1_(5)
# {
# }
#
ConstructorInitializerIndentWidth: 4
# Make access modifier slightly more visible.
AccessModifierOffset: -1
# This will unfortunately use spaces in some cases where it's not desired (like
# function calls) but the overall result is better since it will allow
# alignment to work properly with different tab width settings.
ContinuationIndentWidth: 4
# This tries to match Blender's style as much as possible. One
BreakBeforeBraces: Custom
BraceWrapping: {
AfterClass: 'false'
AfterControlStatement: 'false'
AfterEnum : 'false'
AfterFunction : 'true'
AfterNamespace : 'false'
AfterStruct : 'false'
AfterUnion : 'false'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
AfterObjCDeclaration: 'true'
}
# For switch statements, indent the cases.
IndentCaseLabels: true
# Indent after the hash inside preprocessor directives
IndentPPDirectives: AfterHash
BreakBeforeTernaryOperators: false
SpaceAfterTemplateKeyword: false
# Handy comment at the end of each C++ name space.
FixNamespaceComments: true
# Use "if (...)" instead of "if(...)", but have function calls like foo().
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
# Use two spaces before trailing comments, for example
#
# foo = bar; // comment
#
# Note that this doesn't work for C-style comments.
SpacesBeforeTrailingComments: 2
# Reflow comments, developers must disable formatting as with code to override this.
ReflowComments: true
# Never use tabs for indentation.
# Note: TabWidth and IndentWidth must be the same, or strange things happen.
UseTab: Never
TabWidth: 2
IndentWidth: 2
# Add a big penalty on breaking after the return type of functions. For example,
#
# static void foo(...)
#
# Instead of:
#
# static void
# foo(very long content here that maybe could be stacked)
#
PenaltyReturnTypeOnItsOwnLine: 10000
# Avoid having function calls broken onto a new line:
#
# int a = foo(
# long, list, of, many, params);
#
# Instead of:
#
# int a =
# foo(long, list, of, many, params);
#
PenaltyBreakAssignment: 100
AllowShortFunctionsOnASingleLine: None
# Disable for now since it complicates initial migration tests,
# TODO: look into enabling this in the future.
SortIncludes: false
# Don't right align escaped newlines to the right because we have a wide default
AlignEscapedNewlines: DontAlign
# Always break:
#
# const char *foo =
# "multi"
# "line";
#
# Instead of:
#
# const char *foo = "multi"
# "line";
#
AlwaysBreakBeforeMultilineStrings: true
# We don't want literal strings to break,
# however clang-format seems to ignore this (sigh).
PenaltyBreakString: 1000000
# There are macros in Blender for custom for loops; tell Clang to treat them
# like loops rather than an expression, and so put the { on the same line.
#
# To find these use multi-line regex search:
# "^\s+[A-Z][A-Z0-9_]+\s*\([^\n]*\)\n\s*\{"
ForEachMacros:
- BEGIN_ANIMFILTER_SUBCHANNELS
- BLI_FOREACH_SPARSE_RANGE
- BLI_SMALLSTACK_ITER_BEGIN
- BMO_ITER
- BMO_ITER_INDEX
- BMW_ITER
- BM_FACES_OF_VERT_ITER_BEGIN
- BM_ITER_BPY_BM_SEQ
- BM_ITER_ELEM
- BM_ITER_ELEM_INDEX
- BM_ITER_MESH
- BM_ITER_MESH_INDEX
- BM_ITER_MESH_MUTABLE
- BM_LOOPS_OF_VERT_ITER_BEGIN
- BOOST_FOREACH
- CTX_DATA_BEGIN
- CTX_DATA_BEGIN_WITH_ID
- DEG_OBJECT_ITER_BEGIN
- DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN
- DRIVER_TARGETS_LOOPER_BEGIN
- DRIVER_TARGETS_USED_LOOPER_BEGIN
- FOREACH_BASE_IN_EDIT_MODE_BEGIN
- FOREACH_BASE_IN_MODE_BEGIN
- FOREACH_BEGIN
- FOREACH_COLLECTION_BEGIN
- FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN
- FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN
- FOREACH_EDIT_OBJECT_BEGIN
- FOREACH_MAIN_ID_BEGIN
- FOREACH_MAIN_LISTBASE_BEGIN
- FOREACH_MAIN_LISTBASE_ID_BEGIN
- FOREACH_NODETREE_BEGIN
- FOREACH_OBJECT_BEGIN
- FOREACH_OBJECT_FLAG_BEGIN
- FOREACH_OBJECT_IN_EDIT_MODE_BEGIN
- FOREACH_OBJECT_IN_MODE_BEGIN
- FOREACH_OBJECT_RENDERABLE_BEGIN
- FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN
- FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN
- FOREACH_SCENE_COLLECTION_BEGIN
- FOREACH_SCENE_OBJECT_BEGIN
- FOREACH_SELECTED_BASE_BEGIN
- FOREACH_SELECTED_EDITABLE_OBJECT_BEGIN
- FOREACH_SELECTED_OBJECT_BEGIN
- FOREACH_TRANS_DATA_CONTAINER
- FOREACH_VIEW_LAYER_TO_RENDER_BEGIN
- FOREACH_VISIBLE_BASE_BEGIN
- FOREACH_VISIBLE_OBJECT_BEGIN
- GHASH_FOREACH_BEGIN
- GHASH_ITER
- GHASH_ITER_INDEX
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
- GP_EDITABLE_STROKES_BEGIN
- GSET_FOREACH_BEGIN
- GSET_ITER
- GSET_ITER_INDEX
- ITER_BEGIN
- ITER_PIXELS
- ITER_SLOTS
- LISTBASE_CIRCULAR_BACKWARD_BEGIN
- LISTBASE_CIRCULAR_FORWARD_BEGIN
- LISTBASE_FOREACH
- LISTBASE_FOREACH_BACKWARD
- LISTBASE_FOREACH_MUTABLE
- LISTBASE_FOREACH_BACKWARD_MUTABLE
- MAN2D_ITER_AXES_BEGIN
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
- NODE_TREE_TYPES_BEGIN
- NODE_TYPES_BEGIN
- PIXEL_LOOPER_BEGIN
- PIXEL_LOOPER_BEGIN_CHANNELS
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SEQP_BEGIN
- SEQ_BEGIN
- foreach
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
# StatementMacros:
# - PyObject_VAR_HEAD
# - STRINGIFY

View File

@@ -1,44 +0,0 @@
# C/C++
[*.{c,cc,h,hh,inl,glsl}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 99
# CMake & Text
[*.{cmake,txt}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 99
# Python
[*.py]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
max_line_length = 120
# Shell
[*.sh]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 99
# reStructuredText
[*.rst]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 3
max_line_length = 120

9
.gitignore vendored
View File

@@ -11,10 +11,6 @@ __pycache__/
*.swo
*#
# Indexes for emacs, vi & others
TAGS
tags
# QtCreator
CMakeLists.txt.user
@@ -25,6 +21,7 @@ Desktop.ini
# commonly used paths in blender
/blender.bin
/user-config.py
/BUILD_NOTES.txt
# local patches
@@ -36,7 +33,3 @@ Desktop.ini
/doc/python_api/sphinx-in-tmp/
/doc/python_api/sphinx-in/
/doc/python_api/sphinx-out/
/doc/python_api/rst/bmesh.ops.rst
# in-source lib downloads
/build_files/build_environment/downloads

4
.gitmodules vendored
View File

@@ -1,20 +1,16 @@
[submodule "release/scripts/addons"]
path = release/scripts/addons
url = ../blender-addons.git
branch = master
ignore = all
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib
url = ../blender-addons-contrib.git
branch = master
ignore = all
[submodule "release/datafiles/locale"]
path = release/datafiles/locale
url = ../blender-translations.git
branch = master
ignore = all
[submodule "source/tools"]
path = source/tools
url = ../blender-dev-tools.git
branch = master
ignore = all

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# -*- mode: gnumakefile; tab-width: 4; indent-tabs-mode: t; -*-
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
# vim: tabstop=4
#
# ##### BEGIN GPL LICENSE BLOCK #####
@@ -24,140 +24,11 @@
# ../build_linux_i386
# This is for users who like to configure & build blender with a single command.
define HELP_TEXT
Convenience Targets
Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers).
* developer: Enable faster builds, error checking and tests, recommended for developers.
* config: Run cmake configuration tool to set build options.
* ninja: Use ninja build tool for faster builds.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
Project Files
Generate project files for development environments.
* project_qtcreator: QtCreator Project Files.
* project_netbeans: NetBeans Project Files.
* project_eclipse: Eclipse CDT4 Project Files.
Package Targets
* package_debian: Build a debian package.
* package_pacman: Build an arch linux pacman package.
* package_archive: Build an archive package.
Testing Targets
Not associated with building Blender.
* test:
Run ctest, currently tests import/export,
operator execution and that python modules load
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
* test_pep8:
Checks all python script are pep8
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
* check_cppcheck: Run blender source through cppcheck (C & C++).
* check_clang_array: Run blender source through clang array checking script (C & C++).
* check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only).
* check_spelling_c: Check for spelling errors (C/C++ only).
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
* check_descriptions: Check for duplicate/invalid descriptions.
Utilities
Not associated with building Blender.
* icons:
Updates PNG icons from SVG files.
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
otherwise default paths are used.
Example
make icons INKSCAPE_BIN=/path/to/inkscape
* icons_geom:
Updates Geometry icons from BLEND file.
Optionally pass in variable: 'BLENDER_BIN'
otherwise default paths are used.
Example
make icons_geom BLENDER_BIN=/path/to/blender
* tgz:
Create a compressed archive of the source code.
* update:
updates git and all submodules
* format
Format source code using clang (uses PATHS if passed in). For example::
make format PATHS="source/blender/blenlib source/blender/blenkernel"
Environment Variables
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
* BUILD_DIR: Override default build path.
* PYTHON: Use this for the Python command (used for checking tools).
* NPROCS: Number of processes to use building (auto-detect when omitted).
Documentation Targets
Not associated with building Blender.
* doc_py: Generate sphinx python api docs.
* doc_doxy: Generate doxygen C/C++ docs.
* doc_dna: Generate blender file format reference.
* doc_man: Generate manpage.
Information
* help: This help message.
* help_features: Show a list of optional features when building.
endef
# HELP_TEXT (end)
# System Vars
OS:=$(shell uname -s)
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
CPU:=$(shell uname -m)
# CPU:=$(shell uname -m) # UNUSED
# Source and Build DIR's
@@ -172,22 +43,6 @@ 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
ifndef DEPS_BUILD_DIR
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
endif
ifndef DEPS_INSTALL_DIR
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
ifneq ($(OS_NCASE),darwin)
# Add processor type to directory name
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
endif
# Allow to use alternative binary (pypy3, etc)
ifndef PYTHON
PYTHON:=python3
@@ -223,42 +78,6 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
endif
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake"
endif
# -----------------------------------------------------------------------------
# build tool
ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -G Ninja
BUILD_COMMAND:=ninja
DEPS_BUILD_COMMAND:=ninja
else
ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
BUILD_COMMAND:=ninja
else
BUILD_COMMAND:=make -s
endif
ifneq ("$(wildcard $(DEPS_BUILD_DIR)/build.ninja)","")
DEPS_BUILD_COMMAND:=ninja
else
DEPS_BUILD_COMMAND:=make -s
endif
endif
# -----------------------------------------------------------------------------
# Blender binary path
# Allow passing in own BLENDER_BIN so developers who don't
# use the default build path can still use utility helpers.
ifeq ($(OS), Darwin)
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
else
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
endif
# -----------------------------------------------------------------------------
# Get the number of cores for threaded build
@@ -267,7 +86,13 @@ ifndef NPROCS
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
@@ -279,7 +104,7 @@ endif
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
-H"$(BLENDER_DIR)" \
-B"$(BUILD_DIR)" \
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
# -----------------------------------------------------------------------------
@@ -288,7 +113,7 @@ CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
# X11 spesific
ifdef DISPLAY
CMAKE_CONFIG_TOOL = cmake-gui
else
else
CMAKE_CONFIG_TOOL = ccmake
endif
@@ -302,16 +127,16 @@ all: .FORCE
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# # $(CMAKE_CONFIG); \
# # fi
# # do this always incase of failed initial build, could be smarter here...
@$(CMAKE_CONFIG)
@echo
@echo Building Blender ...
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
@echo
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo Blender successfully built, run from: $(BLENDER_BIN)
@echo Blender successfully built, run from: "$(BUILD_DIR)/bin/blender"
@echo
debug: all
@@ -320,30 +145,7 @@ lite: all
cycles: all
headless: all
bpy: all
developer: all
ninja: all
# -----------------------------------------------------------------------------
# Build dependencies
DEPS_TARGET = install
ifneq "$(findstring clean, $(MAKECMDGOALS))" ""
DEPS_TARGET = clean
endif
deps: .FORCE
@echo
@echo Configuring dependencies in \"$(DEPS_BUILD_DIR)\"
@cmake -H"$(DEPS_SOURCE_DIR)" \
-B"$(DEPS_BUILD_DIR)" \
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
@echo
@echo Building dependencies ...
$(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
@echo
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
@echo
# -----------------------------------------------------------------------------
# Configuration (save some cd'ing around)
@@ -353,9 +155,81 @@ config: .FORCE
# -----------------------------------------------------------------------------
# Help for build targets
export HELP_TEXT
help: .FORCE
@echo "$$HELP_TEXT"
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@echo " * full - enable all supported dependencies & options"
@echo " * lite - disable non essential features for a smaller binary and faster build"
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * cycles - build Cycles standalone only, without Blender"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo ""
@echo " * config - run cmake configuration tool to set build options"
@echo ""
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
@echo " Note, passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments."
@echo ""
@echo ""
@echo "Project Files for IDE's"
@echo " * project_qtcreator - QtCreator Project Files"
@echo " * project_netbeans - NetBeans Project Files"
@echo " * project_eclipse - Eclipse CDT4 Project Files"
@echo ""
@echo "Package Targets"
@echo " * package_debian - build a debian package"
@echo " * package_pacman - build an arch linux pacman package"
@echo " * package_archive - build an archive package"
@echo ""
@echo "Testing Targets (not associated with building blender)"
@echo " * test - run ctest, currently tests import/export,"
@echo " operator execution and that python modules load"
@echo " * test_cmake - runs our own cmake file checker"
@echo " which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8"
@echo " which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
@echo " * test_style_c - checks C/C++ conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo ""
@echo "Static Source Code Checking (not associated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@echo " * check_clang_array - run blender source through clang array checking script (C & C++)"
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo " * check_smatch - run blenders source through smatch (C only)"
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
@echo " * check_spelling_py - check for spelling errors (Python only)"
@echo " * check_descriptions - check for duplicate/invalid descriptions"
@echo ""
@echo "Utilities (not associated with building blender)"
@echo " * icons - updates PNG icons from SVG files."
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Environment Variables"
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
@echo " * BUILD_DIR - override default build path."
@echo " * PYTHON - use this for the Python command (used for checking tools)."
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_doxy - generate doxygen C/C++ docs"
@echo " * doc_dna - generate blender file format reference"
@echo " * doc_man - generate manpage"
@echo ""
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
# -----------------------------------------------------------------------------
# Packages
@@ -375,7 +249,7 @@ package_archive: .FORCE
# Tests
#
test: .FORCE
python3 ./build_files/utils/make_test.py "$(BUILD_DIR)"
cd $(BUILD_DIR) ; ctest . --output-on-failure
# run pep8 check check on scripts we distribute.
test_pep8: .FORCE
@@ -436,7 +310,7 @@ test_style_osl_qtc: .FORCE
#
project_qtcreator: .FORCE
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
project_netbeans: .FORCE
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
@@ -509,7 +383,7 @@ check_spelling_osl: .FORCE
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions: .FORCE
$(BLENDER_BIN) --background -noaudio --factory-startup --python \
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
# -----------------------------------------------------------------------------
@@ -519,23 +393,16 @@ check_descriptions: .FORCE
tgz: .FORCE
./build_files/utils/build_tgz.sh
INKSCAPE_BIN?="inkscape"
icons: .FORCE
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
icons_geom: .FORCE
BLENDER_BIN=$(BLENDER_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
update: .FORCE
python3 ./build_files/utils/make_update.py
format: .FORCE
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
python3 source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
if [ -d "../lib" ]; then \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule foreach git pull --rebase origin master
# -----------------------------------------------------------------------------
@@ -544,29 +411,36 @@ format: .FORCE
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py: .FORCE
ASAN_OPTIONS=halt_on_error=0 \
$(BLENDER_BIN) --background -noaudio --factory-startup \
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_doxy: .FORCE
cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: .FORCE
$(BLENDER_BIN) --background -noaudio --factory-startup \
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
--python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man: .FORCE
$(PYTHON) doc/manpage/blender.1.py $(BLENDER_BIN) blender.1
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
help_features: .FORCE
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
@$(PYTHON) -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
if not l.lstrip().startswith('#') \
for w in (re.sub(\
r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
if w.startswith('WITH_')]))" | uniq
clean: .FORCE
$(BUILD_COMMAND) -C "$(BUILD_DIR)" clean
$(MAKE) -C "$(BUILD_DIR)" clean
.PHONY: all

View File

@@ -1,160 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################
#
# This is a build system used by platform maintainers to build library dependencies on
# Windows, macOS and Linux.
#
# For users building Blender, we recommend using the precompiled libraries from lib/ on
# Windows and macOS, and install_deps.sh on Linux.
#
# WINDOWS USAGE:
# Don't call this cmake file yourself, use build_deps.cmd
# build_deps 2013 x64 / build_deps 2013 x86
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler cmake autoconf automake libtool yasm nasm tcl
# Run "make deps" from main Blender directory
#
####################################################################################################
project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
include(cmake/versions.cmake)
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
include(cmake/zlib.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
include(cmake/boost.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/ilmbase.cmake)
include(cmake/openexr.cmake)
include(cmake/freetype.cmake)
include(cmake/freeglut.cmake)
include(cmake/glew.cmake)
include(cmake/alembic.cmake)
include(cmake/glfw.cmake)
include(cmake/clew.cmake)
include(cmake/cuew.cmake)
include(cmake/opensubdiv.cmake)
include(cmake/sdl.cmake)
include(cmake/opencollada.cmake)
include(cmake/opencolorio.cmake)
include(cmake/llvm.cmake)
include(cmake/clang.cmake)
if(APPLE)
include(cmake/openmp.cmake)
endif()
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
include(cmake/flexbison.cmake)
include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/numpy.cmake)
if(UNIX AND NOT APPLE)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
include(cmake/openimagedenoise.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WITH_EMBREE)
include(cmake/embree.cmake)
endif()
if(WIN32)
# HMD branch deps
include(cmake/hidapi.cmake)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
#include(cmake/lcms.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
endif()
endif()
endif()
endif()
if(UNIX)
include(cmake/bzip2.cmake)
include(cmake/ffi.cmake)
include(cmake/lzma.cmake)
include(cmake/ssl.cmake)
include(cmake/sqlite.cmake)
endif()
include(cmake/harvest.cmake)

View File

@@ -1,105 +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(ALEMBIC_HDF5)
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
endif()
if(WIN32)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
else()
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${ALEMBIC_ILMBASE}
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
)
ExternalProject_Add(external_alembic
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
)

View File

@@ -1,75 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BLOSC_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
if(WIN32)
#prevent blosc from including it's own local copy of zlib in the object file
#and cause linker errors with everybody else
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
endif()
ExternalProject_Add(external_blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/blosc
)
add_dependencies(
external_blosc
external_zlib
)
if(WIN32)
add_dependencies(
external_blosc
external_pthreads
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,91 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BOOST_ADDRESS_MODEL 64)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
endif()
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND bjam)
set(BOOST_BUILD_OPTIONS runtime-link=static )
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=darwin 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 ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
${BOOST_TOOLSET}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)

View File

@@ -1,39 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BZIP2_PREFIX "${LIBDIR}/bzip2")
set(BZIP2_CONFIGURE_ENV echo .)
set(BZIP2_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(BZIP2_LDFLAGS "-Wl,--as-needed")
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
endif()
ExternalProject_Add(external_bzip2
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
INSTALL_DIR ${LIBDIR}/bzip2
)

View File

@@ -1,53 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
set(_required_software
autoconf
automake
libtoolize
nasm
yasm
tclsh
)
foreach(_software ${_required_software})
find_program(_software_find NAMES ${_software})
if(NOT _software_find)
set(_software_missing "${_software_missing}${_software} ")
endif()
unset(_software_find CACHE)
endforeach()
if(_software_missing)
message(
"\n"
"Missing software for building Blender dependencies:\n"
" ${_software_missing}\n"
"\n"
"On Debian and Ubuntu:\n"
" apt install autoconf automake libtool yasm nasm tcl\n"
"\n"
"On macOS (with homebrew):\n"
" brew install cmake autoconf automake libtool yasm nasm\n"
"\n"
"Other platforms:\n"
" Install equivalent packages.\n")
message(FATAL_ERROR "Install missing software before continuing")
endif()
endif()

View File

@@ -1,63 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
)
if(WIN32)
set(CLANG_GENERATOR "Ninja")
else()
set(CLANG_GENERATOR "Unix Makefiles")
endif()
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
else()
set(CLANG_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${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
)

View File

@@ -1,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew
)

View File

@@ -1,29 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CUEW_EXTRA_ARGS)
ExternalProject_Add(external_cuew
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/cuew
)

View File

@@ -1,69 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the utility apps may use png/tiff/gif system libraries, but the
# library itself does not depend on them, so should give no problems.
set(EMBREE_EXTRA_ARGS
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
)
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
else()
set(EMBREE_BUILD_DIR)
endif()
ExternalProject_Add(external_embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,40 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FAAD_EXTRA_ARGS)
if(WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)
endif()
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,40 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ffi
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
--enable-shared=no
--enable-static=yes
--with-pic
--libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
)
if(UNIX AND NOT APPLE)
ExternalProject_Add_Step(external_ffi after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
DEPENDEES install
)
endif()

View File

@@ -1,152 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=yasm
)
endif()
else()
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
--enable-libopenjpeg
)
endif()
if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
endif()
ExternalProject_Add(external_ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
# will fail. This patch does that in a way that is compatible with multiple distributions.
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--prefix=${LIBDIR}/ffmpeg
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl2
--disable-gnutls
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
--disable-crystalhd
--disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
if(MSVC)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
)
if(WIN32)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
endif()

View File

@@ -1,47 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
endif()
ExternalProject_Add(external_fftw3
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
)
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)
endif()
endif()

View File

@@ -1,32 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
)
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,31 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
)

View File

@@ -1,35 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
ExternalProject_Add(external_freeglut
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
endif()

View File

@@ -1,44 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FREETYPE_EXTRA_ARGS
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
ExternalProject_Add(external_freetype
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
INSTALL_DIR ${LIBDIR}/freetype
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
endif()

View File

@@ -1,32 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLEW_EXTRA_ARGS
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
)
ExternalProject_Add(external_glew
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glew
)

View File

@@ -1,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw
)

View File

@@ -1,202 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
########################################################################
# Copy all generated files to the proper strucure as blender prefers
########################################################################
if(NOT DEFINED HARVEST_TARGET)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# 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()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# 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 &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
endif()
else(WIN32)
function(harvest from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
endfunction()
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest(alembic/bin alembic/bin "*")
harvest(boost/include boost/include "*")
harvest(boost/lib boost/lib "*.a")
harvest(ffmpeg/include ffmpeg/include "*.h")
harvest(ffmpeg/lib ffmpeg/lib "*.a")
harvest(fftw3/include fftw3/include "*.h")
harvest(fftw3/lib fftw3/lib "*.a")
harvest(flac/lib sndfile/lib "libFLAC.a")
harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(glew/include glew/include "*.h")
harvest(glew/lib glew/lib "*.a")
harvest(ilmbase openexr "*")
harvest(ilmbase/include openexr/include "*.h")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(clang/bin llvm/bin "clang-format")
harvest(clang/include llvm/include "*")
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(blosc/lib blosc/lib "*.a")
harvest(zlib/include zlib/include "*.h")
harvest(zlib/lib zlib/lib "*.a")
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
else()
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
harvest(opencolorio/include opencolorio/include "*.h")
harvest(opencolorio/lib opencolorio/lib "*.a")
harvest(opencolorio/lib/static opencolorio/lib "*.a")
harvest(openexr/include openexr/include "*.h")
harvest(openexr/lib openexr/lib "*.a")
harvest(openimageio/bin openimageio/bin "idiff")
harvest(openimageio/bin openimageio/bin "maketx")
harvest(openimageio/bin openimageio/bin "oiiotool")
harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
harvest(openimagedenoise/include openimagedenoise/include "*")
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
harvest(osl/shaders osl/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(sdl/include/SDL2 sdl/include "*.h")
harvest(sdl/lib sdl/lib "libSDL2.a")
harvest(sndfile/include sndfile/include "*.h")
harvest(sndfile/lib sndfile/lib "*.a")
harvest(spnav/include spnav/include "*.h")
harvest(spnav/lib spnav/lib "*.a")
harvest(tbb/include tbb/include "*.h")
harvest(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
endif()

View File

@@ -1,42 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HDF5_EXTRA_ARGS
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
)
if(WIN32)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
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
)

View File

@@ -1,29 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HIDAPI_EXTRA_ARGS)
ExternalProject_Add(external_hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
)

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 *****
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
)
if(MSVC)
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_iconv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
DEPENDEES install
)
endif()
endif()

View File

@@ -1,58 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_ilmbase after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
DEPENDEES install
)
endif()
else()
set(ILMBASE_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()

View File

@@ -1,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
)

View File

@@ -1,65 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif(WIN32)

View File

@@ -1,47 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LAME_EXTRA_ARGS)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--disable-frontend
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
)
if(MSVC)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,31 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LCMS_EXTRA_ARGS
)
ExternalProject_Add(external_lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
#patch taken from ocio
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
)

View File

@@ -1,58 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
)
if(WIN32)
set(LLVM_GENERATOR "Ninja")
else()
set(LLVM_GENERATOR "Unix Makefiles")
endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()

View File

@@ -1,32 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
--disable-shared
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
INSTALL_DIR ${LIBDIR}/lzma
)

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 *****
if(MSVC)
message("BIN >${PYTHON_BINARY}<")
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif()
endif()
set(NUMPY_POSTFIX)
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ""
)
add_dependencies(
external_numpy
external_python
)

View File

@@ -1,32 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ogg
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
)
if(MSVC)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,67 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=OFF
-DALSOFT_NO_CONFIG_UTIL=ON
-DALSOFT_EXAMPLES=OFF
-DALSOFT_TESTS=OFF
-DALSOFT_CONFIG=OFF
-DALSOFT_HRTF_DEFS=OFF
-DALSOFT_INSTALL=ON
-DALSOFT_BACKEND_SNDIO=OFF
)
if(UNIX)
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DLIBTYPE=STATIC
)
endif()
if(UNIX AND NOT APPLE)
# Ensure we have backends for playback.
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DALSOFT_REQUIRE_ALSA=ON
-DALSOFT_REQUIRE_OSS=ON
-DALSOFT_REQUIRE_PULSEAUDIO=ON
)
endif()
ExternalProject_Add(external_openal
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)
ExternalProject_Add_Step(external_openal after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
DEPENDEES install
)
endif()
endif()

View File

@@ -1,65 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
endif()
ExternalProject_Add(external_opencollada
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
)
if(UNIX)
add_dependencies(
external_opencollada
external_xml2
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,112 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
)
if(WIN32)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
#lie because ocio cmake is demanding boost even though it is not needed
-DYAML_CPP_VERSION=0.5.0
)
else()
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
endif()
ExternalProject_Add(external_opencolorio
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
if(NOT WIN32)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
endif()
add_dependencies(
external_opencolorio
external_boost
)
if(WIN32)
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,78 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OPENEXR_EXTRA_ARGS
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
-DOPENEXR_BUILD_ILMBASE=On
-DOPENEXR_BUILD_OPENEXR=On
-DOPENEXR_BUILD_PYTHON_LIBS=Off
-DOPENEXR_BUILD_STATIC=On
-DOPENEXR_BUILD_SHARED=Off
-DOPENEXR_BUILD_TESTS=Off
-DOPENEXR_BUILD_VIEWERS=Off
-DOPENEXR_BUILD_UTILS=Off
-DOPENEXR_NAMESPACE_VERSIONING=Off
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add_Step(external_openexr after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
#libs have moved between versions, just duplicate it for now.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
DEPENDEES install
)
else()
set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
set(OPENEXR_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
--with-ilmbase-prefix=${LIBDIR}/ilmbase
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()
add_dependencies(
external_openexr
external_zlib
external_ilmbase
)

View File

@@ -1,61 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OIDN_EXTRA_ARGS
-DWITH_EXAMPLE=OFF
-DWITH_TEST=OFF
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=ON
-DOIDN_STATIC_LIB=ON
)
ExternalProject_Add(external_openimagedenoise
URL ${OIDN_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OIDN_HASH}
PREFIX ${BUILD_DIR}/openimagedenoise
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise < ${PATCH_DIR}/openimagedenoise.diff
INSTALL_DIR ${LIBDIR}/openimagedenoise
)
add_dependencies(
external_openimagedenoise
external_tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/include ${HARVEST_TARGET}/openimagedenoise/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,152 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OIIO_TOOLS ON)
else()
set(OIIO_TOOLS OFF)
endif()
if(UNIX AND NOT APPLE)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
else()
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
endif()
if(WITH_WEBP)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${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}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-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
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL ${OPENIMAGEIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.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}
)
if(NOT WIN32)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
endif()

View File

@@ -1,64 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
# library itself does not depend on them, so should give no problems.
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
ExternalProject_Add(external_openjpeg
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
INSTALL_DIR ${LIBDIR}/openjpeg
)
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openjpeg_msvc after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
DEPENDEES install
)
endif()
endif()
set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,33 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_openmp
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
)
add_dependencies(
external_openmp
external_clang
)

View File

@@ -1,101 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OPENSUBDIV_EXTRA_ARGS
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
)
if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=OFF
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
)
endif()
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
)
endif()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
)

View File

@@ -1,102 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
set(OPENVDB_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DOPENVDB_BUILD_UNITTESTS=Off
-DOPENVDB_BUILD_PYTHON_MODULE=Off
-DGLEW_LOCATION=${LIBDIR}/glew/
-DBLOSC_LOCATION=${LIBDIR}/blosc/
-DTBB_LOCATION=${LIBDIR}/tbb/
-DTBB_ROOT=${LIBDIR}/tbb/
-DOPENEXR_LOCATION=${LIBDIR}/openexr
-DILMBASE_LOCATION=${LIBDIR}/ilmbase
-DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
)
if(WIN32)
# Namespaces seem to be buggy and cause linker errors due to things not
# being in the correct namespace
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DOPENEXR_NAMESPACE_VERSIONING=OFF
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
-DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
)
endif()
endif()
ExternalProject_Add(openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.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
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,218 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_EMBREE "Enable building of Embree" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
message("LIBDIR = ${LIBDIR}")
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /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")
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(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
else()
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(LIBPREFIX "lib")
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.11)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin15.0.0) # OS X 10.11
set(PLATFORM_CMAKE_FLAGS
-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")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
endif()
set(DEFAULT_CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
#we need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
else()
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
endif()
else()
set(ZLIB_LIBRARY libz${LIBEXT})
endif()
if(MSVC)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
set(CMAKE_INSTALL_MESSAGE LAZY)

View File

@@ -1,141 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
SET(OSL_PLATFORM_FLAGS)
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half{ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
)
if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
endif()
ExternalProject_Add(external_osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
add_dependencies(
external_osl
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
)
if(UNIX AND NOT APPLE)
# Rely on PugiXML compiled with OpenImageIO
else()
add_dependencies(
external_osl
external_pugixml
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,58 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
set(PYTARGET ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS})
set(PYSRC ${LIBDIR}/python/)
if(BUILD_MODE STREQUAL Release)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS}/bin/python${PYTHON_POSTFIX}.exe)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe)
endif()
endif()

View File

@@ -1,44 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PNG_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
)
ExternalProject_Add(external_png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
)
add_dependencies(
external_png
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -1,53 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
INSTALL_DIR ${LIBDIR}/pthreads
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pthreads after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,43 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,103 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
set(PYTHON_EXTRA_INSTLAL_FLAGS -d)
endif()
if(WIN32)
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
else()
if(APPLE)
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
export ac_cv_func_basename_r=no &&
export ac_cv_func_clock_getres=no &&
export ac_cv_func_clock_gettime=no &&
export ac_cv_func_clock_settime=no &&
export ac_cv_func_dirname_r=no &&
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
endif()
if(UNIX)
add_dependencies(
external_python
external_bzip2
external_ffi
external_lzma
external_ssl
external_sqlite
external_zlib
)
endif()

View File

@@ -1,9 +0,0 @@
{
global:
Py*;
_Py*;
_py*;
local:
*;
};

View File

@@ -1,30 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
)
add_dependencies(
external_python_site_packages
external_python
)

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 *****
if(WIN32)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
else()
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
endif()
ExternalProject_Add(external_sdl
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
endif()

View File

@@ -1,227 +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 *****
####################################################################################################################
# Mingw32 Builds
####################################################################################################################
# This installs mingw32+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
endif()
message("checking i686-w64-mingw32-strings")
# copy strings.exe to i686-w64-mingw32-strings for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
endif()
message("checking i686-w64-mingw32-ar.exe")
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
endif()
message("checking i686-w64-mingw32-strip.exe")
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
endif()
message("checking i686-w64-mingw32-ranlib.exe")
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
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

@@ -1,227 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################################
# Mingw64 Builds
####################################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw64")
# download ming64
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw64
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z"))
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
message("Installing ming64sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
endif()
message("checking x86_64-w64-mingw32-strings.exe")
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
message("fixing x86_64-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
)
endif()
message("checking x86_64-w64-mingw32-ar.exe")
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
message("fixing x86_64-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
)
endif()
message("checking x86_64-w64-mingw32-strip.exe")
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
message("fixing x86_64-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
)
endif()
message("checking x86_64-w64-mingw32-ranlib.exe")
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
message("fixing x86_64-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -1,62 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(UNIX)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
INSTALL_DIR ${LIBDIR}/sndfile
)
if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_sndfile
external_ogg
external_vorbis
)
if(UNIX)
add_dependencies(
external_sndfile
external_flac
)
endif()

View File

@@ -1,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
)

View File

@@ -1,57 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SQLITE_CONFIGURE_ENV echo .)
set(SQLITE_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(SQLITE_LDFLAGS -Wl,--as-needed)
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
endif()
ExternalProject_Add(external_sqlite
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
INSTALL_DIR ${LIBDIR}/sqlite
)

View File

@@ -1,48 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
set(SSL_OS_COMPILER "blender-linux-x86")
endif()
endif()
ExternalProject_Add(external_ssl
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
--openssldir=${LIBDIR}/ssl
no-shared
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
${SSL_OS_COMPILER}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
INSTALL_DIR ${LIBDIR}/ssl
)

View File

@@ -1,15 +0,0 @@
%targets = (
"blender-linux-x86" => {
inherit_from => [ "linux-x86" ],
cflags => add("-fPIC"),
},
"blender-linux-x86_64" => {
inherit_from => [ "linux-x86_64" ],
cflags => add("-fPIC"),
},
"blender-darwin-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc" ],
cflags => add("-fPIC"),
},
);

View File

@@ -1,52 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,50 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if (UNIX)
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV} && export HAVE_PDFLATEX=no)
else()
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_theora
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
)
add_dependencies(
external_theora
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,47 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
)
ExternalProject_Add(external_tiff
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
)
add_dependencies(
external_tiff
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -1,31 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TINYXML_EXTRA_ARGS
)
ExternalProject_Add(external_tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
#patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
)

View File

@@ -1,308 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(OPENAL_VERSION 1.18.2)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH d4eeb0889812e2fdeaa1843523d76190)
set(PNG_VERSION 1.6.35)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 678b7e696a62a193ed3503b04bf449d6)
set(JPEG_VERSION 1.5.3)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 5b7549d440b86c98a517355c102d155e)
set(BOOST_VERSION 1.68.0)
set(BOOST_VERSION_NODOTS 1_68_0)
set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH 5d8b4503582fffa9eefdb9045359c239)
set(BLOSC_VERSION 1.14.4)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH e80dfc71e4cba03b8d01ed0876547ffe)
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(ILMBASE_VERSION 2.3.0)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
else()
set(ILMBASE_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_POSTFIX _s_d)
endif()
else()
set(ILMBASE_VERSION_POSTFIX)
endif()
set(ILMBASE_URI https://github.com/openexr/openexr/releases/download/v${ILMBASE_VERSION}/ilmbase-${ILMBASE_VERSION}.tar.gz)
set(ILMBASE_HASH 354bf86de3b930ab87ac63619d60c860)
set(OPENEXR_VERSION 2.3.0)
if(WIN32) #release 2.3.0 tarball has broken cmake support
set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
else()
set(OPENEXR_VERSION_POSTFIX)
set(OPENEXR_URI https://github.com/openexr/openexr/releases/download/v${OPENEXR_VERSION}/openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH a157e8a46596bc185f2472a5a4682174)
endif()
set(FREETYPE_VERSION 2.9.1)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066)
set(FREEGLUT_VERSION 3.0.0)
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(HDF5_VERSION 1.8.17)
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
set(ALEMBIC_VERSION 1.7.8)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_MD5 d095c2feb5e183b824904db7b63c1d30)
## hash is for 3.1.2
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
#latest uid in git as of 2016-04-01
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
#latest uid in git as of 2016-04-01
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_4_0_RC2)
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.8)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLORIO_VERSION 1.1.0)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 802d8f5b1d1fe316ec5f76511aa611b8)
set(LLVM_VERSION 6.0.1)
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH c88c98709300ce2c285391f387fecce0)
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz)
set(CLANG_HASH 4e419bd4e3b55aa06d872320f754bd85)
set(OPENMP_URI http://releases.llvm.org/${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 4826402ae3633c36c51ba4d0e5527d30)
set(OPENIMAGEIO_VERSION 1.8.13)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH f5526c3c9878029ee900d84856683f93)
set(TIFF_VERSION 4.0.9)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 54bad211279cc93eb4fca31ba9bfdc79)
set(OSL_VERSION 1.9.9)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 44ad511e424965a10fce051a053b0605)
set(PYTHON_VERSION 3.7.4)
set(PYTHON_SHORT_VERSION 3.7)
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
set(TBB_VERSION 2018_U5)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH ff3ae09f8c23892fbc3008c39f78288f)
set(OPENVDB_VERSION 5.1.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 5310101f874dcfd2165f9cee68c22624)
set(IDNA_VERSION 2.8)
set(CHARDET_VERSION 3.0.4)
set(URLLIB3_VERSION 1.25.3)
set(CERTIFI_VERSION 2019.6.16)
set(REQUESTS_VERSION 2.22.0)
set(NUMPY_VERSION v1.17.0)
set(NUMPY_SHORT_VERSION 1.17)
set(NUMPY_URI https://files.pythonhosted.org/packages/da/32/1b8f2bb5fb50e4db68543eb85ce37b9fa6660cd05b58bddfafafa7ed62da/numpy-1.17.0.zip)
set(NUMPY_HASH aed49b31bcb44ec73b8155be78566135)
set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(OGG_VERSION 1.3.3)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 6ed40e0241089a42c48604dc00e362beee00036af2d8b3f46338031c9e0351cb)
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(FLAC_VERSION 1.3.2)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f)
set(VPX_VERSION 1.7.0)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
set(XVIDCORE_VERSION 1.3.5)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
#this has to be in sync with the version in blenders /extern folder
set(OPENJPEG_VERSION 2.3.0)
set(OPENJPEG_SHORT_VERSION 2.3)
# Use slightly newer commit after release which includes a cmake fix
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/66297f07a43.zip)
set(OPENJPEG_HASH 8242b18d908c7c42174e4231a741cfa7ce7c26b6ed5c9644feb9df7b3054310b)
set(FAAD_VERSION 2-2.8.8)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.gz)
set(FAAD_HASH 28f6116efdbe9378269f8a6221767d1f)
set(FFMPEG_VERSION 4.0.2)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 5576e8a22f80b6a336db39808f427cfb)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(ICONV_VERSION 1.15)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH ace8b5f2db42f7b3b3057585e80d9808)
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_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
#set(HIDAPI_VERSION 0.8.0-rc1)
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
#set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
set(HIDAPI_HASH b6e22f6b514f8bcf594989f20ffc46fb)
set(WEBP_VERSION 0.6.1)
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_HASH b49ce9c3e3e9acae4d91bca44bb85a72)
set(SPNAV_VERSION 0.2.3)
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
set(JEMALLOC_VERSION 5.0.1)
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(XML2_VERSION 2.9.4)
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
set(TINYXML_VERSION 2_6_2)
set(TINYXML_VERSION_DOTS 2.6.2)
set(TINYXML_URI https://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/${TINYXML_VERSION_DOTS}/tinyxml_${TINYXML_VERSION}.tar.gz)
set(TINYXML_HASH c1b864c96804a10526540c664ade67f0)
set(YAMLCPP_VERSION 0.6.2)
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
set(YAMLCPP_HASH 5b943e9af0060d0811148b037449ef82)
set(LCMS_VERSION 2.9)
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
set(PUGIXML_VERSION 1.9)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v1.9.tar.gz)
set(PUGIXML_HASH 9346ca1dce2c48f1748c12fdac41a714)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
# Libraries to keep Python modules static on Linux.
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
# sources from Debian packaging.
set(BZIP2_VERSION 1.0.6)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.bz2)
set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7)
set(FFI_VERSION 3.2.1)
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37)
set(LZMA_VERSION 5.2.4)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf)
set(SSL_VERSION 1.1.0i)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99)
set(SQLITE_VERSION 3.24.0)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(EMBREE_VERSION 3.2.4)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
set(OIDN_VERSION 1.0.0)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.zip)
set(OIDN_HASH 19fe67b0164e8f020ac8a4f520defe60)

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 *****
ExternalProject_Add(external_vorbis
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
)
add_dependencies(
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,60 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
else()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
)
if(MSVC)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
endif()

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 *****
# Note the utility apps may use png/tiff/gif system libraries, but the
# library itself does not depend on them, so should give no problems.
set(WEBP_EXTRA_ARGS
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
)
if(WIN32)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
else()
set(WEBP_BUILD_DIR)
endif()
ExternalProject_Add(external_webp
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp
)

View File

@@ -1,45 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_PATCH_CMD echo .)
endif()
ExternalProject_Add(external_x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
)
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,36 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
)

View File

@@ -1,44 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
)
ExternalProject_Add_Step(external_xvidcore after_install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
)
if(MSVC)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,34 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(YAMLCPP_EXTRA_ARGS
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DMSVC_SHARED_RT=OFF
)
ExternalProject_Add(external_yamlcpp
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp
)

View File

@@ -1,47 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
DEPENDEES install
)
endif()
else()
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
DEPENDEES install
)
endif()

View File

@@ -1,39 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
--- 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

@@ -0,0 +1,12 @@
--- 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,31 +0,0 @@
diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
--- src/blosc/CMakeLists.txt 2016-02-03 10:26:28 -0700
+++ external_blosc/blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
@@ -61,6 +61,8 @@
set(SOURCES ${SOURCES} win32/pthread.c)
else(NOT Threads_FOUND)
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
+ set(LIBS ${LIBS} ${PTHREAD_LIBS})
+ include_directories( ${PTHREAD_INCLUDE_DIR} )
endif(NOT Threads_FOUND)
else(WIN32)
find_package(Threads REQUIRED)
diff -Naur external_blosc.orig/blosc/blosc.c external_blosc/blosc/blosc.c
--- external_blosc.orig/blosc/blosc.c 2018-07-30 04:56:38 -0600
+++ external_blosc/blosc/blosc.c 2018-08-11 15:27:26 -0600
@@ -56,14 +56,7 @@
#include <inttypes.h>
#endif /* _WIN32 */
-/* Include the win32/pthread.h library for all the Windows builds. See #224. */
-#if defined(_WIN32)
- #include "win32/pthread.h"
- #include "win32/pthread.c"
-#else
- #include <pthread.h>
-#endif
-
+#include <pthread.h>
/* Some useful units */
#define KB 1024

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 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If BLOSC_ROOT_DIR was defined in the environment, use it.
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
ENDIF()
SET(_blosc_SEARCH_DIRS
${BLOSC_ROOT_DIR}
/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_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
BLOSC_INCLUDE_DIR
BLOSC_LIBRARY
)

View File

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

View File

@@ -1,264 +0,0 @@
# Module to find IlmBase
#
# This module will first look into the directories defined by the variables:
# - ILMBASE_HOME, ILMBASE_VERSION, ILMBASE_LIB_AREA
#
# It also supports non-standard names for the library components.
#
# To use a custom IlmBase:
# - Set the variable ILMBASE_CUSTOM to True
# - Set the variable ILMBASE_CUSTOM_LIBRARIES to a list of the libraries to
# use, e.g. "SpiImath SpiHalf SpiIlmThread SpiIex"
# - Optionally set the variable ILMBASE_CUSTOM_INCLUDE_DIR to any
# particularly weird place that the OpenEXR/*.h files may be found
# - Optionally set the variable ILMBASE_CUSTOM_LIB_DIR to any
# particularly weird place that the libraries files may be found
#
# This module defines the following variables:
#
# ILMBASE_INCLUDE_DIR - where to find half.h, IlmBaseConfig.h, etc.
# ILMBASE_LIBRARIES - list of libraries to link against when using IlmBase.
# ILMBASE_FOUND - True if IlmBase was found.
# Other standarnd issue macros
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)
include(SelectLibraryConfigurations)
if( ILMBASE_USE_STATIC_LIBS )
set( _ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
endif()
# Macro to assemble a helper state variable
macro(SET_STATE_VAR varname)
set(tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(tmp_ilmbaselibs)
set(tmp_lst
${ILMBASE_CUSTOM} | ${tmp_ilmbaselibs} |
${ILMBASE_HOME} | ${ILMBASE_VERSION} | ${ILMBASE_LIB_AREA}
)
set(${varname} "${tmp_lst}")
unset(tmp_ilmbaselibs)
unset(tmp_lst)
endmacro()
# To enforce that find_* functions do not use inadvertently existing versions
if(ILMBASE_CUSTOM)
set(ILMBASE_FIND_OPTIONS "NO_DEFAULT_PATH")
endif()
# Macro to search for an include directory
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${ILMBASE_FIND_OPTIONS}
)
if(${tmp_varname})
mark_as_advanced(${tmp_varname})
endif()
unset(tmp_varname)
endmacro()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string(TOUPPER ${prefix}_${libname} tmp_prefix)
# Handle new library names for OpenEXR 2.1 build via cmake
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${ILMBASE_FIND_OPTIONS}
)
find_library(${tmp_prefix}_LIBRARY_DEBUG
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${ILMBASE_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations(${tmp_prefix})
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list(APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced(
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset(tmp_prefix)
endmacro()
# Encode the current state of the external variables into a string
SET_STATE_VAR(ILMBASE_CURRENT_STATE)
# If the state has changed, clear the cached variables
if(ILMBASE_CACHED_STATE AND
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
foreach(libvar ${ILMBASE_CACHED_VARS})
unset(${libvar} CACHE)
endforeach()
endif()
# Generic search paths
set(IlmBase_generic_include_paths
${ILMBASE_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include
)
set(IlmBase_generic_library_paths
${ILMBASE_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib
)
# Search paths for the IlmBase files
if(ILMBASE_HOME)
if(ILMBASE_VERSION)
set(IlmBase_include_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/include
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION}
)
set(IlmBase_library_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION}
)
endif()
list(APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
set(IlmBase_library_paths
${ILMBASE_HOME}/lib
${ILMBASE_HOME}/lib64
${ILMBASE_LIB_AREA}
${IlmBase_library_paths})
endif()
list(APPEND IlmBase_include_paths ${IlmBase_generic_include_paths})
list(APPEND IlmBase_library_paths ${IlmBase_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR(IlmBase
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
if(ILMBASE_INCLUDE_DIR)
# Get the version from config file, if not already set.
if(NOT ILMBASE_VERSION)
FILE(STRINGS "${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h" ILMBASE_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(ILMBASE_BUILD_SPECIFICATION)
if(NOT IlmBase_FIND_QUIETLY)
message(STATUS "${ILMBASE_BUILD_SPECIFICATION}")
endif()
string(REGEX REPLACE ".*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
endif()
endif()
endif()
if(ILMBASE_CUSTOM)
if(NOT ILMBASE_CUSTOM_LIBRARIES)
message(FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
endif()
set(IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
else()
#elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
set(IlmBase_Libraries Half Iex Imath IlmThread)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif()
# Locate the IlmBase libraries
set(IlmBase_libvars "")
set(IlmBase_cachevars "")
foreach(ilmbase_lib ${IlmBase_Libraries})
PREFIX_FIND_LIB(IlmBase ${ilmbase_lib}
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
endforeach()
# Create the list of variables that might need to be cleared
set(ILMBASE_CACHED_VARS
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}
CACHE INTERNAL "Variables set by FindIlmBase.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set(ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
# Link with pthreads if required
if(NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
file(STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
ILMBASE_HAVE_PTHREAD
REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
)
if(ILMBASE_HAVE_PTHREAD)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
set(ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
endif()
endif()
endif()
# Use the standard function to handle ILMBASE_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IlmBase DEFAULT_MSG
ILMBASE_INCLUDE_DIR ${IlmBase_libvars})
if(ILMBASE_FOUND)
set(ILMBASE_LIBRARIES "")
foreach(tmplib ${IlmBase_libvars})
list(APPEND ILMBASE_LIBRARIES ${${tmplib}})
endforeach()
list(APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
if(NOT IlmBase_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE(ILMBASE
"Found IlmBase: ${ILMBASE_LIBRARIES}"
"[${ILMBASE_INCLUDE_DIR}][${ILMBASE_LIBRARIES}][${ILMBASE_CURRENT_STATE}]"
)
endif()
endif()
# Restore the original find library ordering
if( ILMBASE_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
# Unset the helper variables to avoid pollution
unset(ILMBASE_CURRENT_STATE)
unset(IlmBase_include_paths)
unset(IlmBase_library_paths)
unset(IlmBase_generic_include_paths)
unset(IlmBase_generic_library_paths)
unset(IlmBase_libvars)
unset(IlmBase_cachevars)
unset(ILMBASE_PTHREADS)

View File

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

View File

@@ -1,246 +0,0 @@
# Module to find OpenEXR.
#
# This module will first look into the directories defined by the variables:
# - OPENEXR_HOME, OPENEXR_VERSION, OPENEXR_LIB_AREA
#
# It also supports non-standard names for the library components.
#
# To use a custom OpenEXR
# - Set the variable OPENEXR_CUSTOM to True
# - Set the variable OPENEXR_CUSTOM_LIBRARY to the name of the library to
# use, e.g. "SpiIlmImf"
# - Optionally set the variable OPENEXR_CUSTOM_INCLUDE_DIR to any
# particularly weird place that the OpenEXR/*.h files may be found
# - Optionally set the variable OPENEXR_CUSTOM_LIB_DIR to any
# particularly weird place that the libraries files may be found
#
# This module defines the following variables:
#
# OPENEXR_INCLUDE_DIR - where to find ImfRgbaFile.h, OpenEXRConfig, etc.
# OPENEXR_LIBRARIES - list of libraries to link against when using OpenEXR.
# This list does NOT include the IlmBase libraries.
# These are defined by the FindIlmBase module.
# OPENEXR_FOUND - True if OpenEXR was found.
# Other standarnd issue macros
include(SelectLibraryConfigurations)
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)
if(OPENEXR_USE_STATIC_LIBS)
set(_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
endif()
# Macro to assemble a helper state variable
macro(SET_STATE_VAR varname)
set(tmp_lst
${OPENEXR_CUSTOM} | ${OPENEXR_CUSTOM_LIBRARY} |
${OPENEXR_HOME} | ${OPENEXR_VERSION} | ${OPENEXR_LIB_AREA}
)
set(${varname} "${tmp_lst}")
unset(tmp_lst)
endmacro()
# To enforce that find_* functions do not use inadvertently existing versions
if(OPENEXR_CUSTOM)
set(OPENEXR_FIND_OPTIONS "NO_DEFAULT_PATH")
endif()
# Macro to search for an include directory
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${OPENEXR_FIND_OPTIONS}
)
if(${tmp_varname})
mark_as_advanced(${tmp_varname})
endif()
unset(tmp_varname)
endmacro()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string(TOUPPER ${prefix}_${libname} tmp_prefix)
# Handle new library names for OpenEXR 2.1 build via cmake
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${OPENEXR_FIND_OPTIONS}
)
find_library(${tmp_prefix}_LIBRARY_DEBUG
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${OPENEXR_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations(${tmp_prefix})
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list(APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced(
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset(tmp_prefix)
endmacro()
# Encode the current state of the external variables into a string
SET_STATE_VAR(OPENEXR_CURRENT_STATE)
# If the state has changed, clear the cached variables
if(OPENEXR_CACHED_STATE AND
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
foreach(libvar ${OPENEXR_CACHED_VARS})
unset(${libvar} CACHE)
endforeach()
endif()
# Generic search paths
set(OpenEXR_generic_include_paths
${OPENEXR_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include
)
set(OpenEXR_generic_library_paths
${OPENEXR_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib
)
# Search paths for the OpenEXR files
if(OPENEXR_HOME)
set(OpenEXR_library_paths
${OPENEXR_HOME}/lib
${OPENEXR_HOME}/lib64)
if(OPENEXR_VERSION)
set(OpenEXR_include_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include
${OPENEXR_HOME}/include/openexr-${OPENEXR_VERSION})
list(APPEND OpenEXR_library_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/lib
${OPENEXR_HOME}/lib/openexr-${OPENEXR_VERSION})
endif()
list(APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
if(OPENEXR_LIB_AREA)
list(INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
endif()
endif()
if(ILMBASE_HOME AND OPENEXR_VERSION)
list(APPEND OpenEXR_include_paths
${ILMBASE_HOME}/include/openexr-${OPENEXR_VERSION})
endif()
list(APPEND OpenEXR_include_paths ${OpenEXR_generic_include_paths})
list(APPEND OpenEXR_library_paths ${OpenEXR_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR(OpenEXR
OpenEXR/ImfArray.h OpenEXR_include_paths)
if(OPENEXR_INCLUDE_DIR)
# Get the version from config file, if not already set.
if(NOT OPENEXR_VERSION)
FILE(STRINGS "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h" OPENEXR_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(OPENEXR_BUILD_SPECIFICATION)
if(NOT OpenEXR_FIND_QUIETLY)
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
endif()
string(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()
endif()
endif()
if(OPENEXR_CUSTOM)
if(NOT OPENEXR_CUSTOM_LIBRARY)
message(FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
endif()
set(OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else()
#elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
set(OpenEXR_Library IlmImf)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
endif()
# Locate the OpenEXR library
set(OpenEXR_libvars "")
set(OpenEXR_cachevars "")
PREFIX_FIND_LIB(OpenEXR ${OpenEXR_Library}
OpenEXR_library_paths OpenEXR_libvars OpenEXR_cachevars)
# Create the list of variables that might need to be cleared
set(OPENEXR_CACHED_VARS
OPENEXR_INCLUDE_DIR ${OpenEXR_cachevars}
CACHE INTERNAL "Variables set by FindOpenEXR.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set(OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindOpenEXR.cmake" FORCE)
# Always link explicitly with zlib
set(OPENEXR_ZLIB ${ZLIB_LIBRARIES})
# Use the standard function to handle OPENEXR_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
OPENEXR_INCLUDE_DIR ${OpenEXR_libvars})
if(OPENEXR_FOUND)
set(OPENEXR_LIBRARIES "")
foreach(tmplib ${OpenEXR_libvars})
list(APPEND OPENEXR_LIBRARIES ${${tmplib}})
endforeach()
list(APPEND OPENEXR_LIBRARIES ${ZLIB_LIBRARIES})
if(NOT OpenEXR_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE(OPENEXR
"Found OpenEXR: ${OPENEXR_LIBRARIES}"
"[${OPENEXR_INCLUDE_DIR}][${OPENEXR_LIBRARIES}][${OPENEXR_CURRENT_STATE}]"
)
endif()
endif()
# Restore the original find library ordering
if( OPENEXR_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
# Unset the helper variables to avoid pollution
unset(OPENEXR_CURRENT_STATE)
unset(OpenEXR_include_paths)
unset(OpenEXR_library_paths)
unset(OpenEXR_generic_include_paths)
unset(OpenEXR_generic_library_paths)
unset(OpenEXR_libvars)
unset(OpenEXR_cachevars)

View File

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

View File

@@ -1,81 +0,0 @@
# select_library_configurations( basename )
#
# This macro takes a library base name as an argument, and will choose good
# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and
# basename_LIBRARY_RELEASE depending on what has been found and set. If only
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
# and basename_LIBRARY_RELEASE will be set to the release value. If only
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
#
# If the generator supports configuration types, then basename_LIBRARY and
# basename_LIBRARIES will be set with debug and optimized flags specifying the
# library to be used for the given configuration. If no build type has been set
# or the generator in use does not support configuration types, then
# basename_LIBRARY and basename_LIBRARIES will take only the release values.
#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
# Copyright 2005-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
# Dicharry <wdicharry@stellarscience.com>.
# Utility macro to check if one variable exists while another doesn't, and set
# one that doesn't exist to the one that exists.
macro( _set_library_name basename GOOD BAD )
if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} )
endif( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
endmacro( _set_library_name )
macro( select_library_configurations basename )
# if only the release version was found, set the debug to be the release
# version.
_set_library_name( ${basename} RELEASE DEBUG )
# if only the debug version was found, set the release value to be the
# debug value.
_set_library_name( ${basename} DEBUG RELEASE )
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
# if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
set( ${basename}_LIBRARY
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
set( ${basename}_LIBRARIES
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
# If there are no configuration types or build type, just use
# the release version
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
"The ${basename} library" )
if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE )
endif( ${basename}_LIBRARY )
mark_as_advanced( ${basename}_LIBRARY
${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro( select_library_configurations )

View File

@@ -1,2 +0,0 @@
cmake_minimum_required (VERSION 2.4)
add_subdirectory(build/cmake)

View File

@@ -1,20 +0,0 @@
cmake_minimum_required(VERSION 2.8)
project(hidapi)
set(SRC_FILES
windows/hid.c
)
set(HEADER_FILES
hidapi/hidapi.h
)
include_directories(hidapi)
add_definitions(-DHID_API_STATIC)
add_library(hidapi STATIC ${SRC_FILES} ${HEADER_FILES})
install(TARGETS hidapi DESTINATION lib)
INSTALL(FILES hidapi/hidapi.h
DESTINATION "include"
)

View File

@@ -1,51 +0,0 @@
project(lcms2)
cmake_minimum_required(VERSION 2.8)
include_directories(include)
set(HEADERS
include/lcms2.h
include/lcms2_plugin.h
)
set(SOURCES
src/cmscam02.c
src/cmscgats.c
src/cmscnvrt.c
src/cmserr.c
src/cmsgamma.c
src/cmsgmt.c
src/cmsintrp.c
src/cmsio0.c
src/cmsio1.c
src/cmslut.c
src/cmsmd5.c
src/cmsmtrx.c
src/cmsnamed.c
src/cmsopt.c
src/cmspack.c
src/cmspcs.c
src/cmsplugin.c
src/cmsps2.c
src/cmssamp.c
src/cmssm.c
src/cmstypes.c
src/cmsvirt.c
src/cmswtpnt.c
src/cmsxform.c
src/lcms2_internal.h
)
add_library(${PROJECT_NAME} STATIC ${HEADERS} ${SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES
LIBRARY_OUTPUT_NAME "${PROJECT_NAME}"
PUBLIC_HEADER "${HEADERS}"
)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)

View File

@@ -1,204 +0,0 @@
cmake_minimum_required (VERSION 2.8)
project(tbb CXX)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
include_directories(include src src/rml/include )
option(TBB_BUILD_SHARED "Build TBB shared library" ON)
option(TBB_BUILD_STATIC "Build TBB static library" ON)
option(TBB_BUILD_TBBMALLOC "Build TBB malloc library" ON)
option(TBB_BUILD_TBBMALLOC_PROXY "Build TBB malloc proxy library" ON)
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
file(GLOB tbb_src "${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/old/*.cpp")
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/rml/client/rml_tbb.cpp)
file(GLOB to_remove "${CMAKE_CURRENT_SOURCE_DIR}/src/old/test*.cpp")
list(REMOVE_ITEM tbb_src ${to_remove})
set(tbbmalloc_static_src
src/tbbmalloc/backend.cpp
src/tbbmalloc/large_objects.cpp
src/tbbmalloc/backref.cpp
src/tbbmalloc/tbbmalloc.cpp
src/tbbmalloc/frontend.cpp
src/tbb/itt_notify.cpp)
set(tbbmalloc_src ${tbbmalloc_static_src})
set(tbbmalloc_proxy_src
src/tbbmalloc/proxy.cpp
src/tbbmalloc/tbb_function_replacement.cpp)
if (NOT APPLE)
add_definitions(-DDO_ITT_NOTIFY)
else()
# Disable annoying "has no symbols" warnings
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
if (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DUSE_PTHREAD")
if(NOT CMAKE_CXX_FLAGS MATCHES "-mno-rtm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mrtm")
endif()
if (APPLE)
set(ARCH_PREFIX "mac")
else()
set(ARCH_PREFIX "lin")
endif()
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH_PREFIX "${ARCH_PREFIX}64")
else()
set(ARCH_PREFIX "${ARCH_PREFIX}32")
endif()
set(ENABLE_RTTI "-frtti -fexceptions ")
set(DISABLE_RTTI "-fno-rtti -fno-exceptions ")
elseif(WIN32)
cmake_minimum_required (VERSION 3.1)
enable_language(ASM_MASM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS- /Zc:wchar_t /Zc:forScope /DUSE_WINTHREAD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0600 /volatile:iso")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4800 /wd4146 /wd4244 /wd4018")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND tbb_src src/tbb/intel64-masm/atomic_support.asm
src/tbb/intel64-masm/itsx.asm src/tbb/intel64-masm/intel64_misc.asm)
list(APPEND tbbmalloc_src src/tbb/intel64-masm/atomic_support.asm)
set(CMAKE_ASM_MASM_FLAGS "/DEM64T=1")
set(ARCH_PREFIX "win64")
else()
list(APPEND tbb_src src/tbb/ia32-masm/atomic_support.asm
src/tbb/ia32-masm/itsx.asm src/tbb/ia32-masm/lock_byte.asm)
list(APPEND tbbmalloc_src src/tbb/ia32-masm/atomic_support.asm)
set(ARCH_PREFIX "win32")
endif()
set(ENABLE_RTTI "/EHsc /GR ")
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
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbb.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
COMMENT "Preprocessing tbb.def"
)
add_custom_command(OUTPUT tbbmalloc.def
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbbmalloc.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
else()
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
COMMENT "Preprocessing tbb.def"
)
add_custom_command(OUTPUT tbbmalloc.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbbmalloc.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
endif()
add_custom_target(tbb_def_files DEPENDS tbb.def tbbmalloc.def)
# TBB library
if (TBB_BUILD_STATIC)
add_library(tbb_static STATIC ${tbb_src})
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_SOURCE_DIRECTLY_INCLUDED=1")
set_property(TARGET tbb_static APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
install(TARGETS tbb_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbb SHARED ${tbb_src})
set_property(TARGET tbb APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
set_property(TARGET tbb APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
add_dependencies(tbb tbb_def_files)
if (APPLE)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(UNIX)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(WIN32)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
endif()
install(TARGETS tbb DESTINATION lib)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
# Quench a warning on GCC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/governor.cpp COMPILE_FLAGS "-Wno-missing-field-initializers ")
elseif(MSVC)
# Quench a warning on MSVC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/scheduler.cpp COMPILE_FLAGS "/wd4458 ")
endif()
if(TBB_BUILD_TBBMALLOC)
# TBB malloc library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_static STATIC ${tbbmalloc_static_src})
set_property(TARGET tbbmalloc_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
install(TARGETS tbbmalloc_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbbmalloc SHARED ${tbbmalloc_src})
set_property(TARGET tbbmalloc APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
add_dependencies(tbbmalloc tbb_def_files)
if (APPLE)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
elseif(UNIX)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
elseif(WIN32)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
endif()
install(TARGETS tbbmalloc DESTINATION lib)
endif()
endif()
if(TBB_BUILD_TBBMALLOC_PROXY)
# TBB malloc proxy library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_proxy_static STATIC ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy_static tbbmalloc)
install(TARGETS tbbmalloc_proxy_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy tbbmalloc)
install(TARGETS tbbmalloc_proxy DESTINATION lib)
endif()
endif()
install(DIRECTORY include/tbb DESTINATION include)

View File

@@ -1,26 +0,0 @@
--- CmakeLists.txt.orig 2015-12-31 03:46:41 -0700
+++ CMakeLists.txt 2016-04-01 13:28:33 -0600
@@ -22,3 +22,10 @@
add_executable(testcuew cuewTest/cuewTest.c include/cuew.h)
target_link_libraries(testcuew cuew ${CMAKE_DL_LIBS})
+
+install(TARGETS cuew
+ LIBRARY DESTINATION lib COMPONENT libraries
+ ARCHIVE DESTINATION lib/static COMPONENT libraries)
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/cuew.h
+ DESTINATION include/)
\ No newline at end of file
--- src/cuew.c 2016-04-01 13:41:43 -0600
+++ src/cuew.c 2016-04-01 13:41:11 -0600
@@ -15,7 +15,9 @@
*/
#ifdef _MSC_VER
+#if _MSC_VER < 1900
# define snprintf _snprintf
+#endif
# define popen _popen
# define pclose _pclose
# define _CRT_SECURE_NO_WARNINGS

View File

@@ -1,11 +0,0 @@
--- Makefile.in 2014-11-12 06:59:58.000000000 -0500
+++ Makefile.in 2018-09-17 13:36:10.974086554 -0400
@@ -600,7 +600,7 @@
target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
-toolexeclibdir = @toolexeclibdir@
+toolexeclibdir = $(libdir)
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@

View File

@@ -1,11 +0,0 @@
--- a/configure 2018-08-27 13:46:41.071106150 +0200
+++ b/configure 2018-08-27 13:46:28.162765762 +0200
@@ -6013,7 +6013,7 @@
require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
- { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+ { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs" && add_cppflags "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs"; } }
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
enabled libopus && {
enabled libopus_decoder && {

View File

@@ -1,25 +0,0 @@
--- config.h.in 2014-03-04 11:44:58 -0700
+++ config.h.in 2016-03-30 11:42:49 -0600
@@ -142,9 +142,6 @@
/* Define to 1 if you have the `gethrtime' function. */
#undef HAVE_GETHRTIME
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
/* Define to 1 if hrtime_t is defined in <sys/time.h> */
#undef HAVE_HRTIME_T
--- kernel/assert.c 2014-03-04 11:41:03 -0700
+++ kernel/assert.c 2016-04-01 09:41:05 -0600
@@ -24,8 +24,10 @@
void X(assertion_failed)(const char *s, int line, const char *file)
{
+#if 0
fflush(stdout);
fprintf(stderr, "fftw: %s:%d: assertion failed: %s\n", file, line, s);
+#endif
#ifdef HAVE_ABORT
abort();
#else

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