1
1

Compare commits

..

858 Commits

Author SHA1 Message Date
c8004ff653 Just what version of C++ does the linux buildbot use, anyway. 2021-09-21 00:44:36 -07:00
fdffbf87ac Fix last commit 2021-09-21 00:13:43 -07:00
bee00909bc forgot a line 2021-09-21 00:04:10 -07:00
562723b080 More linux fixes 2021-09-21 00:03:32 -07:00
2195a5eb2c Try to fix another linux compile error 2021-09-20 23:28:03 -07:00
4307c0eb68 try to fix weird gcc compile error 2021-09-20 22:56:02 -07:00
2d473ff4a8 Sculpt: more brush stuff 2021-09-20 22:52:17 -07:00
2b2b569229 Disable a static assert on gcc. 2021-09-20 20:26:53 -07:00
015dae3dc5 add missing files 2021-09-20 19:42:31 -07:00
3fc687ad75 Sculpt: Finish color support for brush channels
* BRUSH_CHANNEL_VEC3/4 are now implemented
* New flag BRUSH_CHANNEL_COLOR
* Also tried to sculpt's usage of wm.radial_control in keymaps
2021-09-20 19:41:00 -07:00
76beed9068 Sculpt: More brush engine stuff, got automasking to work with it
* Sculpt now has an API to get brush channel settings.
  If a sculpt cache exists it will use the channels there
  (ss->cache->channels_final), otherwise it pulls them
  from a brush and Sculpt toolsettings. Exampes:

  float f = SCULPT_get_float(ss, "setting", sd, brush);
  itn i = SCULPT_get_int(ss, "setting", sd, brush);

* Improved the UI a bit
2021-09-20 14:10:35 -07:00
645aee0835 Fix small crash in last commit and a few typos 2021-09-20 03:34:13 -07:00
83bfa950b1 Sculpt: add missing files 2021-09-20 03:14:39 -07:00
898625547f Fix problem in last commit 2021-09-20 03:14:14 -07:00
73150981c8 Sculpt: More brush channel stuff
* The input device curves for brush channels
  now use a copy on write mechanism.
  + It's based on a global cache of curves.
    The alternative is to reference count
    BrushChannels, which I also implemented
    then abandoned.
  + Profiling showed that copying CurveMapping
    instances was actually a problem.

* Lots of small fixes to the old<-> new brush setting
  conversion code;

* Brush commands can now, sortof, have individual
  spacing.  The default brush spacing still acts
  as a minimum though.

* Added a BLI_ghash_lookup_p_ex method that
  returns the key ptr inside the ghash (it
  returns the actual key, not a pointer to
  Entry.key).
* Added a general 1d CurveMapping preset operator
  that uses an RNA path to get the curve.
2021-09-20 03:01:30 -07:00
c9f1e104da Sculpt: Brush channels names are now lower-case instead
of upper case.
2021-09-19 16:17:01 -07:00
336b263b56 Sculpt: brush engine stuff
BrushChannels are now stored in linked lists
instead of simple arrays.  This helps to
avoid memory corruption.

I had originally wanted to be able to pass
BrushChannels by value, but that doesn't really
work since they heap allocd data (the input
mapping curves).
2021-09-19 15:35:10 -07:00
b3ed969b86 commit prior to small refactor 2021-09-19 13:30:43 -07:00
87feba04dd Sculpt: more brush engine stuff; do not test.
Pushing this commit early due to computer
weirdness
2021-09-19 01:11:35 -07:00
1ca57bc5f4 Sculpt: flushed out brush channel RNA and made basic UI 2021-09-18 12:10:14 -07:00
7749b89d74 Sculpt: Added some icons and commit icon_geom.blend into the branch
Help with icons would be appreciated.  The
scene project icon kind of came out looking
like a band-aid.
2021-09-18 02:43:03 -07:00
bae92a0ce5 Disable threading for sculpt project brush 2021-09-18 01:39:40 -07:00
5223f73a1d Fix compile error 2021-09-18 01:26:12 -07:00
fe47584316 Sculpt: Flesh out RNA wrapping of BrushChannels 2021-09-18 00:35:56 -07:00
2d3d6eb7b2 Merge remote-tracking branch 'origin/temp_bmesh_multires' into sculpt-dev 2021-09-17 23:32:08 -07:00
f0c35d16f3 Merge branch 'master' into temp_bmesh_multires 2021-09-17 20:13:39 -07:00
85d274a60c Merge branch 'master' into sculpt-dev 2021-09-17 16:22:10 -07:00
d3bba94bf2 Commit current working copy; having
weird file system issues
2021-09-17 14:43:00 -07:00
04c3690299 Sculpt dyntopo: Roughed out skeleton of new brush engine API
Command Lists

* The new system will be based on command lists
  generated by (eventually) a node editor.
* For now, the lists will be hardcoded.
* Idea is to make a minimal viable
  brush engine that won't cause file breakage
  when the upgrade to node-based brushes happen.

Brush Channels

* Wrote new structures and API to wrange
  brush parameters: BrushChannel.
* Supports, floats, ints, enums, bitmasks,
  with plans for vec3 and vec4.
* This will replace UnifiedPaintStruct,
  most of the members of Brush and the
  DynTopoSettings struct.
* Brush channels can
  be mapped to various input device
  channels (e.g. pen pressure); each
  mapping has its own associated curve
  (CurveMapping instance) and bounds.

Brush channel inheritence chaining

* Brush channels can form inheritence chains
* Channel sets are stored in three places:
  in the scene toolsettings, in Brush, and in
  individual brush commands.
* Node groups will also have a channel set.
* Channels in each set can be flagged to
  inherit from the parent set.
* Inheritence happens in seperate merged
  channel sets at runtime.  The final
  Brush channels live in Brush->channels_final,
  while the final command channels live in
  BrushCommand->params_final.
2021-09-16 20:29:33 -07:00
627edd1efa Merge branch 'master' into temp_bmesh_multires 2021-09-16 13:44:21 -07:00
445889676b commit prior to merge 2021-09-16 10:42:30 -07:00
350e783668 Add skeletal beginnings of C++ sculpt refactor
design study (note that it's #ifdef'd out).

Basic idea is to put all the sculpt brush code
in a single large template.  This template
takes a PBVH adaptor class (of which there
would be three, one per PBVH_XXX type)
as a template argument.

Basically we're using the compiler to generate
three complete copies of every brush implementation.
C++20 concepts are used to validate the pbvh classes.

An example brush implementation:

    pbvh->forVertsInRange(
        {
          .brush = ss->cache->brush,
          .radius = radius,
          .use_threads = true,
          .use_original = false
        },

        [&offset](auto viter, int node_i, void *userdata) {
          //add offset to vertex coordinates

          madd_v3_v3fl(viter.co, offset, viter.fade);
        },

        [](PBVHNode *node, int node_i, void *userdata) {
          BKE_pbvh_node_mark_update(node);
        });
2021-09-15 14:56:19 -07:00
0b2aee5841 Sculpt dyntopo: Fix a few issues from last commit
* Fixed crashing on entering sculpt mode
* Fixed transitioning between sculpt and
  another undo system type sometimes
  corrupting stack.
2021-09-15 02:50:32 -07:00
ecdd6a302e Sculpt dyntopo: fix missing bit from last commit
* BM_mesh_bm_to_me now saves id layers by default.
2021-09-15 02:16:03 -07:00
173f5f94ff Sculpt dyntopo:
Seperate enabling PBVH_BMESH from enabling DynTopo:

* Created a new option to globally disabled
  DynTopo.
* The DynTopo panel header now reads "Dynamic Mode",
  to hopefully signal that turning on PBVH_BMESH is
  a seperate step from enabling or disabling DynTopo
  itself.
* The first checkbox in the panel is "DynTopo" so it
  should be clear enough (it's on by default, with multiple
  layers of file versioning checks).

PBVH_BMesh's undo system:

* CD_MESH_ID layers are now permanently saved once
  they are created (by default they are not).  This
  fixed a *lot* of bugs:

  Before this the undo system had to save maps between
  mesh indices and mesh IDs on transitioning
  between sculpt and global undo steps.  This was
  extremely error prone, and it simply wasn't possible
  to cover all of the corner cases

* Note that there is still an odd bug where the first
  global undo push after a sculpt step gets ignored,
  I dunno what's up with this.

* Dyntopo undo should be nearly (hopefully completely)
  bug-free after this commit.

C++20

* Made a few small changes to get blender to compile
  with c++20.  std::result_of was removed, had to
  replace a couple of usages of it with std::invoke_result.

* I'm planning to do some design studies on rewriting
  sculpt into C++.

* I strongly suspect we are going to need C++20'a new
  concepts feature if we move sculpt into C++.
  I'm planning to do some design studies on how
  that might work.
2021-09-15 01:41:03 -07:00
0eeaeb3fc2 Sculpt dyntopo: fix nasty node splitting bug 2021-09-13 20:14:46 -07:00
3df335d330 Sculpt dyntopo:
* Fixed noise on using autosmooth with tools that use original
  coorinates.  While this was most prominent with DynTopo,
  it did happen with other tools.
* The solution is to smooth the original coordinates as well
  as the explicit coordinates if the active tool requires
  original data.

* I decided to replace the original coordinates system for
  PBVH_FACES and PBVH_GRIDS with the same MDynTopoVert structure
  DynTopo uses.  The alternative would have been extremely messy
  code.

* Todo: Rename MDynTopoVert to. . .SculptInfoVert?
* Todo: Cache boundary flag and corner info in MDynTopoVert->flag
        for PBVH_FACES/GRIDS similar to PBVH_BMESH.
2021-09-13 19:24:21 -07:00
0676928408 Sculpt dyntopo: more collapse fixes
The edge cases just never end.
2021-09-13 02:31:33 -07:00
e68667a835 Sculpt dyntopo:
* A few more collapse fixes
* Fixed boudary handling in surface_smooth_v_safe
2021-09-12 23:39:49 -07:00
86972d294f Dyntopo sculpt: fix bug with boundary flags 2021-09-11 13:38:42 -07:00
f52a03dd71 Sculpt dyntopo: Added a 'hard edge mode' option
to forcibly set autosmooth_fset_slide to zero
(i.e. treat face set boundaries as hard edges
and not project them on the surface).
2021-09-09 10:06:24 -08:00
a52f89a446 Add more int casts for linux 2021-09-08 23:21:57 -08:00
9f3bafc4ab Sculpt dyntopo
* Non-manifold "fins" are now detected and automatically
  deleted.
* Fixed compile error on linux.
2021-09-08 23:18:07 -08:00
bb1096f475 Sculpt dyntopo:
* Collapse now uses code from decimate to detect
  degenerate cases.
* Remaining, unknown (and rare) degenerate cases
  are now detected (via presence of duplicate verts
  in faces) and fixed.
* DynTopo fills in undo size properly now,
  so undo memory limiting works.
2021-09-08 15:51:56 -08:00
3e6edf5278 Sculpt dyntopo:
* BLI_table_gset now internally uses a SmallHash instead of
  a GHash.  Profiling revealed this to be quite a bit
  faster.
* This is something of a stopgap until C++-afication of
  pbvh, when we'll have our pick of a bunch of
  really nice C++ hashmap libs.
* pbvh_collapse_edge bites the dust; dyntopo now uses
  BM_collapse_edge.  Of the three topology operations
  (subdivide edge, collapse edge, dissolve 3/4 valence
  vertex) only dissolve still has a dyntopo-specific
  implementation.
* Fixed a bunch of annoying memory corruption bugs.
* Non-manifold triangles are now detected in more
  places.

SmallHash changes:

* Enabled removal
* Fixed infinite loop bug caused by
  improperly counting free*d* cells
  versus free cells.
* Added a BLI_smallhash_ensure_p method
  that works just like the GHash version.

Sculpt replay system

* Roughed out a simple system to record and
  play back sculpt strokes using a simple
  text format.
* This is exclusively for
  performance profiling and unit tests.
* For each brush stroke the system saves a copy
  of the active StrokeCache and PaintStroke
  and parts of Sculpt.

This should make profiling DRAM thrashing a lot
easier.
2021-09-07 23:49:54 -08:00
37bce7b701 commit working code 2021-09-02 23:19:11 -07:00
6febbd7a55 Linux's gcc's flags are evil 2021-09-02 11:42:06 -07:00
416c7a32d8 Fix warnings 2021-09-02 11:32:46 -07:00
d4badd4b22 Fix compile error 2021-09-02 11:26:28 -07:00
4e43e09cca Sculpt dyntopo: increment subversion. 2021-09-02 11:08:28 -07:00
21b6d78cd2 Sculpt dyntopo: change brush defaults and fix bug
* Changed brush defaults a bit.  New defaults
  are for organic modeling.
* autosmooth_fset_slide now defaults to 1, so
  face set boundaries are smoothed but stick to mesh
  surface (if 0 they would function as hard edges).
* Weight by area smooth mode is on by default for all
  brushes.
* Cleaned up versioning code and made it
  kick in at 3.00:21, with some simple checks to
  try and detect existing data from beta testers.

* Also fixed a small crash bug.
2021-09-02 11:02:44 -07:00
2b20931707 Merge branch 'master' into temp_bmesh_multires 2021-09-02 00:02:20 -07:00
416686707f commit before merge 2021-09-01 21:32:43 -07:00
8bfbbc467a Sculpt dyntopo
* Wrote a simple fix for drawing face sets
  in inverse (ctrl) mode with face set automasking
  on.

* Various fixes related to hard edges and smoothing.

* Started writing some code to defragment bmesh mempools.
  Need to figure out how to avoid triggering excessive
  PBVH node rebuilds.
2021-09-01 11:47:03 -07:00
baa24243a5 Sculpt dyntopo: Dynamic field-propegated topology rake
I might write a paper on this.  Topology rake now locally
updates a vector field, which it uses to smooth the input
and constrain to mesh (including face set) boundaries.
This can make an enormous difference for things like
smoothing.

Note that this is different from the existing 'curvature rake'
mode, which also builds a field and which is fed into the input
of this new one.

The only oddity is that the field is stored in a CD_PROP_COLOR
since we don't have a CD_PROP_FLOAT4, and this shows up in the UI
(not sure if I'm messing up the CD_TEMPORARY flags or if the UI
doesn't check for them).
2021-08-30 15:04:43 -07:00
73529fb1bb Sculpy dyntopo: fixed various topology bugs
* Fixed crash in dyntopo collapse.  The
  loops around vertex iterator dyntopo uses
  doesn't actually work on non-manifold meshes,
  or meshes with invalid normals, this was not
  being checked in pbvh_bmesh_collapse_edge.
* Rotate tool now works with dyntopo.
2021-08-29 16:05:26 -07:00
381ef09073 Sculpt dyntopo: another bugfix from today's earlier commits 2021-08-28 15:33:41 -07:00
56ba339cd8 Fix a few bugs in lat commit 2021-08-28 14:59:54 -07:00
055fa3fa5e fix missing curly braces 2021-08-28 13:59:00 -07:00
7d5c3beb06 Sculpt dyntopo: Fix bug with edge collapse 2021-08-28 13:30:46 -07:00
39b0e9df81 Sculpt dyntopo: Add edge API
* Added a minimal edge API to query edge
  boundary states.
* This is necassary because the previous approximation,
  testing if two adjacent verts are boundaries, breaks
  for triangles.
2021-08-28 12:14:59 -07:00
6648f82ef7 Merge branch 'master' into sculpt-dev 2021-08-28 19:58:13 +02:00
320ff87948 Sculpt: Quantize mask filter 2021-08-28 19:57:32 +02:00
b21595cdf9 Tweak last commit to not affect base face set. 2021-08-27 21:54:15 -07:00
e4b36fb6bc Sculpt dyntopo: split face set boundaries on mirror boundary
Added an option to split face set boundaries on mirror
boundaries; currently only DynTopo supports this.

Very useful for making hard edges along mirror lines.
2021-08-27 20:02:20 -07:00
966e4ba9ae Sculpt dyntopo: improved boundary smoothing
It's kind of hackish mathematically.
2021-08-27 18:13:18 -07:00
268682527f Sculpt dyntopo: added a smoothing factor for sharp boundaries
Works by projecting non-boundary verts onto boundary vert
normals and weighting by boundary_smooth_Factor.
2021-08-27 14:18:50 -07:00
cdb52aee9f Missed an ATTR_NONNULL fix 2021-08-27 01:59:34 -07:00
8b02ab86f1 change 'error' to 'warning' in a printf 2021-08-27 01:57:13 -07:00
019700583b Sculpt dyntopo: undo bugfixes
* Fixed nasty undo bug related
  to now rewinding BMLogEntry subchains properly.
* Fixed bug in dyntopo collapse
2021-08-27 01:51:56 -07:00
31d2b04411 Sculpt dyntopo: Who knew gcc's nonnull attribute is 1-based 2021-08-26 20:23:17 -07:00
3508c699fb Sculpt dyntopo: Cleanup past few commits
* Removed some ATTR_NO_OPTs
* Made pbvh_split_edges disallowed
  4-valence splits if cleanup topology
  mode is on
2021-08-26 20:10:54 -07:00
8ea7c93a37 Sculpt dyntopo: support sharp edge flags
* Sharp edge flags are now supported and are
  treated much the same as face set boundaries:
 + Dyntopo preserves them
 + Interior smoothing treats them as boundaries
 + Corners are detected and pinned in smoothing
 + TODO: add a brush flag to ignore sharp boundaries
   for smoothing.
* Seams are also preserved, but don't affect smoothing.
* BMLog now saves edges.
* The new edge split function is enabled.
* Dyntopo now pushes new combined BMLog entries in
  its top-level function, to avoid scary id reuse
  edge cases.
* SCULPT_vertex_is_boundary/corner now take a bitmask
  of which types of boundaries you wish to query instead
  of check_face_sets.
2021-08-26 18:00:29 -07:00
8b8733e76c Sculpt Vertex Colors: New sample color operator 2021-08-27 01:07:07 +02:00
4dda04eaa9 Merge branch 'master' into sculpt-dev 2021-08-26 23:19:21 +02:00
30691560fa Fix C++20 designated initializer build issue. 2021-08-26 20:56:13 +05:30
12f87d02c6 commit prior to small cleanup 2021-08-25 03:01:56 -07:00
9680edf77c * Implemented bounday/face set corner handling.
* New function SCULPT_vertex_is_corner, similar to
  SCULPT_vertex_is_boundary it takes argument to
  check face sets.  PBVH_FACES/GRIDS version is
  incomplete.  It returns a bitmask of whether
  the vert is a boundary corner and/or a face
  set one.
* PBVH_BMESH uses a somewhat more expensive
  calculation to detect corners of face set islands by
  edge angle. This is currently not done for boundary
  corners.

Corner pinning now happens in:

* The internal smoother dyntopo uses for stability reasons.
* SCULPT_vertex_neighbor_average_interior.
* Topology rake.
* Dyntopo collapse.

Note that DynTopo always pins face set corners
but everything else only does so if preserve face
sets is on.
2021-08-24 13:18:36 -07:00
a00bfa8976 Sculpt dyntopo: more smooth stuff
* All of the smooth brushes now use the SculptCustomLayer
  system for temporary data, so all work with dyntopo now.
* You can now use a flat array in SculptCustomLayer with
  PBVH_BMESH (though you have to build the structure manually).
  The mesh filter code uses this.
* Smooth (and autosmooth) now have an option to preserve face
  set boundaries.  Corners are currently not handled.
* Simplify brush has preserve face set boundaries autosmooth
  flag set by default.
* SCULPT_vertex_is_boundary now takes an addition argument
  for whether to check for face set boundaries.
2021-08-23 22:55:17 -07:00
bde54e127e Sculpt dyntopo: Smooth improvements and bug fixes
* Added an option to weight smooth by face areas
* Dyntopo now caches face areas in a CD_PROP_FLOAT layer
* Dyntopo also caches number of edges around verts inside of
  MDynTopoVert.  To avoid increasing the struct size flag was
  made a short.
* Cleanup mode (dissolves 3/4-valence verts) now piggybacks on
  subdivide code to build list of verts; this is much faster.
2021-08-23 21:06:10 -07:00
9b8c82e2ed Sculpt dyntopo: fix mem cache test function, how did this
ever work
2021-08-23 02:28:19 -07:00
5866a4680d Dyntopo Sculpt: Wrote new edge split code, currently disabled 2021-08-23 01:19:55 -07:00
d795144f54 I hate default int 2021-08-22 13:31:05 -07:00
de6258c618 Silly me, don't use alloca in this situation 2021-08-22 13:16:10 -07:00
d912ceeb40 Fix compile error on linux 2021-08-22 13:15:08 -07:00
9a197a1185 Sculpt dyntopo: Temp fix for nasty GCC compiler bug on linux.
I'll file a bug report with GCC tomorrow.
2021-08-22 12:51:53 -07:00
36785c83f0 Sculpt dyntopo: Fix a dumb mistake I made in space_toolsystem_toolbar.py 2021-08-22 10:29:36 -07:00
8eb7a04150 fix signed/unsigned warning 2021-08-21 20:46:08 -07:00
97c3e5944c Sculpt dyntopo: Finished bmesh cache coherency tester
To run, in the python console enter:

bpy.msgbus.pbvh_bmesh_do_cache_test()

The output will be in the regular console.  The test
build a half-million vert cube and smooths it. It runs
several passes (all of which perform the same smoothing
operation):

1; Randomized order pass
2. Ordered pass (by vertex clustering)
3. Same as 2 but with a purely data-oriented version
   of the bmesh structs.
4. Same as 2, but using a version of the bmesh structs
   with all pointers replaced by integer indices.

At least on my laptop #3 and #2 are about a third faster
then #1, and #2 tends to be around 15%.
2021-08-21 20:40:22 -07:00
6f523ffacb Sculpt dyntopo: Don't allow dyntopo when multires modfier exists
Note that thoeretically we could support multires in dyntopo,
but numerical instability would probably make the grid data
explode.
2021-08-21 15:19:15 -07:00
04562794df Sculpt dyntopo: disable mem cache test executable
from compiling altogether
2021-08-20 20:52:22 -07:00
93004c7b19 Dyntopo: Disable mem cache test executable for now as it
doens't link on mac
2021-08-20 20:49:29 -07:00
0d542db1e1 Sculpt dyntopo:
* Fixed multires apply base feeding bad original coordinates to
  deform modifiers.
* Roughed out some code for cache performance testing.
* Wrote skeleton code for a PBVH texel API; hasn't been tested
  yet and may be removed.
2021-08-20 20:36:04 -07:00
de1f2c41fa * BM_mesh_remap can now reorder loops
* Wrote yet another BKE_pbvh_reorder_bmesh function
2021-08-18 21:43:59 -07:00
106f542ac4 Sculpt dyntopo: yet another undo bug
BKE_pbvh_bmesh_add_face had a branch where it ignored
the log_face argument, leading to corruption in
BMLog.
2021-08-17 14:58:37 -07:00
83f94ebb6f Sculpt dyntopo: remove debug ATTR_NO_OPT's 2021-08-17 00:31:04 -07:00
954aa88ba4 Sculpt dyntopo: more undo fixes
Yay for massively overdetermined bugs.
2021-08-17 00:09:43 -07:00
9503751c83 Sculpt dyntopo
* Added a limited "fast draw" mode to pbvh drawing
  that tries to limit data sent to the GPU.
 - Facesets and mask data are disabled.
 - Indexed mode is forced.
 - Does not work (at all) for multires.

* Finally fixed some outstanding bmesh sculpt undo bugs:
 - Forgot to mark pbvh nodes to update their bounds, which
   produced a bug I had thought was caused by something else.
 - Hopefully fixed a long-standing occasional memory corruption
   bug.
2021-08-16 20:50:02 -07:00
dcaba4c5e3 Sculpt dyntopo: fix various faceset init operator bugs
that crept in.
2021-08-16 16:34:35 -07:00
fb463a13cd Sculpt dyntopo: Fix memory corruption caused by improperly disabled
code.
2021-08-16 02:12:30 -07:00
b5100e73c8 Sculpt dyntopo: Fix boundary brush for multires
This commit fixes boundary brush for multires which
broke two commits ago.

This required implementing the geodesic api for PBVH_GRIDS,
which I did by building topology maps in a rather. . .
haphazard fashion.

Basically I built a vert->edge map and then used it to
derive a pseudo edge to quads mapping (it maps edges
to all the verts in the two surrounding quads except
the edge's own verts).

Just for fun I enabled geodesic mode in mask expand;
it seems to work.
2021-08-16 01:44:31 -07:00
ab632243e6 Merge branch 'master' into temp_bmesh_multires 2021-08-15 18:14:41 -07:00
8510c77b9c Sculpt dyntopo: improve boundary brush for irregular topology
(still a wip)

The boundary brush now builds a geodesic distance
  field (from the boundary) from which it derives a tangent
  field:

* These now define the rotation plane for bend mode.
* Rotation origins snap to these planes.

There is also typedef'd code for visualization tangents
in a temporary object (note the sculpt object), to enable
define VISBM in sculpt_boundary.c.  This will be removed
lated.

Additional changes:

* Added a function to get the number of edges around verts,
  SCULPT_vertex_valence_get.
* Added an API to calculate cotangent weights for vert fans,
  SCULPT_cotangents_begin (call in main thread first) and
  SCULPT_get_cotangents.
* Sculpt neighbors for PBVH_FACES now uses ss->vemap if it exists.
* The Mesh topology mapping code now takes extra parameters for
  sorting vert/edge cycles geometrically.
* Similarly, there is now a function to sort BMesh edge cycles,
  BM_sort_disk_cycle.
* MDynTopoVert->flag now has a bitflag for when the disk cycle
  sorting needs to be redone, DYNVERT_NEED_DISK_SORT.
* The sculpt geodesic code now supports passing in custom vertex
  coordinates.
* The geodesic API can also build an optional map of which vertex
  in the initial vertex list is closest to any other vertex.
2021-08-15 18:02:16 -07:00
40aa321dc7 Sculpt dyntopo: fix bug with dyntopo geometry undo push 2021-08-11 22:51:09 -07:00
a80c381ec5 Sculpt Dyntopo: PBVH draw fixes
* The PBVH draw subsystem is now told whether any viewports
  have drawtype >= OB_MATERIAL before anything in any windows
  are drawn.  There are no alternatives given the design
  constraints of sculpting, where simply uploading data to the GPU
  quickly becomes a bottleneck.

* Fixed flat vcol shading mode.
2021-08-07 22:28:00 -07:00
1e9a7383ef * Don't rely on BMLog's stored normals, instead flag pbvh nodes to
update normals on undo/redo.
2021-08-07 19:25:36 -07:00
dc738de90c Sculpt dyntopo: Fix bug in cleanup_valence_3_4 2021-08-06 18:39:54 -07:00
8ed4c5fc61 Merge branch 'master' into temp_bmesh_multires
Also fixed a pbvh corruption bug
2021-08-06 12:51:18 -07:00
76bd253be7 Dyntopo sculpt: add dev operator to debug memory cache coherency 2021-08-06 09:58:46 -07:00
c78b0874ad Asset Browser: Support dropping materials into Face Sets 2021-08-06 17:33:18 +02:00
b991a92aab Merge branch 'master' into sculpt-dev 2021-08-05 20:10:57 +02:00
01965a275c Cursor: Change face set color and wireframe preview 2021-08-04 22:17:48 +02:00
b2dc8bd92e Merge branch 'master' into sculpt-dev 2021-08-02 21:35:31 +02:00
d3faf09082 Merge branch 'master' into sculpt-dev 2021-07-31 17:16:02 +02:00
b243eb2646 Merge branch 'master' into temp_bmesh_multires
Also:

* added BMLog function to save mesh IDs.
  - Used by SCULPT_UNDO_DYNTOPO_BEGIN/END instead of
    saving the whole mesh, which was the previous behavior.
* SCULPT_UNDO_DYNTOPO_BEGIN no longer pushes a non-dyntopo
  geomtry undo node, as this is no longer necassary.

This greatly speeds up going into/out of sculpt mode
with dyntopo enabled, as before it was copying
the mesh twice.
2021-07-29 16:08:14 -07:00
fcfb47b983 Merge branch 'master' into sculpt-dev 2021-07-27 22:00:24 +02:00
c1f5ac7cfe Array Brush: Support array editing with the voxel remesher 2021-07-25 20:36:56 +02:00
89897140cf Merge branch 'master' into sculpt-dev 2021-07-25 18:20:27 +02:00
af71984942 sculpt dyntopo: fix memory corruption and associated memory leak 2021-07-25 05:28:54 -07:00
ec4b9dff19 Add 'projection' option for volume-preserving smoothing to
smooth corrective modifier
2021-07-23 15:46:01 -07:00
d71b6d37fe Array Brush: Initial radial and linear array editing 2021-07-23 21:29:07 +02:00
2689124320 Array Brush: Path edit mode working 2021-07-21 23:27:46 +02:00
70a4956020 Sculpt dyntopo: Removed triangle limit for PBVH_BMESH
* PBVH_BMESH now supports faces other then triangles;

* Dyntopo triangulates faces as it finds them.
  - I looked into methods of preserving quads and failed to
    find anything that worked well in practice; it actually
    worked better to use topology rake to align triangles
    into quads and then mark diagonal edges for later dissolving
    then to try to preserve quads explicitly (I've not
    implementated that here, that was research code).
  - To avoid excessive cache-destroying loops over vertex-faces,
    DynTopo flags which verts have non-triangle faces.

* PBVHTriBuf now builds edge buffers so we can avoid drawing
  tesselation phantom edges.

* BMLog also now supports arbitrary faces.  It still does not
  support edges though.

TODO:

* Fix vcol cell shading mode
* Make sure indexed drawing works
2021-07-20 19:46:00 -07:00
93305b97df Merge branch 'master' into sculpt-dev 2021-07-20 18:28:53 +02:00
7cd74015f8 Sculpt dyntopo: Another fix for faceset boundary handling
* Turned out pbvh->cd_faceset_offset wasn't being updated
  correctly.
2021-07-20 05:47:08 -07:00
7bd521a5c4 Sculpt dyntopo: Another small fix 2021-07-20 04:56:29 -07:00
7dda5ac5ba A few small fixes for last commit 2021-07-20 04:29:23 -07:00
1694e2aca4 Sculpt dyntopo: Face set boundaries are now presered with dyntopo
* Face set boundaries are now preserved on dyntopo remeshing.
* MDynTopoVert->flag now has a DYNVERT_FSET_BOUNDARY flag
  in addition to DYNVERT_BOUNDARY.
* Instrumented uiBut with ASAN poison regions to hopefully
  find the super evil memory corruption bug that's been driving
  me insane.  It's frustratingly intermittent.  There are five
  poison regions.
2021-07-20 04:14:59 -07:00
2fddbebf93 Sculpt dyntopo: Dyntopo now handles mesh boundaries in a more
intelligent way.
2021-07-19 15:32:41 -07:00
4247a56cde Add back hackish fix for clang bug. I should probably
file a bug report with the clang people.
2021-07-18 13:15:43 -07:00
e3b58b6451 Sculpt dyntopo: Split off dyntopo stuff from pbvh_bmesh.c into a new file, dyntopo.c. 2021-07-18 13:12:08 -07:00
5b10d08db3 Sculpt dyntopo:
* Prototyped a threaded bmesh->Mesh converter function.  It's about
  20-30% faster.  Currently disabled.
* Tried to fix more of the bugs when stepping between sculpt and
  other undo step types in the global undo stack.
2021-07-17 04:10:28 -07:00
7c4eb4f8db Merge branch 'master' into temp_bmesh_multires 2021-07-17 00:44:01 -07:00
792292e3de Sculpt dyntopo: BLI_mempool now adds redzones when compiled with ASAN 2021-07-16 23:29:28 -07:00
95a969e7d5 Array Brush: Disable debug drawing 2021-07-15 21:20:48 +02:00
f9c0c9e70c Merge branch 'master' into sculpt-dev 2021-07-15 21:16:12 +02:00
aousdfh
3600e9057b Array Brush: expose fill holes and orientation lock 2021-07-15 21:00:14 +02:00
aousdfh
a78ecfe0f3 Array Brush: Fix crash 2021-07-14 02:57:07 +02:00
aousdfh
65127f9875 Array Brush: Refactor array indices access 2021-07-14 02:02:26 +02:00
aousdfh
37c2bbe5ea Array Brush: Fix EEVEE and modifier evaluation 2021-07-13 19:22:00 +02:00
aousdfh
ceac1d91e2 Array Brush: Fix scale, symmetry and rotation jittering 2021-07-13 02:16:05 +02:00
aousdfh
dfab5a0c4a Array Brush: Array rotation orientations working 2021-07-13 00:37:10 +02:00
aousdfh
85379482d5 Array Brush: Orientation detection working 2021-07-12 23:49:22 +02:00
4ca249018d More msvc errors 2021-07-12 16:03:22 -04:00
d529e13d65 Sculpt dyntopo: fix msvc compiler error 2021-07-12 16:01:17 -04:00
4e797dbc69 Definitely going to modify BLI_strict_types.h 2021-07-12 12:30:23 -04:00
aousdfh
41a8e94d4d Array Brush: First attempt to copy orientation (disabled) 2021-07-12 17:48:42 +02:00
1b9a835893 Make gcc happy 2021-07-11 23:57:14 -04:00
320a1b6f35 Fix bug in previous commit; customdata_bmesh_set_default now ignores
CD_MESH_ID layers
2021-07-11 23:28:19 -04:00
f07f56aa37 BM_mesh_create will now add mesh_id customdata layers when asked,
instead of leaving that to the client.

Also semi-fixed uninitialized memory bug in bmesh unit test (dunno
how best to memset a C struct in C++ won't won't run afoul of some
random compiler somewhere).
2021-07-11 22:02:52 -04:00
4e91e72d53 Let's try that again 2021-07-11 21:21:10 -04:00
58b4688c34 Weird linux compile error 2021-07-11 21:20:37 -04:00
2f862bc7b9 Fix more dyntopo sculpt undo memory corruption 2021-07-11 21:14:49 -04:00
4674795591 Sculpt dyntopo: another attempt to fix undo memory corruption bug 2021-07-11 13:14:24 -04:00
be9017c349 Fix implicit int error 2021-07-11 06:01:39 -04:00
4c2f5b80b7 Remove extraneous code 2021-07-11 05:25:41 -04:00
0502b0103f Merge branch 'master' into temp_bmesh_multires 2021-07-11 05:23:24 -04:00
e8b717ee42 Sculpt dyntopo: Exposed UV smooth bruth in experimental features prefs.
* Also got undo working for it
2021-07-11 04:12:20 -04:00
4b4ac93acd Sculpt dyntopo: Wrote a little UV smoother sculpt brush.
It uses a simple LSCM-like solver; hold ctrl to do simple
laplacian relaxation.

There are some interesting artistic possibilities to using
DynTopo with UV maps, the point of this tool is to help
explore them.

Note that I'm not planning to merge this into master with
the rest of this branch.  When the time comes I plan to
move it into a new branch for sculpt research stuff.
2021-07-11 03:43:47 -04:00
aousdfh
f283c527d2 Array Brush: Scale and stroke strength working 2021-07-09 00:01:56 +02:00
aousdfh
820d086719 Array Brush: Count and deform mode brush properties 2021-07-07 03:26:52 +02:00
aousdfh
69668d62ba Array Brush: Working code for path and radial arrays 2021-07-07 02:20:14 +02:00
aousdfh
351744f2b0 Sculpt Array: Debug path drawing 2021-07-06 01:21:14 +02:00
aousdfh
5ac471a021 Sculpt Array: Initial code for path and path points 2021-07-06 01:06:15 +02:00
aousdfh
db932ccde6 Array Brush: Implement symmetry datalayers 2021-07-06 00:44:49 +02:00
57286eed8d Sculpt dyntopo: Add support for multiple materials to dyntopo
pbvh drawing.

* Dyntopo now stores a list of PBVHTriBufs in leaf nodes, one per material
  used by the node.
* Actual drawing buffers live in a new mat_draw_buffers PBVHNode member.
2021-07-02 13:14:00 -07:00
9dbf3b9fab Array Brush: Implement array instances datalayer 2021-07-02 22:10:21 +02:00
4f8c63e77b Array Brush: BMesh duplication working 2021-07-02 19:52:58 +02:00
47c226cbe3 Array Brush: Add template code and support geometry modifications 2021-07-02 16:38:37 +02:00
d0759840a0 Merge branch 'master' into temp_bmesh_multires 2021-06-30 21:38:18 -07:00
5b19b2cb56 remove debug printf 2021-06-30 21:25:46 -07:00
dcb00bf529 * Enable mask/fset extract for dyntopo]
* Fix nasty memory corruption bug
2021-06-30 21:13:24 -07:00
e8e062f866 Merge branch 'master' into sculpt-dev 2021-06-30 18:12:50 +02:00
9838e9e485 Merge branch 'master' into sculpt-dev 2021-06-30 01:31:21 +02:00
d66d5b431e Clean up a few warnings 2021-06-29 05:50:40 -07:00
43a0fe378f Merge branch 'master' into temp_bmesh_multires 2021-06-29 04:35:53 -07:00
199f846072 Merge branch 'master' into sculpt-dev 2021-06-28 19:44:07 +02:00
fb6636c812 Sculpt dyntopo: fix bug with automasking being needlessly initialized 2021-06-26 23:46:47 -07:00
adc8980dec Sculpt dyntopo: fix symmetrix undo bug from last commit 2021-06-26 22:52:35 -07:00
48c41b189a fix type of code line being after the parenthesis
instead of before
2021-06-26 21:40:07 -07:00
7562ad5777 Sculpt dyntopo: BMLog now uses the new bmesh unique id system
A few notes:

* MESH_ID layers are not saved on conversion to Mesh unless
  you ask for it in BM_mesh_bm_to_me's params.
* Still need to test the box/lasso trim tools.
* Need to find some way to test loop/edge ids, which aren't
  used by dyntopo.
2021-06-26 21:26:33 -07:00
27986e9b56 Sculpt dyntopo: Added a function to add multiple customdata
layers to a bmesh at once.  Helpful since bmesh customdata
layers are allocated in single blocks, thus adding
layers individually can lead to lots of memory
copying.
2021-06-26 19:12:07 -07:00
dba4f30328 Sculpt dyntopo: Added (optional) support for unique mesh id tracking in
bmesh

* System is per element type.  So you can have unique ids for verts and
  faces, but not edges and loops.
* Supports an optional id to element lookup table.
* Uses single id space for all elements
* Added a new CD_FLAG_ELEM_NOCOPY flag to tell
  customdata_bmesh_copy_data to ignore that layer.
* IDs are stored as a temporary customdata layer with
  CD_FLAG_ELEM_NOCOPY set.
2021-06-26 18:24:00 -07:00
83c491f044 Merge branch 'master' into temp_bmesh_multires 2021-06-26 13:00:26 -07:00
7ef7843ada Sculpt Dyntopo: Fix memory corruption in dyntopo undo
ss->active_XXX_index wasn't being handled properly.
2021-06-25 17:10:12 -07:00
5a7b9adef1 Dyntopo sculpt: add support for asan to mempool 2021-06-25 15:04:09 -07:00
d293de425f Sculpt Dyntopo: fix bug in dyntopo brush spacing. 2021-06-25 11:49:28 -07:00
17d4c7abb1 Sculpt dyntopo:
* Got automasking to work with dyntopo properly.
  - AutomaskingCache->factor
    has been replaced with the new temp layer API (which works for all
    PBVH modes).
  - AutomaskingCache->factor is, however, only initialized for
    topology and face set boundary modes (if DynTopo is enabled)
    since it's probably better to calculate the rest dynamically
    in that case.
* Fixed stats bug
2021-06-24 23:50:49 -07:00
2f81449a70 Twist brush: use relax instead of smooth 2021-06-22 01:20:36 +02:00
ca4ac36c59 Merge branch 'master' into temp_bmesh_multires 2021-06-20 15:58:24 -07:00
5c328ab8b0 Twist Brush: Add separate smooth step 2021-06-20 18:32:19 +02:00
7a67cb2aeb Twist Brush: Fix bug in rotation 2021-06-20 17:53:35 +02:00
178c3a4064 Twist Brush: Scale brush tip space per vertex 2021-06-20 17:34:20 +02:00
15884510e8 Twist Brush: Deform rotation space 2021-06-20 17:21:53 +02:00
22e2e4f062 Twist Brush: Rotate in brush tip space 2021-06-20 17:12:05 +02:00
3ccc160682 Merge branch 'master' into sculpt-dev 2021-06-20 16:46:21 +02:00
00fd823bcd Sculpt dyntopo: Don't calculate curvature info in topology rake if curvature
mode is not enabled.
2021-06-19 23:54:51 -07:00
d9badbf25c Merge branch 'master' into sculpt-dev 2021-06-19 22:12:13 +02:00
f16e35ce0a Twist Brush: Initial working version 2021-06-18 22:01:26 +02:00
425e5c8d76 Twitst Brush: initial commit 2021-06-18 21:44:29 +02:00
1ab412f13d Merge branch 'master' into sculpt-dev 2021-06-18 21:24:36 +02:00
ee1c0c682b Fix build in edit mode mesh fairing 2021-06-16 21:06:27 +02:00
59f0811ac9 Merge branch 'master' into sculpt-dev 2021-06-16 21:01:43 +02:00
45f522888b Merge branch 'master' into sculpt-dev 2021-06-14 22:53:41 +02:00
d15262ded1 Merge branch 'master' into sculpt-dev 2021-06-11 21:58:12 +02:00
ab5b138805 Merge branch 'master' into sculpt-dev 2021-06-08 22:56:21 +02:00
8ca52a7757 Merge branch 'master' into temp_bmesh_multires 2021-06-07 16:57:33 -07:00
d4af8a8d26 Sculpt: Make subdivision surface modifier use the On Cage option 2021-06-04 16:20:38 +02:00
b1e59f1a20 Merge branch 'master' into sculpt-dev 2021-06-03 22:46:38 +02:00
bd34d77a90 Merge branch 'master' into sculpt-dev 2021-06-03 20:24:11 +02:00
3ac83dcc73 Merge branch 'master' into sculpt-dev 2021-06-01 14:26:49 +02:00
900178d438 Fix build after merge 2021-06-01 14:22:49 +02:00
414b8b7628 Merge branch 'master' into sculpt-dev 2021-06-01 12:52:07 +02:00
4adc0a7798 Dyntopo: do a little bit of code cleanup 2021-05-31 10:53:22 -07:00
88620e8cd9 Merge branch 'master' into sculpt-dev 2021-05-31 11:14:07 +02:00
552e44bd25 Fix implicit int error 2021-05-27 14:30:45 -07:00
1f19a86150 DynTopo:
* Fixed failed patch reversion from a while ago
* Also tweaked a few comments.
2021-05-27 12:15:49 -07:00
702376e935 Merge branch 'master' into sculpt-dev 2021-05-27 11:24:32 +02:00
3ca3098ed7 DynTopo: Enable BLI_linklist_stack type checking for clang-cl
and fix a few errors.
2021-05-24 11:40:05 -07:00
995702da48 Let's try that again. 2021-05-23 21:39:37 -07:00
33066542ca MIssed a flag in bli_strict_types.h 2021-05-23 21:34:20 -07:00
5a26ea0961 DynTopo: Attempt to fix compiling on macos 2021-05-23 21:02:29 -07:00
1e3e79fe7b Fix one more strict flags violation 2021-05-23 20:52:25 -07:00
d4292bbd28 * Added clang-cl support to BLI_strict_flags.h 2021-05-23 20:39:52 -07:00
a97c5d7daa DynTopo: started refactoring pbvh drawing to handle customdata layers in
a more generic (and maintainable) way.
2021-05-23 16:11:16 -07:00
6b009b8890 Merge branch 'master' into temp_bmesh_multires 2021-05-23 14:30:32 -07:00
3d16099a77 Dyntopo:
Fix multires not setting pbvh->depth_limit
2021-05-20 17:59:09 -07:00
4352980b0f Dyntopo
* Got threaded mesh->bmesh conversion working (it's disabled
  pending further testing however).

Note that SCULPT_dynamic_topology_enable_ex calls BKE_scene_graph_update_tagged,
which in tests was adding ~1 second to conversion time for larger
meshes.  Do we need this call?
2021-05-19 14:36:00 -07:00
3d6ac0bd7b Dyntopo: code cleanup 2021-05-19 12:21:46 -07:00
71959181ad * Fix bug with symmetrize creating non-manifold geometry.
* Fix bug in pbvh face create
2021-05-18 22:26:49 -07:00
daa4a33383 Merge branch 'master' into temp_bmesh_multires 2021-05-17 19:48:16 -07:00
d3695eb12c * Fix corner case in last commit 2021-05-17 14:23:02 -07:00
c1f236dcd4 BMLogFace now stores the face normal. 2021-05-17 14:02:31 -07:00
3276c3b4a1 Merge branch 'master' into sculpt-dev 2021-05-17 22:08:28 +02:00
a90533e9b8 Cleanup failed patch reversion 2021-05-17 00:45:07 -07:00
9bea7259e1 Merge branch 'master' into temp_bmesh_multires 2021-05-16 23:32:35 -07:00
7fca310f25 Dyntopo now updates the existing pbvh on undo instead of building
a new one from scratch, an operation that can be slow despite being
  threaded.

PBVH building is a memory bound operation (not just on the CPU side
either, remember the draw buffers have to be fully regenerated too).
Incrementally updating it this way is enormously faster (about as fast
as non-dyntopo undo).

The downside is we don't have the convienience of users regularly
building the pbvh from scratch anymore.  Dyntopo does try to
join empty PBVH nodes (which happens after every stroke), but
that's not a complete substitute for a decent tree balancer.
That's on the todo list.
2021-05-15 21:19:20 -07:00
27f4f761e7 Tried to make pbvh bmesh normals calc a bit more efficient. 2021-05-15 11:51:14 -07:00
17fafe2f63 fix memory leak 2021-05-14 21:21:01 -07:00
89d56ea225 fix missing null pointer check. 2021-05-14 21:12:23 -07:00
cfd6d48aab * Prototyped a faster smooth algo, currently disabled.
* Wrote a new API for wrangling temporary customdata layers across pbvh types:
  - SCULPT_temp_customlayer_ensure: makes sure a (named) customdata
    layer exists.  Works for multires; since these are temporary
    layers we can safely allocate them in a temporary CustomData
    structure (in ss->temp_vdata).
  - SCULPT_temp_customlayer_get: initializes a special structure,
    SculptCustomLayer, that is used to get per elem customdata.
  - SCULPT_temp_cdata_get: Uses a SculptCustomLayer ref along with
    a SculptVertexRef to look up the data.
2021-05-14 18:26:41 -07:00
6be2c079c1 Did some profiling with VTune.
* Sculpt code seems to be memory bandwidth bound.
  * Some key topology loops will have to be written manually
    instead of using BM_ITER.

I wrote a function to re-allocate a bmesh with elements ordered by
PBVH leaf nodes, SCULPT_reorder_bmesh.  It's currently disabled.

This is going to take more profiling, but my original proxy refactor
idea might be worth revisiting.  Might be more cache efficient.

The good news is that the worst case is the smooth code, which I can speed
up significantly by keeping a bit of state around.
2021-05-14 15:56:04 -07:00
ae5d971e8f Merge branch 'master' into sculpt-dev 2021-05-14 19:09:06 +02:00
13bdc4a7e6 Merge branch 'master' into sculpt-dev 2021-05-14 19:08:19 +02:00
72aad83780 Merge branch 'master' into sculpt-dev 2021-05-13 17:43:21 +02:00
32ceaa7919 Update ATTR_NO_OPT macro 2021-05-12 22:27:35 -07:00
ec4786d00b Dyntopo branch
* Sculpt expand now works with dyntopo in more cases
* Fixed various dyntopo face set bugs

Stuff from several commits ago:

* There is now an API to get face sets using SculptFaceRef's.
  + SCULPT_face_set_get
  + SCULPT_face_set_set

* Prototyped a faster geodesic propagation function, but it currently
  doesn't work.

* Dyntopo triangulation now preserves face flags (took some work as BM_triangulate_face explicitly prevents selection flags from being preserved).
* Also face smooth flags are no longer being overriden.
* Most of the faceset create operators work (I'm not sure I've tested
  all of them though).
* SCULPT_face_set.c now has helper functions that checks if a pbvh
  is *not* PBVH_BMESH, in which case it builds a temporary bmesh,
  otherwise ss->bm is used (sculpt_faceset_bm_begin and sculpt_faceset_bm_end).
  + Note that some functions were able to use SCULPT_face_set_XXX
    instead and avoid bmesh entirely.
2021-05-12 16:22:39 -07:00
582c30d32f Fix nasty edge case for BMLog. 2021-05-11 22:57:06 -07:00
b047b333b0 Remove yet more debugging crap . . . 2021-05-11 21:48:14 -07:00
f2c9706781 Get rid of various ATTR_NO_OPT debug attributes left from two
commits ago.
2021-05-11 21:46:44 -07:00
fa06238aa7 Fix bug in last commit. 2021-05-11 21:45:43 -07:00
b8a8e4f9b1 Today I ran outside screaming and an hour later came back in and made BMLog
reference counted.  This fixes various undo bugs caused by dyntopo
needing to execute an undo push but not being able too (e.g. during
file load, and I think it also happens sometimes with global undo).

A much better way of fixing this would be to add unique IDs to mesh
verts and faces, perhaps as a customdata layer.

The root problem is that BMLog assigns unique IDs to mesh elements,
which it does via a series of GHash's.  I imagine this is a fairly
serious violation of the undo system's design rules, since it means
BMLogs are tied to specific instances of the bmesh in SculptSession->bm.

There were some hacks to try and get around this, but they were buggy
and needed to push the unstack stack to work, which wasn't possible in
all cases (e.g. if G_MAIN->wm.first->undo_stack is NULL, as it is during
file loading and apparently global undo).

Anyway, long story short each chain of SculptUndoNodes needs some way
to reconstruct their ID GHash's when exiting/entering the chain. The
only way I could think to do this was to make BMLog reference counted,
with BMLogEntry the users.

Like I said, having a proper system to assign unique IDs to mesh
elements would be *much* better.
2021-05-11 21:14:45 -07:00
dbe767f5d9 Merge branch 'master' into temp_bmesh_multires 2021-05-11 14:18:48 -07:00
fad42fc6c7 Merge branch 'master' into sculpt-dev 2021-05-10 19:01:57 +02:00
7cf3b1f472 Get face set create operator working for dyntopo 2021-05-07 07:04:19 -07:00
6c3b29a14c Merge branch 'master' into temp_bmesh_multires 2021-05-05 08:52:14 -07:00
febfaecd97 * Added new paint API method paint_stroke_apply_subspacing, for various
things that need custom spacing (that is coaser than the brush radius),
  and refactored the existing dyntopo spacing code to use it.

* Added option to topology rake to ignore brush falloff settings
  (it forcibly uses Smooth falloff).

* Smooth and topology rake support custom spacing now.
  + This is especially important for the clay brush, which works
    better at smaller spacings and with a bit of autosmoothing.
    Now you can tell it to override the smooth spacing to be coarser,
    leading to much better performance.

* Topology rake now has a projection setting similar to autosmooth
  which defaults to 1.0 (to preserve current behavior).

The main motivation for this commit was to make topology rake work
better for normal brushes.  This is now possible, however it tends to
make the brush slower and also the settings are a bit fiddly.
We might want to make dedicated brush presets for this.

Btw, the UI for brush settings are becoming a real mess. Help!
2021-05-02 14:29:30 -07:00
2d98802905 * Added a "projection" option to smooth/autosmooth. It works by
projection neighboring vertices onto the current smooth vert's normal
  plane, multiplied by a "projection" factor.  This is extremely similar
  to what the surface laplacian produces, but is much simpler, uses
  no temporary state and thus can be used in more places.
2021-05-02 10:54:12 -07:00
f70a8c1581 Merge branch 'master' into temp_bmesh_multires
Also fixed a pose brush bug that may or may not have been
the result of the merge nixing code, need to check master.
2021-04-29 10:17:22 -07:00
8eeacca9cb Fix a few cast warnings 2021-04-29 08:01:32 -07:00
82847af9f9 Fix invalid parameter type in bmlog. 2021-04-29 06:28:37 -07:00
ee19a80041 * Eeek, left in an ATTR_NO_OPT attribute 2021-04-28 19:31:43 -07:00
013eee7ec6 * The dyntopo remesher is now a bit smarter about avoiding
certain degenerate cases that produce lots of bad geometry (and
  also bad PBVHs that slows down the whole mesh).
 + A very small amount of surface smoothing is now applied by dyntopo.
 + The recursive functions that expand the region considered by dyntopo
   now ignore "front face only" for depths less then 5.
 + The number of edges dyntopo can split or collapse in one run has been cut in
   half to 4k.
   - This limit is also now dynamically adjusted by a measure
     of how skinny the edges are.
2021-04-28 19:11:23 -07:00
ce0b4e6681 Merge branch 'master' into sculpt-dev 2021-04-28 21:55:09 +02:00
d1cf59e547 Sculpt: Add operator to store a limit surface manually 2021-04-27 23:54:04 +02:00
d0407b0ed5 Merge branch 'master' into sculpt-dev 2021-04-27 22:42:21 +02:00
83a855a8a1 fix compile error 2021-04-27 13:38:14 -07:00
9e46eebcf1 Fix last commit flipping the order of booleans. 2021-04-27 13:20:36 -07:00
786781304c * Got box trim tool working for dyntopo
- This required implementing SCULPT_UNDO_GEOMETRY for dyntopo.
    That turned out to be more work then I expected.  Basically
    it writes an entire Mesh to BMLogEntry, which can be swapped
    with current bmesh.  Tricky part was patching bm log ids.
2021-04-27 13:04:36 -07:00
2e888bfe6c Fix possible crash with dyntopo and clay strips normal filter 2021-04-27 21:31:25 +02:00
901d6e68d7 Merge branch 'master' into sculpt-dev 2021-04-27 21:31:00 +02:00
3028d53865 Edit face set brush now works for pbvh bmesh 2021-04-27 09:51:49 -07:00
fb5f6e762e Merge branch 'master' into sculpt-dev 2021-04-27 18:31:19 +02:00
02b4df9827 Enable color filter brush for pbvh bmesh 2021-04-27 09:12:35 -07:00
815d77192f One more null ptr check 2021-04-27 09:07:00 -07:00
9fab16f0f3 * Fix null ptr bug in automasking code 2021-04-27 09:01:32 -07:00
82f5e0200c * Fix bug in last commit where boundary flags weren't properly
updated after symmetrize.
2021-04-26 17:44:38 -07:00
032a35fb50 Fix memory corruption in sculpt neighbors code 2021-04-25 15:12:11 -07:00
8a700673db * Boundary info is no longer initialized with
SCULPT_boundary_info_ensure, instead PBVH_BMESH keeps
  track of boundary vert flags internally.  This prevents
  nasty first-click lag on the smooth brush as well as anything
  with autosmooth.
2021-04-25 14:51:31 -07:00
0386350de6 * Fixed SCULPT_dynamic_topology_sync_layers to properly sync
active/render/clone/mask layers indices.
* Fixed sculpt color bugs in pbvh drawing for bmesh.
2021-04-25 14:02:39 -07:00
d912d4735a Merge branch 'master' into sculpt-dev 2021-04-22 21:23:44 +02:00
97fc606c65 Fix nasty crash in dyntopo with non-manifold geometry. 2021-04-21 10:00:02 -07:00
14be52f0fc * Fixed vcol drawing in indexed smooth shading mode 2021-04-20 15:40:03 -07:00
739bb8f1d2 Merge branch 'master' into sculpt-dev 2021-04-20 22:43:50 +02:00
7107753f73 Merge branch 'master' into sculpt-dev 2021-04-20 17:56:22 +02:00
73c590e1eb Added detail_size to local dyntopo brush settings 2021-04-20 06:34:35 -07:00
44fd07c1c8 Merge branch 'master' into sculpt-dev 2021-04-19 23:24:55 +02:00
931a8da26c Merge branch 'master' into sculpt-dev 2021-04-19 20:14:24 +02:00
895fef5ccb Sculpt: Add area normal test to clay strips for better front faces detection 2021-04-18 20:10:12 +02:00
b82a2fd9ab Fix wrong visibility flush with Face Sets 2021-04-18 19:36:44 +02:00
18a86af416 Fix neighbor connectivy with hidden edges 2021-04-18 19:00:02 +02:00
a0b5fd9cb6 Fix Scene project brush after merge 2021-04-18 18:14:45 +02:00
553e8ffd1a Merge branch 'master' into sculpt-dev 2021-04-18 18:04:00 +02:00
fdc6fb2c53 SCULPT_calc_principle_curvatures now has option to use
slower but more accurate BLI_eigen_solve_selfadjoint_m3 solver.
2021-04-17 20:25:51 -07:00
8bc9286c4c Merge branch 'master' into sculpt-dev 2021-04-16 19:52:23 +02:00
4f8693652b Sculpt Symmetrize: Fix missing updates with modifiers 2021-04-16 01:47:27 +02:00
d29378c2f2 Sculpt Symmetrize: Free the symmetrize map on changes 2021-04-16 01:31:44 +02:00
0e6c07c063 Sculpt Symmetrize: Prevent crash with dyntopo and multires 2021-04-16 01:30:02 +02:00
cb3e0ff344 Sculpt Symmetrize: Add brush falloff 2021-04-16 01:29:12 +02:00
11d1fdeb34 Sculpt Symmetrize: Fix bug in main brush loop 2021-04-16 01:25:22 +02:00
430641d481 Sculpt Symmetrize: Initial working version 2021-04-16 01:24:49 +02:00
4745f29971 Sculpt Symmetrize: Add base symmetrize map code 2021-04-16 00:56:39 +02:00
8512b1b5dd Sculpt Symmetrize: sculpt_symmetrize file and main loop 2021-04-16 00:47:08 +02:00
674bc2e4b4 Sculpt Symmetrize: Initial commit 2021-04-16 00:38:47 +02:00
b240973412 Object: Make flash animation slower 2021-04-15 20:28:04 +02:00
39994c3208 Object: Use theme select color for animation 2021-04-15 20:26:45 +02:00
8189f2c806 Merge branch 'master' into sculpt-dev 2021-04-15 20:14:30 +02:00
237ac342c9 Merge branch 'master' into temp_bmesh_multires 2021-04-14 22:07:27 -07:00
465e804193 commit prior to merge 2021-04-14 22:04:36 -07:00
4ab8614cd1 Last attempt at fixing boundary brush for now. Unassigned boundary
verts now get bend data from their neighbors.  Still isn't quite
satisfactory but better then before.
2021-04-14 22:02:32 -07:00
dabff9af7d * Fix crash in boundary sculpt tool
* For some reason boundary tool sometimes fails to match verts to
  boundary verts.  It now simply freezes them in place if that happens
2021-04-14 18:41:23 -07:00
384a0930d1 Commit current code state 2021-04-14 15:55:09 -07:00
a5fa9ec310 Fix another crash 2021-04-13 01:44:29 -07:00
ed15d0c1b9 Fix infinite loop bug 2021-04-13 01:08:05 -07:00
e07a95b86d Fix extremely nastly memory corruption bug in pbvh 2021-04-12 04:19:49 -07:00
b52e04f794 * Fix bug in last commit, broke draw brush 2021-04-11 23:39:25 -07:00
e74c298cf9 Fix dyntopo undo bug 2021-04-11 22:03:16 -07:00
cd485a7c6f fix last commit 2021-04-11 21:44:00 -07:00
06341c19c4 Fix crash 2021-04-11 21:42:47 -07:00
a527bd5f48 Get rid of various __attribute__((optnone)) I had scattered throughout
the code
2021-04-11 19:29:06 -07:00
7f14d519c0 * Dyntopo cleanup mode is now on by default.
* Fixed undo bug
2021-04-11 18:19:13 -07:00
64337d087d * Merge branch 'master' into temp_bmesh_multires
* Implemented DynTopo option to dissolve 3 and 4-valence
  vertices.
* Fixed bug in dyntopo collapse customdata snapping.
2021-04-11 17:59:16 -07:00
e1fae3cbee Fix do_versions check 2021-04-11 12:34:15 -07:00
7dbb4c9b2d Fix issues with last commit. Also, simplify brush now
uses dyntopo local overrides to always enable collapse instead
of being hardcoded.
2021-04-11 12:27:02 -07:00
fe67ca56d6 * Fixed wireframe drawing in vcol cell drawing mode
* Added UI for editing local brush dyntopo settings.
2021-04-11 11:38:27 -07:00
68e4e1bb41 Merge branch 'master' into sculpt-dev 2021-04-11 17:43:40 +02:00
881df30a46 Cavity masking now has a checkbox in the UI, instead of simply turning
itself on if the concave mask factor is > 0.
2021-04-07 22:49:39 -07:00
6f91eaad39 * Fixed an annoying number of undo bugs
* Original data for bmesh pbvh is no longer handled by the undo code.
  This should eliminate a whole class of subtle and hard to track down
  bugs.
2021-04-07 20:39:16 -07:00
55045ed85a SCULPT_dyntopo_ensure_templayer no longer returns a customdata offset.
Making multiply layers sequentially can lead to corrupted offsets.
Instead, ensure all layers exist with SCULPT_dyntopo_ensure_templayer
first,

then get all the offsets at once.
2021-04-07 02:03:32 -07:00
2582090824 Fix bug in previous commit, code was being subject to inside
brush test that should not ahve been.
2021-04-07 01:46:10 -07:00
55415cd62a * Layer brush now supports dyntopo.
- To do this I made a little API to make scratch
    customdata layers: SCULPT_dyntopo_[ensure/get]_templayer.
    Takes a customdata type and a layer name (e.g.
    '__dyntopo_bleh") and returns a customdata offset.
  - Note that I also did this for the persistent base code.

* Added a macro to check if a tool supports splitting the PBVH
  during a stroke, DYNTOPO_HAS_DYNAMIC_SPLIT.  It is in sculpt_intern.h
  (for now) to avoid the enormous amount of recompiling that is
  triggered if DNA_brush_enum.h is modified.

* TODO: Right now the undo code resets original vertex coordinates for
  bmesh PBVH.  This means tools that rely on original data (sharp and
  layer) can't split the pbvh during the stroke, since that will
  allocate new undo nodes and reset original coords.

  The solution is to move the original data API entirely out of the undo
  code.
2021-04-07 01:20:21 -07:00
d29bdda34c Fix build error with include 2021-04-06 19:56:17 +02:00
e3ee04dec5 Object: Flash objects on mode transfer 2021-04-06 19:49:18 +02:00
347c8255ed Merge branch 'master' into sculpt-dev 2021-04-06 17:49:13 +02:00
8aac19cab5 Merge branch 'master' into temp_bmesh_multires 2021-04-05 21:26:04 -07:00
b4536d274c Forgot to increase array size for data transfer modifier struct. 2021-04-05 21:24:38 -07:00
d3ffaa8e52 Merge branch 'master' into sculpt-dev 2021-04-05 18:22:38 +02:00
f5588dfb70 Merge branch 'master' into temp_bmesh_multires 2021-04-03 19:29:12 -07:00
4b308888d8 Add support for sculpt colors to the data transfer modifier 2021-04-03 19:23:15 -07:00
fdfa2045ec Add a paranoia check 2021-04-02 13:55:48 -07:00
33af94dc46 Fixed an out of bounds read error. 2021-04-02 13:42:29 -07:00
8ea624aeaf fix gcc build errors 2021-04-01 15:58:56 -07:00
e29cd298fe Fix last commit to handle symmetrical brushing properly 2021-04-01 15:09:50 -07:00
7bba304c57 * Dyntopo now has its own brush spacing. This is a huge performance
boost for brushes with fine spacing, e.g. the clay brush.
2021-04-01 14:51:10 -07:00
0dc09668ce Finished curvature rake. 2021-04-01 13:07:10 -07:00
cfa6753518 wrote a fast and inaccurate distance to triangle function
for DynTopo.  Profiling consistently showed it to be a bottleneck.
I've now written scalar versions of this function four times.

For now I'm committing this inaccuration version.  I'm also committing
code for a vectorized version I found in a paper.  Still need to rejigger
the dyntopo code to use it though.
2021-03-30 19:00:08 -07:00
2cf8c35578 Merge branch 'master' into temp_bmesh_multires 2021-03-30 00:57:43 -07:00
aa116ba5ba Added per-brush DynTopo settings which are stored in a new DynTopoSettings struct.
This system is designed to inherit settings from scene dyntopo defaults
in a highly flexible way; settings can be individually overridden via the
.inherit bitmask.

At stroke time the scene settings and brush->dyntopo are merged
and stored in brush->cached_dyntopo.

Note that brush->flag has a bit flag, DYNTOPO_DISABLED, with a few
subtlies.  It does not switch the PBVH back to PBVH_FACES mode, it
simply disbles dyntopo topology update.  It also doesn't inherit from
any default settings.  And it's the only setting
that's currently exposed in the UI.
2021-03-30 00:08:09 -07:00
d2c1357fc5 Sculpt: Initial implementation of uniform smoothing 2021-03-27 21:52:24 +01:00
0bf2a1f8fe Merge branch 'master' into sculpt-dev 2021-03-27 21:27:41 +01:00
7be027075f Add this file 2021-03-26 14:23:31 -07:00
215c346017 Only send all vcol layers to gpu (for pbvh drawing) in a material
draw mode.
2021-03-25 17:38:27 -07:00
7c9235d0e0 * Sculpt color layers are now properly handle by pbvh bmesh draw code.
Before only the active layer was uploaded to the GPU, now all of them
  (except the autogenerated original color layer) are.
2021-03-25 17:17:42 -07:00
e254cc23b2 Code cleanup 2021-03-25 11:32:20 -07:00
f5a122309d Sculpt Poly Loop: Fix symmetry 2021-03-25 02:46:00 +01:00
dee286fc7e clean up code a bit 2021-03-24 17:01:53 -07:00
ab9b89ac5d Fixed two remaining performance bugs with dyntopo:
* Normals are now updated in threads.
* The sculpt neighbor code was using the slower BM_LOOPS_OF_VERT
  instead of BM_EDGES_OF_VERT, fixed.
2021-03-24 14:09:02 -07:00
ce9e0b53b1 Sculpt Expand: Default Face Set boundary modes to topology 2021-03-24 21:20:09 +01:00
ce6d9112aa Sculpt Poly Loop: Symmetry support 2021-03-24 20:55:31 +01:00
20f4fe138e Merge branch 'master' into sculpt-dev 2021-03-24 20:55:05 +01:00
ecbf642ddd Cleanup: Clang format 2021-03-24 18:48:39 +01:00
caf5f5767f Cloth Filter: Add pinch origin modes 2021-03-24 18:47:01 +01:00
e0cc387124 Cloth Filter: Add symmetry support to pinch deformation mode 2021-03-24 18:12:55 +01:00
ebeb144701 Merge branch 'master' into sculpt-dev 2021-03-23 17:54:08 +01:00
924b13b03a * Added a new CustomData type for dyntopo vertex data: MDynTopoVert.
It stores:
   - Original coordiates, colors and mask (which were previously four
     seperate layers).
   - A bitmask with (currently) one bitflag, whether or not a vertex is
     on a boundary.

I needed to cache calculating vertex boundary state (which involves
iterating over the edges surrounding a vertex) and got fed up with
having so many CD layers for dyntopo.  This struct consolidates them
and saves having yet another layer just to store a flag.
2021-03-21 16:26:38 -07:00
75a1116b51 Merge from master 2021-03-19 18:01:12 -07:00
73a4b885ec Merge branch 'master' into sculpt-dev 2021-03-19 20:08:30 +01:00
f6cda6bf88 Merge branch 'master' into temp_bmesh_multires 2021-03-19 10:57:32 -07:00
9ce0a2815d Merge branch 'master' into sculpt-dev 2021-03-19 18:44:23 +01:00
7d7dcce859 Merge branch 'master' into sculpt-dev 2021-03-18 16:42:53 +01:00
f429a7dc13 Sculpt Expand: Split snap event into two separate events 2021-03-17 16:58:56 +01:00
257562ad6d Sculpt Expand: Add Poly Loop Falloff mode 2021-03-17 16:49:08 +01:00
8883c76b9a Merge branch 'master' into sculpt-dev 2021-03-17 16:20:44 +01:00
dd77b22626 Face Sets Topology: Improve keymap and creation delay 2021-03-17 03:03:02 +01:00
3d70805a68 Sculpt Poly Loop: Improve loop direction detection 2021-03-17 01:39:08 +01:00
b6f0176c10 Face Sets Topology: Add repeat last and default keymap 2021-03-17 01:20:50 +01:00
6835ea72f2 Sculpt Poly Loop: Move poly loop code to its own file 2021-03-17 00:07:41 +01:00
6408c4ebf6 Sculpt Poly Loop: refactor poly loop code for reusability 2021-03-16 23:46:46 +01:00
e557e4d03c Face Sets Topology: Initial working version 2021-03-16 23:17:08 +01:00
02d482e8f2 Face Sets Topology: Initial loop iteration implementation (one side only) 2021-03-16 22:48:31 +01:00
525badbd7d Face Sets Topology: Initial edge loop detection 2021-03-16 22:28:39 +01:00
49fa3dd5ff Face Sets Topology: Initial commit 2021-03-16 22:03:22 +01:00
8b0bc7e3e8 Cleanup: Clang format 2021-03-16 21:25:56 +01:00
ef4abf1212 Sculpt IPMask: Working exec callback for scripts 2021-03-16 21:24:08 +01:00
6ce37c59ec Sculpt IPMask: Refactor filter initialization 2021-03-16 21:05:10 +01:00
6824d73b75 Sculpt IPMask: Add direction property to the filter 2021-03-16 20:45:58 +01:00
06762eefcf Sculpt IPMask: Start implementing exec callback 2021-03-16 20:42:12 +01:00
f791fc031e Sculpt IPMask: Fix memory leak in step compute 2021-03-16 20:26:55 +01:00
57b7eba4b6 Merge branch 'master' into sculpt-dev 2021-03-16 20:00:37 +01:00
abda36c076 Sculpt: Apply latest clang-format changes to the branch 2021-03-14 21:15:47 +01:00
476b333a3e Merge branch 'master' into sculpt-dev 2021-03-14 21:14:58 +01:00
4ad1a7ab31 Cleanup: Clang format 2021-03-14 21:14:39 +01:00
5f5aa43ab1 Sculpt: Fair all by tangency mode for face set edit 2021-03-14 21:14:19 +01:00
4293db60b3 Merge branch 'master' into sculpt-dev 2021-03-12 21:57:37 +01:00
647c065b9c Merge branch 'master' into sculpt-dev 2021-03-12 16:51:18 +01:00
497e532e23 Merge branch 'master' into sculpt-dev 2021-03-12 01:46:40 +01:00
e1f338b9f4 Merge branch 'master' into sculpt-dev 2021-03-11 17:53:47 +01:00
15ef2d42f3 Merge branch 'master' into sculpt-dev 2021-03-10 18:55:12 +01:00
a9083cc0ee Sculpt: Move Mask Init to its own file 2021-03-09 22:11:23 +01:00
c8a03bc716 Sculpt IPMask: Increase sensitivity of contrast mask filter 2021-03-09 21:53:19 +01:00
3efb094fd3 Merge branch 'master' into sculpt-dev 2021-03-09 21:50:31 +01:00
251440f538 Merge branch 'master' into sculpt-dev 2021-03-09 18:44:15 +01:00
cb0f159155 Merge branch 'master' into temp_bmesh_multires
Merge not finished, but need to commit to move to different computer;
laptop being sent in for repairs
2021-03-08 13:57:21 -08:00
409a525fa9 Merge branch 'master' into sculpt-dev 2021-03-08 21:18:53 +01:00
966af5a075 Cleanup: Clang format 2021-03-08 17:37:57 +01:00
5234e23c2c Voxel Remesher: Option to preserver material slots 2021-03-08 17:37:47 +01:00
11613f8c7a Merge branch 'master' into sculpt-dev 2021-03-07 18:06:27 +01:00
8a98189bfb commit before merge 2021-03-07 04:00:14 -08:00
3678b87272 Merge branch 'master' into sculpt-dev 2021-03-06 18:51:48 +01:00
1f2b48eb45 Add a little todo list 2021-03-05 16:54:19 -08:00
dd1c4c84c9 Merge branch 'master' into sculpt-dev 2021-03-04 20:06:27 +01:00
de2625518b Merge branch 'master' into sculpt-dev 2021-03-04 17:32:05 +01:00
75709e4d57 Fix crash in Boundary brush expand mode after refactor 2021-03-03 22:13:19 +01:00
6a74211f99 Merge branch 'master' into sculpt-dev 2021-03-03 20:25:18 +01:00
d3742022c2 Sculpt: Make global smooth factor control the strengh directly 2021-03-03 18:52:16 +01:00
75794afdcd Cleaup: Clang format 2021-03-03 18:51:35 +01:00
b1b49f6130 Sculpt IPMask: Tweak default filter sensitivity 2021-03-03 17:29:46 +01:00
ca60d520d9 Sculp IPMask: Property to enable/disable step interpolation 2021-03-03 17:29:24 +01:00
2fd22fd663 Cleanup: Clang format 2021-03-03 17:12:38 +01:00
04c85de559 Sculpt IPMask: Implement restoring and cancelling the filter 2021-03-03 17:10:09 +01:00
407dd37573 Merge branch 'master' into sculpt-dev 2021-03-03 17:08:59 +01:00
0acaa40c08 Fix after merge 2021-03-03 16:43:41 +01:00
f2024f7d99 Merge branch 'master' into sculpt-dev 2021-03-02 17:05:00 +01:00
a7b5bbf13f Merge branch 'master' into sculpt-dev 2021-03-01 22:28:41 +01:00
e696280b88 Sculpt IPMask: Fix crash in original data updates 2021-03-01 22:14:22 +01:00
5e9eb1930f Sculpt IPMask: Implement filters that use original data 2021-03-01 22:03:22 +01:00
9a7cbff535 Sculpt IPMask: Some experiments for a better sharpen filter 2021-03-01 20:21:23 +01:00
8dec2ca7ba Sculpt IPMask: Tweak default sensitivity of each step 2021-03-01 19:24:58 +01:00
098d0d782a Sculp IPMask: First working version of substep interpolation 2021-03-01 19:19:41 +01:00
779a268c6e Sculpt IPMask: Initial refactor to support step interpolation 2021-03-01 18:52:27 +01:00
13b7b69e7f Merge branch 'master' into sculpt-dev 2021-03-01 18:01:17 +01:00
148b39caec Added some code to calculate principle curvature direction for
uniform triangle tesselations (dyntopo).  This will be used for
a version of topological rake that aligns edge flows to lines of curvature
automatically.
2021-03-01 01:09:27 -08:00
e9f9217f75 Merge from master 2021-02-28 17:05:35 -08:00
dd45a4bc6e Merge branch 'master' into temp_bmesh_multires 2021-02-28 04:59:03 -08:00
1ccd92d0bb commit prior to merge 2021-02-28 04:23:45 -08:00
9f78a24eca Merge branch 'master' into sculpt-dev 2021-02-27 18:32:35 +01:00
930a9edc1e Sculpt IPMask: First version of contrast filter 2021-02-26 22:03:48 +01:00
5cfe7bf72c Merge branch 'master' into sculpt-dev 2021-02-26 20:34:38 +01:00
422b1c64cd Merge branch 'master' into sculpt-dev 2021-02-26 19:05:58 +01:00
1edad56ffc Sculpt IPMask: update pie menu 2021-02-26 17:17:00 +01:00
ef3d68f17b Sculpt IPMask: Use the new mask filter in the pie menu 2021-02-26 14:46:02 +01:00
094ffcf669 Sculpt IPMask: Implement some other filterts (hard/soft) 2021-02-26 02:47:49 +01:00
56d33186a4 Sculpt IPMask: Move main data update to its own function 2021-02-26 01:41:23 +01:00
d570feeffc Cleanup: Clang format 2021-02-26 01:36:13 +01:00
158397a007 Sculpt IPMask: Ignore inbetween mouse events 2021-02-26 01:35:30 +01:00
4e8c430c6e Sculpt IPMask: Free ghash when finishing 2021-02-26 01:31:49 +01:00
d8a4ebb068 Sculpt IPMask: Multithreaded and fast mesh updates 2021-02-26 01:23:45 +01:00
6d46a3ca4e Sculpt IPMask: Enable iteration count 2021-02-26 01:12:14 +01:00
1751b3c7c1 Sculpt IPMask: Refactor, prepare for iteration counts 2021-02-26 01:08:21 +01:00
8ae0573c0f Sculpt IPMask: Unify function to apply delta steps 2021-02-26 00:50:25 +01:00
be0194ef3e Sculpt IPMask: Remove debug prints 2021-02-26 00:47:45 +01:00
0a2ca5860f Sculpt IPMask: Implement automasking for the filter 2021-02-26 00:46:52 +01:00
151cf0b9d9 Sculpt IPMask: Implement filter selection 2021-02-26 00:43:46 +01:00
12cb22d5f6 Sculpt IPMask: Multithreaded compute step 2021-02-26 00:25:06 +01:00
5c2bb6f93a Sculpt IPMask: Implement undo 2021-02-26 00:14:11 +01:00
2e99348da7 Sculpt IPMask: Generalize compute function 2021-02-26 00:08:25 +01:00
817ccc3a99 Sculpt IPMask: Implement smooth and sharpen callbacks 2021-02-26 00:03:44 +01:00
a429f73d2b Sculpt IPMask: Fix bugs in stack index, start refactor 2021-02-25 23:52:41 +01:00
5898cc25c9 Sculpt IPMask: First working version 2021-02-25 23:09:56 +01:00
c05c2c3fb7 Merge branch 'master' into sculpt-dev 2021-02-25 22:24:03 +01:00
f55c39a974 Sculpt IPMask: Functions to step back/forward in the stack 2021-02-25 18:24:09 +01:00
ebf94179b5 Sculpt IPMask: Dummy function to compute a step 2021-02-24 20:48:12 +01:00
9e5a219f3f Sculpt IPMask: delta steps struct and packing 2021-02-24 20:10:34 +01:00
76de0eeb95 Sculpt: Add mask filter tool and target step count 2021-02-24 20:00:02 +01:00
773c5c7464 Sculpt: Initial commit for Mask Filter tool with interactive preview
Hopefully this will become a mask filter that can grow/shrink and smooth/
sharpen any mask shape interactively by dragging the pen, like the rest
of the filters.
2021-02-24 16:50:24 +01:00
7abdfb5c2a Merge branch 'master' into sculpt-dev 2021-02-24 16:23:38 +01:00
ad743c056f Fix crash in versioning code 2021-02-23 23:27:51 +01:00
05bb102a30 Sculpt: Add global smooth strength factor for alt-smooth 2021-02-23 22:52:40 +01:00
b37fd7a14b Sculpt: Add extra options to Face Set pie menu 2021-02-23 22:36:43 +01:00
4154943eef Merge branch 'master' into sculpt-dev 2021-02-23 18:58:53 +01:00
5d7f7b7065 Sculpt: Initial support for bend deformations in Pose 2021-02-23 17:33:21 +01:00
09e394583e Sculpt Expand: Silence warning 2021-02-21 19:33:53 +01:00
7baa3c7df3 Sculpt Expand: Fix artifacts in sculpt geodesic distances 2021-02-21 19:33:32 +01:00
06a8b84792 Merge branch 'master' into sculpt-dev 2021-02-21 17:57:56 +01:00
343950f0c0 Merge branch 'master' into sculpt-dev 2021-02-21 17:28:13 +01:00
da0ef1daac Merge branch 'master' into sculpt-dev 2021-02-19 22:24:49 +01:00
2eb35c7cc0 Merge branch 'master' into sculpt-dev 2021-02-17 19:21:38 +01:00
13952ecec1 Merge branch 'master' into sculpt-dev 2021-02-17 18:02:01 +01:00
214e802f5f Sculpt Expand: More comment on ExpandCache 2021-02-17 17:50:18 +01:00
697e6e53b8 Sculpt Expand: Improve and fix Face Set snapping whit Face Sets 2021-02-17 17:44:00 +01:00
64c0f1fc3f Sculpt Expand: ExpandCache comments 2021-02-17 17:40:14 +01:00
ca5ccb52e5 Sculpt Expand: Expose normals expand in the keymap 2021-02-17 17:39:50 +01:00
51e90a0ada Sculpt Expand: Fix normals falloff 2021-02-17 16:50:41 +01:00
822bbb19f1 Merge branch 'master' into sculpt-dev 2021-02-17 16:35:48 +01:00
a35da15228 Merge branch 'master' into sculpt-dev 2021-02-17 16:35:31 +01:00
53874b413e Sculpt Expand: More comments 2021-02-17 00:17:49 +01:00
1b029b790b Sculpt Expand: Refactor, more comments 2021-02-16 21:03:34 +01:00
acd99f12e7 Sculpt Expand: Cleanup, comments 2021-02-16 20:38:06 +01:00
1a11ac5e34 Sculpt Expand: rename texture options to distortion 2021-02-15 19:41:23 +01:00
416afcb1c3 Sculpt: Move geodesic distances code to its own file 2021-02-15 19:11:49 +01:00
3539cbc497 Sculpt Expand: Fix face set snapping with Multires 2021-02-15 19:07:59 +01:00
4288b2a1d1 Sculpt Expand: Fix crash when editing an existing face set with Multires 2021-02-15 18:56:58 +01:00
d4548fe55b install_deps: Bump OpenEXR to 2.5.5 version. 2021-02-15 18:29:47 +01:00
7b360abb18 Cleanup: Remove code duplication (merge error) 2021-02-15 18:29:47 +01:00
b30294ba41 Cleanup: clang tidy 2021-02-15 18:29:47 +01:00
50f1bd6f09 Cleanup: Spelling in function name 2021-02-15 18:29:47 +01:00
Peter Fog
83d530688b FFmpeg: Improve multi-threading settings for VSE proxies
Following code from D8627 this patch corrects multi threaded processing
of proxies, where a 60 sec proxy generation drops to 35 sec.

Differential Revision: https://developer.blender.org/D8659
2021-02-15 18:29:47 +01:00
b790b57fe1 FFmpeg: Improve multi-threading settings
Allow use all system threads for frame encoding/decoding. This is very
straightforward: the value of zero basically disables threading.

Change threading policy to slice when decoding frames. The reason for
this is because decoding happens frame-by-frame, so inter-frame threading
policy will not bring any speedup.

The change for threading policy to slice is less obvious and is based on
benchmark of the demo files from T78986. This gives best performance so
far.

Rendering the following file went down from 190sec down to 160sec.

  https://storage.googleapis.com/institute-storage/vse_simplified_example.zip

This change makes both reading and writing faster. The animation render
is just easiest to get actual time metrics.

Differential Revision: https://developer.blender.org/D8627
2021-02-15 18:29:47 +01:00
14fe422b48 CMake/Deps: upgrade USD 20.05 → 21.02
USD version 21.02 includes two of the changes Blender used to patch in,
which have now been removed from `usd.diff`. Unfortunately 21.02
introduces another issue where LZ4 symbols are accidentally exported,
causing linker errors. Fortunately these symbols are only used for
resting, so I added a patch hunk that simply removes their `extern "C"`
declaration.

The LZ4 linker issue has been reported upstream at
https://github.com/PixarAnimationStudios/USD/issues/1447.

Reviewed By: sebbas, mont29

Differential Revision: https://developer.blender.org/D10367
2021-02-15 18:29:47 +01:00
0af8ddab2d CMake/Deps: OpenImageDenoise 1.2.3 → 1.3.0 2021-02-15 18:29:47 +01:00
Ray molenkamp
79ecc59f0b CMake/Deps: XR_OpenXR v1.0.14
Straight up version bump

Things of note:

They started using API calls only available in windows 8, however given
the Python 3.9 update will forcibly bump us to 8.1+ anyhow this is not
an issue.

Will require some minor tweaks to platform_win32.cmake after adding the
libs to svn which are not included in this diff so this diff can land
without having to have the libs in place yet.

Reviewed By: sebbas, sybren

Differential Revision: https://developer.blender.org/D10349
2021-02-15 18:29:47 +01:00
Ray molenkamp
0ac4824d07 CMake/Deps: OpenVDB 8.0.1
Straight forward version bump, some of the variables to detect a static
OpenEXR changed and the folder structure seemingly changed a little
requiring updates to the diff

Reviewed By: sebbas, sybren

Differential Revision: https://developer.blender.org/D10340
2021-02-15 18:29:47 +01:00
5f8d444a76 CMake/Deps: Alembic 1.7.16
Version bump + no longer using Boost.

Building Alembic with Boost gave compiler errors, and having one less
inter-dependency is good as well.

Reviewed By: sebbas, sybren

Differential Revision: https://developer.blender.org/D10329
2021-02-15 18:29:47 +01:00
Ray molenkamp
42c5fdeff4 CMake/Deps: TBB 2020U2
Straight forward version bump.

2020U2 is significantly louder in the deprecated header usage warning
department, we should probably see if we need to act on this: P1949

Differential Revision: https://developer.blender.org/D10359
2021-02-15 18:29:47 +01:00
Ray molenkamp
54801f695c CMake/Deps: Boost 1.73
Just a simple version bump.

Maniphest Tasks: T85365

Differential Revision: https://developer.blender.org/D10314
2021-02-15 18:29:47 +01:00
39ac38c25f Attributes: return refined Attribute from attributes.new method
Previously `mesh.attributes.new(...)` would return a generic attribute that
one could not do much with. Now it returns refined attributes like `FloatAttribute`.
2021-02-15 18:29:47 +01:00
834d3e15ce Fix T71960: Malformed .bmp files lead to crash
Add a boundary check, avoiding access past actual data.

Ideally would need to report error to the user somehow,
but it doesn't seem to be easy to do.

This is a minimal safe patch. The proper complete fix is
being worked on by Jesse.

Differential Revision: https://developer.blender.org/D10357
2021-02-15 18:29:47 +01:00
b3c00f97be Cleanup: Use enum class for CryptomatteLayerState. 2021-02-15 18:29:47 +01:00
6324e9bae8 Cleanup: Grammar in comments 2021-02-15 18:29:47 +01:00
bbdfd0cabe Fix: incorrect versioning for Attribute Randomize node 2021-02-15 18:29:47 +01:00
6ef557fdf1 Cleanup: unused variable 2021-02-15 18:29:47 +01:00
30897a56e7 Fix T85633: Misspelling of "neighborhood" in description 2021-02-15 18:29:47 +01:00
eb18eb709d Merge branch 'master' into sculpt-dev 2021-02-14 21:20:30 +01:00
fc7c57f4a1 Sculpt Expand: Improve support for Multires and dyntopo 2021-02-14 20:02:24 +01:00
e3fdfcc981 Sculpt Expand: Fix propagation from grids to faces in Multires 2021-02-14 19:53:30 +01:00
e9b6848fe7 Sculpt Expand: Limited support for Multires 2021-02-14 19:50:59 +01:00
38e61c04ea Sculpt Expand: Fix texture strength when switching falloffs 2021-02-14 19:12:48 +01:00
5e56eb8ca2 Sculpt Expand: Make texture strength consistent across falloff modes 2021-02-14 19:09:07 +01:00
ccfc8aacf8 Sculpt: Add option to show the sculpt pivot as part of the cursor 2021-02-14 18:17:29 +01:00
edece9e741 Sculpt Expand: Update Keymap descriptions 2021-02-14 18:07:27 +01:00
6ee1db0d67 Sculpt Expand: Fix wrong expandcache ref when finishing expand 2021-02-14 18:06:43 +01:00
30434e3904 Sculpt Expand: Render the origin of expand as part of the cursor 2021-02-14 17:45:30 +01:00
e45986291d Merge branch 'master' into sculpt-dev 2021-02-14 17:42:08 +01:00
eb6e96006e Cleanup: clang format 2021-02-12 18:47:23 +01:00
9047bf89fa Sculpt Expand: Fix max falloff with texture distorsion 2021-02-12 18:42:14 +01:00
63ef98d056 Sculpt Expand: Support for texture distorsion for mask and colors 2021-02-12 18:34:18 +01:00
bf53622eef Merge branch 'master' into sculpt-dev 2021-02-12 17:57:50 +01:00
f419d4625a Sculpt Expand: Fix and improve behaviour of pivot reposition 2021-02-11 20:32:25 +01:00
ae19d5303a Sculpt Expand: Fix Face Set ID constantly updated when moving 2021-02-11 20:05:29 +01:00
35f883b886 Cleanup: clang format 2021-02-11 20:02:15 +01:00
7d52658d84 Sculpt Expand: Use symmetry and component filtering for pivot reposition 2021-02-11 20:01:58 +01:00
974b50d16b Scupt Expand: Remove unused Face Sets update code 2021-02-11 18:55:49 +01:00
55382bcdd9 Merge branch 'master' into sculpt-dev 2021-02-11 18:55:15 +01:00
51c931ebb5 Fix depth PBVH raycast with grids 2021-02-11 18:48:14 +01:00
0b9aaaf97f Sculpt Expand: Force all enabled when cursor not over the mesh 2021-02-11 18:47:48 +01:00
faccaee6c3 Fix cloth filter not working after merge 2021-02-11 17:54:54 +01:00
a56fb568ed Cleanup: Clang format 2021-02-10 21:09:41 +01:00
c365e0c6b6 Merge branch 'master' into sculpt-dev 2021-02-10 21:08:52 +01:00
0d6deb7e65 Merge branch 'master' into sculpt-dev 2021-02-10 18:04:45 +01:00
50eed6e54f Merge branch 'master' into sculpt-dev 2021-02-10 01:45:53 +01:00
147cddb398 Merge branch 'master' into sculpt-dev 2021-02-10 00:35:07 +01:00
88c4684466 Sculpt expand: Fix crash when missing connected components 2021-02-09 20:18:02 +01:00
77a30a2886 Sculpt: fix pose brush flood fill with symmetry 2021-02-09 00:30:14 +01:00
370e2b5d82 Sculpt Expand: Force expand to work only on active connected components 2021-02-08 20:27:09 +01:00
44dc741e89 Fix crash in versioning code 2021-02-08 19:02:23 +01:00
7a8cf94170 Sculpt Expand: Fix keymap entry for snapping 2021-02-08 19:01:55 +01:00
fd28c19d09 Scupt: Fix failed scene projection with ortographic views 2021-02-08 18:59:26 +01:00
2f5eabf859 Sculpt: Fix wrong vertex normals in Scene Project 2021-02-08 18:42:43 +01:00
1a17c578a8 Merge branch 'master' into temp_bmesh_multires 2021-02-07 23:17:09 -08:00
56e1ae1afa * Yet another attempt at writing a faster distance to tri function.
I think I will end up writing a less accurate version and be done
  with it.  This is a consistent hotspot in profiling.
* Fixed a few more undo bugs
2021-02-07 23:01:09 -08:00
eea78bd112 PBVH depth: Improve detection with normal orientation in trim 2021-02-07 19:33:35 +01:00
d927f54da6 Merge branch 'arcpatch-D9622' into sculpt-dev 2021-02-07 19:18:46 +01:00
Pablo Dobarro
ec8d1b4eae Sculpt: Location option for lasso trim and depth info
This adds a location option to the trim lasso tool to position the shape
in the middle of the volume of the object instead of in the surface
under the cursor.

{F9349724}

In order to make this work, the SCULPT_cursor_geometry_info_update can
now also get the depth of the geometry from the raycast. The depth is
calculated as the second further intersecting triangle in the raycast
over the entire mesh. This information will also be used to improve and
create new tools.

Differential Revision: https://developer.blender.org/D9622
2021-02-07 19:12:37 +01:00
4e4c1f40e0 Sculpt Expand: Use visibility state for enabled values 2021-02-07 18:54:13 +01:00
35ac8cf4dc Sculpt Expand: Fix gradient when using invert 2021-02-07 17:59:15 +01:00
2f2f14ffed Sculpt Expand: Enable gradient when enabling brush gradient 2021-02-07 17:53:38 +01:00
03778b787e Merge branch 'master' into sculpt-dev 2021-02-07 17:49:48 +01:00
f7e062ef3e Sculpt: fix pose and expand floodfill initial vertex 2021-02-07 17:45:28 +01:00
23cf808585 Sculpt: Boundary circle deformation mode 2021-02-07 17:42:51 +01:00
8e8845786f Cleanup: clang format 2021-02-05 21:59:21 +01:00
3ed1a99dd2 Fix elastic deform surface falloff crashing or breaking geometry 2021-02-05 20:44:45 +01:00
0a9bc6944c Rename random per component to random per loose part 2021-02-05 20:33:38 +01:00
ec4e2f32c8 Fix const warning 2021-02-05 20:31:56 +01:00
2ea03ff860 Remove unused variable 2021-02-05 20:31:18 +01:00
9a3f32f80f Fix crash in versioning code 2021-02-05 20:30:54 +01:00
bcf2f30878 Merge branch 'master' into sculpt-dev 2021-02-05 20:23:18 +01:00
23312a6994 Merge branch 'master' into sculpt-dev 2021-02-04 19:06:15 +01:00
cf5a96aa8d Merge branch 'master' into sculpt-dev 2021-02-04 16:46:45 +01:00
7ed64d9430 Merge branch 'master' into sculpt-dev 2021-02-03 21:08:28 +01:00
1cc0f8cf75 Sculpt Expand: Enable repeat events for loop count increase/decrease 2021-02-03 19:26:18 +01:00
b4e90b6e61 Sculpt Expand: fix topology recursion and flood fill 2021-02-03 18:49:03 +01:00
112c67f688 Merge branch 'master' into sculpt-dev 2021-02-03 17:03:50 +01:00
19fa6fd9f4 Cleanup: Clang format 2021-02-03 01:26:24 +01:00
88921150ff Sculpt: Init Face Sets by Face Sets boundary 2021-02-03 01:25:47 +01:00
e973c94036 Sculpt Expand: Add Expand to the keymap by default 2021-02-03 01:12:11 +01:00
b40f1f4c79 Sculpt Expand: Fix multiple crashes when using modifiers 2021-02-03 00:36:54 +01:00
c191344efb Sculpt Expand: Fix modal keymap descriptions 2021-02-03 00:10:28 +01:00
debf4fc7c9 Sculpt Expand: Refactor and pivot reposition 2021-02-02 23:48:06 +01:00
a60aca00bb Sculpt Expand: Implement topology diagonals falloff 2021-02-02 23:06:18 +01:00
763f96526e Sculpt Expand: implement restore, undo and cancel 2021-02-02 22:44:44 +01:00
abfd14817f Merge branch 'master' into sculpt-dev 2021-02-02 22:05:49 +01:00
529cffd804 Merge branch 'master' into sculpt-dev 2021-02-02 16:08:54 +01:00
09bb5e3aa0 Merge branch 'master' into sculpt-dev 2021-02-01 19:34:38 +01:00
5fb15545c1 Merge branch 'master' into sculpt-dev 2021-01-30 18:15:24 +01:00
a2df63e996 Merge branch 'master' into sculpt-dev 2021-01-29 22:44:44 +01:00
ccaba71fdf Merge branch 'master' into sculpt-dev 2021-01-28 01:16:42 +01:00
710c72807f Merge branch 'master' into sculpt-dev 2021-01-27 20:58:23 +01:00
e779eab729 Sculpt: Implement elastic surface falloff 2021-01-26 20:51:53 +01:00
a72cf784a7 Merge branch 'master' into sculpt-dev 2021-01-26 20:30:39 +01:00
78dffe2f16 Fix Face Set init not showing in the menus 2021-01-25 21:06:36 +01:00
9d31943d88 Merge branch 'master' into sculpt-dev 2021-01-25 20:05:56 +01:00
0a2b19e96d Merge branch 'master' into sculpt-dev 2021-01-24 20:23:54 +01:00
46582b3743 Merge branch 'master' into sculpt-dev 2021-01-24 03:04:27 +01:00
c10b19e453 Merge branch 'master' into sculpt-dev 2021-01-20 18:56:37 +01:00
5631bd4f94 Cleanup: Clang format 2021-01-20 18:51:49 +01:00
30b6d7826d Sculpt: Reset all brushes operator 2021-01-20 18:48:34 +01:00
d1b2c55322 Sculpt Expand: Brush Gradients 2021-01-20 18:17:19 +01:00
87ae49c78e Sculpt Expand: Expose geodesic and topology recursions 2021-01-19 00:14:10 +01:00
2765fb6c76 Sculpt Expand: Loops and recursion types 2021-01-18 23:28:49 +01:00
65cea9523e Merge branch 'master' into sculpt-dev 2021-01-18 22:26:46 +01:00
3d311fdaf1 Sculpt Expand: Expand from active 2021-01-16 21:21:16 +01:00
7a0d5e0c9e Sculpt Expand: Expand from face set boundary 2021-01-16 21:05:16 +01:00
e2fb2315fd Cleanup: Clang Format 2021-01-16 20:41:33 +01:00
fc1fc95b79 Sculpt Expand: Modify Active Face Set 2021-01-16 20:41:10 +01:00
05703d630e Sculpt Expand: face set selection snapping 2021-01-16 20:11:37 +01:00
65c358851d Sculpt Expand: Recursivity, move and falloff switching 2021-01-16 18:38:05 +01:00
b997fc5ea1 Sculpt Expand: Initial implementation of face falloff factors 2021-01-16 01:54:36 +01:00
869747e527 Sculpt Expand: Initial face sets expand target 2021-01-16 01:19:56 +01:00
df7857a364 Sculpt Expand: vertex colors target 2021-01-16 00:42:26 +01:00
cd0cf0a5b7 Expand: Support for invert, preserve and mask gradients 2021-01-15 23:37:42 +01:00
abf7518cbf Sculpt expand modal keymap 2021-01-15 22:24:12 +01:00
58406eddb5 Merge branch 'master' into sculpt-dev 2021-01-15 19:47:28 +01:00
97ab225428 Merge branch 'master' into sculpt-dev 2021-01-14 17:56:31 +01:00
24bbe05913 Add automatic falloff type switching to expand 2021-01-14 02:03:49 +01:00
81ac9f61b6 Implement boundary expand 2021-01-14 01:40:32 +01:00
a9f6ab7357 Basic mask expand operation working 2021-01-14 01:05:11 +01:00
df9a5825e1 Initial commit for new generic sculpt expand operator 2021-01-13 22:59:59 +01:00
0c8b9cd7d1 Cleanup: Clang format 2021-01-13 20:28:09 +01:00
142aba9485 Sculpt: Grab brush surface falloff 2021-01-13 20:27:51 +01:00
bf632990e0 Merge branch 'master' into sculpt-dev 2021-01-13 18:53:20 +01:00
3b4a9b2319 Merge branch 'master' into sculpt-dev 2021-01-12 19:43:30 +01:00
38dce1d29d Merge branch 'master' into sculpt-dev 2021-01-09 17:56:44 +01:00
deeb0b3aac Add experimental ripple effects option to the cloth solver 2021-01-06 20:26:38 +01:00
237b1f9d75 Merge branch 'master' into sculpt-dev 2021-01-06 17:34:16 +01:00
11cd86a8d2 Fix crash in fairing and memory optimization 2021-01-06 17:34:01 +01:00
27713d65d1 Merge branch 'master' into sculpt-dev 2021-01-05 23:49:10 +01:00
d37d96437e Fix crash with scene project and dyntopo 2021-01-05 23:32:29 +01:00
940fb3c044 Sculpt Scene Project: Add option to use vertex normals and brush normal 2021-01-05 22:47:22 +01:00
f91a2a0831 Sculpt: add option for use the center of mass to the sphere mesh filter 2021-01-05 21:59:15 +01:00
6d6ab057e4 Add missing random mask init menu 2021-01-05 21:27:59 +01:00
ea12ba5441 Merge branch 'master' into sculpt-dev 2021-01-05 21:03:21 +01:00
601d896fc6 Fix crash with custom input curves versioning 2021-01-05 18:12:32 +01:00
c237a48104 Fix warnings and windows build 2021-01-05 17:53:50 +01:00
29078186f8 Merge branch 'master' into sculpt-dev 2021-01-05 17:52:46 +01:00
7754c4f10f Fix windows build 2021-01-04 21:22:45 +01:00
90931d6de9 Sculpt: Update clay strips presets with custom input curves 2021-01-01 21:47:18 +01:00
4785f80d51 Fix multiple crashes with custom input curves 2021-01-01 20:12:46 +01:00
5136cc701f Merge branch 'master' into sculpt-dev 2021-01-01 17:18:40 +01:00
ef9eb626a8 Sculpt: Initial support for custom pressure input curves 2020-12-31 19:48:25 +01:00
0663576d19 Tweak draw sharp preset to include size-pressure 2020-12-31 18:36:39 +01:00
e1b8577e41 Merge branch 'master' into sculpt-dev 2020-12-31 18:30:27 +01:00
e09d9c86b6 Merge branch 'master' into sculpt-dev 2020-12-30 18:17:24 +01:00
52e99c5639 Merge branch 'master' into sculpt-dev 2020-12-29 16:13:12 +01:00
193806f590 Merge branch 'master' into sculpt-dev 2020-12-28 22:41:46 +01:00
a3e4f9d9a6 Merge branch 'master' into sculpt-dev 2020-12-28 14:21:15 +01:00
482f46a35a Change default cloth grab deform constraints strength 2020-12-27 00:41:45 +01:00
975a17c816 Sculpt: Auto detect the sphere radius in the sphere mesh filter 2020-12-27 00:14:57 +01:00
985c6464e2 Sculpt: Edit face set extrude operation 2020-12-26 20:11:19 +01:00
bca07d9039 Merge branch 'master' into sculpt-dev 2020-12-26 17:52:31 +01:00
35092510ba Merge branch 'master' into temp_bmesh_multires 2020-12-26 04:24:54 -08:00
85842851d5 Fix build 2020-12-25 21:54:14 +01:00
61ec4159c8 Implement radial gradient 2020-12-25 21:51:21 +01:00
c4ebefc1c8 Cleanup: Clang format 2020-12-25 21:36:58 +01:00
eb4f2f1548 Sculpt: Base code for gradient tools 2020-12-25 21:36:31 +01:00
47b4b45011 Optimize fairing weights calculation 2020-12-25 17:25:00 +01:00
7547e28ba4 Merge branch 'master' into sculpt-dev 2020-12-25 17:09:01 +01:00
0b2e4fa52e Cleanup: Clang format 2020-12-24 19:58:09 +01:00
f4900b3d02 Sculpt: Smooth Directional deform mode 2020-12-24 19:57:58 +01:00
1d53fbfd06 Merge branch 'master' into sculpt-dev 2020-12-24 19:30:30 +01:00
c203de25db Merge branch 'master' into sculpt-dev 2020-12-24 16:30:33 +01:00
ac8c589b7c Preparte curvature fairing and Fairing edit mode operator 2020-12-24 16:30:12 +01:00
f32d3f7b06 Merge branch 'master' into sculpt-dev 2020-12-23 19:23:03 +01:00
5385455e6a Fixed undo bugs caused by SculptVertRef refactor. I need to figure out
the right way to make assigning a pointer to a SculptVertRef to an int*
spit out a compiler error.
2020-12-22 22:47:50 -08:00
1bf726f1ad Merge branch 'master' into sculpt-dev 2020-12-22 23:59:48 +01:00
f031000b28 Sculpt: Mask Init operator and random init modes 2020-12-22 23:59:25 +01:00
2c54c641a3 Added a new cavity automasking mode for sculpt colors painting.
In theory it should also work with other sculpt tools (the
automasking code is fairly general) though it doesn't seem
to do much.
2020-12-22 14:11:11 -08:00
554be8d96c Merge branch 'master' into sculpt-dev 2020-12-22 16:30:14 +01:00
f969b3d440 Merge branch 'master' into sculpt-dev 2020-12-21 23:44:17 +01:00
6034a5bd5b Merge branch 'master' into sculpt-dev 2020-12-21 21:17:51 +01:00
eea756e513 Sculpt: Scene Project Brush 2020-12-21 21:16:16 +01:00
ecbf3e2d0f Sculpt: Face Set Edit fill component mode 2020-12-21 20:00:56 +01:00
6fa6a8851f Merge branch 'master' into sculpt-dev 2020-12-21 16:19:03 +01:00
b3fff9b07a Merge remote-tracking branch 'origin/master' into temp_bmesh_multires
Also redid vcol boundary tool icon, and made a little icon for sculpt
color paint.
2020-12-21 01:08:24 -08:00
671ef8f0e9 Merge branch 'master' into sculpt-dev 2020-12-20 16:10:56 +01:00
373b9b4481 Merge branch 'master' into sculpt-dev 2020-12-19 21:00:53 +01:00
0ada9c1638 Sculpt: Improve boundary artifacts in fairing mask with line gestures 2020-12-19 17:46:23 +01:00
31158ef0c9 Merge branch 'master' into sculpt-dev 2020-12-19 17:00:44 +01:00
5fbd436bb1 Merge branch 'master' into sculpt-dev 2020-12-18 20:10:58 +01:00
c0cb475689 Merge branch 'master' into sculpt-dev 2020-12-17 22:28:12 +01:00
b8a0455983 Fix crash in combine proxies 2020-12-17 19:24:45 +01:00
6145a6bc6c Merge branch 'master' into sculpt-dev 2020-12-17 17:48:12 +01:00
5c03d0c30c Fix plane falloff with elastic cloth 2020-12-16 21:09:45 +01:00
6b42781319 Merge branch 'master' into sculpt-dev 2020-12-16 21:02:04 +01:00
6c4a9b83ff Fix elastic drag cloth brush deformation 2020-12-16 20:59:20 +01:00
9453b45e20 Sculpt: Change default damping for cloth deform target 2020-12-16 20:52:52 +01:00
c0f19d6082 Sculpt: Cloth Brush elastic drag deform type 2020-12-16 20:49:02 +01:00
06078a6f92 Merge branch 'master' into sculpt-dev 2020-12-16 20:27:13 +01:00
1199b9e678 Merge branch 'master' into sculpt-dev 2020-12-16 19:10:48 +01:00
92bc9477d1 Merge branch 'master' into sculpt-dev 2020-12-16 16:43:09 +01:00
7bc1657d05 Fix cloth sim artifacts on planes 2020-12-15 22:13:11 +01:00
e582a4dc77 Fix debug build 2020-12-15 22:07:47 +01:00
243e329ec3 Sculpt: Cloth Deform target for transform 2020-12-15 22:07:08 +01:00
5775efba2f Sculpt: Elastic Transform 2020-12-15 21:38:07 +01:00
cab8626cf2 Sculpt: lasso and box project gestures 2020-12-15 21:33:49 +01:00
19cb01aa21 Cleanup: Clang format 2020-12-15 21:15:05 +01:00
6e6828e09d Sculpt: Project gesture fairing deformation mode 2020-12-15 21:14:26 +01:00
72ff64590d Sculpt: Fairing Brush 2020-12-15 20:39:53 +01:00
553724529e Change PBVH leaf limit size 2020-12-15 20:35:29 +01:00
681e2b6134 Fixes from merge 2020-12-08 13:37:00 -08:00
49bd2228cb Merge branch 'master' into temp_bmesh_multires 2020-12-07 13:04:19 -08:00
0a140ec66e Commit before merge 2020-12-07 11:48:32 -08:00
f30225725d Some multires stuff 2020-11-18 18:34:08 -08:00
a1ac104f02 add NULL pointer check 2020-11-11 05:19:35 -08:00
d823f6e2cf Added an "Exponent" slider to Color Boundary brush. 2020-11-09 22:25:03 -08:00
3042f6e608 Tweaked value for smoothing in vcol boundary tool (a slight amount of
smoothing is applied to prevent normal discontiuties from perfectly
colinear triangles).

Also reverted some CLANG compiling stuff.
2020-11-09 18:30:24 -08:00
6115091103 View3D: take clipping into account for Frame All
Clamp the min/max used for Frame All/Selected
by the clipping region if it's set.

Resolve T81050
2020-11-07 02:54:23 -08:00
78ef2d0d84 Cleanup: move plane array intersection into a function
Also add check to ensure a point isn't occluded by it's own plane,
which could happen if a small epsilon values are passed in.
2020-11-07 02:54:23 -08:00
9d92a97562 Cleanup: Rename render texture files to texture_* 2020-11-07 02:54:23 -08:00
192670e8ce Cleanup: Remove unused variable 2020-11-07 02:54:23 -08:00
7ae1cc23fc Cleanup: remove unused includes in readfile.c and writefile.c 2020-11-07 02:54:23 -08:00
ebb6648bda Fix missing include warning
Caused by rB580ff2cb937daf43699908afe1190baea8d117aa
2020-11-07 02:54:23 -08:00
384f2956e5 Cleanup: fix naming and remove unnecessary code 2020-11-07 02:54:23 -08:00
2ba90cf717 Refactor: move Screen .blend data read to blenkernel
Ref T76372.
2020-11-07 02:54:23 -08:00
e5af8597e5 Refactor: move Ipo .blend I/O to IDTypeInfo callbacks 2020-11-07 02:54:23 -08:00
1f6a7785f6 Refactor: move Object .blend I/O to IDTypeInfo callbacks 2020-11-07 02:54:23 -08:00
0ee053fb12 Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.

No functional changes.
2020-11-07 02:54:20 -08:00
8cd4776764 Clang-Tidy: error out when executable not found
Stop with an error when the Clang-Tidy executable cannot be found.

Without this check, CMake will happily report "Found Clang-Tidy" but with
the fallback version (0, 0, 0), when `CLANG_TIDY_EXECUTABLE` points to a
non-existing executable.
2020-11-07 02:53:25 -08:00
f32bde6bd9 Refactor: move Pose .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:25 -08:00
Yevgeny Makarov
8b808cefae UI: Improved macOS Application Icon Progress Bar
Nicer appearance for the progress bar that is drawn over the application icon during long processes on macOS.

Differential Revision: https://developer.blender.org/D9398

Reviewed by Brecht Van Lommel
2020-11-07 02:53:24 -08:00
f8466b6284 Refactor: move Constraint .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:24 -08:00
4a2d7a2f89 Refactor: move MotionPath .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:24 -08:00
67defe866b Fix T81997: Subsurf Optimal Display sticks after object conversion
When using Optimal Display, some edges are not flagged `ME_EDGEDRAW` |
`ME_EDGERENDER`.
When the modifier is applied through the UI in the modifier stack this is
not an issue because the `modifyMesh` callback is run with
`MOD_APPLY_TO_BASE_MESH` (this will effectively turn of Optimal
Display).
When converting to mesh though, this will just get an evaluated mesh
(where the edge flags are still the same as with the subdivision
modifier).
Now ensure every edge is flagged to draw after conversion.

Maniphest Tasks: T81997

Differential Revision: https://developer.blender.org/D9331
2020-11-07 02:53:24 -08:00
b6575fed92 Refactor: move gpencil modifier .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:24 -08:00
d6735bfae0 Refactor: move modifier .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:24 -08:00
e4c45d0c5e Fix T82251: Outliner Material Drag&Drop missing tree update
Caused by rBb077de086e14.

Not entirely sure why this was rebuilding the tree prior to above
commit, but sending an ND_OB_SHADING notifier is appropriate (and also
what the Outliners listener listens to).

Maniphest Tasks: T82251

Differential Revision: https://developer.blender.org/D9396
2020-11-07 02:53:24 -08:00
c4668b750c Fix T82220 Missing viewport update after manual "HDRI Preview Size" input
This is caused by the TAA being reset after the init phase, leading to
1 sample being kept as valid when it is clearly not.

To fix this, we run the lookdev validation before TAA init.

Reviewed By: Jeroen Bakker

Differential Revision: https://developer.blender.org/D9452
2020-11-07 02:53:24 -08:00
81a85233a7 Cleanup: Clang-Tidy, modernize-make-unique 2020-11-07 02:53:24 -08:00
89f62e5dc3 Cleanup: Sort includes after recent render module cleanup 2020-11-07 02:53:23 -08:00
408e13783d Cleanup: remove unused functions 2020-11-07 02:53:23 -08:00
3900734063 Refactor: move ShaderFx .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:23 -08:00
fa688ac593 Cleanup: Render Module: combine intern/ source & include 2020-11-07 02:53:23 -08:00
787f952ef4 Cleanup: whitespace 2020-11-07 02:53:23 -08:00
63241d25b9 Cleanup: Render Module: move header files to main directory
Move headers files from `render/extern/` to `render/`

Part of T73586
2020-11-07 02:53:23 -08:00
Paul Melis
98166b5c98 Add background rectangle option to video sequencer Text strip
This adds a Box option to the Text strip's style properties, plus related Box Margin value:

{F9208309}

When enabled the text is placed on top of a solid-filled rectangle of a chosen color, as shown below:

{F9208324}

When the box option is disabled the text strip works the same as it does now. When the box option is enabled the meaning of the Shadow option changes to provide a drop-shadow on the rectangle (and not on the text itself). The latter made more sense to me.

The box margin is specified as a fraction of the image width. The offset of the drop-down box shadow is fixed to a specific fraction of the image width as well.

I tested this feature on a movie of a couple of minutes containing dozens of text strips (all with box background), edge cases like multi-line strings and text overlapping the image edges.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D9468
2020-11-07 02:53:23 -08:00
229849af0f Refactor: move ParticleSystem .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:23 -08:00
0a1fc855bc Sequencer: Make naming consistent in header and implementation files 2020-11-07 02:53:23 -08:00
46ccaff9a3 VSE: Don't store proxy images in cache
Proxies are expected to be fast to read. Storing them in cache has
little to no effect on performance.

This change also allows to omit invalidation of cache when user switch
between proxies and original media.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9473
2020-11-07 02:53:23 -08:00
9c8b0a20c1 Refactor: move Scene .blend expand to IDTypeInfo callback 2020-11-07 02:53:22 -08:00
a42cf75ecb Refactor: move Scene .blend lib reading to IDTypeInfo callback 2020-11-07 02:53:22 -08:00
d77e884bd7 Cleanup: rename time related variables
Variables renaned:
 - cfra -> timeline_frame
 - nr -> frame index
 - cfra_over -> overlap_frame

Function seq_give_stripelem_index was renamed to seq_give_frame_index.
2020-11-07 02:53:22 -08:00
e2111233f0 Blenloader: access report list via api 2020-11-07 02:53:22 -08:00
e4efd04063 Blenloader: expose BLO_reportf_wrap in api
This function is used by a couple of functions that are moved out of blenloader.
2020-11-07 02:53:22 -08:00
8edd20274e Refactor: move Scene .blend data reading to IDTypeInfo callback 2020-11-07 02:53:22 -08:00
9be60839cd Refactor: move Scene .blend writing to IDTypeInfo callback 2020-11-07 02:53:22 -08:00
af934d751d CMake: Fix wrong library used for dependency
Was causing compilation failure on fresh builds.
2020-11-07 02:53:22 -08:00
5ac07c31f0 Refactor: move PointCache .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:22 -08:00
f3a7d9375d Cleanup: Fluid engine API return types
Use bool return type where possible instead of int (the return values from fluid object are already boolean instead of int).

Also removed several if guards in API functions. If one of the arguments is in fact invalid / nullptr (should not happen though), it better to catch them directly where they failed and not silently escape them.
2020-11-07 02:53:22 -08:00
a033a0eaaf Cleanup: Clang-Tidy, modernize-use-bool-literals 2020-11-07 02:53:22 -08:00
c137b53569 Refactor: move sequencer modifier .blend I/O to sequencer module
Ref T76372.
2020-11-07 02:53:21 -08:00
f0a9986ccf Cleanup: Alembic, simplify expression
Change `1 + current_mat++` to `++current_mat`.

No functional changes.
2020-11-07 02:53:21 -08:00
f639ffe795 Cleanup: Alembic, simplify material assignment code
Refactor material assignment code such that:
- `build_mat_map()` just returns the built map (instead of relying on
  modifying a map passed as parameter),
- `LISTBASE_FOREACH` is used to loop over a `ListBase` (instead of a
  hand-crafted for-loop),
- just `return` when not enough material slots can be created (instead
  of setting a boolean to false, then doing some useless work, then
  checking the boolean),
- reorder some code for clarity, and
- rename `mat_map` to `matname_to_material` so that the semantics are
  clearer.

No functional changes.
2020-11-07 02:53:21 -08:00
326381bfe1 Refactor: move Paint lib linking to blenkernel
Ref T76372.
2020-11-07 02:53:21 -08:00
174e3c6b65 Refactor: move color settings .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:21 -08:00
5c899dcc92 Cleanup: Clang-Tidy, modernize-use-emplace 2020-11-07 02:53:21 -08:00
24ee80f077 Fix compilation error of bf_draw
Similar to previous commit, missing build dependency.
2020-11-07 02:53:21 -08:00
22b69af796 Fix compilation error when building from scratch
Make sure the DNA offset files is ready at a time bf_windowmanager
need it.
2020-11-07 02:53:21 -08:00
0758c006ec Cleanup: Clang-Tidy, modernize-redundant-void-arg 2020-11-07 02:53:21 -08:00
c2a329ec07 Refactor: move LightCache .blend I/O to eevee_lightcache.c
Ref T76372.
2020-11-07 02:53:21 -08:00
bdaee543f3 Refactor: move remaining ViewLayer .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:21 -08:00
44d358c384 Cleanup: remove unnecessary function 2020-11-07 02:53:21 -08:00
f87123a6eb Refactor: move Paint .blend I/O to blenkernel
Ref T76372.
2020-11-07 02:53:21 -08:00
f2fc2cd521 Refactor: move wmWindowManager .blend I/O to IDTypeInfo callbacks 2020-11-07 02:53:20 -08:00
af92a39e37 Fix T82364: Widget anim state not updated when deleting channel in Graph Editor
So a keyframed e.g. location slider would stay yellow/green even if its
corresponding channel was removed.

Needs a appropriate notifier so the listeners (e.g.
buttons_area_listener, view3d_buttons_region_listener) would cause a
redraw.

Maniphest Tasks: T82364

Differential Revision: https://developer.blender.org/D9438
2020-11-07 02:53:20 -08:00
49cbb23855 Fix T82457: Python error when clicking on a tool in the viewport
Ths variable was initialized for false, while it was expected to be
true.
2020-11-07 02:53:20 -08:00
9cb84de509 Clang Tidy: Expand modernize category
Gives an idea of which warnings are affecting Blender code base.
2020-11-07 02:53:20 -08:00
53f6991de8 Cleanup: Use nullptr everywhere in fluid code
Switched from NULL to nullptr.
2020-11-07 02:53:20 -08:00
5b696c2bd8 Fix T82407: Negative number input gives syntax error for velocities and
accelerations

Caused by rB45dbc38a8b15.

Above commit would place parentheses surrounding a block until the next
operator was found.
For velocities and accelerations though, the '/' in 'm/s' or 'ft/s'
should not be considered an operator.

Maniphest Tasks: T82407

Differential Revision: https://developer.blender.org/D9467
2020-11-07 02:53:20 -08:00
b95a5c2e68 Fix T82387: Crash loading file saved with recent master in old versions
This fix makes sure new files save `wmWindow.global_areas` under a different
name, so old Blender versions don't recognize and 0-initialize it.

Since enabling global area writing (ef4aa42ea4), loading a file in old
Blender versions would cause `wmWindow.global_areas` to be read, because there
was already reading code for it and `ScrAreaMap` was in SDNA.
However the `ScrArea.global` of the global areas would be NULL, because it was
*not* in SDNA (`ScrGlobalAreaData` was excluded).
Now, issue is that the code assumes that areas in the global area-map have a
valid ScrArea.global pointer.

Think this was a mistake in rB5f6c45498c92. We should have cleared all this data
on reading, until the global area writing was enabled.

Differential Revision: https://developer.blender.org/D9442

Reviewed by: Brecht Van Lommel
2020-11-07 02:53:20 -08:00
080e78d205 Cleanup: Clang-Tidy, readability-redundant-member-init 2020-11-07 02:53:20 -08:00
a55a69f81a Fix Outliner editbone selection with 'Sync Selection'
When editbones were selected from the Outliner (and they were connected
to a parent) with the 'Sync Selection' option turned ON, they could not
get duplicated.

For duplication to work, the (connected) parent bone's tip also has to
be selected [which was not the case when selection is done from the
Outliner under above circumstances]. The reason being that
armature_duplicate_selected_exec ->
ED_armature_edit_sync_selection clears the BONE_ROOTSEL flag if the
parent bone's BONE_TIPSEL is not set.

Caused by rB71eb65328078 btw.

The correct "parent-tip-selection" would actually happen in activation
- `tree_element_active_ebone`
-- `tree_element_active_ebone__sel`
but for 'Sync Selection' this happens [also] in
- `outliner_sync_selection_from_outliner`
-- `outliner_select_sync_to_edit_bone`
which did not do the "flushing" to the parent bone's tip

Now use existing dedicated function for this.

ref. T82347

Reviewers: Zachman

Differential Revision: https://developer.blender.org/D9470
2020-11-07 02:53:20 -08:00
596fea8afd Cleanup: Clang-Tidy warnings 2020-11-07 02:53:19 -08:00
47e4adde5a Fix compilation error in GHOST
ELEM macro isn't available in GHOST library.
2020-11-07 02:53:19 -08:00
a349943cd7 Cleanup: Fix the order of info_cfg_option. 2020-11-07 02:53:19 -08:00
360faf5c3c Cleanup: add missing doxygen group 2020-11-07 02:53:19 -08:00
9cf97857d1 Cleanup: Fix wrong doxygen groups
Was missed in rB9b6088cb9da4df1a893361997fc1a22986bf6f2e
2020-11-07 02:53:19 -08:00
44bdf515ba CMake: configue_file() to pass strings for build-info
Using configue_file(..) would have avoided the breakage from
1daa3c3f0a, caused by buildinfo not properly escaping quotes.

Rely on CMake to escaping strings instead using configure_file().
2020-11-07 02:53:19 -08:00
45ccdebad3 Fix uninitialized value
Own mistake in rB74188e65028d268af887ab2140e4253087410c1e
2020-11-07 02:53:19 -08:00
d242d33571 Cleanup: use 'BKE_' prefix for initialization functions 2020-11-07 02:53:19 -08:00
731eaa68d3 Cleanup: use doxy sections for node_group.c 2020-11-07 02:53:19 -08:00
344963bf23 Cleanup: use if/else check for property poll 2020-11-07 02:53:19 -08:00
aaca5731fb Cleanup: replace STREQLEN with STRPREFIX for constant strings 2020-11-07 02:53:19 -08:00
aa7147f665 Cleanup: use STR_ELEM macro 2020-11-07 02:53:19 -08:00
0fb50afdc5 Cleanup: Use LISTBASE_FOREACH macro 2020-11-07 02:53:18 -08:00
f3cc74d216 Cleanup: Use descriptive variable names 2020-11-07 02:53:18 -08:00
0946a8da3b Cleanup: de-duplicate code for instancing objects when linking
Ref D8843
2020-11-07 02:53:18 -08:00
a8e5e63f45 Cleanup: doxygen comments 2020-11-07 02:53:18 -08:00
e52f8ac7ce Cleanup: doxygen comments in ghost
Use colon after parameters, use hash to reference symbols.
2020-11-07 02:53:18 -08:00
71a088582a Cleanup: use ELEM macro (>2 args) 2020-11-07 02:53:18 -08:00
3aab8dd731 Cleanup: clang-format
Missed this last commit.
2020-11-07 02:53:18 -08:00
56d57b2e9d Cleanup: use ELEM macro 2020-11-07 02:53:18 -08:00
b16eb9d7ad Cleanup: follow our code style for float literals 2020-11-07 02:53:17 -08:00
3fcd3d41c4 Cleanup: use bool argument in BLI_noise 2020-11-07 02:53:17 -08:00
0b0bfa0628 Cleanup: BLI_noise
Use common prefix as this collided with existing API's (eg BLI_voronoi).

Also expand some non-obvious abbreviations:

- 'g'  -> 'generic'
- 'vl' -> 'variable_lacunarity'
- 'V'  -> 'v3'
2020-11-07 02:53:17 -08:00
ff9ce5fd98 Cleanup: remove unused BLI_turbulence1
A slightly modified version of BLI_turbulence1, unused for years.
2020-11-07 02:53:17 -08:00
2d99e118b4 Cleanup: use snake case for BLI_args API 2020-11-07 02:53:17 -08:00
a93add61b0 Cleanup: remove unused BLI_argsArgv 2020-11-07 02:53:17 -08:00
7f28a99dd5 Cleanup: use string APPEND/PREPEND
Replace 'set' with 'string(APPEND/PREPEND ...)'.
This avoids duplicating the variable name.
2020-11-07 02:53:10 -08:00
9aaf9857a0 Cleanup: transform.h comments, use doxy sections 2020-11-07 02:52:23 -08:00
e2595de761 Cleanup: sort structs, files 2020-11-07 02:52:23 -08:00
40c4942901 Cleanup: clang-format 2020-11-07 02:52:23 -08:00
2e188dc504 Cleanup: unused variable 2020-11-07 02:52:23 -08:00
Yevgeny Makarov
dfce29b809 UI: Tweaks to the Warning Icon
Warning Sign Alert Icon given a more rounded border.

Differential Revision: https://developer.blender.org/D9443

Reviewed by Pablo Vazquez
2020-11-07 02:52:23 -08:00
decf7adcf6 Fix T81915: Draw Face Sets not working with deformed sculpt mesh
The draw face sets brush uses the poly center when used in meshes to increase
its precision when working in low poly geometry. For this to work with deformed
meshes, the deformed coordinates from the PBVH should be used instead.

Reviewed By: sergey

Maniphest Tasks: T81915

Differential Revision: https://developer.blender.org/D9424
2020-11-07 02:52:23 -08:00
81531d5e76 Fix memory leaks in sculpt mode trimming tools
BKE_mesh_free() seems to not free the meshes correctly, so using BKE_id_free() instead.
The looptri array was also not freed.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9426
2020-11-07 02:52:23 -08:00
15bc0b7d5d Fix T82400: Dyntopo detail size edit operator visual glitch
Just a missing immUnbindProgram

Reviewed By: sergey

Maniphest Tasks: T82400

Differential Revision: https://developer.blender.org/D9459
2020-11-07 02:52:23 -08:00
17dec471c5 Fix Dyntopo detail size preview orientation not matching the cursor
Used the sampled cursor normal when available instead of the raycast face normal.
This makes the preview match the previous orientation of the cursor.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9460
2020-11-07 02:52:23 -08:00
81f05aca29 Move "Camera Parent Lock" from preferences to Object Relations
"Camera Parent Lock" can be useful when rigging cameras, but it is not
intuitive, and has also generated a lot of confusion (bug reports).
This is because it breaks the fundamental parent <-> child relationship
conventions in Blender, and there is no indication that it's intended
without diving into the preferences.

This commit moves the setting to the object level, and exposes it in
the relations panel in the property editor. It is exposed for every
object type because any object type can be "View Locked" in the 3D view.
The property description is also updated to reflect this change and be
more specific without getting too long.

In the future this could become a more general feature of the transform
system, but for now it is limited to "Lock Camera to View".

Differential Revision: https://developer.blender.org/D9239
2020-11-07 02:52:22 -08:00
d1270925a5 Fix T82423: Add modifier key back into keymap
Commit rBf5080c82dd915db6c7b9dd68a52aaaccf2600137
accidentally remove the Shift modifier key from
the `AUTOCONSTRAINPLANE` shortcut.

Differential Revision: https://developer.blender.org/D9480
2020-11-07 02:52:22 -08:00
9e09ae7aff Fix T82164: Knife tool draws huge vertices after using bgl.glPointSize
Since it is possible to have multiple draw callbacks, (some of which
use bgl and others gpu), check and force the reset of the drawing status
at the end of each callback.

Differential Revision: https://developer.blender.org/D9476
2020-11-07 02:52:22 -08:00
Robert Guetzkow
c51a5e1066 Fix T82423: Replace duplicate name in keymap
The two entries `TFM_MODAL_AUTOCONSTRAINT` and
`TFM_MODAL_AUTOCONSTRAINTPLANE` had the same name
displayed in the UI. The latter is now includes
"plane" in it's name.

Reviewed By: mano-wii

Differential Revision: https://developer.blender.org/D9474
2020-11-07 02:52:22 -08:00
758452ffba Fix T80043: missing Cycles displacement update when relinking output sockets 2020-11-07 02:52:22 -08:00
c7cd82c356 Cleanup: Reduce variable scope
Differential Revision: https://developer.blender.org/D9475
2020-11-07 02:52:22 -08:00
cc554eea75 Fix T82428: Cycles crashes when building volume meshes
The Volume Node did not have all of the sockets from its Mesh base class
which are now required due to the recent socket API change.
2020-11-07 02:52:21 -08:00
0d770432d6 pre-merge commit 2020-11-07 02:48:34 -08:00
b2cb9d4b1b Fixed handling of edge seam flags in dyntopo, for some reason did the
code was not brought over from trimesh branch.
2020-11-06 16:23:12 -08:00
08e19c6bc0 Added debug option in dyntopo to draw sculpt colors as solid cells
instead of interpolating (it's next to "draw smooth" in the dyntopo
settings panel).
2020-11-06 03:17:45 -08:00
b928f58849 Made vcol boundary tool avoid perfectly degenerate triangles. 2020-11-06 01:35:52 -08:00
228c1e5345 Replace call to BMLog with origco CD layer.
Also fixed SCULPT_HIDE_FACE_SETS.  It was 1<<16, which overlaps
SCULPT_DYNTOPO_DETAIL_MANUAL.  Changed it to 1<<17.  Someone should do
this in master too.
2020-11-05 16:35:42 -08:00
488af21ae0 Merge remote-tracking branch 'origin' into temp_bmesh_multires 2020-11-05 09:05:02 -08:00
b54d7bfad8 Fix redraw error for dyntopo smooth brush 2020-11-05 09:03:56 -08:00
2babf80ae6 Fixed sculpt colors undo for mesh pbvh. 2020-11-04 21:27:21 -08:00
022dcb8e6c Added autosmooth-like option to run vcol boundary tool in paint tool 2020-11-04 20:36:43 -08:00
6d66e81667 Fixed color boundary tool for faces pbvh 2020-11-04 03:05:38 -08:00
91a5e1aef8 Added an icon for new sculpt colors boundary smooth tool 2020-11-04 02:34:18 -08:00
6d704d57ad Merge remote-tracking branch 'origin' into temp_bmesh_multires 2020-11-03 22:41:57 -08:00
a1b1c840a0 Adjust weighting for color boundary tool 2020-11-03 19:41:18 -08:00
901654dcbf * Added a "color boundary" tool that tries to smooth out vcol boundaries 2020-11-03 19:08:37 -08:00
37a657a45f Added face set support to dyntopo. Still need to finish "edit face
sets" tool and do more testing.
2020-11-03 16:05:38 -08:00
e07bb3955e Enabled dyntopo for sharp brush. Also fixed paint brush strength being
too strong with dyntopo enabled.
2020-11-03 00:47:19 -08:00
7834b59598 Merge remote-tracking branch 'origin' into temp_bmesh_multires 2020-11-02 14:33:52 -08:00
0c8d40d2de Fixed bug with multires editmode code messing up loop indices for draw
code.

Also fixed a bug in dyntopo ray tracing, where r_active_vertex_index
wasn't always being set.
2020-11-02 14:29:45 -08:00
1014b6f455 More fixes for sculpt vertex color undo. Moved one of the undo pushes
outside a thread, since dyntopo undo is not thread safe.
2020-10-31 11:06:15 -07:00
093e29f3c2 Tried to fix sculpt vcol paint undo. It's better, but I still need to
go through and thorougly analyze just what the undo stack is doing.
2020-10-30 20:06:05 -07:00
0f0d1f8e2a Paint brush no long SCULPT_undo_push_node per dab (except for first
stroke) for dyntopo.  Instead it updates the original vertex color
customdata layer.

Calling into the undo system destroys threading with dyntopo, as its
undo code is single-threaded.
2020-10-30 19:37:22 -07:00
43ccbe353f Try to make SCULPT_orig_vert_data_init avoid allocating undo nodes,
which calls into BMLog which, while now threadsafe (ish?) causes
threads to get bogged down in lock contention.
2020-10-30 19:17:03 -07:00
2d861122e1 Remove debugging clang keyword. It's not #ifdef'd code, but still. 2020-10-29 22:39:06 -07:00
66f8852e30 * Edge queue creation for dyntopo edge split/collapse is now
multithreaded.
* Worked on ProxyVert system, but it still needs more work.  Issue is keeping
  topological layers (reasonably) up to date without it being slow.
* Fixed memory leak in bmlog.
2020-10-29 22:33:57 -07:00
54ddb01299 Fixed a variety of memory corruption bugs 2020-10-29 04:28:03 -07:00
3d47323162 Fixed bug with original coordinates/normals not being set when
dyntopo pbvh is first built
2020-10-27 01:38:59 -07:00
5c77439264 * Fix bug in BKE_pbvh_node_color_buffer_get. 2020-10-27 00:20:07 -07:00
e2c92c1341 More fixes for dyntopo undo and vertices (face data still isn't
implemented).
2020-10-26 18:46:12 -07:00
faf8402c19 Added initial support for customdata to dyntopo undo (BMLog).
TODO:
 - Handle face (loop) data
 - Figure out what to do about edge data (warn user? actually handle
   it?)
 - Handle sculpt color undo push nodes properly (shouldn't be hard).
2020-10-26 02:45:56 -07:00
4c0bcc3d13 PBVH drawing now properly names attributes.
NOTE: I've added a new function, DRW_make_cdlayer_attr_aliases, for
this.  It's patterned after extract_uvs.  The appropriate devs from the
draw engine team should take a look.
2020-10-26 00:19:14 -07:00
4fc4a7e1f4 Fixed SCULPT_dynamic_topology_sync_layers from last commit. 2020-10-25 22:55:46 -07:00
f9859a3b2a Got sculpt colors to work, needs more testing 2020-10-25 22:35:02 -07:00
6da9fa1bf2 pre-valgrind commit 2020-10-25 20:00:42 -07:00
5c6407c268 Fixed broken customdata interpolation in dyntopo collapse.
Also added support for uvs to dyntopo gpu buffer building code.
2020-10-25 04:31:06 -07:00
3214b1114f Added support for customdata interpolation to dyntopo.
It seems fast enough for simple cases, I make no promises that it
will be fast in crazy cases lots if there's lots of vgroup layers.

Note I still need to interface properly with the sculpt colors code.
2020-10-25 01:37:52 -07:00
bfbe9a0d55 Fix bugs in last commit. 2020-10-25 01:07:05 -07:00
f482afadab Refactored sculpt code to use a new type, SculptVertRef, that replaces
much of the usage of integer indices.  Meshes and grids simply store the
index here, but bmesh stores a pointer to a BMVert.  This greatly speeds
up DynTopo by reducing the need to maintain flat pointer arrays in bmesh.

To prevent the accidental casting of ScuptVertexRef to indices and vice
versa SculptVertRef is defined as a struct:

typedef struct {intptr_t i} SculptVertRef;

There are also two functions to convert flat index indices to
SculptVertRefs and back:

ScultpVertRef BKE_pbvh_table_index_to_vertex(PBVH *pbvh, int index);
int BKE_pbvh_vertex_index_to_table(PBVH *pbvh, SculptVertRef *ref);

Note that these functions require the aforementioned maintanance of
flat pointer arrays in bmesh, so make sure to call
SCULPT_ensure_vertex_random_access().
2020-10-25 00:32:59 -07:00
661dcd813c Merge performance improvements from trimesh branch into this one. 2020-10-24 19:41:54 -07:00
5541de9a3a Submodule update 2020-10-24 16:03:05 -07:00
3791afa29c Merge remote-tracking branch 'origin' into temp_bmesh_multires 2020-10-24 16:01:45 -07:00
3ae8229843 commit before merge 2020-10-24 16:01:08 -07:00
f61d4b2e3a * Improved multires projection some more in bmesh_interp.c 2020-10-18 18:10:16 -07:00
49f57d8de8 COde cleanup 2020-10-18 16:12:02 -07:00
64c7bad391 New branch to fix multires topology editing. WIP
Changes:
* Brought back bmesh_mdisps_space_set, written from scratch using
  subdiv api, not ccg.
* Wrote a function to smooth multigres grids from within bmesh.  I might
  not need it; unless anyone thinks of a use for it I'll go ahead and
  delete it.

Todo:
* Purge code of all usages of CCG for multires.

This commit:
* Wrote a utility function to dump multires displacements into a (new)
  scene object.
* Consequently, I now know that the CCG_based multires code is not
  compatible with the OpenSubdiv based code.  The former produces gaps
  between grids when converting displacements to object space.
2020-10-17 15:11:02 -07:00
4659855b0f commit multires patch 2020-10-17 01:24:34 -07:00
10010 changed files with 952871 additions and 1064492 deletions

View File

@@ -162,7 +162,6 @@ PenaltyBreakString: 1000000
ForEachMacros:
- BEGIN_ANIMFILTER_SUBCHANNELS
- BKE_pbvh_vertex_iter_begin
- BKE_pbvh_face_iter_begin
- BLI_FOREACH_SPARSE_RANGE
- BLI_SMALLSTACK_ITER_BEGIN
- BMO_ITER
@@ -181,7 +180,6 @@ ForEachMacros:
- CTX_DATA_BEGIN_WITH_ID
- DEG_OBJECT_ITER_BEGIN
- DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN
- DRW_ENABLED_ENGINE_ITER
- DRIVER_TARGETS_LOOPER_BEGIN
- DRIVER_TARGETS_USED_LOOPER_BEGIN
- FOREACH_BASE_IN_EDIT_MODE_BEGIN
@@ -206,7 +204,6 @@ ForEachMacros:
- FOREACH_SCENE_COLLECTION_BEGIN
- FOREACH_SCENE_OBJECT_BEGIN
- FOREACH_SELECTED_BASE_BEGIN
- FOREACH_SELECTED_BEZT_BEGIN
- FOREACH_SELECTED_EDITABLE_OBJECT_BEGIN
- FOREACH_SELECTED_OBJECT_BEGIN
- FOREACH_TRANS_DATA_CONTAINER
@@ -266,13 +263,8 @@ ForEachMacros:
- SET_SLOT_PROBING_BEGIN
- MAP_SLOT_PROBING_BEGIN
- VECTOR_SET_SLOT_PROBING_BEGIN
- WL_ARRAY_FOR_EACH
- FOREACH_SPECTRUM_CHANNEL
- TGSET_ITER
StatementMacros:
- PyObject_HEAD
- PyObject_VAR_HEAD
- ccl_gpu_kernel_postfix
MacroBlockBegin: "^OSL_CLOSURE_STRUCT_BEGIN$"
MacroBlockEnd: "^OSL_CLOSURE_STRUCT_END$"

View File

@@ -1,8 +1,6 @@
# The warnings below are disabled because they are too pedantic and not worth fixing.
# Some of them will be enabled as part of the Clang-Tidy task, see T78535.
# NOTE: No comments in the list below is allowed. Clang-tidy will ignore items after comments in the lists flag list.
# This is because the comment is not a valid list item and it will stop parsing flags if a list item is a comment.
Checks: >
-*,
readability-*,
@@ -14,11 +12,10 @@ Checks: >
-readability-avoid-const-params-in-decls,
-readability-simplify-boolean-expr,
-readability-make-member-function-const,
-readability-suspicious-call-argument,
-readability-redundant-member-init,
-readability-misleading-indentation,
-readability-use-anyofallof,
-readability-identifier-length,
-readability-function-cognitive-complexity,
@@ -28,16 +25,12 @@ Checks: >
-bugprone-branch-clone,
-bugprone-macro-parentheses,
-bugprone-reserved-identifier,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-redundant-branch-condition,
-bugprone-suspicious-include,
modernize-*,
-modernize-use-auto,
-modernize-use-trailing-return-type,
@@ -45,8 +38,9 @@ Checks: >
-modernize-use-nodiscard,
-modernize-loop-convert,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-return-braced-init-list
# Cannot be enabled yet, because using raw string literals in tests breaks
# the windows compiler currently.
-modernize-raw-string-literal
CheckOptions:
- key: modernize-use-default-member-init.UseAssignment

View File

@@ -34,15 +34,6 @@ indent_style = space
indent_size = 2
max_line_length = 99
# Tom's Obvious Minimal Language
[*.toml]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
max_line_length = 120
# reStructuredText
[*.rst]
charset = utf-8
@@ -51,12 +42,3 @@ insert_final_newline = true
indent_style = space
indent_size = 3
max_line_length = 120
# Makefile
[{Makefile,GNUmakefile}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120

View File

@@ -1,5 +0,0 @@
This repository is only used as a mirror of git.blender.org. Blender development happens on
https://developer.blender.org.
To get started with contributing code, please see:
https://wiki.blender.org/wiki/Process/Contributing_Code

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,23 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# -*- mode: gnumakefile; tab-width: 4; indent-tabs-mode: t; -*-
# vim: tabstop=4
#
# ##### 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 Makefile does an out-of-source CMake build in ../build_`OS`_`CPU`
# eg:
@@ -8,7 +27,7 @@
define HELP_TEXT
Blender Convenience Targets
Provided for building Blender (multiple targets can be used at once).
Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
@@ -21,8 +40,6 @@ Blender Convenience Targets
* ninja: Use ninja build tool for faster builds.
* ccache: Use ccache for faster rebuilds.
Note: when passing in multiple targets their order is not important.
So for a fast build you can for e.g. run 'make lite ccache ninja'.
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.
@@ -32,7 +49,7 @@ Other Convenience Targets
* config: Run cmake configuration tool to set build options.
* deps: Build library dependencies (intended only for platform maintainers).
The existence of locally build dependencies overrides the pre-built dependencies from subversion.
The existance of locally build dependancies overrides the pre-built dependencies from subversion.
These must be manually removed from '../lib/' to go back to using the pre-compiled libraries.
Project Files
@@ -44,6 +61,8 @@ 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
@@ -51,25 +70,24 @@ Testing Targets
* test:
Run automated tests with ctest.
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
* test_pep8:
Checks all python script are pep8
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
Static Source Code Checking
Not associated with building Blender.
* check_cppcheck: Run blender source through cppcheck (C & C++).
* check_clang_array: Run blender source through clang array checking script (C & C++).
* check_deprecated: Check if there is any deprecated code to remove.
* check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only).
* check_descriptions: Check for duplicate/invalid descriptions.
* check_licenses: Check license headers follow the SPDX license specification,
using one of the accepted licenses in 'doc/license/SPDX-license-identifiers.txt'
Append with 'SHOW_HEADERS=1' to show all unique headers
which can be useful for spotting license irregularities.
* check_cmake: Runs our own cmake file checker which detects errors in the cmake file list definitions.
* check_pep8: Checks all Python script are pep8 which are tagged to use the stricter formatting.
* check_mypy: Checks all Python scripts using mypy,
see: source/tools/check_source/check_mypy_config.py scripts which are included.
Spell Checkers
This runs the spell checker from the developer tools repositor.
@@ -120,7 +138,7 @@ Utilities
Updates git and all submodules but not svn.
* format:
Format source code using clang-format & autopep8 (uses PATHS if passed in). For example::
Format source code using clang (uses PATHS if passed in). For example::
make format PATHS="source/blender/blenlib source/blender/blenkernel"
@@ -130,7 +148,6 @@ Environment Variables
* 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).
* AUTOPEP8: Command used for Python code-formatting (used for the format target).
Documentation Targets
Not associated with building Blender.
@@ -162,7 +179,6 @@ CPU:=$(shell uname -m)
# Source and Build DIR's
BLENDER_DIR:=$(shell pwd -P)
BUILD_TYPE:=Release
BLENDER_IS_PYTHON_MODULE:=
# CMake arguments, assigned to local variable to make it mutable.
CMAKE_CONFIG_ARGS := $(BUILD_CMAKE_ARGS)
@@ -201,47 +217,17 @@ endif
# in libraries, or python 2 for running make update to get it.
ifeq ($(OS_NCASE),darwin)
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=$(DEPS_INSTALL_DIR)/python/bin/python3.10
PYTHON:=$(DEPS_INSTALL_DIR)/python/bin/python3.7m
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=python
endif
endif
endif
# Set the LIBDIR, an empty string when not found.
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
ifeq (, $(LIBDIR))
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_centos7_${CPU})
endif
ifeq (, $(LIBDIR))
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
endif
# Use the autopep8 module in ../lib/ (which can be executed via Python directly).
# Otherwise the "autopep8" command can be used.
ifndef AUTOPEP8
ifneq (, $(LIBDIR))
AUTOPEP8:=$(wildcard $(LIBDIR)/python/lib/python3.10/site-packages/autopep8.py)
endif
ifeq (, $(AUTOPEP8))
AUTOPEP8:=autopep8
endif
endif
# -----------------------------------------------------------------------------
# Additional targets for the build configuration
# additional targets for the build configuration
# NOTE: These targets can be combined and are applied in reverse order listed here.
# So it's important that `bpy` comes before `release` (for example)
# `make bpy release` first loads `release` configuration, then `bpy`.
# This is important as `bpy` will turn off some settings enabled by release.
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_bpy
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
BLENDER_IS_PYTHON_MODULE:=1
endif
# support 'make debug'
ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_debug
BUILD_TYPE:=Debug
@@ -266,6 +252,10 @@ ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_headless
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_bpy
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
@@ -303,10 +293,8 @@ endif
# use the default build path can still use utility helpers.
ifeq ($(OS), Darwin)
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
BLENDER_BIN_DIR?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
else
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
BLENDER_BIN_DIR?="$(BUILD_DIR)/bin"
endif
@@ -338,7 +326,7 @@ CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
# -----------------------------------------------------------------------------
# Tool for 'make config'
# X11 specific.
# X11 spesific
ifdef DISPLAY
CMAKE_CONFIG_TOOL = cmake-gui
else
@@ -363,12 +351,8 @@ all: .FORCE
@echo Building Blender ...
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
@echo
@echo Edit build configuration with: \"$(BUILD_DIR)/CMakeCache.txt\" run make again to rebuild.
@if test -z "$(BLENDER_IS_PYTHON_MODULE)"; then \
echo Blender successfully built, run from: $(BLENDER_BIN); \
else \
echo Blender successfully built as a Python module, \"bpy\" can be imported from: $(BLENDER_BIN_DIR); \
fi
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo Blender successfully built, run from: $(BLENDER_BIN)
@echo
debug: all
@@ -419,6 +403,11 @@ help: .FORCE
# -----------------------------------------------------------------------------
# Packages
#
package_debian: .FORCE
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
package_pacman: .FORCE
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
package_archive: .FORCE
make -C "$(BUILD_DIR)" -s package_archive
@@ -429,7 +418,21 @@ package_archive: .FORCE
# Tests
#
test: .FORCE
@$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
# run pep8 check check on scripts we distribute.
test_pep8: .FORCE
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
test_cmake: .FORCE
$(PYTHON) build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
@echo "written: test_cmake_consistency.log"
# run deprecation tests, see if we have anything to remove.
test_deprecated: .FORCE
$(PYTHON) tests/check_deprecated.py
# -----------------------------------------------------------------------------
@@ -451,44 +454,44 @@ project_eclipse: .FORCE
#
check_cppcheck: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
$(PYTHON) \
"$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
check_clang_array: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
check_splint: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
check_sparse: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
check_smatch: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
check_mypy: .FORCE
@$(PYTHON) "$(BLENDER_DIR)/source/tools/check_source/check_mypy.py"
$(PYTHON) "$(BLENDER_DIR)/source/tools/check_source/check_mypy.py"
check_spelling_py: .FORCE
@cd "$(BUILD_DIR)" ; \
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/release/scripts"
check_spelling_c: .FORCE
@cd "$(BUILD_DIR)" ; \
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
@@ -498,71 +501,53 @@ check_spelling_c: .FORCE
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_osl: .FORCE
@cd "$(BUILD_DIR)" ; \
cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions: .FORCE
@$(BLENDER_BIN) --background -noaudio --factory-startup --python \
$(BLENDER_BIN) --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
check_deprecated: .FORCE
@PYTHONIOENCODING=utf_8 $(PYTHON) \
source/tools/check_source/check_deprecated.py
check_licenses: .FORCE
@PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_licenses.py" \
"--show-headers=$(SHOW_HEADERS)"
check_pep8: .FORCE
@PYTHONIOENCODING=utf_8 $(PYTHON) \
tests/python/pep8.py
check_cmake: .FORCE
@PYTHONIOENCODING=utf_8 $(PYTHON) \
source/tools/check_source/check_cmake_consistency.py
# -----------------------------------------------------------------------------
# Utilities
#
source_archive: .FORCE
@$(PYTHON) ./build_files/utils/make_source_archive.py
python3 ./build_files/utils/make_source_archive.py
source_archive_complete: .FORCE
@cmake \
cmake \
-S "$(BLENDER_DIR)/build_files/build_environment" -B"$(BUILD_DIR)/source_archive" \
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE) -DPACKAGE_USE_UPSTREAM_SOURCES=OFF
# This assumes CMake is still using a default `PACKAGE_DIR` variable:
@$(PYTHON) ./build_files/utils/make_source_archive.py --include-packages "$(BUILD_DIR)/source_archive/packages"
python3 ./build_files/utils/make_source_archive.py --include-packages "$(BUILD_DIR)/source_archive/packages"
INKSCAPE_BIN?="inkscape"
icons: .FORCE
@BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
@INKSCAPE_BIN=$(INKSCAPE_BIN) \
INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
@INKSCAPE_BIN=$(INKSCAPE_BIN) \
INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/alert_icons_update.py"
icons_geom: .FORCE
@BLENDER_BIN=$(BLENDER_BIN) \
BLENDER_BIN=$(BLENDER_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
update: .FORCE
@$(PYTHON) ./build_files/utils/make_update.py
$(PYTHON) ./build_files/utils/make_update.py
update_code: .FORCE
@$(PYTHON) ./build_files/utils/make_update.py --no-libraries
$(PYTHON) ./build_files/utils/make_update.py --no-libraries
format: .FORCE
@PATH="${LIBDIR}/llvm/bin/:$(PATH)" $(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
@$(PYTHON) source/tools/utils_maintenance/autopep8_format_paths.py --autopep8-command="$(AUTOPEP8)" $(PATHS)
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
# -----------------------------------------------------------------------------
@@ -571,25 +556,25 @@ 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:${ASAN_OPTIONS} \
ASAN_OPTIONS=halt_on_error=0:${ASAN_OPTIONS} \
$(BLENDER_BIN) \
--background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
@sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out
sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
doc_doxy: .FORCE
@cd doc/doxygen; doxygen Doxyfile
cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: .FORCE
@$(BLENDER_BIN) \
$(BLENDER_BIN) \
--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="$(BLENDER_BIN)" --output=blender.1 --verbose
$(PYTHON) doc/manpage/blender.1.py $(BLENDER_BIN) blender.1
help_features: .FORCE
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"

View File

@@ -1,6 +1,22 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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.
@@ -22,7 +38,7 @@
# Install compiler cmake autoconf automake libtool yasm tcl
# Run "make deps" from main Blender directory
#
##################################################################################################
####################################################################################################
project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
@@ -30,12 +46,8 @@ cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
# `versions.cmake` needs to be included after `options.cmake`
# due to the `BLENDER_PLATFORM_ARM` variable being needed.
include(cmake/versions.cmake)
include(cmake/boost_build_options.cmake)
include(cmake/download.cmake)
include(cmake/macros.cmake)
if(ENABLE_MINGW64)
include(cmake/setup_mingw64.cmake)
@@ -50,16 +62,18 @@ include(cmake/png.cmake)
include(cmake/jpeg.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/imath.cmake)
include(cmake/openexr.cmake)
include(cmake/brotli.cmake)
include(cmake/freetype.cmake)
include(cmake/epoxy.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/llvm.cmake)
if(APPLE)
include(cmake/openmp.cmake)
endif()
@@ -76,8 +90,8 @@ endif()
include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/nanovdb.cmake)
include(cmake/python.cmake)
include(cmake/llvm.cmake)
option(USE_PIP_NUMPY "Install NumPy using pip wheel instead of building from source" OFF)
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
set(USE_PIP_NUMPY ON)
@@ -89,33 +103,18 @@ include(cmake/package_python.cmake)
include(cmake/usd.cmake)
include(cmake/potrace.cmake)
include(cmake/haru.cmake)
# Boost needs to be included after `python.cmake` due to the PYTHON_BINARY variable being needed.
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
include(cmake/pugixml.cmake)
include(cmake/ispc.cmake)
include(cmake/openimagedenoise.cmake)
include(cmake/embree.cmake)
include(cmake/openpgl.cmake)
include(cmake/fmt.cmake)
include(cmake/robinmap.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/xr_openxr.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
include(cmake/dpcpp.cmake)
include(cmake/dpcpp_deps.cmake)
endif()
if(NOT WIN32)
include(cmake/igc.cmake)
include(cmake/gmmlib.cmake)
include(cmake/ocloc.cmake)
endif()
endif()
# OpenColorIO and dependencies.
include(cmake/expat.cmake)
include(cmake/pystring.cmake)
include(cmake/yamlcpp.cmake)
include(cmake/opencolorio.cmake)
@@ -123,9 +122,8 @@ if(BLENDER_PLATFORM_ARM)
include(cmake/sse2neon.cmake)
endif()
include(cmake/webp.cmake)
if(NOT APPLE)
include(cmake/level-zero.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
@@ -143,7 +141,6 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/aom.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
@@ -152,6 +149,7 @@ if(NOT WIN32 OR ENABLE_MINGW64)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
@@ -172,10 +170,6 @@ if(UNIX AND NOT APPLE)
include(cmake/libglu.cmake)
include(cmake/mesa.cmake)
include(cmake/wayland_protocols.cmake)
# Can be removed when the build-bot upgrades to v1.20.x or newer.
include(cmake/wayland.cmake)
include(cmake/wayland_libdecor.cmake)
endif()
include(cmake/harvest.cmake)
include(cmake/cve_check.cmake)

View File

@@ -1,16 +1,46 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(ALEMBIC_EXTRA_ARGS
-DImath_ROOT=${LIBDIR}/imath
-DUSE_PYALEMBIC=OFF
-DUSE_ARNOLD=OFF
-DUSE_MAYA=OFF
-DUSE_PRMAN=OFF
-DUSE_HDF5=OFF
-DUSE_TESTS=OFF
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DILMBASE_ROOT=${LIBDIR}/openexr
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IexMath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=OFF
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
)
ExternalProject_Add(external_alembic
@@ -41,6 +71,6 @@ endif()
add_dependencies(
external_alembic
external_zlib
external_openexr
external_imath
)

View File

@@ -1,41 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
# The default generator on windows is msbuild, which we do not
# want to use for this dep, as needs to build with mingw
set(AOM_GENERATOR "Ninja")
# The default flags are full of MSVC options given this will be
# building with mingw, it'll have an unhappy time with that and
# we need to clear them out.
set(AOM_CMAKE_FLAGS )
else()
set(AOM_GENERATOR "Unix Makefiles")
set(AOM_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
endif()
set(AOM_EXTRA_ARGS
-DENABLE_TESTDATA=OFF
-DENABLE_TESTS=OFF
-DENABLE_TOOLS=OFF
-DENABLE_EXAMPLES=OFF
${AOM_EXTRA_ARGS_WIN32}
)
# This is slightly different from all other deps in the way that
# aom uses cmake as a build system, but still needs the environment setup
# to include perl so we manually setup the environment and call
# cmake directly for the configure, build and install commands.
ExternalProject_Add(external_aom
URL file://${PACKAGE_DIR}/${AOM_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${AOM_HASH_TYPE}=${AOM_HASH}
PREFIX ${BUILD_DIR}/aom
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/aom/src/external_aom < ${PATCH_DIR}/aom.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/aom/src/external_aom-build/ &&
${CMAKE_COMMAND} -G "${AOM_GENERATOR}" -DCMAKE_INSTALL_PREFIX=${LIBDIR}/aom ${AOM_CMAKE_FLAGS} ${AOM_EXTRA_ARGS} ${BUILD_DIR}/aom/src/external_aom/
BUILD_COMMAND ${CMAKE_COMMAND} --build .
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
INSTALL_DIR ${LIBDIR}/aom
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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/
@@ -24,6 +40,7 @@ ExternalProject_Add(external_blosc
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BLOSC_HASH_TYPE}=${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
)

View File

@@ -1,6 +1,33 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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(BLENDER_PLATFORM_ARM)
set(BOOST_ARCHITECTURE arm)
else()
set(BOOST_ARCHITECTURE x86)
endif()
if(WIN32)
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND b2)
set(BOOST_BUILD_OPTIONS runtime-link=shared )
@@ -20,6 +47,11 @@ else()
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
endif()
if(WITH_BOOST_PYTHON)

View File

@@ -1,30 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(BOOST_ADDRESS_MODEL 64)
if(BLENDER_PLATFORM_ARM)
set(BOOST_ARCHITECTURE arm)
else()
set(BOOST_ARCHITECTURE x86)
endif()
if(WIN32)
if(MSVC_VERSION GREATER_EQUAL 1920) # 2019
set(BOOST_TOOLSET toolset=msvc-14.2)
set(BOOST_COMPILER_STRING -vc142)
else() # 2017
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
endif()
endif()
set(DEFAULT_BOOST_FLAGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DBoost_ADDITIONAL_VERSIONS=${BOOST_VERSION_SHORT}
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
)

View File

@@ -1,22 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(BROTLI_EXTRA_ARGS
)
ExternalProject_Add(external_brotli
URL file://${PACKAGE_DIR}/${BROTLI_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BROTLI_HASH_TYPE}=${BROTLI_HASH}
PREFIX ${BUILD_DIR}/brotli
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/brotli ${DEFAULT_CMAKE_FLAGS} ${BROTLI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/brotli
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_brotli after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/brotli/include ${HARVEST_TARGET}/brotli/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/brotli/lib/brotlidec-static${LIBEXT} ${HARVEST_TARGET}/brotli/lib/brotlidec-static${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/brotli/lib/brotlicommon-static${LIBEXT} ${HARVEST_TARGET}/brotli/lib/brotlicommon-static${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 .)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
if(APPLE)
@@ -12,13 +28,21 @@ if(UNIX)
automake
bison
${_libtoolize_name}
meson
ninja
pkg-config
tclsh
yasm
)
if(NOT APPLE)
set(_required_software
${_required_software}
# Needed for Mesa.
meson
ninja
)
endif()
foreach(_software ${_required_software})
find_program(_software_find NAMES ${_software})
if(NOT _software_find)
@@ -46,10 +70,13 @@ if(UNIX)
" ${_software_missing}\n"
"\n"
"On Debian and Ubuntu:\n"
" apt install autoconf automake bison libtool yasm tcl ninja-build meson python3-mako\n"
" apt install autoconf automake libtool yasm tcl ninja-build meson python3-mako\n"
"\n"
"On macOS (with homebrew):\n"
" brew install autoconf automake bison flex libtool meson ninja pkg-config yasm\n"
"On macOS Intel (with homebrew):\n"
" brew install autoconf automake bison libtool pkg-config yasm\n"
"\n"
"On macOS ARM (with homebrew):\n"
" brew install autoconf automake bison flex libtool pkg-config yasm\n"
"\n"
"Other platforms:\n"
" Install equivalent packages.\n")

View File

@@ -0,0 +1,28 @@
# ***** 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 file://${PACKAGE_DIR}/${CLEW_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${CLEW_HASH_TYPE}=${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

@@ -0,0 +1,29 @@
# ***** 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 file://${PACKAGE_DIR}/${CUEW_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${CUEW_HASH_TYPE}=${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,75 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# CVE Check requirements
#
# - A working installation of intels cve-bin-tool [1] has to be available in
# your path
#
# - Not strictly required, but highly recommended is obtaining a NVD key from
# nist since it significantly speeds up downloading/updating the required
# databases one can request a key on the following website:
# https://nvd.nist.gov/developers/request-an-api-key
# Bill of Materials construction
#
# This constructs a CSV cve-bin-tool [1] can read and process. Sadly
# cve-bin-tool at this point does not take a list of CPE's and output a check
# based on that list. so we need to pick apart the CPE retrieve the vendor,
# product and version tokens and generate a CSV.
#
# [1] https://github.com/intel/cve-bin-tool
# Because not all deps are downloaded (ie python packages) but can still have a
# xxx_CPE declared loop over all variables and look for variables ending in CPE.
set(SBOMCONTENTS)
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
if(_variableName MATCHES "CPE$")
string(REPLACE ":" ";" CPE_LIST ${${_variableName}})
string(REPLACE "_CPE" "_ID" CPE_DEPNAME ${_variableName})
list(GET CPE_LIST 3 CPE_VENDOR)
list(GET CPE_LIST 4 CPE_NAME)
list(GET CPE_LIST 5 CPE_VERSION)
set(${CPE_DEPNAME} "${CPE_VENDOR},${CPE_NAME},${CPE_VERSION}")
set(SBOMCONTENTS "${SBOMCONTENTS}${CPE_VENDOR},${CPE_NAME},${CPE_VERSION},,,\n")
endif()
endforeach()
configure_file(${CMAKE_SOURCE_DIR}/cmake/cve_check.csv.in ${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv @ONLY)
# Custom Targets
#
# This defines two new custom targets one could run in the build folder
# `cve_check` which will output the report to the console, and `cve_check_html`
# which will write out blender_dependencies.html in the build folder that one
# could share with other people or be used to get more information on the
# reported CVE's.
#
# cve-bin-tool takes data from the nist nvd database which rate limits
# unauthenticated requests to 1 requests per 6 seconds making the database
# download take "quite a bit" of time.
#
# When adding -DCVE_CHECK_NVD_KEY=your_api_key_here to your cmake invocation
# this key will be passed on to cve-bin-tool speeding up the process.
#
if(DEFINED CVE_CHECK_NVD_KEY)
set(NVD_ARGS --nvd-api-key ${CVE_CHECK_NVD_KEY})
endif()
# This will just report to the console
add_custom_target(cve_check
COMMAND cve-bin-tool
${NVD_ARGS}
-i ${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv
--affected-versions
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv
)
# This will write out blender_dependencies.html
add_custom_target(cve_check_html
COMMAND cve-bin-tool
${NVD_ARGS}
-i ${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv
-f html
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv
)

View File

@@ -1,29 +0,0 @@
vendor,product,version,cve_number,remarks,comment
@OPENJPEG_ID@,CVE-2016-9675,Ignored,issue in convert command line tool not used by blender
@PYTHON_ID@,CVE-2009-2940,Ignored,issue in pygresql not used by blender
@PYTHON_ID@,CVE-2020-29396,Ignored,issue in odoo not used by blender
@PYTHON_ID@,CVE-2021-32052,Ignored,issue in django not used by blender
@PYTHON_ID@,CVE-2009-3720,Ignored,already fixed in libexpat version used
@SSL_ID@,CVE-2009-1390,Ignored,issue in mutt not used by blender
@SSL_ID@,CVE-2009-3765,Ignored,issue in mutt not used by blender
@SSL_ID@,CVE-2009-3766,Ignored,issue in mutt not used by blender
@SSL_ID@,CVE-2009-3767,Ignored,issue in ldap not used by blender
@SSL_ID@,CVE-2019-0190,Ignored,issue in apache not used by blender
@TIFF_ID@,CVE-2022-2056,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-2057,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-2058,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-2519,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-2520,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-2521,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-2953,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-34526,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-3570,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-3597,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-3598,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-3599,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-3626,Ignored,issue in tiff command line tool not used by blender
@TIFF_ID@,CVE-2022-3627,Ignored,issue in tiff command line tool not used by blender
@XML2_ID@,CVE-2016-3709,Ignored,not affecting blender and not considered a security issue upstream
@GMP_ID@,CVE-2021-43618,Mitigated,patched using upstream commit 561a9c25298e
@SQLITE_ID@,CVE-2022-35737,Ignored,only affects SQLITE_ENABLE_STAT4 compile option not used by blender or python
@SBOMCONTENTS@

View File

@@ -1,33 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-or-later
## Update and uncomment this in the release branch
# set(BLENDER_VERSION 3.1)
function(download_source dep)
set(TARGET_FILE ${${dep}_FILE})
set(TARGET_HASH_TYPE ${${dep}_HASH_TYPE})
set(TARGET_HASH ${${dep}_HASH})
if(PACKAGE_USE_UPSTREAM_SOURCES)
set(TARGET_URI ${${dep}_URI})
elseif(BLENDER_VERSION)
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/tags/blender-${BLENDER_VERSION}-release/lib/packages/${TARGET_FILE})
else()
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})
endif()
# Validate all required variables are set and give an explicit error message
# rather than CMake erroring out later on with a more ambigious error.
if (NOT DEFINED TARGET_FILE)
message(FATAL_ERROR "${dep}_FILE variable not set")
endif()
if (NOT DEFINED TARGET_HASH)
message(FATAL_ERROR "${dep}_HASH variable not set")
endif()
if (NOT DEFINED TARGET_HASH_TYPE)
message(FATAL_ERROR "${dep}_HASH_TYPE variable not set")
endif()
if (NOT DEFINED TARGET_URI)
message(FATAL_ERROR "${dep}_URI variable not set")
endif()
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
message("Checking source : ${dep} (${TARGET_FILE})")
if(NOT EXISTS ${TARGET_FILE})
@@ -39,36 +18,6 @@ function(download_source dep)
SHOW_PROGRESS
)
endif()
if(EXISTS ${TARGET_FILE})
# Sometimes the download fails, but that is not a
# fail condition for "file(DOWNLOAD" it will warn about
# a crc mismatch and just carry on, we need to explicitly
# catch this and remove the bogus 0 byte file so we can
# retry without having to go find the file and manually
# delete it.
file (SIZE ${TARGET_FILE} TARGET_SIZE)
if(${TARGET_SIZE} EQUAL 0)
file(REMOVE ${TARGET_FILE})
message(FATAL_ERROR "for ${TARGET_FILE} file size 0, download likely failed, deleted...")
endif()
# If we are using sources from the blender repo also
# validate that the hashes match, this takes a
# little more time, but protects us when we are
# building a release package and one of the packages
# is missing or incorrect.
#
# For regular platform maintenaince this is not needed
# since the actual build of the dep will notify the
# platform maintainer if there is a problem with the
# source package and refuse to build.
if(NOT PACKAGE_USE_UPSTREAM_SOURCES OR FORCE_CHECK_HASH)
file(${TARGET_HASH_TYPE} ${TARGET_FILE} LOCAL_HASH)
if(NOT ${TARGET_HASH} STREQUAL ${LOCAL_HASH})
message(FATAL_ERROR "${TARGET_FILE} ${TARGET_HASH_TYPE} mismatch\nExpected\t: ${TARGET_HASH}\nActual\t: ${LOCAL_HASH}")
endif()
endif()
endif()
endfunction(download_source)
download_source(ZLIB)
@@ -80,9 +29,13 @@ download_source(BLOSC)
download_source(PTHREADS)
download_source(OPENEXR)
download_source(FREETYPE)
download_source(EPOXY)
download_source(GLEW)
download_source(FREEGLUT)
download_source(ALEMBIC)
download_source(GLFW)
download_source(CLEW)
download_source(GLFW)
download_source(CUEW)
download_source(OPENSUBDIV)
download_source(SDL)
download_source(OPENCOLLADA)
@@ -95,6 +48,7 @@ download_source(OSL)
download_source(PYTHON)
download_source(TBB)
download_source(OPENVDB)
download_source(NANOVDB)
download_source(NUMPY)
download_source(LAME)
download_source(OGG)
@@ -110,10 +64,13 @@ download_source(FFMPEG)
download_source(FFTW)
download_source(ICONV)
download_source(SNDFILE)
download_source(WEBP)
if(WITH_WEBP)
download_source(WEBP)
endif()
download_source(SPNAV)
download_source(JEMALLOC)
download_source(XML2)
download_source(TINYXML)
download_source(YAMLCPP)
download_source(EXPAT)
download_source(PUGIXML)
@@ -131,35 +88,9 @@ download_source(MESA)
download_source(NASM)
download_source(XR_OPENXR_SDK)
download_source(WL_PROTOCOLS)
download_source(WAYLAND)
download_source(WAYLAND_LIBDECOR)
download_source(ISPC)
download_source(GMP)
download_source(POTRACE)
download_source(HARU)
download_source(ZSTD)
download_source(SSE2NEON)
download_source(FLEX)
download_source(BROTLI)
download_source(FMT)
download_source(ROBINMAP)
download_source(IMATH)
download_source(PYSTRING)
download_source(OPENPGL)
download_source(LEVEL_ZERO)
download_source(DPCPP)
download_source(VCINTRINSICS)
download_source(OPENCLHEADERS)
download_source(ICDLOADER)
download_source(MP11)
download_source(SPIRV_HEADERS)
download_source(IGC)
download_source(IGC_LLVM)
download_source(IGC_OPENCL_CLANG)
download_source(IGC_VCINTRINSICS)
download_source(IGC_SPIRV_HEADERS)
download_source(IGC_SPIRV_TOOLS)
download_source(IGC_SPIRV_TRANSLATOR)
download_source(GMMLIB)
download_source(OCLOC)
download_source(AOM)

View File

@@ -1,112 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(LLVM_GENERATOR "Ninja")
else()
set(LLVM_GENERATOR "Unix Makefiles")
endif()
set(DPCPP_CONFIGURE_ARGS
# When external deps dpcpp needs are not found it will automatically
# download the during the configure stage using FetchContent. Given
# we need to keep an archive of all source used during build for compliance
# reasons it CANNOT download anything we do not know about. By setting
# this property to ON, all downloads are disabled, and we will have to
# provide the missing deps some other way, a build error beats a compliance
# violation
--cmake-opt FETCHCONTENT_FULLY_DISCONNECTED=ON
)
set(DPCPP_SOURCE_ROOT ${BUILD_DIR}/dpcpp/src/external_dpcpp/)
set(DPCPP_EXTRA_ARGS
# When external deps dpcpp needs are not found it will automatically
# download the during the configure stage using FetchContent. Given
# we need to keep an archive of all source used during build for compliance
# reasons it CANNOT download anything we do not know about. By setting
# this property to ON, all downloads are disabled, and we will have to
# provide the missing deps some other way, a build or configure error
# beats a compliance violation
-DFETCHCONTENT_FULLY_DISCONNECTED=ON
-DLLVMGenXIntrinsics_SOURCE_DIR=${BUILD_DIR}/vcintrinsics/src/external_vcintrinsics/
-DOpenCL_HEADERS=file://${PACKAGE_DIR}/${OPENCLHEADERS_FILE}
-DOpenCL_LIBRARY_SRC=file://${PACKAGE_DIR}/${ICDLOADER_FILE}
-DBOOST_MP11_SOURCE_DIR=${BUILD_DIR}/mp11/src/external_mp11/
-DLEVEL_ZERO_LIBRARY=${LIBDIR}/level-zero/lib/${LIBPREFIX}ze_loader${SHAREDLIBEXT}
-DLEVEL_ZERO_INCLUDE_DIR=${LIBDIR}/level-zero/include
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${BUILD_DIR}/spirvheaders/src/external_spirvheaders/
# Below here is copied from an invocation of buildbot/config.py
-DLLVM_ENABLE_ASSERTIONS=ON
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_EXTERNAL_PROJECTS=sycl^^llvm-spirv^^opencl^^libdevice^^xpti^^xptifw
-DLLVM_EXTERNAL_SYCL_SOURCE_DIR=${DPCPP_SOURCE_ROOT}/sycl
-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=${DPCPP_SOURCE_ROOT}/llvm-spirv
-DLLVM_EXTERNAL_XPTI_SOURCE_DIR=${DPCPP_SOURCE_ROOT}/xpti
-DXPTI_SOURCE_DIR=${DPCPP_SOURCE_ROOT}/xpti
-DLLVM_EXTERNAL_XPTIFW_SOURCE_DIR=${DPCPP_SOURCE_ROOT}/xptifw
-DLLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR=${DPCPP_SOURCE_ROOT}/libdevice
-DLLVM_ENABLE_PROJECTS=clang^^sycl^^llvm-spirv^^opencl^^libdevice^^xpti^^xptifw
-DLIBCLC_TARGETS_TO_BUILD=
-DLIBCLC_GENERATE_REMANGLED_VARIANTS=OFF
-DSYCL_BUILD_PI_HIP_PLATFORM=AMD
-DLLVM_BUILD_TOOLS=ON
-DSYCL_ENABLE_WERROR=OFF
-DSYCL_INCLUDE_TESTS=ON
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_ENABLE_SPHINX=OFF
-DBUILD_SHARED_LIBS=OFF
-DSYCL_ENABLE_XPTI_TRACING=ON
-DLLVM_ENABLE_LLD=OFF
-DXPTI_ENABLE_WERROR=OFF
-DSYCL_CLANG_EXTRA_FLAGS=
-DSYCL_ENABLE_PLUGINS=level_zero
-DCMAKE_INSTALL_RPATH=\$ORIGIN
-DPython3_ROOT_DIR=${LIBDIR}/python/
-DPython3_EXECUTABLE=${PYTHON_BINARY}
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
-DLLDB_ENABLE_CURSES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
)
if(WIN32)
list(APPEND DPCPP_EXTRA_ARGS -DPython3_FIND_REGISTRY=NEVER)
endif()
ExternalProject_Add(external_dpcpp
URL file://${PACKAGE_DIR}/${DPCPP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${DPCPP_HASH_TYPE}=${DPCPP_HASH}
PREFIX ${BUILD_DIR}/dpcpp
CMAKE_GENERATOR ${LLVM_GENERATOR}
SOURCE_SUBDIR llvm
LIST_SEPARATOR ^^
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/dpcpp ${DEFAULT_CMAKE_FLAGS} ${DPCPP_EXTRA_ARGS}
# CONFIGURE_COMMAND
# ${PYTHON_BINARY}
# ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS}
# BUILD_COMMAND
# echo "." # ${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/compile.py
INSTALL_COMMAND ${CMAKE_COMMAND} --build . -- deploy-sycl-toolchain
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/dpcpp/src/external_dpcpp < ${PATCH_DIR}/dpcpp.diff
INSTALL_DIR ${LIBDIR}/dpcpp
)
add_dependencies(
external_dpcpp
external_python
external_python_site_packages
external_vcintrinsics
external_openclheaders
external_icdloader
external_mp11
external_level-zero
external_spirvheaders
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_dpcpp after_install
COMMAND ${CMAKE_COMMAND} -E rm -f ${LIBDIR}/dpcpp/bin/clang-cl.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${LIBDIR}/dpcpp/bin/clang-cpp.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${LIBDIR}/dpcpp/bin/clang.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/dpcpp ${HARVEST_TARGET}/dpcpp
)
endif()

View File

@@ -1,61 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# These are build time requirements for dpcpp
# We only have to unpack these dpcpp will build
# them.
ExternalProject_Add(external_vcintrinsics
URL file://${PACKAGE_DIR}/${VCINTRINSICS_FILE}
URL_HASH ${VCINTRINSICS_HASH_TYPE}=${VCINTRINSICS_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/vcintrinsics
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
)
# opencl headers do not have to be unpacked, dpcpp will do it
# but it wouldn't hurt to do it anyway as an opertunity to validate
# the hash is correct.
ExternalProject_Add(external_openclheaders
URL file://${PACKAGE_DIR}/${OPENCLHEADERS_FILE}
URL_HASH ${OPENCLHEADERS_HASH_TYPE}=${OPENCLHEADERS_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/openclheaders
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
)
# icdloader does not have to be unpacked, dpcpp will do it
# but it wouldn't hurt to do it anyway as an opertunity to validate
# the hash is correct.
ExternalProject_Add(external_icdloader
URL file://${PACKAGE_DIR}/${ICDLOADER_FILE}
URL_HASH ${ICDLOADER_HASH_TYPE}=${ICDLOADER_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/icdloader
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
)
ExternalProject_Add(external_mp11
URL file://${PACKAGE_DIR}/${MP11_FILE}
URL_HASH ${MP11_HASH_TYPE}=${MP11_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/mp11
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
)
ExternalProject_Add(external_spirvheaders
URL file://${PACKAGE_DIR}/${SPIRV_HEADERS_FILE}
URL_HASH ${SPIRV_HEADERS_HASH_TYPE}=${SPIRV_HEADERS_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/spirvheaders
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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.
@@ -10,33 +26,53 @@ set(EMBREE_EXTRA_ARGS
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_TASKING_SYSTEM=TBB
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
)
if (NOT BLENDER_PLATFORM_ARM)
set(EMBREE_EXTRA_ARGS
${EMBREE_EXTRA_ARGS}
-DEMBREE_MAX_ISA=AVX2)
endif()
if(TBB_STATIC_LIBRARY)
set(EMBREE_EXTRA_ARGS
${EMBREE_EXTRA_ARGS}
-DEMBREE_TBB_COMPONENT=tbb_static
-DEMBREE_TBB_LIBRARY_NAME=tbb_static
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_static
)
endif()
ExternalProject_Add(external_embree
URL file://${PACKAGE_DIR}/${EMBREE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EMBREE_HASH_TYPE}=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
if(BUILD_MODE STREQUAL Debug)
list(APPEND EMBREE_EXTRA_ARGS
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_debug
-DEMBREE_TBB_LIBRARY_NAME=tbb_debug
)
endif()
else()
set(EMBREE_BUILD_DIR)
endif()
if(BLENDER_PLATFORM_ARM)
ExternalProject_Add(external_embree
GIT_REPOSITORY ${EMBREE_ARM_GIT}
GIT_TAG "blender-arm"
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
else()
ExternalProject_Add(external_embree
URL file://${PACKAGE_DIR}/${EMBREE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EMBREE_HASH_TYPE}=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
endif()
add_dependencies(
external_embree

View File

@@ -1,25 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(EPOXY_LIB_TYPE shared)
else()
set(EPOXY_LIB_TYPE static)
endif()
ExternalProject_Add(external_epoxy
URL file://${PACKAGE_DIR}/${EPOXY_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EPOXY_HASH_TYPE}=${EPOXY_HASH}
PREFIX ${BUILD_DIR}/epoxy
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/epoxy/src/external_epoxy/ < ${PATCH_DIR}/epoxy.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && meson setup --prefix ${LIBDIR}/epoxy --default-library ${EPOXY_LIB_TYPE} --libdir lib ${BUILD_DIR}/epoxy/src/external_epoxy-build ${BUILD_DIR}/epoxy/src/external_epoxy -Dtests=false
BUILD_COMMAND ninja
INSTALL_COMMAND ninja install
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_epoxy after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/epoxy/include ${HARVEST_TARGET}/epoxy/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/bin/epoxy-0.dll ${HARVEST_TARGET}/epoxy/bin/epoxy-0.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/lib/epoxy.lib ${HARVEST_TARGET}/epoxy/lib/epoxy.lib
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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(EXPAT_EXTRA_ARGS
-DEXPAT_BUILD_DOCS=OFF

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 file://${PACKAGE_DIR}/${FFI_FILE}

View File

@@ -1,9 +1,25 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include -I${mingw_LIBDIR}/aom/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib -L${mingw_LIBDIR}/aom/lib")
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:${mingw_LIBDIR}/aom/lib/pkgconfig:)
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:)
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
@@ -16,6 +32,12 @@ if(WIN32)
--enable-libopenjpeg
--disable-mediafoundation
)
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}
@@ -73,7 +95,6 @@ ExternalProject_Add(external_ffmpeg
--disable-librtmp
--enable-libx264
--enable-libxvid
--enable-libaom
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
@@ -120,7 +141,6 @@ add_dependencies(
external_vorbis
external_ogg
external_lame
external_aom
)
if(WIN32)
add_dependencies(

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 file://${PACKAGE_DIR}/${FLAC_FILE}

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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_flex
URL file://${PACKAGE_DIR}/${FLEX_FILE}

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)

View File

@@ -1,14 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(FMT_EXTRA_ARGS
-DFMT_TEST=Off
)
ExternalProject_Add(external_fmt
URL file://${PACKAGE_DIR}/${FMT_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FMT_HASH_TYPE}=${FMT_HASH}
PREFIX ${BUILD_DIR}/fmt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/fmt ${DEFAULT_CMAKE_FLAGS} ${FMT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/fmt
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)

View File

@@ -1,18 +1,31 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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
-DFT_DISABLE_BZIP2=ON
-DFT_DISABLE_HARFBUZZ=ON
-DFT_DISABLE_PNG=ON
-DFT_REQUIRE_BROTLI=ON
-DFT_REQUIRE_ZLIB=ON
-DPC_BROTLIDEC_INCLUDEDIR=${LIBDIR}/brotli/include
-DPC_BROTLIDEC_LIBDIR=${LIBDIR}/brotli/lib
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
)
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE)
ExternalProject_Add(external_freetype
URL file://${PACKAGE_DIR}/${FREETYPE_FILE}
@@ -23,12 +36,6 @@ ExternalProject_Add(external_freetype
INSTALL_DIR ${LIBDIR}/freetype
)
add_dependencies(
external_freetype
external_brotli
external_zlib
)
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

View File

@@ -0,0 +1,32 @@
# ***** 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 file://${PACKAGE_DIR}/${GLEW_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GLEW_HASH_TYPE}=${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

@@ -0,0 +1,28 @@
# ***** 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 file://${PACKAGE_DIR}/${GLFW_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GLFW_HASH_TYPE}=${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,13 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(GMMLIB_EXTRA_ARGS
)
ExternalProject_Add(external_gmmlib
URL file://${PACKAGE_DIR}/${GMMLIB_FILE}
URL_HASH ${GMMLIB_HASH_TYPE}=${GMMLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/gmmlib
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmmlib ${DEFAULT_CMAKE_FLAGS} ${GMMLIB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/gmmlib
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GMP_EXTRA_ARGS -enable-cxx)
@@ -22,12 +38,18 @@ elseif(UNIX AND NOT APPLE)
)
endif()
if(BLENDER_PLATFORM_ARM)
set(GMP_OPTIONS
${GMP_OPTIONS}
--disable-assembly
)
endif()
ExternalProject_Add(external_gmp
URL file://${PACKAGE_DIR}/${GMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GMP_HASH_TYPE}=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmp
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/gmp/src/external_gmp < ${PATCH_DIR}/gmp.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make install

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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(HARU_EXTRA_ARGS
-DLIBHPDF_SHARED=OFF

View File

@@ -1,7 +1,23 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 structure as blender prefers
# Copy all generated files to the proper strucure as blender prefers
########################################################################
if(NOT DEFINED HARVEST_TARGET)
@@ -11,194 +27,178 @@ 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}/jpeg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpeg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
DEPENDS
)
endif()
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/
DEPENDS
)
endif()
else()
else(WIN32)
function(harvest from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
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(brotli/include brotli/include "*.h")
harvest(brotli/lib brotli/lib "*.a")
harvest(boost/include boost/include "*")
harvest(boost/lib boost/lib "*.a")
harvest(imath/include imath/include "*.h")
harvest(imath/lib imath/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(epoxy/include epoxy/include "*.h")
harvest(epoxy/lib epoxy/lib "*.a")
harvest(gmp/include gmp/include "*.h")
harvest(gmp/lib gmp/lib "*.a")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpeg/include jpeg/include "*.h")
harvest(jpeg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
if(NOT APPLE)
harvest(level-zero/include/level_zero level-zero/include/level_zero "*.h")
harvest(level-zero/lib level-zero/lib "*.so*")
endif()
harvest(llvm/bin llvm/bin "clang-format")
if(BUILD_CLANG_TOOLS)
harvest(llvm/bin llvm/bin "clang-tidy")
harvest(llvm/share/clang llvm/share "run-clang-tidy.py")
endif()
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(llvm/lib llvm/lib "libclang*.a")
harvest(llvm/lib/clang llvm/lib/clang "*.h")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
if(BLENDER_PLATFORM_ARM)
harvest(sse2neon sse2neon "*.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")
harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml")
harvest(wayland/bin wayland/bin "wayland-scanner")
harvest(wayland/include wayland/include "*.h")
harvest(wayland_libdecor/include wayland_libdecor/include "*.h")
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()
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
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()
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(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
harvest(openpgl/include openpgl/include "*.h")
harvest(openpgl/lib openpgl/lib "*.a")
harvest(openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION} openpgl/lib/cmake/openpgl "*.cmake")
harvest(openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} 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/include/nanovdb openvdb/include/nanovdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(sdl/include/SDL2 sdl/include "*.h")
harvest(sdl/lib sdl/lib "libSDL2.a")
harvest(sndfile/include sndfile/include "*.h")
harvest(sndfile/lib sndfile/lib "*.a")
harvest(spnav/include spnav/include "*.h")
harvest(spnav/lib spnav/lib "*.a")
harvest(tbb/include tbb/include "*.h")
harvest(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(opus/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(aom/lib ffmpeg/lib "*.a")
harvest(webp/lib webp/lib "*.a")
harvest(webp/include webp/include "*.h")
harvest(usd/include usd/include "*.h")
harvest(usd/lib/usd usd/lib/usd "*")
harvest(usd/plugin usd/plugin "*")
harvest(potrace/include potrace/include "*.h")
harvest(potrace/lib potrace/lib "*.a")
harvest(haru/include haru/include "*.h")
harvest(haru/lib haru/lib "*.a")
harvest(zstd/include zstd/include "*.h")
harvest(zstd/lib zstd/lib "*.a")
endfunction()
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*")
harvest(mesa/lib64 mesa/lib "*.so*")
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest(alembic/bin alembic/bin "*")
harvest(boost/include boost/include "*")
harvest(boost/lib boost/lib "*.a")
harvest(ffmpeg/include ffmpeg/include "*.h")
harvest(ffmpeg/lib ffmpeg/lib "*.a")
harvest(fftw3/include fftw3/include "*.h")
harvest(fftw3/lib fftw3/lib "*.a")
harvest(flac/lib sndfile/lib "libFLAC.a")
harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(glew/include glew/include "*.h")
harvest(glew/lib glew/lib "*.a")
harvest(gmp/include gmp/include "*.h")
harvest(gmp/lib gmp/lib "*.a")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(llvm/bin llvm/bin "clang-format")
if(BUILD_CLANG_TOOLS)
harvest(llvm/bin llvm/bin "clang-tidy")
harvest(llvm/share/clang llvm/share "run-clang-tidy.py")
endif()
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(llvm/lib llvm/lib "libclang*.a")
harvest(llvm/lib/clang llvm/lib/clang "*.h")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
if(BLENDER_PLATFORM_ARM)
harvest(sse2neon sse2neon "*.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(dpcpp dpcpp "*")
harvest(igc dpcpp/lib/igc "*")
harvest(ocloc dpcpp/lib/ocloc "*")
endif()
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")
harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml")
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(embree/include embree/include "*.h")
harvest(embree/lib embree/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(nanovdb/nanovdb nanovdb/include/nanovdb "*.h")
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(sdl/include/SDL2 sdl/include "*.h")
harvest(sdl/lib sdl/lib "libSDL2.a")
harvest(sndfile/include sndfile/include "*.h")
harvest(sndfile/lib sndfile/lib "*.a")
harvest(spnav/include spnav/include "*.h")
harvest(spnav/lib spnav/lib "*.a")
harvest(tbb/include tbb/include "*.h")
harvest(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(opus/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(usd/include usd/include "*.h")
harvest(usd/lib/usd usd/lib/usd "*")
harvest(usd/plugin usd/plugin "*")
harvest(potrace/include potrace/include "*.h")
harvest(potrace/lib potrace/lib "*.a")
harvest(haru/include haru/include "*.h")
harvest(haru/lib haru/lib "*.a")
harvest(zstd/include zstd/include "*.h")
harvest(zstd/lib zstd/lib "*.a")
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*")
harvest(mesa/lib64 mesa/lib "*.so*")
endif()
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)

View File

@@ -1,126 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
unpack_only(igc_vcintrinsics)
unpack_only(igc_spirv_headers)
unpack_only(igc_spirv_tools)
#
# igc_opencl_clang contains patches that need to be applied
# to external_igc_llvm and igc_spirv_translator, we unpack
# igc_opencl_clang first, then have the patch stages of
# external_igc_llvm and igc_spirv_translator apply them.
#
ExternalProject_Add(external_igc_opencl_clang
URL file://${PACKAGE_DIR}/${IGC_OPENCL_CLANG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${IGC_OPENCL_CLANG_HASH_TYPE}=${IGC_OPENCL_CLANG_HASH}
PREFIX ${BUILD_DIR}/igc_opencl_clang
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/igc_opencl_clang/src/external_igc_opencl_clang/ < ${PATCH_DIR}/igc_opencl_clang.diff
)
set(IGC_OPENCL_CLANG_PATCH_DIR ${BUILD_DIR}/igc_opencl_clang/src/external_igc_opencl_clang/patches)
set(IGC_LLVM_SOURCE_DIR ${BUILD_DIR}/igc_llvm/src/external_igc_llvm)
set(IGC_SPIRV_TRANSLATOR_SOURCE_DIR ${BUILD_DIR}/igc_spirv_translator/src/external_igc_spirv_translator)
ExternalProject_Add(external_igc_llvm
URL file://${PACKAGE_DIR}/${IGC_LLVM_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${IGC_LLVM_HASH_TYPE}=${IGC_LLVM_HASH}
PREFIX ${BUILD_DIR}/igc_llvm
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0001-OpenCL-3.0-support.patch &&
${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0002-Remove-__IMAGE_SUPPORT__-macro-for-SPIR.patch &&
${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0003-Avoid-calling-ParseCommandLineOptions-in-BackendUtil.patch &&
${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0004-OpenCL-support-cl_ext_float_atomics.patch &&
${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/clang/0005-OpenCL-Add-cl_khr_integer_dot_product.patch &&
${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/llvm/0001-Memory-leak-fix-for-Managed-Static-Mutex.patch &&
${PATCH_CMD} -p 1 -d ${IGC_LLVM_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/llvm/0002-Remove-repo-name-in-LLVM-IR.patch
)
add_dependencies(
external_igc_llvm
external_igc_opencl_clang
)
ExternalProject_Add(external_igc_spirv_translator
URL file://${PACKAGE_DIR}/${IGC_SPIRV_TRANSLATOR_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${IGC_SPIRV_TRANSLATOR_HASH_TYPE}=${IGC_SPIRV_TRANSLATOR_HASH}
PREFIX ${BUILD_DIR}/igc_spirv_translator
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${IGC_SPIRV_TRANSLATOR_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/spirv/0001-update-SPIR-V-headers-for-SPV_INTEL_split_barrier.patch &&
${PATCH_CMD} -p 1 -d ${IGC_SPIRV_TRANSLATOR_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/spirv/0002-Add-support-for-split-barriers-extension-SPV_INTEL_s.patch &&
${PATCH_CMD} -p 1 -d ${IGC_SPIRV_TRANSLATOR_SOURCE_DIR} < ${IGC_OPENCL_CLANG_PATCH_DIR}/spirv/0003-Support-cl_bf16_conversions.patch
)
add_dependencies(
external_igc_spirv_translator
external_igc_opencl_clang
)
if(WIN32)
set(IGC_GENERATOR "Ninja")
set(IGC_TARGET Windows64)
else()
set(IGC_GENERATOR "Unix Makefiles")
set(IGC_TARGET Linux64)
endif()
set(IGC_EXTRA_ARGS
-DIGC_OPTION__ARCHITECTURE_TARGET=${IGC_TARGET}
-DIGC_OPTION__ARCHITECTURE_HOST=${IGC_TARGET}
)
if(UNIX AND NOT APPLE)
list(APPEND IGC_EXTRA_ARGS
-DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex
-DFLEX_INCLUDE_DIR=${LIBDIR}/flex/include
)
endif()
ExternalProject_Add(external_igc
URL file://${PACKAGE_DIR}/${IGC_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${IGC_HASH_TYPE}=${IGC_HASH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/igc ${DEFAULT_CMAKE_FLAGS} ${IGC_EXTRA_ARGS}
# IGC is pretty set in its way where sub projects ought to live, for some it offers
# hooks to supply alternatives folders, other are just hardocded with no way to configure
# we symlink everything here, since it's less work than trying to convince the cmake
# scripts to accept alternative locations.
#
PATCH_COMMAND ${CMAKE_COMMAND} -E create_symlink ${BUILD_DIR}/igc_llvm/src/external_igc_llvm/ ${BUILD_DIR}/igc/src/llvm-project &&
${CMAKE_COMMAND} -E create_symlink ${BUILD_DIR}/igc_opencl_clang/src/external_igc_opencl_clang/ ${BUILD_DIR}/igc/src/llvm-project/llvm/projects/opencl-clang &&
${CMAKE_COMMAND} -E create_symlink ${BUILD_DIR}/igc_spirv_translator/src/external_igc_spirv_translator/ ${BUILD_DIR}/igc/src/llvm-project/llvm/projects/llvm-spirv &&
${CMAKE_COMMAND} -E create_symlink ${BUILD_DIR}/igc_spirv_tools/src/external_igc_spirv_tools/ ${BUILD_DIR}/igc/src/SPIRV-Tools &&
${CMAKE_COMMAND} -E create_symlink ${BUILD_DIR}/igc_spirv_headers/src/external_igc_spirv_headers/ ${BUILD_DIR}/igc/src/SPIRV-Headers &&
${CMAKE_COMMAND} -E create_symlink ${BUILD_DIR}/igc_vcintrinsics/src/external_igc_vcintrinsics/ ${BUILD_DIR}/igc/src/vc-intrinsics
PREFIX ${BUILD_DIR}/igc
INSTALL_DIR ${LIBDIR}/igc
INSTALL_COMMAND ${CMAKE_COMMAND} --install . --strip
CMAKE_GENERATOR ${IGC_GENERATOR}
)
add_dependencies(
external_igc
external_igc_vcintrinsics
external_igc_llvm
external_igc_opencl_clang
external_igc_vcintrinsics
external_igc_spirv_headers
external_igc_spirv_tools
external_igc_spirv_translator
)
if(UNIX AND NOT APPLE)
add_dependencies(
external_igc
external_flex
)
endif()

View File

@@ -1,24 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(IMATH_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DBUILD_TESTING=OFF
-DIMATH_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
)
ExternalProject_Add(external_imath
URL file://${PACKAGE_DIR}/${IMATH_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${IMATH_HASH_TYPE}=${IMATH_HASH}
PREFIX ${BUILD_DIR}/imath
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/imath ${DEFAULT_CMAKE_FLAGS} ${IMATH_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/imath
)
if(WIN32)
ExternalProject_Add_Step(external_imath after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/imath/lib ${HARVEST_TARGET}/imath/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/imath/include ${HARVEST_TARGET}/imath/include
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ISPC_EXTRA_ARGS_WIN
@@ -6,7 +22,6 @@ if(WIN32)
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
-DARM_ENABLED=Off
-DPython3_FIND_REGISTRY=NEVER
)
elseif(APPLE)
# Use bison and flex installed via Homebrew.
@@ -28,7 +43,7 @@ elseif(UNIX)
set(ISPC_EXTRA_ARGS_UNIX
-DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang
-DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++
-DARM_ENABLED=${BLENDER_PLATFORM_ARM}
-DARM_ENABLED=Off
-DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex
)
endif()
@@ -44,8 +59,6 @@ set(ISPC_EXTRA_ARGS
-DISPC_INCLUDE_TESTS=Off
-DCLANG_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_INCLUDE_DIRS=${LIBDIR}/llvm/include
-DPython3_ROOT_DIR=${LIBDIR}/python/
-DPython3_EXECUTABLE=${PYTHON_BINARY}
${ISPC_EXTRA_ARGS_WIN}
${ISPC_EXTRA_ARGS_APPLE}
${ISPC_EXTRA_ARGS_UNIX}
@@ -64,7 +77,6 @@ ExternalProject_Add(external_ispc
add_dependencies(
external_ispc
ll
external_python
)
if(WIN32)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 file://${PACKAGE_DIR}/${JEMALLOC_FILE}

View File

@@ -1,53 +1,61 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 MS-Windows.
set(JPEG_EXTRA_ARGS
-DNASM=${NASM_PATH}
-DWITH_JPEG8=ON
-DCMAKE_DEBUG_POSTFIX=d
-DWITH_CRT_DLL=On
-DENABLE_SHARED=OFF
-DENABLE_STATIC=ON
)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpeg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpeg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpeg
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()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpeg/lib/${JPEG_LIBRARY} ${LIBDIR}/jpeg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
else()
# CMAKE for UNIX.
else(WIN32)
# cmake for unix
set(JPEG_EXTRA_ARGS
-DWITH_JPEG8=ON
-DENABLE_STATIC=ON
-DENABLE_SHARED=OFF
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpeg/lib)
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpg/lib)
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpeg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpeg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpeg
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})

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)

View File

@@ -1,21 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(LEVEL_ZERO_EXTRA_ARGS
)
ExternalProject_Add(external_level-zero
URL file://${PACKAGE_DIR}/${LEVEL_ZERO_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LEVEL_ZERO_HASH_TYPE}=${LEVEL_ZERO_HASH}
PREFIX ${BUILD_DIR}/level-zero
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/level-zero/src/external_level-zero < ${PATCH_DIR}/level-zero.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/level-zero ${DEFAULT_CMAKE_FLAGS} ${LEVEL_ZERO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/level-zero
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_level-zero after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/level-zero ${HARVEST_TARGET}/level-zero
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LIBGLU_CFLAGS "-static-libgcc")
set(LIBGLU_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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(BLENDER_PLATFORM_ARM)
set(LLVM_TARGETS AArch64$<SEMICOLON>ARM)
@@ -9,7 +25,6 @@ endif()
if(APPLE)
set(LLVM_XML2_ARGS
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
)
set(LLVM_BUILD_CLANG_TOOLS_EXTRA ^^clang-tools-extra)
set(BUILD_CLANG_TOOLS ON)
@@ -26,14 +41,11 @@ set(LLVM_EXTRA_ARGS
-DLLVM_BUILD_LLVM_C_DYLIB=OFF
-DLLVM_ENABLE_UNWIND_TABLES=OFF
-DLLVM_ENABLE_PROJECTS=clang${LLVM_BUILD_CLANG_TOOLS_EXTRA}
-DPython3_ROOT_DIR=${LIBDIR}/python/
-DPython3_EXECUTABLE=${PYTHON_BINARY}
${LLVM_XML2_ARGS}
)
if(WIN32)
set(LLVM_GENERATOR "Ninja")
list(APPEND LLVM_EXTRA_ARGS -DPython3_FIND_REGISTRY=NEVER)
else()
set(LLVM_GENERATOR "Unix Makefiles")
endif()
@@ -78,8 +90,3 @@ if(APPLE)
external_xml2
)
endif()
add_dependencies(
ll
external_python
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 .)

View File

@@ -1,18 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# shorthand to only unpack a certain dependency
macro(unpack_only name)
string(TOUPPER ${name} UPPER_NAME)
set(TARGET_FILE ${${UPPER_NAME}_FILE})
set(TARGET_HASH_TYPE ${${UPPER_NAME}_HASH_TYPE})
set(TARGET_HASH ${${UPPER_NAME}_HASH})
ExternalProject_Add(external_${name}
URL file://${PACKAGE_DIR}/${TARGET_FILE}
URL_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/${name}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND echo .
)
endmacro()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(MESA_CFLAGS "-static-libgcc")
set(MESA_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")

View File

@@ -0,0 +1,54 @@
# ***** 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(NANOVDB_EXTRA_ARGS
# NanoVDB is header-only, so only need the install target
-DNANOVDB_BUILD_UNITTESTS=OFF
-DNANOVDB_BUILD_EXAMPLES=OFF
-DNANOVDB_BUILD_BENCHMARK=OFF
-DNANOVDB_BUILD_DOCS=OFF
-DNANOVDB_BUILD_TOOLS=OFF
-DNANOVDB_CUDA_KEEP_PTX=OFF
# Do not need to include any of the dependencies because of this
-DNANOVDB_USE_OPENVDB=OFF
-DNANOVDB_USE_OPENGL=OFF
-DNANOVDB_USE_OPENCL=OFF
-DNANOVDB_USE_CUDA=OFF
-DNANOVDB_USE_TBB=OFF
-DNANOVDB_USE_BLOSC=OFF
-DNANOVDB_USE_ZLIB=OFF
-DNANOVDB_USE_OPTIX=OFF
-DNANOVDB_ALLOW_FETCHCONTENT=OFF
)
ExternalProject_Add(nanovdb
URL file://${PACKAGE_DIR}/${NANOVDB_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NANOVDB_HASH_TYPE}=${NANOVDB_HASH}
PREFIX ${BUILD_DIR}/nanovdb
SOURCE_SUBDIR nanovdb
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanovdb ${DEFAULT_CMAKE_FLAGS} ${NANOVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/nanovdb
)
if(WIN32)
ExternalProject_Add_Step(nanovdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/nanovdb/nanovdb ${HARVEST_TARGET}/nanovdb/include/nanovdb
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_nasm
URL file://${PACKAGE_DIR}/${NASM_FILE}

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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}<")
@@ -22,6 +38,7 @@ ExternalProject_Add(external_numpy
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ""

View File

@@ -1,24 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(OCLOC_EXTRA_ARGS
-DNEO_SKIP_UNIT_TESTS=1
-DNEO_BUILD_WITH_OCL=0
-DBUILD_WITH_L0=0
-DIGC_DIR=${LIBDIR}/igc
-DGMM_DIR=${LIBDIR}/gmmlib
)
ExternalProject_Add(external_ocloc
URL file://${PACKAGE_DIR}/${OCLOC_FILE}
URL_HASH ${OCLOC_HASH_TYPE}=${OCLOC_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ocloc
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ocloc ${DEFAULT_CMAKE_FLAGS} ${OCLOC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/ocloc
)
add_dependencies(
external_ocloc
external_igc
external_gmmlib
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 file://${PACKAGE_DIR}/${OGG_FILE}

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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

View File

@@ -1,32 +1,25 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)
# WARNING: the patch contains mixed UNIX and DOS line endings
# as does the OPENCOLLADA package, if this can be corrected upstream that would be better.
# For now use `sed` to force UNIX line endings so the patch applies.
# Needed as neither ignoring white-space or applying as a binary resolve this problem.
set(PATCH_MAYBE_DOS2UNIX_CMD
sed -i "s/\\r//"
${PATCH_DIR}/opencollada.diff
${BUILD_DIR}/opencollada/src/external_opencollada/CMakeLists.txt
${BUILD_DIR}/opencollada/src/external_opencollada/Externals/LibXML/CMakeLists.txt &&
)
else()
set(OPENCOLLADA_EXTRA_ARGS
-DCMAKE_DEBUG_POSTFIX=_d
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
)
if(BUILD_MODE STREQUAL Release)
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2s.lib)
else()
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2sd.lib)
endif()
set(PATCH_MAYBE_DOS2UNIX_CMD)
endif()
ExternalProject_Add(external_opencollada
@@ -34,19 +27,17 @@ ExternalProject_Add(external_opencollada
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENCOLLADA_HASH_TYPE}=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND
${PATCH_MAYBE_DOS2UNIX_CMD}
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
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
)
unset(PATCH_MAYBE_DOS2UNIX_CMD)
add_dependencies(
external_opencollada
external_xml2
)
if(UNIX)
add_dependencies(
external_opencollada
external_xml2
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
@@ -57,7 +48,17 @@ if(WIN32)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/lib ${HARVEST_TARGET}/opencollada/lib
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()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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
@@ -11,12 +27,13 @@ set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_BUILD_GPU_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INSTALL_EXT_PACKAGES=NONE
# Manually build ext packages except for pystring, which does not have
# a CMake or autotools build system that we can easily use.
-DOCIO_INSTALL_EXT_PACKAGES=MISSING
-DHalf_ROOT=${LIBDIR}/openexr
-DHalf_STATIC_LIBRARY=ON
-Dexpat_ROOT=${LIBDIR}/expat
-Dyaml-cpp_ROOT=${LIBDIR}/yamlcpp
-Dpystring_ROOT=${LIBDIR}/pystring
-DImath_ROOT=${LIBDIR}/imath
)
if(BLENDER_PLATFORM_ARM)
@@ -29,9 +46,7 @@ endif()
if(WIN32)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-Dexpat_LIBRARY=${LIBDIR}/expat/lib/libexpatMD
-Dyaml-cpp_LIBRARY=${LIBDIR}/expat/lib/libyaml-cppmd.lib
-DImath_LIBRARY=${LIBDIR}/imath/lib/imath${OPENEXR_VERSION_POSTFIX}
-DOCIO_INLINES_HIDDEN=OFF
)
else()
set(OPENCOLORIO_EXTRA_ARGS
@@ -53,8 +68,7 @@ add_dependencies(
external_opencolorio
external_yamlcpp
external_expat
external_imath
external_pystring
external_openexr
)
if(WIN32)
@@ -64,7 +78,7 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatMD.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pystring/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring.lib
DEPENDEES install
)
endif()
@@ -73,7 +87,7 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmdd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatdMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatdMD.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pystring/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring_d.lib
DEPENDEES install
)
endif()
@@ -81,7 +95,7 @@ else()
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND cp ${LIBDIR}/yamlcpp/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/
COMMAND cp ${LIBDIR}/expat/lib/libexpat.a ${LIBDIR}/opencolorio/lib/
COMMAND cp ${LIBDIR}/pystring/lib/libpystring.a ${LIBDIR}/opencolorio/lib/
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libpystring.a ${LIBDIR}/opencolorio/lib/
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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}")
@@ -16,10 +32,12 @@ set(OPENEXR_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBUILD_TESTING=OFF
-DOPENEXR_BUILD_BOTH_STATIC_SHARED=OFF
-DILMBASE_BUILD_BOTH_STATIC_SHARED=OFF
-DBUILD_SHARED_LIBS=OFF
-DOPENEXR_INSTALL_TOOLS=OFF
-DOPENEXR_INSTALL_EXAMPLES=OFF
-DImath_DIR=${LIBDIR}/imath/lib/cmake/Imath
-DOPENEXR_BUILD_UTILS=OFF
-DPYILMBASE_ENABLE=OFF
-DOPENEXR_VIEWERS_ENABLE=OFF
-DILMBASE_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
-DOPENEXR_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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
@@ -8,8 +24,6 @@ set(OIDN_EXTRA_ARGS
-DOIDN_STATIC_LIB=ON
-DOIDN_STATIC_RUNTIME=OFF
-DISPC_EXECUTABLE=${LIBDIR}/ispc/bin/ispc
-DOIDN_FILTER_RTLIGHTMAP=OFF
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
)
if(WIN32)
@@ -39,7 +53,6 @@ add_dependencies(
external_openimagedenoise
external_tbb
external_ispc
external_python
)
if(WIN32)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)
@@ -18,31 +34,40 @@ if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
set(OPENJPEG_POSTFIX _msvc)
if(BUILD_MODE STREQUAL Debug)
set(TIFF_POSTFIX d)
else()
set(TIFF_POSTFIX)
endif()
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
set(TIFF_POSTFIX)
endif()
if(WITH_WEBP)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOpenJPEG_ROOT=${LIBDIR}/openjpeg_msvc
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg_msvc
)
else()
set(OPENJPEG_FLAGS
-DOpenJPEG_ROOT=${LIBDIR}/openjpeg
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
${OPENIMAGEIO_LINKSTATIC}
${DEFAULT_BOOST_FLAGS}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DUSE_LIBSQUISH=OFF
-DUSE_QT5=OFF
-DUSE_NUKE=OFF
@@ -53,6 +78,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_LIBHEIF=OFF
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
@@ -63,7 +89,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_OPENCOLORIO=OFF
-DUSE_WEBP=ON
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
@@ -71,11 +97,16 @@ set(OPENIMAGEIO_EXTRA_ARGS
-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${TIFF_POSTFIX}${LIBEXT}
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpeg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpeg/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOpenEXR_USE_STATIC_LIBS=On
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
@@ -83,14 +114,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_EXTERNAL_PUGIXML=ON
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
-DBUILD_MISSING_ROBINMAP=OFF
-DBUILD_MISSING_FMT=OFF
-DFMT_INCLUDE_DIR=${LIBDIR}/fmt/include/
-DRobinmap_ROOT=${LIBDIR}/robinmap
-DWebP_ROOT=${LIBDIR}/webp
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
-DOpenEXR_ROOT=${LIBDIR}/openexr
-DImath_ROOT=${LIBDIR}/imath
)
ExternalProject_Add(external_openimageio
@@ -108,15 +133,12 @@ add_dependencies(
external_png
external_zlib
external_openexr
external_imath
external_jpeg
external_boost
external_tiff
external_pugixml
external_fmt
external_robinmap
external_openjpeg${OPENJPEG_POSTFIX}
external_webp
${WEBP_DEP}
)
if(WIN32)
@@ -131,8 +153,8 @@ if(WIN32)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_d.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util_d.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib
DEPENDEES install
)
endif()

View File

@@ -1,26 +1,38 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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()
set(OPENJPEG_EXTRA_ARGS
${OPENJPEG_EXTRA_ARGS}
-DBUILD_SHARED_LIBS=OFF
-DBUILD_CODEC=OFF
)
ExternalProject_Add(external_openjpeg
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENJPEG_HASH_TYPE}=${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 ${BUILD_DIR}/openjpeg/src/external_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

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(APPLE)
set(OPENMP_PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openmp/src/external_openmp < ${PATCH_DIR}/openmp.diff)

View File

@@ -1,47 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# 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(OPENPGL_EXTRA_ARGS
-DOPENPGL_BUILD_STATIC=ON
-DOPENPGL_TBB_ROOT=${LIBDIR}/tbb
-DTBB_ROOT=${LIBDIR}/tbb
-DCMAKE_DEBUG_POSTFIX=_d
)
if(TBB_STATIC_LIBRARY)
set(OPENPGL_EXTRA_ARGS
${OPENPGL_EXTRA_ARGS}
-DOPENPGL_TBB_COMPONENT=tbb_static
)
endif()
ExternalProject_Add(external_openpgl
URL file://${PACKAGE_DIR}/${OPENPGL_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENPGL_HASH_TYPE}=${OPENPGL_HASH}
PREFIX ${BUILD_DIR}/openpgl
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openpgl ${DEFAULT_CMAKE_FLAGS} ${OPENPGL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openpgl
)
add_dependencies(
external_openpgl
external_tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openpgl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openpgl ${HARVEST_TARGET}/openpgl
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_openpgl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openpgl/lib/openpgl_d.lib ${HARVEST_TARGET}/openpgl/lib/openpgl_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION}/openpgl_Exports-debug.cmake ${HARVEST_TARGET}/openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION}/openpgl_Exports-debug.cmake
DEPENDEES install
)
endif()
endif()

View File

@@ -1,25 +1,35 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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_LIB=OFF
-DNO_EXAMPLES=ON
-DNO_TUTORIALS=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_OMP=ON
-DNO_TBB=OFF
-DNO_CUDA=ON
-DNO_OPENCL=ON
-DNO_CLEW=ON
-DNO_OPENGL=OFF
-DNO_METAL=OFF
-DNO_DX=ON
-DNO_TESTS=ON
-DNO_GLTESTS=ON
-DNO_GLEW=ON
-DNO_GLFW=ON
-DNO_GLFW_X11=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)
@@ -27,12 +37,30 @@ if(WIN32)
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=OFF
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
)
endif()
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-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()
@@ -64,5 +92,9 @@ endif()
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)
@@ -13,7 +29,6 @@ else()
endif()
set(OPENVDB_EXTRA_ARGS
${DEFAULT_BOOST_FLAGS}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
@@ -25,20 +40,22 @@ set(OPENVDB_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBlosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DBlosc_LIBRARY_RELEASE=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DBlosc_LIBRARY_DEBUG=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DOPENVDB_BUILD_UNITTESTS=OFF
-DOPENVDB_BUILD_PYTHON_MODULE=OFF
-DOPENVDB_BUILD_NANOVDB=ON
-DNANOVDB_BUILD_TOOLS=OFF
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DOPENVDB_BUILD_UNITTESTS=Off
-DOPENVDB_BUILD_PYTHON_MODULE=Off
-DBlosc_ROOT=${LIBDIR}/blosc/
-DTBB_ROOT=${LIBDIR}/tbb/
-DOpenEXR_ROOT=${LIBDIR}/openexr
-DIlmBase_ROOT=${LIBDIR}/openexr
-DOPENEXR_LIBRARYDIR=${LIBDIR}/openexr/lib
# All libs live in openexr, even the ilmbase ones
-DILMBASE_LIBRARYDIR=${LIBDIR}/openexr/lib
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
-DOPENVDB_BUILD_BINARIES=OFF
-DOPENVDB_BUILD_BINARIES=Off
-DCMAKE_DEBUG_POSTFIX=_d
-DBLOSC_USE_STATIC_LIBS=ON
-DUSE_NANOVDB=ON
-DILMBASE_USE_STATIC_LIBS=On
-DOPENEXR_USE_STATIC_LIBS=On
)
if(WIN32)
@@ -47,6 +64,15 @@ if(WIN32)
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DCMAKE_CXX_STANDARD_LIBRARIES="${LIBDIR}/pthreads/lib/pthreadVC3.lib"
-DUSE_EXR=On
)
else()
# OpenVDB can't find the _static libraries automatically.
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DTbb_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_tbbmalloc_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbbmalloc_static${LIBEXT}
-DTbb_tbbmalloc_proxy_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbbmalloc_proxy_static${LIBEXT}
)
endif()
@@ -64,6 +90,7 @@ add_dependencies(
openvdb
external_tbb
external_boost
external_openexr
external_zlib
external_blosc
)
@@ -71,7 +98,7 @@ add_dependencies(
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_directory ${LIBDIR}/openvdb/include/openvdb ${HARVEST_TARGET}/openvdb/include/openvdb
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
DEPENDEES install

View File

@@ -1,9 +1,25 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
endif()
option(FORCE_CHECK_HASH "Force a check of all hashses during CMake the configure phase" OFF)
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
cmake_host_system_information(RESULT NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
set(MAKE_THREADS ${NUM_CORES} CACHE STRING "Number of threads to run make with")
@@ -16,14 +32,14 @@ message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
else()
else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
set(DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads" CACHE STRING "Path for downloaded files")
set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages" CACHE PATH "default path for downloaded packages")
option(PACKAGE_USE_UPSTREAM_SOURCES "Use sources upstream to download the package sources, when OFF the blender mirror will be used" ON)
# This path must be hard-coded like this, so that the GNUmakefile knows where it is and can pass it to make_source_archive.py:
set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages")
option(PACKAGE_USE_UPSTREAM_SOURCES "Use soures upstream to download the package sources, when OFF the blender mirror will be used" ON)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
file(TO_CMAKE_PATH ${PACKAGE_DIR} PACKAGE_DIR)
@@ -39,33 +55,32 @@ message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
set(LIBEXT ".lib")
set(SHAREDLIBEXT ".lib")
set(LIBPREFIX "")
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
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()
string(APPEND COMMON_MSVC_FLAGS " /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MD ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MD ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MD /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MD /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
@@ -98,20 +113,37 @@ if(WIN32)
else()
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(SHAREDLIBEXT ".so")
set(LIBPREFIX "lib")
if(APPLE)
# Use same Xcode detection as Blender itself.
include(../cmake/platform/platform_apple_xcode.cmake)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND xcodebuild -version -sdk macosx SDKVersion
OUTPUT_VARIABLE MACOSX_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT CMAKE_OSX_ARCHITECTURES)
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Detected native architecture ${ARCHITECTURE}.")
set(CMAKE_OSX_ARCHITECTURES "${ARCHITECTURE}")
endif()
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(OSX_DEPLOYMENT_TARGET 10.13)
else()
set(OSX_DEPLOYMENT_TARGET 11.00)
endif()
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(BLENDER_PLATFORM_ARM ON)
endif()
set(PLATFORM_CFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_CXXFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_LDFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin17.0.0) # OS X 10.13
else()
@@ -119,8 +151,8 @@ else()
endif()
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
@@ -154,8 +186,8 @@ else()
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} &&
export MACOSX_SDK_VERSION=${CMAKE_OSX_DEPLOYMENT_TARGET} &&
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export MACOSX_SDK_VERSION=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_opus
URL file://${PACKAGE_DIR}/${OPUS_FILE}

View File

@@ -1,17 +1,51 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
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}/jpeg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
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}")
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/openexr/lib/Imath${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Half{OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/IlmThread${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Iex${OPENEXR_VERSION_POSTFIX}.lib")
set(OSL_EXTRA_ARGS
${DEFAULT_BOOST_FLAGS}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DOpenEXR_ROOT=${LIBDIR}/openexr/
-DIlmBase_ROOT=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOpenImageIO_ROOT=${LIBDIR}/openimageio/
-DOSL_BUILD_TESTS=OFF
-DOSL_BUILD_MATERIALX=OFF
@@ -31,12 +65,10 @@ set(OSL_EXTRA_ARGS
-DUSE_QT=OFF
-DUSE_Qt5=OFF
-DINSTALL_DOCS=OFF
${OSL_SIMD_FLAGS}
-Dpugixml_ROOT=${LIBDIR}/pugixml
-DTIFF_ROOT=${LIBDIR}/tiff
-DJPEG_ROOT=${LIBDIR}/jpeg
-DUSE_PYTHON=OFF
-DCMAKE_CXX_STANDARD=14
-DImath_ROOT=${LIBDIR}/imath
)
ExternalProject_Add(external_osl
@@ -83,7 +115,6 @@ if(WIN32)
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
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslnoise.lib ${HARVEST_TARGET}/osl/lib/oslnoise_d.lib
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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})
@@ -8,7 +24,7 @@ if(MSVC)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should output at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
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
@@ -27,7 +43,7 @@ if(MSVC)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should output at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
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

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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}
@@ -24,14 +40,6 @@ add_dependencies(
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static${LIBEXT} ${HARVEST_TARGET}/png/lib/libpng${LIBEXT}
DEPENDEES install
)
endif()
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}

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(POTRACE_EXTRA_ARGS
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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
)

View File

@@ -1,22 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(PYSTRING_EXTRA_ARGS
)
ExternalProject_Add(external_pystring
URL file://${PACKAGE_DIR}/${PYSTRING_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYSTRING_HASH_TYPE}=${PYSTRING_HASH}
PREFIX ${BUILD_DIR}/pystring
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_pystring.txt ${BUILD_DIR}/pystring/src/external_pystring/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pystring ${DEFAULT_CMAKE_FLAGS} ${PYSTRING_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pystring
)
if(WIN32)
ExternalProject_Add_Step(external_pystring after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pystring/lib ${HARVEST_TARGET}/pystring/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pystring/include ${HARVEST_TARGET}/pystring/include
DEPENDEES install
)
endif()

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)
@@ -15,11 +31,9 @@ if(WIN32)
endmacro()
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(ZLIB_SOURCE_FOLDER ${BUILD_DIR}/zlib/src/external_zlib)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${ZLIB_SOURCE_FOLDER} ZLIB_SOURCE_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
ExternalProject_Add(external_python
@@ -27,21 +41,11 @@ if(WIN32)
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYTHON_HASH_TYPE}=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
# Python will download its own deps and there's very little we can do about
# that beyond placing some code in their externals dir before it tries.
# the foldernames *HAVE* to match the ones inside pythons get_externals.cmd.
# python 3.10.8 still ships zlib 1.2.12, replace it with our 1.2.13
# copy until they update.
CONFIGURE_COMMAND mkdir ${PYTHON_EXTERNALS_FOLDER_DOS} &&
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.12 ${ZLIB_SOURCE_FOLDER_DOS} &&
${CMAKE_COMMAND} -E copy ${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h ${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.12/zconf.h
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
add_dependencies(
external_python
external_zlib
)
else()
if(APPLE)
# Disable functions that can be in 10.13 sdk but aren't available on 10.9 target.

View File

@@ -1,21 +1,31 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 AND BUILD_MODE STREQUAL Debug)
set(SITE_PACKAGES_EXTRA --global-option build --global-option --debug)
# zstandard is determined to build and link release mode libs in a debug
# configuration, the only way to make it happy is to bend to its will
# and give it a library to link with.
set(PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib)
else()
set(PIP_CONFIGURE_COMMAND echo ".")
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} autopep8==${AUTOPEP8_VERSION} pycodestyle==${PYCODESTYLE_VERSION} toml==${TOML_VERSION} --no-binary :all:
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
)
if(USE_PIP_NUMPY)

View File

@@ -1,13 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(ROBINMAP_EXTRA_ARGS
)
ExternalProject_Add(external_robinmap
URL file://${PACKAGE_DIR}/${ROBINMAP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ROBINMAP_HASH_TYPE}=${ROBINMAP_HASH}
PREFIX ${BUILD_DIR}/robinmap
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/robinmap ${DEFAULT_CMAKE_FLAGS} ${ROBINMAP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/robinmap
)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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

View File

@@ -1,10 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
##################################################################################################
####################################################################################################################
# Mingw64 Builds
##################################################################################################
####################################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3
##################################################################################################
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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})
@@ -11,11 +27,18 @@ 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 file://${PACKAGE_DIR}/${SNDFILE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SNDFILE_HASH_TYPE}=${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

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 file://${PACKAGE_DIR}/${SPNAV_FILE}

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)
@@ -48,6 +64,7 @@ ExternalProject_Add(external_sqlite
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SQLITE_HASH_TYPE}=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/sqlite/src/external_sqlite < ${PATCH_DIR}/sqlite.diff
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install

View File

@@ -1,9 +1,25 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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_sse2neon
URL file://${PACKAGE_DIR}/${SSE2NEON_FILE}
GIT_REPOSITORY ${SSE2NEON_GIT}
GIT_TAG ${SSE2NEON_GIT_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SSE2NEON_HASH_TYPE}=${SSE2NEON_HASH}
PREFIX ${BUILD_DIR}/sse2neon
CONFIGURE_COMMAND echo sse2neon - Nothing to configure
BUILD_COMMAND echo sse2neon - nothing to build

View File

@@ -1,11 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
set(SSL_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/ssl/src/external_ssl < ${PATCH_DIR}/ssl.diff)
else()
if(BLENDER_PLATFORM_ARM)
set(SSL_OS_COMPILER "blender-linux-aarch64")

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=On

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)

View File

@@ -1,16 +1,36 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WITH_WEBP)
set(WITH_TIFF_WEBP ON)
else()
set(WITH_TIFF_WEBP OFF)
endif()
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DJPEG_LIBRARY=${LIBDIR}/jpeg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpeg/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
-Dzstd=OFF
-Dwebp=OFF
-Dwebp=${WITH_TIFF_WEBP}
)
ExternalProject_Add(external_tiff
@@ -25,14 +45,11 @@ ExternalProject_Add(external_tiff
add_dependencies(
external_tiff
external_zlib
external_jpeg
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${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/
DEPENDEES install
)
endif()
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,73 +1,55 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
# OIIO and OSL are statically linked for us, but USD doesn't know
set(USD_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DOIIO_STATIC_DEFINE /DOSL_STATIC_DEFINE")
if(BUILD_MODE STREQUAL Debug)
# USD does not look for debug libs, nor does it link them
# when building static, so this is just to keep find_package happy
# if we ever link dynamically on windows util will need to be linked as well.
set(USD_OIIO_CMAKE_DEFINES "-DOIIO_LIBRARIES=${LIBDIR}/openimageio/lib/OpenImageIO_d${LIBEXT}")
endif()
set(USD_PLATFORM_FLAGS
${USD_OIIO_CMAKE_DEFINES}
-DCMAKE_CXX_FLAGS=${USD_CXX_FLAGS}
)
endif()
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(USD_EXTRA_ARGS
${DEFAULT_BOOST_FLAGS}
${USD_PLATFORM_FLAGS}
# This is a preventative measure that avoids possible conflicts when add-ons
# try to load another USD library into the same process space.
-DPXR_SET_INTERNAL_NAMESPACE=usdBlender
-DOPENSUBDIV_ROOT_DIR=${LIBDIR}/opensubdiv
-DOpenImageIO_ROOT=${LIBDIR}/openimageio
-DOPENEXR_LIBRARIES=${LIBDIR}/imath/lib/imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/imath/include
-DPXR_ENABLE_PYTHON_SUPPORT=OFF
-DPXR_BUILD_IMAGING=ON
-DPXR_BUILD_TESTS=OFF
-DPXR_BUILD_EXAMPLES=OFF
-DPXR_BUILD_TUTORIALS=OFF
-DPXR_ENABLE_HDF5_SUPPORT=OFF
-DPXR_ENABLE_MATERIALX_SUPPORT=OFF
-DPXR_ENABLE_OPENVDB_SUPPORT=OFF
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
-DPXR_BUILD_MONOLITHIC=ON
# OSL is an optional dependency of the Imaging module. However, since that
# module was included for its support for converting primitive shapes (sphere,
# cube, etc.) to geometry, it's not necessary. Disabling it will make it
# simpler to build Blender; currently only Cycles uses OSL.
-DPXR_ENABLE_OSL_SUPPORT=OFF
# GL support on Linux also links to X11 libraries. Enabling it would break
# headless or Wayland-only builds. OpenGL support would be useful if someone
# wants to work on a Hydra viewport in Blender; when that's actually being
# worked on, we could patch in a new PXR_ENABLE_X11_SUPPORT option (to
# separate OpenGL from X11) and contribute it upstream.
-DPXR_ENABLE_GL_SUPPORT=OFF
# Disable Metal since USD fails to build this when OpenGL is disabled.
-DPXR_ENABLE_METAL_SUPPORT=OFF
# OIIO is used for loading image textures in Hydra Storm / Embree renderers,
# which we don't use.
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF
# USD 22.03 does not support OCIO 2.x
# Tracking ticket https://github.com/PixarAnimationStudios/USD/issues/1386
-DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF
-DPXR_ENABLE_PTEX_SUPPORT=OFF
-DPXR_BUILD_USD_TOOLS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DBUILD_SHARED_LIBS=Off
# USD is hellbound on making a shared library,
# unless you point this variable to a valid CMAKE file doesn't have to make sense,
# but as long as it points somewhere valid it will skip the shared library.
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
# USD wants the tbb debug lib set even when you are doing a release build
# Otherwise it will error out during the cmake configure phase.
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
# This is a preventative measure that avoids possible conflicts when add-ons
# try to load another USD library into the same process space.
-DPXR_SET_INTERNAL_NAMESPACE=usdBlender
-DPXR_ENABLE_PYTHON_SUPPORT=OFF
-DPXR_BUILD_IMAGING=OFF
-DPXR_BUILD_TESTS=OFF
-DBUILD_SHARED_LIBS=OFF
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
-DPXR_BUILD_MONOLITHIC=ON
# The PXR_BUILD_USD_TOOLS argument is patched-in by usd.diff. An upstream pull request
# can be found at https://github.com/PixarAnimationStudios/USD/pull/1048.
-DPXR_BUILD_USD_TOOLS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
# USD is hellbound on making a shared lib, unless you point this variable to a valid cmake file
# doesn't have to make sense, but as long as it points somewhere valid it will skip the shared lib.
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
)
ExternalProject_Add(external_usd
@@ -84,32 +66,29 @@ add_dependencies(
external_usd
external_tbb
external_boost
external_opensubdiv
)
# Since USD 21.11 the libraries are prefixed with "usd_", i.e.
# "libusd_m.a" became "libusd_usd_m.a".
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
if(NOT WIN32)
if (USD_VERSION VERSION_LESS 21.11)
set(PXR_LIB_PREFIX "")
else()
set(PXR_LIB_PREFIX "usd_")
endif()
endif()
if(WIN32)
# USD currently demands python be available at build time
# and then proceeds not to use it, but still checks that the
# version of the interpreter it is not going to use is atleast 2.7
# so we need this dep currently since there is no system python
# on windows.
add_dependencies(
external_usd
external_python
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/ ${HARVEST_TARGET}/usd
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/usd_usd_m.lib ${HARVEST_TARGET}/usd/lib/usd_usd_m.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/usd_m.lib ${HARVEST_TARGET}/usd/lib/libusd_m.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/lib ${HARVEST_TARGET}/usd/lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/usd_usd_m_d.lib ${HARVEST_TARGET}/usd/lib/usd_usd_m_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/usd_m_d.lib ${HARVEST_TARGET}/usd/lib/libusd_m_d.lib
DEPENDEES install
)
endif()
@@ -121,7 +100,7 @@ else()
# case (only the shared library). As a result, we need to grab the `libusd_m.a`
# file from the build directory instead of from the install directory.
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/lib${PXR_LIB_PREFIX}usd_m.a ${HARVEST_TARGET}/usd/lib/lib${PXR_LIB_PREFIX}usd_m.a
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/libusd_m.a ${HARVEST_TARGET}/usd/lib/libusd_m.a
DEPENDEES install
)
endif()

View File

@@ -1,23 +1,30 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# CPE's are used to identify dependencies, for more information on what they
# are please see https://nvd.nist.gov/products/cpe
# ***** BEGIN GPL LICENSE BLOCK *****
#
# We use them in combination with cve-bin-tool to scan for known security issues.
# 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.
#
# Not all of our dependencies are currently in the nvd database so not all
# dependencies have one assigned.
# 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.13)
set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 9b8aa094c4e5765dabf4da391f00d15c)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(ZLIB_HASH_TYPE MD5)
set(ZLIB_FILE zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_CPE "cpe:2.3:a:zlib:zlib:${ZLIB_VERSION}:*:*:*:*:*:*:*")
set(OPENAL_VERSION 1.21.1)
set(OPENAL_VERSION 1.20.1)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH a936806ebd8de417b0ffd8cf3f48f456)
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
set(OPENAL_HASH_TYPE MD5)
set(OPENAL_FILE openal-soft-${OPENAL_VERSION}.tar.bz2)
@@ -26,31 +33,27 @@ set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.
set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
set(PNG_HASH_TYPE SHA256)
set(PNG_FILE libpng-${PNG_VERSION}.tar.xz)
set(PNG_CPE "cpe:2.3:a:libpng:libpng:${PNG_VERSION}:*:*:*:*:*:*:*")
set(JPEG_VERSION 2.1.3)
set(JPEG_VERSION 2.0.4)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 627b980fad0573e08e4c3b80b290fc91)
set(JPEG_HASH 44c43e4a9fb352f47090804529317c88)
set(JPEG_HASH_TYPE MD5)
set(JPEG_FILE libjpeg-turbo-${JPEG_VERSION}.tar.gz)
set(JPEG_CPE "cpe:2.3:a:d.r.commander:libjpeg-turbo:${JPEG_VERSION}:*:*:*:*:*:*:*")
set(BOOST_VERSION 1.78.0)
set(BOOST_VERSION_SHORT 1.78)
set(BOOST_VERSION_NODOTS 1_78_0)
set(BOOST_VERSION_NODOTS_SHORT 1_78)
set(BOOST_VERSION 1.73.0)
set(BOOST_VERSION_NODOTS 1_73_0)
set(BOOST_VERSION_NODOTS_SHORT 1_73)
set(BOOST_URI https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH c2f6428ac52b0e5a3c9b2e1d8cc832b5)
set(BOOST_HASH 4036cd27ef7548b8d29c30ea10956196)
set(BOOST_HASH_TYPE MD5)
set(BOOST_FILE boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_CPE "cpe:2.3:a:boost:boost:${BOOST_VERSION}:*:*:*:*:*:*:*")
set(BLOSC_VERSION 1.21.1)
# Using old version as recommended by OpenVDB build documentation.
set(BLOSC_VERSION 1.5.0)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH 134b55813b1dca57019d2a2dc1f7a923)
set(BLOSC_HASH 6e4a49c8c06f05aa543f3312cfce3d55)
set(BLOSC_HASH_TYPE MD5)
set(BLOSC_FILE blosc-${BLOSC_VERSION}.tar.gz)
set(BLOSC_CPE "cpe:2.3:a:c-blosc2_project:c-blosc2:${BLOSC_VERSION}:*:*:*:*:*:*:*")
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://prdownloads.sourceforge.net/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
@@ -58,19 +61,11 @@ set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(PTHREADS_HASH_TYPE MD5)
set(PTHREADS_FILE pthreads4w-code-${PTHREADS_VERSION}.zip)
set(OPENEXR_VERSION 3.1.5)
set(OPENEXR_VERSION 2.5.5)
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH a92f38eedd43e56c0af56d4852506886)
set(OPENEXR_HASH 85e8a979092c9055d10ed103062d31a0)
set(OPENEXR_HASH_TYPE MD5)
set(OPENEXR_FILE openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_CPE "cpe:2.3:a:openexr:openexr:${OPENEXR_VERSION}:*:*:*:*:*:*:*")
set(IMATH_VERSION 3.1.5)
set(IMATH_URI https://github.com/AcademySoftwareFoundation/Imath/archive/v${OPENEXR_VERSION}.tar.gz)
set(IMATH_HASH dd375574276c54872b7b3d54053baff0)
set(IMATH_HASH_TYPE MD5)
set(IMATH_FILE imath-${IMATH_VERSION}.tar.gz)
if(WIN32)
# Openexr started appending _d on its own so now
@@ -88,18 +83,17 @@ else()
set(OPENEXR_VERSION_POSTFIX)
endif()
set(FREETYPE_VERSION 2.12.1)
set(FREETYPE_VERSION 2.10.2)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH 8bc5c9c9df7ac12c504f8918552a7cf2)
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
set(FREETYPE_HASH_TYPE MD5)
set(FREETYPE_FILE freetype-${FREETYPE_VERSION}.tar.gz)
SET(FREETYPE_CPE "cpe:2.3:a:freetype:freetype:${FREETYPE_VERSION}:*:*:*:*:*:*:*")
set(EPOXY_VERSION 1.5.10)
set(EPOXY_URI https://github.com/anholt/libepoxy/archive/refs/tags/${EPOXY_VERSION}.tar.gz)
set(EPOXY_HASH f0730aad115c952e77591fcc805b1dc1)
set(EPOXY_HASH_TYPE MD5)
set(EPOXY_FILE libepoxy-${EPOXY_VERSION}.tar.gz)
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(GLEW_HASH_TYPE MD5)
set(GLEW_FILE glew-${GLEW_VERSION}.tgz)
set(FREEGLUT_VERSION 3.0.0)
set(FREEGLUT_URI http://prdownloads.sourceforge.net/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
@@ -107,25 +101,44 @@ set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(FREEGLUT_HASH_TYPE MD5)
set(FREEGLUT_FILE freeglut-${FREEGLUT_VERSION}.tar.gz)
set(ALEMBIC_VERSION 1.8.3)
set(ALEMBIC_VERSION 1.7.16)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_HASH 2cd8d6e5a3ac4a014e24a4b04f4fadf9)
set(ALEMBIC_HASH effcc86e42fe6605588e3de57bde6677)
set(ALEMBIC_HASH_TYPE MD5)
set(ALEMBIC_FILE alembic-${ALEMBIC_VERSION}.tar.gz)
SET(FREETYPE_CPE "cpe:2.3:a:freetype:freetype:${FREETYPE_VERSION}:*:*:*:*:*:*:*")
set(OPENSUBDIV_VERSION v3_4_4)
# 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)
set(GLFW_HASH_TYPE MD5)
set(GLFW_FILE glfw-${GLFW_GIT_UID}.zip)
# 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)
set(CLEW_HASH_TYPE MD5)
set(CLEW_FILE clew-${CLEW_GIT_UID}.zip)
# 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(CUEW_HASH_TYPE MD5)
set(CUEW_FILE cuew-${CUEW_GIT_UID}.zip)
set(OPENSUBDIV_VERSION v3_4_3)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(OPENSUBDIV_HASH 39ecc5caf0abebc943d1ce131855e76e)
set(OPENSUBDIV_HASH 7bbfa275d021fb829e521df749160edb)
set(OPENSUBDIV_HASH_TYPE MD5)
set(OPENSUBDIV_FILE opensubdiv-${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.20)
set(SDL_VERSION 2.0.12)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH a53acc02e1cca98c4123229069b67c9e)
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
set(SDL_HASH_TYPE MD5)
set(SDL_FILE SDL2-${SDL_VERSION}.tar.gz)
set(SDL_CPE "cpe:2.3:a:libsdl:sdl:${SDL_VERSION}:*:*:*:*:*:*:*")
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
@@ -133,9 +146,9 @@ set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLLADA_HASH_TYPE MD5)
set(OPENCOLLADA_FILE opencollada-${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLORIO_VERSION 2.1.1)
set(OPENCOLORIO_VERSION 2.0.0)
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 604f562e073f23d88ce89ed4f7f709ba)
set(OPENCOLORIO_HASH 1a2e3478b6cd9a1549f24e1b2205e3f0)
set(OPENCOLORIO_HASH_TYPE MD5)
set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz)
@@ -144,7 +157,6 @@ set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LL
set(LLVM_HASH 5a4fab4d7fc84aefffb118ac2c8a4fc0)
set(LLVM_HASH_TYPE MD5)
set(LLVM_FILE llvm-project-${LLVM_VERSION}.src.tar.xz)
set(LLVM_CPE "cpe:2.3:a:llvm:compiler:${LLVM_VERSION}:*:*:*:*:*:*:*")
if(APPLE)
# Cloth physics test is crashing due to this bug:
@@ -159,107 +171,81 @@ set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${
set(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
set(OPENIMAGEIO_VERSION v2.3.20.0)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/refs/tags/${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH defb1fe7c8e64bac60eb3cacaf5c3736)
set(OPENIMAGEIO_VERSION 2.2.15.1)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH 3db5c5f0b3dc91597c75e5df09eb9072)
set(OPENIMAGEIO_HASH_TYPE MD5)
set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz)
# 8.0.0 is currently oiio's preferred version although never versions may be available.
# the preferred version can be found in oiio's externalpackages.cmake
set(FMT_VERSION 8.0.0)
set(FMT_URI https://github.com/fmtlib/fmt/archive/refs/tags/${FMT_VERSION}.tar.gz)
set(FMT_HASH 7bce0e9e022e586b178b150002e7c2339994e3c2bbe44027e9abb0d60f9cce83)
set(FMT_HASH_TYPE SHA256)
set(FMT_FILE fmt-${FMT_VERSION}.tar.gz)
set(FMT_CPE "cpe:2.3:a:fmt:fmt:${FMT_VERSION}:*:*:*:*:*:*:*")
# 0.6.2 is currently oiio's preferred version although never versions may be available.
# the preferred version can be found in oiio's externalpackages.cmake
set(ROBINMAP_VERSION v0.6.2)
set(ROBINMAP_URI https://github.com/Tessil/robin-map/archive/refs/tags/${ROBINMAP_VERSION}.tar.gz)
set(ROBINMAP_HASH c08ec4b1bf1c85eb0d6432244a6a89862229da1cb834f3f90fba8dc35d8c8ef1)
set(ROBINMAP_HASH_TYPE SHA256)
set(ROBINMAP_FILE robinmap-${ROBINMAP_VERSION}.tar.gz)
set(TIFF_VERSION 4.4.0)
set(TIFF_VERSION 4.1.0)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 376f17f189e9d02280dfe709b2b2bbea)
set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
set(TIFF_HASH_TYPE MD5)
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
set(OSL_VERSION 1.12.6.2)
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/refs/tags/v${OSL_VERSION}.tar.gz)
set(OSL_HASH 6fef11548adfdd3e5b25c49d2dae96ee)
set(OSL_VERSION 1.11.14.1)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 1abd7ce40481771a9fa937f19595d2f2)
set(OSL_HASH_TYPE MD5)
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
set(PYTHON_VERSION 3.10.8)
set(PYTHON_SHORT_VERSION 3.10)
set(PYTHON_SHORT_VERSION_NO_DOTS 310)
set(PYTHON_VERSION 3.9.2)
set(PYTHON_SHORT_VERSION 3.9)
set(PYTHON_SHORT_VERSION_NO_DOTS 39)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH e92356b012ed4d0e09675131d39b1bde)
set(PYTHON_HASH f0dc9000312abeb16de4eccce9a870ab)
set(PYTHON_HASH_TYPE MD5)
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_CPE "cpe:2.3:a:python:python:${PYTHON_VERSION}:-:*:*:*:*:*:*")
set(TBB_YEAR 2020)
set(TBB_VERSION ${TBB_YEAR}_U3)
set(TBB_VERSION 2020_U2)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 55ec8df6eae5ed6364a47f0e671e460c)
set(TBB_HASH 1b711ae956524855088df3bbf5ec65dc)
set(TBB_HASH_TYPE MD5)
set(TBB_FILE oneTBB-${TBB_VERSION}.tar.gz)
set(TBB_CPE "cpe:2.3:a:intel:threading_building_blocks:${TBB_YEAR}:*:*:*:*:*:*:*")
set(OPENVDB_VERSION 9.0.0)
set(OPENVDB_VERSION 8.0.1)
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 684ce40c2f74f3a0c9cac530e1c7b07e)
set(OPENVDB_HASH 01b490be16cc0e15c690f9a153c21461)
set(OPENVDB_HASH_TYPE MD5)
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
set(IDNA_VERSION 3.3)
set(CHARSET_NORMALIZER_VERSION 2.0.10)
set(URLLIB3_VERSION 1.26.8)
set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*")
set(CERTIFI_VERSION 2021.10.8)
set(REQUESTS_VERSION 2.27.1)
set(CYTHON_VERSION 0.29.26)
# The version of the zstd library used to build the Python package should match ZSTD_VERSION
# defined below. At this time of writing, 0.17.0 was already released,
# but built against zstd 1.5.1, while we use 1.5.0.
set(ZSTANDARD_VERSION 0.16.0)
set(AUTOPEP8_VERSION 1.6.0)
set(PYCODESTYLE_VERSION 2.8.0)
set(TOML_VERSION 0.10.2)
set(NANOVDB_GIT_UID dc37d8a631922e7bef46712947dc19b755f3e841)
set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz)
set(NANOVDB_HASH e7b9e863ec2f3b04ead171dec2322807)
set(NANOVDB_HASH_TYPE MD5)
set(NANOVDB_FILE nano-vdb-${NANOVDB_GIT_UID}.tar.gz)
set(NUMPY_VERSION 1.22.0)
set(NUMPY_SHORT_VERSION 1.22)
set(IDNA_VERSION 2.10)
set(CHARDET_VERSION 4.0.0)
set(URLLIB3_VERSION 1.26.3)
set(CERTIFI_VERSION 2020.12.5)
set(REQUESTS_VERSION 2.25.1)
set(CYTHON_VERSION 0.29.21)
set(NUMPY_VERSION 1.19.5)
set(NUMPY_SHORT_VERSION 1.19)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH 252de134862a27bd66705d29622edbfe)
set(NUMPY_HASH f6a1b48717c552bbc18f1adc3cc1fe0e)
set(NUMPY_HASH_TYPE MD5)
set(NUMPY_FILE numpy-${NUMPY_VERSION}.zip)
set(NUMPY_CPE "cpe:2.3:a:numpy:numpy:${NUMPY_VERSION}:*:*:*:*:*:*:*")
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(LAME_HASH_TYPE MD5)
set(LAME_FILE lame-${LAME_VERSION}.tar.gz)
set(LAME_CPE "cpe:2.3:a:lame_project:lame:${LAME_VERSION}:*:*:*:*:*:*:*")
set(OGG_VERSION 1.3.5)
set(OGG_VERSION 1.3.4)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH 0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664)
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
set(OGG_HASH_TYPE SHA256)
set(OGG_FILE libogg-${OGG_VERSION}.tar.gz)
set(VORBIS_VERSION 1.3.7)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab)
set(VORBIS_HASH 6ed40e0241089a42c48604dc00e362beee00036af2d8b3f46338031c9e0351cb)
set(VORBIS_HASH_TYPE SHA256)
set(VORBIS_FILE libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_CPE "cpe:2.3:a:xiph.org:libvorbis:${VORBIS_VERSION}:*:*:*:*:*:*:*")
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
@@ -267,19 +253,17 @@ set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc
set(THEORA_HASH_TYPE SHA256)
set(THEORA_FILE libtheora-${THEORA_VERSION}.tar.bz2)
set(FLAC_VERSION 1.3.4)
set(FLAC_VERSION 1.3.3)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737 )
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
set(FLAC_HASH_TYPE SHA256)
set(FLAC_FILE flac-${FLAC_VERSION}.tar.xz)
set(FLAC_CPE "cpe:2.3:a:flac_project:flac:${FLAC_VERSION}:*:*:*:*:*:*:*")
set(VPX_VERSION 1.11.0)
set(VPX_VERSION 1.8.2)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 965e51c91ad9851e2337aebcc0f517440c637c506f3a03948062e3d5ea129a83)
set(VPX_HASH 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
set(VPX_HASH_TYPE SHA256)
set(VPX_FILE libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_CPE "cpe:2.3:a:webmproject:libvpx:${VPX_VERSION}:*:*:*:*:*:*:*")
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
@@ -287,9 +271,9 @@ set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(OPUS_HASH_TYPE SHA256)
set(OPUS_FILE opus-${OPUS_VERSION}.tar.gz)
set(X264_VERSION 35fe20d1ba49918ec739a5b068c208ca82f977f7)
set(X264_VERSION 33f9e1474613f59392be5ab6a7e7abf60fa63622)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/${X264_VERSION}/x264-${X264_VERSION}.tar.gz)
set(X264_HASH bb4f7da03936b5a030ed5827133b58eb3f701d7e5dce32cca4ba6df93797d42e)
set(X264_HASH 5456450ee1ae02cd2328be3157367a232a0ab73315e8c8f80dab80469524f525)
set(X264_HASH_TYPE SHA256)
set(X264_FILE x264-${X264_VERSION}.tar.gz)
@@ -299,24 +283,22 @@ set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce
set(XVIDCORE_HASH_TYPE SHA256)
set(XVIDCORE_FILE xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(OPENJPEG_VERSION 2.5.0)
set(OPENJPEG_SHORT_VERSION 2.5)
set(OPENJPEG_VERSION 2.3.1)
set(OPENJPEG_SHORT_VERSION 2.3)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a)
set(OPENJPEG_HASH 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9)
set(OPENJPEG_HASH_TYPE SHA256)
set(OPENJPEG_FILE openjpeg-v${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_CPE "cpe:2.3:a:uclouvain:openjpeg:${OPENJPEG_VERSION}:*:*:*:*:*:*:*")
set(FFMPEG_VERSION 5.1.2)
set(FFMPEG_VERSION 4.4)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 39a0bcc8d98549f16c570624678246a6ac736c066cebdb409f9502e915b22f2b)
set(FFMPEG_HASH 42093549751b582cf0f338a21a3664f52e0a9fbe0d238d3c992005e493607d0e)
set(FFMPEG_HASH_TYPE SHA256)
set(FFMPEG_FILE ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_CPE "cpe:2.3:a:ffmpeg:ffmpeg:${FFMPEG_VERSION}:*:*:*:*:*:*:*")
set(FFTW_VERSION 3.3.10)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8ccbf6a5ea78a16dbc3e1306e234cc5c)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(FFTW_HASH_TYPE MD5)
set(FFTW_FILE fftw-${FFTW_VERSION}.tar.gz)
@@ -326,19 +308,17 @@ set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
set(ICONV_HASH_TYPE MD5)
set(ICONV_FILE libiconv-${ICONV_VERSION}.tar.gz)
set(SNDFILE_VERSION 1.1.0)
set(SNDFILE_URI https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-${SNDFILE_VERSION}.tar.xz)
set(SNDFILE_HASH e63dead2b4f0aaf323687619d007ee6a)
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(SNDFILE_HASH_TYPE MD5)
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_CPE "cpe:2.3:a:libsndfile_project:libsndfile:${SNDFILE_VERSION}:*:*:*:*:*:*:*")
set(WEBP_VERSION 1.2.2)
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 b5e2e414a8adee4c25fe56b18dd9c549)
set(WEBP_HASH b49ce9c3e3e9acae4d91bca44bb85a72)
set(WEBP_HASH_TYPE MD5)
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_CPE "cpe:2.3:a:webmproject:libwebp:${WEBP_VERSION}:*:*:*:*:*:*:*")
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)
@@ -352,40 +332,36 @@ set(JEMALLOC_HASH 3d41fbf006e6ebffd489bdb304d009ae)
set(JEMALLOC_HASH_TYPE MD5)
set(JEMALLOC_FILE jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(XML2_VERSION 2.10.3)
set(XML2_URI https://download.gnome.org/sources/libxml2/2.10/libxml2-${XML2_VERSION}.tar.xz)
set(XML2_HASH f9edac7fac232b3657a003fd9a5bbe42)
set(XML2_VERSION 2.9.10)
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH 10942a1dc23137a8aa07f0639cbfece5)
set(XML2_HASH_TYPE MD5)
set(XML2_FILE libxml2-${XML2_VERSION}.tar.xz)
set(XML2_CPE "cpe:2.3:a:xmlsoft:libxml2:${XML2_VERSION}:*:*:*:*:*:*:*")
set(XML2_FILE libxml2-${XML2_VERSION}.tar.gz)
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(TINYXML_HASH_TYPE MD5)
set(TINYXML_FILE tinyxml_${TINYXML_VERSION}.tar.gz)
set(YAMLCPP_VERSION 0.6.3)
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
set(YAMLCPP_HASH b45bf1089a382e81f6b661062c10d0c2)
set(YAMLCPP_HASH_TYPE MD5)
set(YAMLCPP_FILE yaml-cpp-${YAMLCPP_VERSION}.tar.gz)
set(YAMLCPP "cpe:2.3:a:yaml-cpp_project:yaml-cpp:${YAMLCPP_VERSION}:*:*:*:*:*:*:*")
set(PYSTRING_VERSION v1.1.3)
set(PYSTRING_URI https://codeload.github.com/imageworks/pystring/tar.gz/refs/tags/${PYSTRING_VERSION})
set(PYSTRING_HASH f2c68786b359f5e4e62bed53bc4fb86d)
set(PYSTRING_HASH_TYPE MD5)
set(PYSTRING_FILE pystring-${PYSTRING_VERSION}.tar.gz)
set(EXPAT_VERSION 2_5_0)
set(EXPAT_VERSION_DOTS 2.5.0)
set(EXPAT_VERSION 2_2_10)
set(EXPAT_URI https://github.com/libexpat/libexpat/archive/R_${EXPAT_VERSION}.tar.gz)
set(EXPAT_HASH d375fa3571c0abb945873f5061a8f2e2)
set(EXPAT_HASH 7ca5f09959fcb9a57618368deb627b9f)
set(EXPAT_HASH_TYPE MD5)
set(EXPAT_FILE libexpat-${EXPAT_VERSION}.tar.gz)
set(EXPAT_CPE "cpe:2.3:a:libexpat_project:libexpat:${EXPAT_VERSION_DOTS}:*:*:*:*:*:*:*")
set(PUGIXML_VERSION 1.10)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v${PUGIXML_VERSION}.tar.gz)
set(PUGIXML_HASH 0c208b0664c7fb822bf1b49ad035e8fd)
set(PUGIXML_HASH_TYPE MD5)
set(PUGIXML_FILE pugixml-${PUGIXML_VERSION}.tar.gz)
set(PUGIXML_CPE "cpe:2.3:a:pugixml_project:pugixml:${PUGIXML_VERSION}:*:*:*:*:*:*:*")
set(FLEXBISON_VERSION 2.5.24)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison/win_flex_bison-${FLEXBISON_VERSION}.zip)
@@ -403,26 +379,17 @@ set(FLEX_FILE flex-${FLEX_VERSION}.tar.gz)
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
# sources from Debian packaging.
#
# NOTE 2: This will *HAVE* to match the version python ships on windows which
# is hardcoded in pythons PCbuild/get_externals.bat. For compliance reasons there
# can be no exceptions to this.
set(BZIP2_VERSION 1.0.8)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(BZIP2_HASH ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269)
set(BZIP2_HASH_TYPE SHA256)
set(BZIP2_FILE bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(BZIP2_CPE "cpe:2.3:a:bzip:bzip2:${BZIP2_VERSION}:*:*:*:*:*:*:*")
# NOTE: This will *HAVE* to match the version python ships on windows which
# is hardcoded in pythons PCbuild/get_externals.bat. For compliance reasons there
# can be no exceptions to this.
set(FFI_VERSION 3.3)
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056)
set(FFI_HASH_TYPE SHA256)
set(FFI_FILE libffi-${FFI_VERSION}.tar.gz)
set(FFI_CPE "cpe:2.3:a:libffi_project:libffi:${FFI_VERSION}:*:*:*:*:*:*:*")
set(LZMA_VERSION 5.2.5)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
@@ -430,42 +397,43 @@ set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
set(LZMA_HASH_TYPE SHA256)
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
# NOTE: This will *HAVE* to match the version python ships on windows which
# is hardcoded in pythons PCbuild/get_externals.bat. For compliance reasons there
# can be no exceptions to this.
set(SSL_VERSION 1.1.1q)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
set(SSL_CPE "cpe:2.3:a:openssl:openssl:${SSL_VERSION}:*:*:*:*:*:*:*")
if(BLENDER_PLATFORM_ARM)
# Need at least 1.1.1i for aarch64 support (https://github.com/openssl/openssl/pull/13218)
set(SSL_VERSION 1.1.1i)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
else()
set(SSL_VERSION 1.1.1g)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
endif()
# Note: This will *HAVE* to match the version python ships on windows which
# is hardcoded in pythons PCbuild/get_externals.bat for compliance reasons there
# can be no exceptions to this.
set(SQLITE_VERSION 3.37.2)
set(SQLLITE_LONG_VERSION 3370200)
set(SQLITE_URI https://www.sqlite.org/2022/sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
set(SQLITE_HASH e56faacadfb4154f8fbd0f2a3f827d13706b70a1)
set(SQLITE_VERSION 3.31.1)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(SQLITE_HASH_TYPE SHA1)
set(SQLITE_FILE sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
set(SQLITE_CPE "cpe:2.3:a:sqlite:sqlite:${SQLITE_VERSION}:*:*:*:*:*:*:*")
set(SQLITE_FILE sqlite-src-3240000.zip)
set(EMBREE_VERSION 3.13.4)
set(EMBREE_VERSION 3.10.0)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 52d0be294d6c88ba7a6c9e046796e7be)
set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87)
set(EMBREE_HASH_TYPE MD5)
set(EMBREE_FILE embree-v${EMBREE_VERSION}.zip)
set(EMBREE_ARM_GIT https://github.com/brechtvl/embree.git)
set(USD_VERSION 22.03)
set(USD_VERSION 21.02)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH e0e441a05057692a83124a1195b09eed)
set(USD_HASH 1dd1e2092d085ed393c1f7c450a4155a)
set(USD_HASH_TYPE MD5)
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
set(OIDN_VERSION 1.4.3)
set(OIDN_VERSION 1.4.1)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
set(OIDN_HASH 027093eaf5e8b4e45835b991137b38e6)
set(OIDN_HASH df4007b0ab93b1c41cdf223b075d01c0)
set(OIDN_HASH_TYPE MD5)
set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz)
@@ -480,18 +448,16 @@ set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa/mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH 022c7293074aeeced2278c872db4fa693147c70f8595b076cf3f1ef81520766d)
set(MESA_HASH_TYPE SHA256)
set(MESA_FILE mesa-${MESA_VERSION}.tar.xz)
set(MESA_CPE "cpe:2.3:a:mesa3d:mesa:${MESA_VERSION}:*:*:*:*:*:*:*")
set(NASM_VERSION 2.15.02)
set(NASM_URI https://github.com/netwide-assembler/nasm/archive/nasm-${NASM_VERSION}.tar.gz)
set(NASM_HASH aded8b796c996a486a56e0515c83e414116decc3b184d88043480b32eb0a8589)
set(NASM_HASH_TYPE SHA256)
set(NASM_FILE nasm-${NASM_VERSION}.tar.gz)
set(NASM_PCE "cpe:2.3:a:nasm:nasm:${NASM_VERSION}:*:*:*:*:*:*:*")
set(XR_OPENXR_SDK_VERSION 1.0.22)
set(XR_OPENXR_SDK_VERSION 1.0.17)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH a2623ebab3d0b340bc16311b14f02075)
set(XR_OPENXR_SDK_HASH bf0fd8828837edff01047474e90013e1)
set(XR_OPENXR_SDK_HASH_TYPE MD5)
set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz)
@@ -501,37 +467,23 @@ set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/
set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a)
set(WL_PROTOCOLS_HASH_TYPE MD5)
set(WAYLAND_VERSION 1.21.0)
set(WAYLAND_FILE wayland-${WAYLAND_VERSION}.tar.xz)
set(WAYLAND_URI https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.21.0/downloads/wayland-${WAYLAND_VERSION}.tar.xz)
set(WAYLAND_HASH f2653a2293bcd882d756c6a83d278903)
set(WAYLAND_HASH_TYPE MD5)
set(WAYLAND_LIBDECOR_VERSION 0.1.0)
set(WAYLAND_LIBDECOR_FILE libdecor-${WAYLAND_LIBDECOR_VERSION}.tar.xz)
set(WAYLAND_LIBDECOR_URI https://gitlab.gnome.org/jadahl/libdecor/uploads/81adf91d27620e20bcc5f6b9b312d768/libdecor-${WAYLAND_LIBDECOR_VERSION}.tar.xz )
set(WAYLAND_LIBDECOR_HASH 47b59eba76faa3787f0878bf8700e912)
set(WAYLAND_LIBDECOR_HASH_TYPE MD5)
set(ISPC_VERSION v1.17.0)
set(ISPC_VERSION v1.16.0)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
set(ISPC_HASH 4f476a3109332a77fe839a9014c60ca9)
set(ISPC_HASH 2e3abedbc0ea9aaec17d6562c632454d)
set(ISPC_HASH_TYPE MD5)
set(ISPC_FILE ispc-${ISPC_VERSION}.tar.gz)
set(GMP_VERSION 6.2.1)
set(GMP_VERSION 6.2.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH 0b82665c4a92fd2ade7440c13fcaa42b)
set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1)
set(GMP_HASH_TYPE MD5)
set(GMP_FILE gmp-${GMP_VERSION}.tar.xz)
set(GMP_CPE "cpe:2.3:a:gmplib:gmp:${GMP_VERSION}:*:*:*:*:*:*:*")
set(POTRACE_VERSION 1.16)
set(POTRACE_URI http://potrace.sourceforge.net/download/${POTRACE_VERSION}/potrace-${POTRACE_VERSION}.tar.gz)
set(POTRACE_HASH 5f0bd87ddd9a620b0c4e65652ef93d69)
set(POTRACE_HASH_TYPE MD5)
set(POTRACE_FILE potrace-${POTRACE_VERSION}.tar.gz)
set(POTRACE_CPE "cpe:2.3:a:icoasoft:potrace:${POTRACE_VERSION}:*:*:*:*:*:*:*")
set(HARU_VERSION 2_3_0)
set(HARU_URI https://github.com/libharu/libharu/archive/RELEASE_${HARU_VERSION}.tar.gz)
@@ -544,167 +496,6 @@ set(ZSTD_URI https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}
set(ZSTD_HASH 5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94)
set(ZSTD_HASH_TYPE SHA256)
set(ZSTD_FILE zstd-${ZSTD_VERSION}.tar.gz)
set(ZSTD_CPE "cpe:2.3:a:facebook:zstandard:${ZSTD_VERSION}:*:*:*:*:*:*:*")
set(SSE2NEON_VERSION fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)
set(SSE2NEON_URI https://github.com/DLTcollab/sse2neon/archive/${SSE2NEON_VERSION}.tar.gz)
set(SSE2NEON_HASH 0780253525d299c31775ef95853698d03db9c7739942af8570000f4a25a5d605)
set(SSE2NEON_HASH_TYPE SHA256)
set(SSE2NEON_FILE sse2neon-${SSE2NEON_VERSION}.tar.gz)
set(BROTLI_VERSION 1.0.9)
set(BROTLI_URI https://github.com/google/brotli/archive/refs/tags/v${BROTLI_VERSION}.tar.gz)
set(BROTLI_HASH f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46)
set(BROTLI_HASH_TYPE SHA256)
set(BROTLI_FILE brotli-v${BROTLI_VERSION}.tar.gz)
set(BROTLI_CPE "cpe:2.3:a:google:brotli:${BROTLI_VERSION}:*:*:*:*:*:*:*")
set(OPENPGL_VERSION v0.4.1-beta)
set(OPENPGL_SHORT_VERSION 0.4.1)
set(OPENPGL_URI https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/${OPENPGL_VERSION}.tar.gz)
set(OPENPGL_HASH db63f5dac5cfa8c110ede241f0c413f00db0c4748697381c4fa23e0f9e82a754)
set(OPENPGL_HASH_TYPE SHA256)
set(OPENPGL_FILE openpgl-${OPENPGL_VERSION}.tar.gz)
set(LEVEL_ZERO_VERSION v1.8.5)
set(LEVEL_ZERO_URI https://github.com/oneapi-src/level-zero/archive/refs/tags/${LEVEL_ZERO_VERSION}.tar.gz)
set(LEVEL_ZERO_HASH b6e9663bbcc53c148d32376998298bec6f7c434ef2218c61fa708963e3a09394)
set(LEVEL_ZERO_HASH_TYPE SHA256)
set(LEVEL_ZERO_FILE level-zero-${LEVEL_ZERO_VERSION}.tar.gz)
set(DPCPP_VERSION 20221019)
set(DPCPP_URI https://github.com/intel/llvm/archive/refs/tags/sycl-nightly/${DPCPP_VERSION}.tar.gz)
set(DPCPP_HASH 2f533946e91ce3829431758ea17b0b834b960c1a796e9e4563c86e03eb9603a2)
set(DPCPP_HASH_TYPE SHA256)
set(DPCPP_FILE DPCPP-${DPCPP_VERSION}.tar.gz)
########################
### DPCPP DEPS BEGIN ###
########################
# The following deps are build time requirements for dpcpp, when possible
# the source in the dpcpp source tree for the version chosen is documented
# by each dep, these will only have to be downloaded and unpacked, dpcpp
# will take care of building them, unpack is being done in dpcpp_deps.cmake
# Source llvm/lib/SYCLLowerIR/CMakeLists.txt
set(VCINTRINSICS_VERSION abce9184b7a3a7fe1b02289b9285610d9dc45465)
set(VCINTRINSICS_URI https://github.com/intel/vc-intrinsics/archive/${VCINTRINSICS_VERSION}.tar.gz)
set(VCINTRINSICS_HASH 3e9fd471246b87633b26f7e15e17ab7733d357458c53d5c5881c03929d6c551f)
set(VCINTRINSICS_HASH_TYPE SHA256)
set(VCINTRINSICS_FILE vc-intrinsics-${VCINTRINSICS_VERSION}.tar.gz)
# Source opencl/CMakeLists.txt
set(OPENCLHEADERS_VERSION dcd5bede6859d26833cd85f0d6bbcee7382dc9b3)
set(OPENCLHEADERS_URI https://github.com/KhronosGroup/OpenCL-Headers/archive/${OPENCLHEADERS_VERSION}.tar.gz)
set(OPENCLHEADERS_HASH ca8090359654e94f2c41e946b7e9d826253d795ae809ce7c83a7d3c859624693)
set(OPENCLHEADERS_HASH_TYPE SHA256)
set(OPENCLHEADERS_FILE opencl_headers-${OPENCLHEADERS_VERSION}.tar.gz)
# Source opencl/CMakeLists.txt
set(ICDLOADER_VERSION 792682ad3d877ab38573b997808bab3b43902b70)
set(ICDLOADER_URI https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/${ICDLOADER_VERSION}.tar.gz)
set(ICDLOADER_HASH b33a0320d94bf300efa1da97931ded506d27813bd1148da6858fe79d412d1ea2)
set(ICDLOADER_HASH_TYPE SHA256)
set(ICDLOADER_FILE icdloader-${ICDLOADER_VERSION}.tar.gz)
# Source sycl/cmake/modules/AddBoostMp11Headers.cmake
# Using external MP11 here, getting AddBoostMp11Headers.cmake to recognize
# our copy in boost directly was more trouble than it was worth.
set(MP11_VERSION 7bc4e1ae9b36ec8ee635c3629b59ec525bbe82b9)
set(MP11_URI https://github.com/boostorg/mp11/archive/${MP11_VERSION}.tar.gz)
set(MP11_HASH 071ee2bd3952ec89882edb3af25dd1816f6b61723f66e42eea32f4d02ceef426)
set(MP11_HASH_TYPE SHA256)
set(MP11_FILE mp11-${MP11_VERSION}.tar.gz)
# Source llvm-spirv/CMakeLists.txt (repo)
# Source llvm-spirv/spirv-headers-tag.conf (hash)
set(SPIRV_HEADERS_VERSION 5a121866927a16ab9d49bed4788b532c7fcea766)
set(SPIRV_HEADERS_URI https://github.com/KhronosGroup/SPIRV-Headers/archive/${SPIRV_HEADERS_VERSION}.tar.gz)
set(SPIRV_HEADERS_HASH ec8ecb471a62672697846c436501638ab25447ae9d4a6761e0bfe8a9a839502a)
set(SPIRV_HEADERS_HASH_TYPE SHA256)
set(SPIRV_HEADERS_FILE SPIR-V-Headers-${SPIRV_HEADERS_VERSION}.tar.gz)
######################
### DPCPP DEPS END ###
######################
##########################################
### Intel Graphics Compiler DEPS BEGIN ###
##########################################
# The following deps are build time requirements for the intel graphics
# compiler, the versions used are taken from the following location
# https://github.com/intel/intel-graphics-compiler/releases
set(IGC_VERSION 1.0.12149.1)
set(IGC_URI https://github.com/intel/intel-graphics-compiler/archive/refs/tags/igc-${IGC_VERSION}.tar.gz)
set(IGC_HASH 44f67f24e3bc5130f9f062533abf8154782a9d0a992bc19b498639a8521ae836)
set(IGC_HASH_TYPE SHA256)
set(IGC_FILE igc-${IGC_VERSION}.tar.gz)
set(IGC_LLVM_VERSION llvmorg-11.1.0)
set(IGC_LLVM_URI https://github.com/llvm/llvm-project/archive/refs/tags/${IGC_LLVM_VERSION}.tar.gz)
set(IGC_LLVM_HASH 53a0719f3f4b0388013cfffd7b10c7d5682eece1929a9553c722348d1f866e79)
set(IGC_LLVM_HASH_TYPE SHA256)
set(IGC_LLVM_FILE ${IGC_LLVM_VERSION}.tar.gz)
# WARNING WARNING WARNING
#
# IGC_OPENCL_CLANG contains patches for some of its dependencies.
#
# Whenever IGC_OPENCL_CLANG_VERSION changes, one *MUST* inspect
# IGC_OPENCL_CLANG's patches folder and update igc.cmake to account for
# any added or removed patches.
#
# WARNING WARNING WARNING
set(IGC_OPENCL_CLANG_VERSION 363a5262d8c7cff3fb28f3bdb5d85c8d7e91c1bb)
set(IGC_OPENCL_CLANG_URI https://github.com/intel/opencl-clang/archive/${IGC_OPENCL_CLANG_VERSION}.tar.gz)
set(IGC_OPENCL_CLANG_HASH aa8cf72bb239722ce8ce44f79413c6887ecc8ca18477dd520aa5c4809756da9a)
set(IGC_OPENCL_CLANG_HASH_TYPE SHA256)
set(IGC_OPENCL_CLANG_FILE opencl-clang-${IGC_OPENCL_CLANG_VERSION}.tar.gz)
set(IGC_VCINTRINSICS_VERSION v0.5.0)
set(IGC_VCINTRINSICS_URI https://github.com/intel/vc-intrinsics/archive/refs/tags/${IGC_VCINTRINSICS_VERSION}.tar.gz)
set(IGC_VCINTRINSICS_HASH 70bb47c5e32173cf61514941e83ae7c7eb4485e6d2fca60cfa1f50d4f42c41f2)
set(IGC_VCINTRINSICS_HASH_TYPE SHA256)
set(IGC_VCINTRINSICS_FILE vc-intrinsics-${IGC_VCINTRINSICS_VERSION}.tar.gz)
set(IGC_SPIRV_HEADERS_VERSION sdk-1.3.204.1)
set(IGC_SPIRV_HEADERS_URI https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/${IGC_SPIRV_HEADERS_VERSION}.tar.gz)
set(IGC_SPIRV_HEADERS_HASH 262864053968c217d45b24b89044a7736a32361894743dd6cfe788df258c746c)
set(IGC_SPIRV_HEADERS_HASH_TYPE SHA256)
set(IGC_SPIRV_HEADERS_FILE SPIR-V-Headers-${IGC_SPIRV_HEADERS_VERSION}.tar.gz)
set(IGC_SPIRV_TOOLS_VERSION sdk-1.3.204.1)
set(IGC_SPIRV_TOOLS_URI https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/${IGC_SPIRV_TOOLS_VERSION}.tar.gz)
set(IGC_SPIRV_TOOLS_HASH 6e19900e948944243024aedd0a201baf3854b377b9cc7a386553bc103b087335)
set(IGC_SPIRV_TOOLS_HASH_TYPE SHA256)
set(IGC_SPIRV_TOOLS_FILE SPIR-V-Tools-${IGC_SPIRV_TOOLS_VERSION}.tar.gz)
set(IGC_SPIRV_TRANSLATOR_VERSION a31ffaeef77e23d500b3ea3d35e0c42ff5648ad9)
set(IGC_SPIRV_TRANSLATOR_URI https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/${IGC_SPIRV_TRANSLATOR_VERSION}.tar.gz)
set(IGC_SPIRV_TRANSLATOR_HASH 9e26c96a45341b8f8af521bacea20e752623346340addd02af95d669f6e89252)
set(IGC_SPIRV_TRANSLATOR_HASH_TYPE SHA256)
set(IGC_SPIRV_TRANSLATOR_FILE SPIR-V-Translator-${IGC_SPIRV_TRANSLATOR_VERSION}.tar.gz)
########################################
### Intel Graphics Compiler DEPS END ###
########################################
set(GMMLIB_VERSION intel-gmmlib-22.1.8)
set(GMMLIB_URI https://github.com/intel/gmmlib/archive/refs/tags/${GMMLIB_VERSION}.tar.gz)
set(GMMLIB_HASH bf23e9a3742b4fb98c7666c9e9b29f3219e4b2fb4d831aaf4eed71f5e2d17368)
set(GMMLIB_HASH_TYPE SHA256)
set(GMMLIB_FILE ${GMMLIB_VERSION}.tar.gz)
set(OCLOC_VERSION 22.38.24278)
set(OCLOC_URI https://github.com/intel/compute-runtime/archive/refs/tags/${OCLOC_VERSION}.tar.gz)
set(OCLOC_HASH db0c542fccd651e6404b15a74d46027f1ce0eda8dc9e25a40cbb6c0faef257ee)
set(OCLOC_HASH_TYPE SHA256)
set(OCLOC_FILE ocloc-${OCLOC_VERSION}.tar.gz)
set(AOM_VERSION 3.4.0)
set(AOM_URI https://storage.googleapis.com/aom-releases/libaom-${AOM_VERSION}.tar.gz)
set(AOM_HASH bd754b58c3fa69f3ffd29da77de591bd9c26970e3b18537951336d6c0252e354)
set(AOM_HASH_TYPE SHA256)
set(AOM_FILE libaom-${AOM_VERSION}.tar.gz)
set(SSE2NEON_GIT https://github.com/DLTcollab/sse2neon.git)
set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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 file://${PACKAGE_DIR}/${VORBIS_FILE}

View File

@@ -1,13 +1,27 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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)
# VPX is determined to use pthreads which it will tell ffmpeg to dynamically
# link, which is not something we're super into distribution wise. However
# if it cannot find pthread.h it'll happily provide a pthread emulation
# layer using win32 threads. So all this patch does is make it not find
# pthead.h
set(VPX_PATCH ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/vpx/src/external_vpx < ${PATCH_DIR}/vpx_windows.diff)
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc )
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
else()
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
@@ -20,16 +34,6 @@ else()
endif()
endif()
if(NOT BLENDER_PLATFORM_ARM)
list(APPEND VPX_EXTRA_FLAGS
--enable-sse4_1
--enable-sse3
--enable-ssse3
--enable-avx
--enable-avx2
)
endif()
ExternalProject_Add(external_vpx
URL file://${PACKAGE_DIR}/${VPX_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -42,6 +46,11 @@ ExternalProject_Add(external_vpx
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
--enable-vp8
@@ -49,7 +58,6 @@ ExternalProject_Add(external_vpx
${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
PATCH_COMMAND ${VPX_PATCH}
INSTALL_DIR ${LIBDIR}/vpx
)

View File

@@ -1,27 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_wayland
URL file://${PACKAGE_DIR}/${WAYLAND_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${WAYLAND_HASH_TYPE}=${WAYLAND_HASH}
PREFIX ${BUILD_DIR}/wayland
PATCH_COMMAND ${PATCH_CMD} -d ${BUILD_DIR}/wayland/src/external_wayland < ${PATCH_DIR}/wayland.diff
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own LIBEXPAT & LIBXML2.
#
# NOTE: passing link args "ffi/lib" should not be needed, but
# `pkgconfig` would incorrectly look in "ffi/lib/../lib64" otherwise.
#
# NOTE: `-lm` is needed for `libxml2` which is a static library that uses `libm.so`,
# without this, math symbols such as `floor` aren't found.
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${LIBDIR}/expat/lib/pkgconfig:${LIBDIR}/xml2/lib/pkgconfig:${LIBDIR}/ffi/lib/pkgconfig:$PKG_CONFIG_PATH
meson --prefix ${LIBDIR}/wayland -Ddocumentation=false -Dtests=false -D "c_link_args=-L${LIBDIR}/ffi/lib -lm" . ../external_wayland
BUILD_COMMAND ninja
INSTALL_COMMAND ninja install
)
add_dependencies(
external_wayland
external_expat
external_xml2
external_ffi
)

View File

@@ -1,15 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# NOTE: currently only the header file is extracted, no compilation is needed
# as the library is dynamically loaded when found on the system.
ExternalProject_Add(external_wayland_libdecor
URL file://${PACKAGE_DIR}/${WAYLAND_LIBDECOR_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${WAYLAND_LIBDECOR_HASH_TYPE}=${WAYLAND_LIBDECOR_HASH}
PREFIX ${BUILD_DIR}/wayland_libdecor
BUILD_COMMAND echo .
CONFIGURE_COMMAND echo .
INSTALL_COMMAND cp ../external_wayland_libdecor/src/libdecor.h ${LIBDIR}/wayland_libdecor/include/libdecor-0/libdecor.h
INSTALL_DIR ${LIBDIR}/wayland_libdecor/include/libdecor-0
)

View File

@@ -1,18 +1,27 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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_wayland_protocols
URL file://${PACKAGE_DIR}/${WL_PROTOCOLS_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH}
PREFIX ${BUILD_DIR}/wayland-protocols
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own WAYLAND.
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${LIBDIR}/wayland/lib64/pkgconfig:$PKG_CONFIG_PATH
meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
BUILD_COMMAND ninja
INSTALL_COMMAND ninja install
)
add_dependencies(
external_wayland_protocols
external_wayland
)

View File

@@ -1,18 +1,28 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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_BUILD_ANIM_UTILS=OFF
-DWEBP_BUILD_CWEBP=OFF
-DWEBP_BUILD_DWEBP=OFF
-DWEBP_BUILD_GIF2WEBP=OFF
-DWEBP_BUILD_IMG2WEBP=OFF
-DWEBP_BUILD_VWEBP=OFF
-DWEBP_BUILD_WEBPINFO=OFF
-DWEBP_BUILD_WEBPMUX=OFF
-DWEBP_BUILD_EXTRAS=OFF
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
)
if(WIN32)

View File

@@ -1,4 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ***** 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})

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