1
1

Compare commits

..

565 Commits

Author SHA1 Message Date
bd2967f01a Fixing metaball boundbox creation on render. 2010-12-06 17:02:49 +00:00
e454acd6a1 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r32752:32753 2010-10-28 12:40:25 +00:00
8e1f643c68 change from r31533 (Ton hasn't got the render branch) 2010-08-24 06:43:47 +00:00
8e71132ff9 Missed file in last commit. 2010-08-05 17:19:57 +00:00
3057cea204 Render Branch: quick durian hack for final tweaks, hair particle system can now
copy coordinates from a mesh object (set Source object in Render panel).

The mesh object can be created by using Convert on the particle system modifier,
after which any mesh modifiers can be applied to it. Ensure that the render path
steps is the same as display path steps, otherwise this doesn't work.
2010-08-05 17:19:35 +00:00
64eb8fca45 Render Branch: code tweak, revert splitting up of ShadeInput, didn't work out
well and ended up mostly being confusing.
2010-07-30 17:18:16 +00:00
d32242d719 Render Branch: code tweak to Render struct. 2010-07-30 12:02:46 +00:00
f430f23a90 Fix for #23006: approximate AO/env/indirect used averaged subpixel location
which could give light leaks, this uses same trick as raytracing to fix it.
2010-07-30 11:26:38 +00:00
c4f6161925 Render Branch: remove centmask/centLut lookup optimization for finding
subpixel position from a mask. It's not working correct for OSA != 16,
and can result in light leaks with raytracing in that case.
2010-07-26 15:14:09 +00:00
71ec3e5a15 Render Branch: paths tweak, don't look in local directory for USER scripts. 2010-07-26 09:23:34 +00:00
ab22e9a9f9 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30470:30620 2010-07-22 09:33:49 +00:00
06857809d7 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30448:30470 2010-07-18 15:21:59 +00:00
7c7d4c972d Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30435:30448 2010-07-17 21:11:04 +00:00
54b4ccf0d1 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30429:30435 2010-07-17 13:45:25 +00:00
70379bde73 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30407:r30429 2010-07-17 12:04:51 +00:00
afdf0eaba9 Render Branch: quick fix for path problems, using local scripts as
system rather than user scripts, will discuss doing the same in trunk
later.
2010-07-16 15:46:37 +00:00
19bd44e8f1 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30308:30407 2010-07-16 12:15:28 +00:00
fdd0719da0 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30292:30308 2010-07-14 10:02:43 +00:00
d8add082d3 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30286:30292 2010-07-14 07:04:56 +00:00
4f9a400d51 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30274:30286 2010-07-13 22:26:45 +00:00
71484596fa remove temp hack, recent merge fixed this. 2010-07-13 17:45:57 +00:00
76c7678037 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30259:30274 2010-07-13 16:11:16 +00:00
bcee576dff workaround for metaball eternal loop, looking into the bug now but this at least makes metaballs in set scenes usable. 2010-07-13 12:54:25 +00:00
ddef3fb142 Render Branch: restore behavior that when material ambient is zero, the
material is also skipped in the AO pass. Not really correct but avoids
performance bottleneck rendering AO for hair.
2010-07-13 12:27:44 +00:00
9a12369b00 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30257:30259 2010-07-13 10:04:30 +00:00
5d08ba9981 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30231:30257 2010-07-13 09:41:29 +00:00
26fa02ac60 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30229:30231 2010-07-12 16:21:48 +00:00
3077a5e5f4 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30216:30229 2010-07-12 15:18:09 +00:00
da42be6bb0 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30116:30216 2010-07-12 10:43:54 +00:00
ea6600c35f Fix #22796: GLEW compile errors on FreeBSD. 2010-07-09 19:10:12 +00:00
5cd2ee1e71 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30108:30116 2010-07-08 15:14:32 +00:00
4835623158 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30081:30108 2010-07-08 10:08:02 +00:00
a2232a3a3c Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30079:30081 2010-07-07 15:09:35 +00:00
0d0d957334 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30031:30079 2010-07-07 14:52:55 +00:00
67974d22f8 Render Branch: code to check if ao/env/indirect should be computed
was confusing and wrong in a few cases, with shadeless, ambient,
passes, etc, now added a single function for it.
2010-07-07 11:13:34 +00:00
3708652c95 Fix environment/indirect light not taking shader into account correctly
for approximate AO.
2010-07-06 14:41:21 +00:00
cd15aca0a4 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30025:30031 2010-07-06 11:51:12 +00:00
b2834b213d Render Branch: https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29994:HEAD 2010-07-06 10:33:42 +00:00
18672244b3 Render Branch: disable some lowres/highres raytracing code, isn't working
well and causing some problems.
2010-07-05 18:45:28 +00:00
25bd015086 Render Branch: fix ray shadow samples not being taken into account correctly. 2010-07-05 17:57:30 +00:00
eda9ea5aa1 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29923:29994 2010-07-05 17:35:38 +00:00
12acd69769 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29903:29923 2010-07-04 11:08:49 +00:00
435e26cdbf Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29850:29903 2010-07-03 17:23:47 +00:00
a108d1e751 Render Branch: world lighting method no shader / shader once / full shading
is now just a single "use shader" option. Full shading can't possibly work
well for irradiance caching, and when not doing irradiance caching we might
as well do full shading.
2010-07-02 13:47:23 +00:00
016954d020 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29826:29850 2010-07-01 16:17:57 +00:00
b6b5dd3719 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29819:29826 2010-06-30 15:25:41 +00:00
994f201ce6 Render Branch: render layer material overrides can now be restricted
to all objects that are not part of a specified group. Helpful for
creating masks.
2010-06-30 14:57:20 +00:00
bb8b17109f Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29790:29819 2010-06-30 10:22:37 +00:00
ead82f7b44 Render Branch: local lightgroup option was missing for volume
materials in the UI.
2010-06-29 13:23:07 +00:00
22b3297f2c Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29775:29790 2010-06-29 13:22:28 +00:00
16bb9fa6bf Render Branch: fix texture nodes + halo rendering problem. 2010-06-29 12:14:03 +00:00
0c9f444ad5 Render Branch: fixes for shaded halo rendering. 2010-06-29 10:58:10 +00:00
b8c6b190aa Render Branch: quick durian hack, particle settings and material
animation are now evaluated according to particle lifetime. This
is how it worked before by default, but was disabled, maybe to be
replaced by a better system? Probably won't be merged to trunk.
2010-06-29 09:48:11 +00:00
c7dcae1592 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29760:29775 2010-06-28 17:21:42 +00:00
fd0cb17cb5 Render Branch: fix crash with node compositing groups and tile cache,
nodes in groups were not getting a thread id assigned.
2010-06-28 13:57:39 +00:00
7686dc2990 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29687:29760 2010-06-28 10:04:00 +00:00
b112e8f7cf Render Branch: volumes with the camera inside were rendering on all
render layers even if the object was on a different layer.
2010-06-25 13:44:47 +00:00
f5be8c6713 Render Branch: better error message when failing to read displacements. 2010-06-25 13:01:04 +00:00
6b982199b0 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29653:29687 2010-06-25 12:35:23 +00:00
d8581c2f78 Render Branch: move tile cache init a bit earlier to fix baking crash. 2010-06-23 16:56:29 +00:00
b9edd036ac Render Branch: baking stability tweak, set G.rendering during bake to
disable drawing in 3d view, etc, same as for regular rendering.
2010-06-23 15:24:44 +00:00
7bea067a9a Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29651:29653 2010-06-23 15:09:37 +00:00
babad75b3a Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29614:29651 2010-06-23 14:39:03 +00:00
11f2aa6e1f Render Branch: attempt to fix crashes with tile cache + baking. 2010-06-23 14:24:58 +00:00
8c34c34654 Render baking bugfix (applies to renderbranch only)
lightgrouphash wasnt initialized
2010-06-23 12:53:27 +00:00
917a62517a Render Branch (only) workaround for
[#22662] Transforming handles in the graph editor is broken.
2010-06-23 10:48:09 +00:00
becb7e24dc svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29614:29626 2010-06-22 18:36:30 +00:00
4e6d1fcdb4 Render Branc: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29608:HEAD 2010-06-22 14:14:46 +00:00
b3058e0470 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29587:29608 2010-06-22 10:52:32 +00:00
9b548ab8ce Render Branch: simplify option for shadow buffer size. 2010-06-21 16:58:35 +00:00
1132052f79 Render Branch: fix bug raytracing instanced objects with use instancing
disabled for the raytracer.
2010-06-21 14:16:05 +00:00
5975ba7f21 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29546:29587 2010-06-21 09:02:56 +00:00
695d59731d Render Branch: trying to fix windows compile. 2010-06-20 15:38:49 +00:00
68b7a5c19e Render Branch: remove some unused code from irradiance cache. 2010-06-20 15:34:04 +00:00
464c58b04c Render Branch: remove "inline" accidentally left in for testing,
and also remove and outdated comment.
2010-06-20 15:24:37 +00:00
117c9a9d95 Render Branch: another 10% performance tweak, store child pointers and
child bb just as fixed arrays of size 4 in nodes, nearly all nodes have
this many children, so overall it actually reduces memory usage a bit
and avoids a pointer indirection.
2010-06-18 16:07:47 +00:00
623211ac1d Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29540:29545, skipped particle_system.c 2010-06-18 14:45:29 +00:00
a8736649aa Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29468:29540 2010-06-18 09:45:46 +00:00
e993ac302b Render Branch: fix crash with strands & override materials. 2010-06-18 09:44:02 +00:00
ca8f1b43dd Render Branch: some optimization tweaks that need more testing on more
scenes, but seems to give a 15% performance improvement in tests here.

* leave out logf() factor in SAH, makes tree build quicker with no
  noticeable influence on raytracing on performance?
* set max childs to 4, simplifies traversal code a bit, but also seems
  to help slightly in general.
2010-06-17 17:04:42 +00:00
3cd3b385c9 Render Branch: removed a bit too much code along with vertex normal flip,
should work correct again now.
2010-06-17 14:47:03 +00:00
e577910cae Render Branch: optimization in raytree building, was computing bounding
boxes more often than necessary.
2010-06-17 12:37:49 +00:00
4bcfa2adce Render Branch: save a few percentages on simple scenes, doesn't seem to help
on more complex ones, but makes things easier to analyze.

* reorganize svbvh code so all the traversal functions are in one file
* don't do test for root so that push_childs can be inlined
* make shadow a template parameter so it doesn't need to be runtime checked
2010-06-17 10:02:52 +00:00
8d7159a673 meant to remove this before last commit. 2010-06-17 01:13:56 +00:00
673e422f47 Warp Modifier (render branch only)
Use 2 objects to warp verts from one objects space into another, option for curve fallof, vgroup and textures.
Similar to hooks but the verts are not fixed.

made this modifier share code with displace.
2010-06-17 01:06:10 +00:00
784aadc3f2 Render Branch: force inlining of auxiliary functions for ray-triangle/quad
intersection, helps a few percentages.
2010-06-16 19:27:29 +00:00
9b53c0cbaa Render Branch: remove a few options
* Simplify Skip Quads to Triangles: now quads are never split, with the
  render branch changes non-planar quads should no longer cause problems.
* Vertex Normal Flip: this seems to be more harmful than helpful in many
  cases, and also makes little sense once you start raytracing.
* Doubled Sided Lighting: just always do this, not much use in being able
  to turn this off, and it works only in the viewport anyway.
2010-06-16 19:12:55 +00:00
477012bf0c Render Branch: add some defines for "always inline" in addition to "inline". 2010-06-16 19:07:00 +00:00
ba33a76d07 Render Branch: attempt to fix some crashes with image tile cache
when compositing and preview render run at the same time.
2010-06-16 19:05:47 +00:00
59ef683191 Render Branch: some reshuffling of the raytracing code, should have
no effect on results, but makes it easier to do some optimizations.
Seems to help a few percentages in performance, but nothing significant.

* remove RE_raytrace.h, raytracer is now only used by render engine again.
* split non-public parts rayobject.h into rayobject_internal.h, hopefully
  makes it clearer how the API is used.
* added rayintersection.h to contain some of the stuff from RE_raytrace.h

* change Isect.vec/labda to Isect.dir/dist, previously vec was sometimes
  normalized and sometimes not, confusing... now dir is always normalized
  and dist contains the distance.

* change VECCOPY and similar to BLI_math functions.
2010-06-16 18:57:23 +00:00
2b762b4db3 Render Branch: update build systems for automatic weighting changes. 2010-06-16 18:15:59 +00:00
fed02c2546 Render Branch: armature weighting / mesh deform no longer use render
raytracing acceleration structure but BVH instead.
2010-06-16 13:34:54 +00:00
c60bf84257 Render Branch: enabled openmp multithreading for multires/subsurf again,
but only if there are >= 1 million faces estimated in the resulting mesh.
2010-06-15 18:44:47 +00:00
451cf34694 Render Branch: don't evaluate displace modifier with strength 0,
avoids multires subdividing vertex group here in some cases.
2010-06-15 18:22:28 +00:00
4e948478a5 Render Branch: move irradiance cache computation of 4x4 matrix svd and
pseudoinverse into blenlib, slightly faster due to avoiding malloc/free
and some floating point divisions.
2010-06-15 18:19:35 +00:00
20985c3962 Render Branch: fix raycounter not working with new indirect light. 2010-06-15 18:14:04 +00:00
5059a10aa3 Render Branch: small optimization to avoid calling material_in_material
too much in sss preprocessing pass.
2010-06-15 18:12:36 +00:00
b361f0d284 Render Branch: remove unnecessary call to ambient_occlusion(). 2010-06-15 18:11:52 +00:00
d39863ef35 Render branch: tiny optimization in qmc sampler. 2010-06-15 18:11:03 +00:00
30403b83c5 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29449:29468 2010-06-15 17:45:03 +00:00
eaf7baec6e missed this from last merge 2010-06-14 17:31:11 +00:00
7876398475 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29432:29449 2010-06-14 15:12:16 +00:00
b7d2c344d2 Render Branch: sss optimization, to share irradiance cache between materials
in preprocessing pass. This required fairly major changes, so that each tile
renders all sss materials, instead of each material rendering all tiles.

I tried further to do a single rasterization for all materials, but it changed
the results too much, for example eyes would be missing shadow at the sides
because occluded faces were included in the sss pass then and not contributing
any shadow. Unfortunate because it helped performance quite a bit as exactly in
these cases the irradiance caching needs to take more samples.
2010-06-14 10:22:52 +00:00
50867ebaaa Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29404:29432 2010-06-13 17:09:16 +00:00
65b6cf1e79 Material IDs work with nodes now; the id defaults to the
containing material's id, but you can also specify an
id mask output node if you want.
2010-06-11 21:53:10 +00:00
6460458c9d Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29385:29404 2010-06-11 12:40:22 +00:00
c445d72719 change lamp wkey menu for render branch (dont merge this back on its own) 2010-06-10 16:06:54 +00:00
3ce583f5b9 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29381:29385 2010-06-10 16:00:24 +00:00
af00fa1b57 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29361:29381 2010-06-10 08:03:39 +00:00
4492d49312 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29331:29361 2010-06-09 09:08:34 +00:00
cc8aee0c9c Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29309:29331 2010-06-08 07:47:03 +00:00
22be1e225c Render Branch: revert last optimization commit, gives problems with
some nested node materials, will fix this properly as part of my
next commit with some deeper changes.
2010-06-07 16:22:18 +00:00
fd56c4e2d6 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29245:29309 2010-06-07 15:44:01 +00:00
864258184a Render Branch: optimization to skip irradiance cache with node sss
materials in some cases, should save about 25% rendertime on the
baby dragon.
2010-06-07 12:11:57 +00:00
437366cab8 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29216:29245 2010-06-05 16:09:35 +00:00
a2f9de98b4 Render Branch: temporarily revert commit 29079 from trunk with particle
path changes. This is causing two problems (reported in tracker):

* hair doesn't move when transforming e.g. an armature parent
  of the mesh emitting the hair.
* particle duplis on hair (for feathers) are not rendering.
2010-06-05 16:04:13 +00:00
7217ce7c17 Render Branch: improve least squares reconstruction for irradiance cache,
in cases where it is underdetermined (few samples points). Hopefully solves
flickering in some of the mountains that we have here.
2010-06-05 14:35:07 +00:00
d7e2aef3b5 Render Branch: post-sim correction for hair bendiness, doesn't work
very well in my tests, but perhaps better than nothing.
2010-06-04 15:41:53 +00:00
8fbf1f3459 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29214:29216 2010-06-04 12:25:41 +00:00
6977b4c4f8 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29182:29214 2010-06-04 12:10:23 +00:00
b9490265d6 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29150:29182 2010-06-03 14:22:07 +00:00
995d227003 print's in pointcache were slowing down bake (renderbranch only) 2010-06-03 11:20:46 +00:00
91b9dcecd0 Render Branch: Fix #22412: crash rendering with octree for raytracing. 2010-06-02 18:37:16 +00:00
a3b3552803 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29132:29150 2010-06-02 07:41:55 +00:00
c29aca9a63 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/render -r29104:29132 2010-06-01 17:29:56 +00:00
35516d3411 Render Branch: multires external files can now be loaded, previously
it would only save to the new location when changing the path.
2010-06-01 15:09:29 +00:00
ed9c96a613 Render Branch: lamp halo's can now be textured. Had to reorganize the
code to separate cone intersection, integration between intersections,
and shadow/texture lookup.
2010-06-01 13:28:13 +00:00
6bfc653fb7 Render Branch: fix crash cancelling render while building object instance
in raytree, object could still be added after it was already freed.
2010-05-31 16:25:20 +00:00
ceab656ecf Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28984:29104 2010-05-31 12:45:45 +00:00
59460799a9 fixed crash in quadview 2010-05-30 20:21:50 +00:00
1e981721fb fixed object id bug 2010-05-28 14:45:16 +00:00
ba22b72426 Fix indexMat typo and linking problem on Linux with make. 2010-05-28 04:28:11 +00:00
df1dcf1e68 Render Branch: hair collision time stepping test. Not sure this is much
better than before but it helps in some cases. It seems to me that
without this it is taking 1.5 steps each time instead of 1.

The original paper defines vi+1/2 = (xi+1 - xi)/dt, but in our case we
already have vi+1 = (xi+1 - xi)/dt ... so there's a conflict here.
2010-05-26 16:16:45 +00:00
228521d6ae Render Branch: fix missing hardness property for Cook-Torrance in UI. 2010-05-26 16:06:35 +00:00
b49e061e56 Render Branch: make hair particles also support drawing their number next
to them, previously this only worked for regular particles.
2010-05-26 16:04:11 +00:00
e50f5a5f5e Render Branch: for hair collisions, always treat quads as split into
triangles for intersections, solves some issues.
2010-05-26 15:59:45 +00:00
cdb9dc8093 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28978:28984 2010-05-25 18:34:49 +00:00
d9042bdb8e Render Branch: bring cloth solver code a bit more in line with trunk again
* goal code using springs is now enabled again by default for cloth, with
  an option to use the different goal code available.
* hair collisions now update tv instead of tx, just like cloth does.
* extra collision solve step is only done if necessary again.
2010-05-25 14:14:31 +00:00
26c48de3d2 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28971:28978 2010-05-25 13:50:36 +00:00
8806001702 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28959:28971 2010-05-25 06:53:18 +00:00
da8993f355 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28957:28959 2010-05-24 14:42:58 +00:00
9ec099a11e Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28949:28957 2010-05-24 12:58:33 +00:00
7434aee374 own merg from trunk broke tiff loading r28950 2010-05-24 10:04:54 +00:00
5accb729a2 Render Branch: manual merge from commit 28949, merging -r28890:28948
Brecht: please check tiff.c, still has minor change compare to trunk, not sure this is intentional.

also copied netrender repath module.
2010-05-24 08:25:40 +00:00
4bfab50cca Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28890:28948 (missing release/scripts/modules/add_object_utils.py and changes from source/blender/render/intern/source/texture.c source/blender/render/intern/source/rendercore.c source/blender/makesrna/intern/rna_scene.c source/blender/imbuf/intern/tiff.c), will manually merge next. 2010-05-24 08:02:15 +00:00
7188740090 ffmpeg was computing the frame length of avis via doubles,
but was not properly ceiling them, sometimes resulting in truncation errors.
2010-05-21 08:55:56 +00:00
7c65b7f559 durian featurette: ^Cmekey in anim editors now respects scene/preview frame range. merge with trunk will happen if Aligorith approves this. implemented view-all in the NLA editor btw, and fixed a bug where shift-select didn't work 2010-05-20 20:34:20 +00:00
8df382dba2 =New feature: material id renderpass=
Works exactly like the object id pass; to use, 
assign a Pass Index in the material Options panel.
2010-05-20 17:41:34 +00:00
77d6845810 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28888:28890 (sorry about the merge-noise) 2010-05-20 16:12:22 +00:00
0c95c15f88 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28887:28888 2010-05-20 15:34:44 +00:00
9415d0ecb6 same as last commit, in renderbranch. render opengl previews had another case that wasn't checking the view3d local layers. 2010-05-20 15:20:16 +00:00
f1505cf854 fixed bug with layers being left out of frame recalc in ogl render 2010-05-20 15:15:48 +00:00
6a650bea1b Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28876:28883 2010-05-20 15:09:04 +00:00
1937f3047c Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28865:28876 2010-05-20 09:38:15 +00:00
b52a6fca12 don't flip zoom direction if continnuous zoom is enabled, which goes opposite from dolly 2010-05-19 16:41:22 +00:00
de895fcb1f Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28850:28865 2010-05-19 16:35:29 +00:00
ca9c265b39 Structural stiffness was missing from the hair dynamics panel. 2010-05-19 16:29:23 +00:00
d7f6b146dd fixed node editor zooming the wrong direction 2010-05-19 16:19:17 +00:00
a86c5a0d7e fix particle trail rendering 2010-05-19 15:53:07 +00:00
d974016885 reversion of dupli commits 2010-05-19 13:26:21 +00:00
61cba1e54f fix for outliner drawing when it should not; code was missing a break 2010-05-19 12:23:29 +00:00
8855de055d yay better less hackish dupli fix 2010-05-19 12:06:48 +00:00
3bc4028150 duplis in groups were not working 2010-05-19 11:32:58 +00:00
7d547c0f07 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28801:28850 ...note: dont merge my previous commit 2010-05-19 08:38:07 +00:00
11b2550c2b Render Branch: implicit solver for hair now calculates forces and does
integration separate per hair. This increase the stability of the hair.

I found that usually the conjugate gradient takes about 4-8 steps, but
it sometimes takes 20 or even does not converge, and returns bogus
velocities. I'm not entirely sure why that is, but it seems logical
that a smaller system would be more numerically stable. What I suspect
is that since there are many hairs, and it tests for the average error
of those hairs, a few hairs may be able to hide their high error in this
average.

I've tried to not make the code too ugly but's there's a few stupid
hacks, maybe eventually it would be better to have a separate hair and
cloth function that calls common functions.

Also for threading, hairs can now be distributed over threads. There
still seems to be too much thread overhead though, should find a way
to keep all threads running for the entire timestep.
2010-05-18 16:40:05 +00:00
81f3fc3564 Render Branch: fix two point cache problems:
* cloth did not get reset correct in some situations, when startframe was
  different than 1
* point cache could sometimes mark the cached frames as inexact, when
  writing an info pointcache file, since that was indicated as cfra == 0.
2010-05-18 16:31:29 +00:00
6a6f3661da Render Branch: some more code shuffling in the implicit solver:
* move force calc + implicit solve into separate function
* do the same for new goal code
* only run the second filtering solve in case it is needed
* only run rigid body damping in case it is enabled
2010-05-18 15:24:04 +00:00
97607e0459 Render Branch: implicit solver now only uses openmp on matrix multiplication
and dot product if num vertices > 25. This may help for cases where there are
few vertices and thread overhead actually slows things down, but mostly it's
to avoid useless threads in threads once I commit the code to solve each hair
individually.
2010-05-18 15:03:45 +00:00
c37fcb42c4 Render Branch: minor code tweaks and warnings fixes in implicit solver, should
have no effect, committing these separately from the actual changes.
2010-05-18 14:57:56 +00:00
edf8a96cbe BLI_init_threads/BLI_end_threads with NULL listbase now raises thread level
and enables mutex protection on MEM_* functions, useful when you want to call
these functions from an OpenMP thread.
2010-05-18 14:38:36 +00:00
a8cede7905 Render Branch: two utility functions:
BLI_linklist_find: find link at an index
BLI_linklist_insert_after: insert link after another one
2010-05-18 14:35:53 +00:00
220bb230e7 particle system can start in negative frames now. also removed BIF_preview_changed, since it's not being used anymore. 2010-05-18 14:30:33 +00:00
f88f711a8d Fix for the eyelid rig type. Vector(#, #, #) to Vector((#, #, #)) 2010-05-18 13:46:56 +00:00
2c4bf966fc made trail settings a seperate panel. bug fixes will follow, after I work on some more urgent ones first. 2010-05-18 12:51:56 +00:00
bc76229439 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28759:28801 ...note: skipping changes from properties_particle.py, will need to be merged manually 2010-05-17 07:43:51 +00:00
974cc93f3d Render Branch: disable threading for vector dot product in implicit solver
for now, due to non-commutative nature of floating point ops the sim would
give different results each time! Sometimes subtle, but sometimes also very
different.
2010-05-14 14:48:57 +00:00
88dbbdd3b5 version patch for 2.49 boids; be warned: this is not really at all correct, but hey at least no more crashing :) 2010-05-14 11:09:35 +00:00
415d25afcf svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28726:28759 2010-05-14 09:44:32 +00:00
4a2c29321b workaound for smoke pointcache not being read, this may not be a correct fix so committing to render-branch for now. 2010-05-13 18:27:56 +00:00
5226fe6355 fix for mistake in commit 28570 2010-05-13 18:26:04 +00:00
c73e9d5645 Render Branch: Fix problem rendering lamp halo's with some materials
using lightgroups.
2010-05-13 16:19:34 +00:00
57e6a32e6e Render Branch: Fix wrong (non-normalized) orco coordinates for particle
system with subdivision surfaces disabled, resulted in strange dark spots
when test rendering sintel at subdiv level 0 due to different textures
coordinates.
2010-05-13 15:30:50 +00:00
948657e38f Render Branch: tweak malloc names to debug memory usage. 2010-05-13 15:28:30 +00:00
24e9008c76 Three optimizations for hair sim effectors:
* Multithread calculating effector forces on vertices.
* Avoid unnecessary where_is_object_time call.
* Avoid perlin noise macro that might expand into slow code.

If only we were actually using effectors more, then this might have
been a significant optimization :).
2010-05-12 19:31:06 +00:00
a88c56ab8f allow negative start frames for point caches 2010-05-11 20:05:21 +00:00
32f7edee88 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28713:28726 2010-05-11 19:57:20 +00:00
c840d24ec0 ui tweak 2010-05-10 17:49:07 +00:00
48f984dd8d improved cloth solver for hair situations. also, made flexibility dampening use a special mode for hair, that applies it to individual hair strands (you can use internal friction, e.g. the velocity smoothing, for global velocity dampening). 2010-05-10 17:16:32 +00:00
584d11030b Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28707:28713 2010-05-10 15:05:27 +00:00
d7545049d0 Fix for memory leak when failing to read displacements file. 2010-05-10 14:07:20 +00:00
7cb69daebe Fix for failures in read tile tiffs wasn't quite correct, this should work. 2010-05-10 14:05:27 +00:00
282f5be597 Fix for slow raytree build with zero bounding boxes, these would get
split into (0..1, 1..size) children which was very slow. Now it just
doesn't add primitives to the tree if they have a zero bounding box.
2010-05-10 14:00:08 +00:00
7d64081964 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28643:28707 2010-05-10 10:32:46 +00:00
e9d42140fb Deep shadow buffers are now created and stored tiled, this helps avoid a
memory peak when creating them, and also can save some memory afterwards
by not storing empty tiles. Threading code here was also changed so that
each tile can be rendered by it's own thread, and memarena is now used
to avoid slowness due to malloc mutex locks. There's no setting at the
moment to configure the tile size, fixed to 256x256 currently to avoid
performance problems.
2010-05-10 10:21:38 +00:00
d2180b16bc Small correction for loading tiled tiff images in case reading pixels fails. 2010-05-10 09:22:29 +00:00
8a6008c819 Fix: always compute dxco/dyco derivatives, previously with shadows disabled
these were not computed but still used in a few places.
2010-05-10 09:20:25 +00:00
1ae4d3d8db Field Buttons:
*Minor spacing problem.
2010-05-08 08:45:16 +00:00
f723b4f986 Field Buttons:
* Own row for "use_all_layers", to prevent jumping around of the button in different situations. Also makes single column layout readable again.
2010-05-08 08:38:04 +00:00
856ef1b9aa Render Branch: small fixes and tweaks:
* better multires error message
* sync blenpluginapi/iff.h with imbuf changes
* remove some unused includes
2010-05-07 15:08:45 +00:00
eed57b40f2 More exception handling for OpenEXR, to fix a crash when reading
back tiles from a cancelled render.
2010-05-07 12:01:32 +00:00
b31051fe0d Render Branch:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender   -r28638:28639
(skipping ghash merge)
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender   -r28640:28643
2010-05-07 09:44:55 +00:00
fa58a65259 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28622:28637 2010-05-07 06:54:07 +00:00
6c2eed3d77 merged over last commit, 28428 2010-05-06 20:10:37 +00:00
1c643060e8 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28613:28622 2010-05-06 17:58:13 +00:00
d895b5b382 Fix tile cache crash, IMB_addrectImbuf could free mipmap levels on
convert tiles to rect, but we want to keep them.
2010-05-06 14:43:56 +00:00
6b10225917 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28593:28613 2010-05-06 11:49:26 +00:00
45d046a0b3 Render Branch: https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28593:28610 2010-05-06 08:34:05 +00:00
587e3e6378 write metadata info into OpenEXR images.
can be viewed with the command line utility 'exrheader'
2010-05-06 07:10:56 +00:00
6c4d7f41b3 debug print, left in by accident 2010-05-05 17:52:55 +00:00
939c56365e Fix image tile cache crash when rendering with the max number of
threads (64), it needs max threads + 1 local caches.
2010-05-05 17:07:55 +00:00
41ca7d4dbf Fix memory free errors for CollisionModifierData.xold. 2010-05-05 16:21:38 +00:00
b0ceb8cc2d Fix/workaround for wrong speedvectors in some shots, added an extra
scene_update_for_newframe call to ensure everything is updated to the
correct state before rendering.
2010-05-05 16:14:37 +00:00
55ee2057b2 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28583:28593 2010-05-05 15:49:37 +00:00
8d986c58b8 division by zero fix 2010-05-05 10:20:59 +00:00
ee5dfb889f Fix crash rendering sss + irr cache, mask value could get a too
high value causing centmask lookup to go out of bounds.
2010-05-05 00:28:16 +00:00
80b9777bf3 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28574:28583 2010-05-04 22:02:26 +00:00
60b45c46a8 Fix light group rendering for case with twice-linked sintel groups. 2010-05-04 21:19:32 +00:00
6b415e46cb Fix wrong pixels when reading small mipmap levels from .tx files. 2010-05-04 16:54:00 +00:00
90fb5143ad pass string to new hashes as with guarded alloc and memarena, this way theres no need to use a compile time option 2010-05-04 15:36:11 +00:00
c88d353e10 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28522:28574
note: rna_lamp.c changes didnt make it in.
2010-05-04 15:14:17 +00:00
6aea33dded add cmake option for previous ghash debug commit 2010-05-04 13:42:28 +00:00
639b3552c3 ghash debug mode, compile with GHASH_DEBUG_LEAKS defined and ghash will append the file/line BLI_ghash_new was called from to the tag str it passed to MEM_mallocN 2010-05-04 13:36:32 +00:00
0707619ab7 particle and pointcaches now check if they are recursing; e.g. a particle system instancing itself. 2010-05-04 12:26:00 +00:00
6b0a8c1f6f proxy rigs now properly recall the active bone correctly on file load 2010-05-04 11:54:44 +00:00
a251f83828 vgroup copy (and a few other ops) now works in editmode. 2010-05-04 11:30:21 +00:00
2d29e4d97c added a peak memory statistic 2010-05-04 10:35:36 +00:00
06e7dfb62c fixed drawing of weights in strand particle edit mode, yay 2010-05-04 10:16:32 +00:00
3d03ac9cde adding up/down buttons for moving vgroups in the stack 2010-05-04 08:59:32 +00:00
e1d1fa5fe5 NULL a collision modifier field on load 2010-05-03 16:35:37 +00:00
67b3a47ffa {forgot this file, added a sanity check.} don't allow modifiers (e.g. cloth) after multires if in sculpt mode; should fix 22021. more work is needed, since while it doesn't crash anymore, you also can't sculpt without manually disabling the modifiers. 2010-05-03 15:36:47 +00:00
150e845ba5 don't allow modifiers (e.g. cloth) after multires if in sculpt mode; should fix 22021. more work is needed, since while it doesn't crash anymore, you also can't sculpt without manually disabling the modifiers. 2010-05-03 15:36:17 +00:00
9c61e95c1c quad view modifies global view3d data appropriately, fixes 22111. 2010-05-03 11:27:31 +00:00
9630be706f mask modifier properly works in weightpaint and edit modes now. note that modifiers should not have to provide a applyModifierEM function, there's really no reason to not pull the result from applyModifier if applyModifierEM doesn't exist, it's not like we don't have a dozen *EM functions that do just that, anyway. fixes 22192 2010-05-03 10:04:25 +00:00
47252b3781 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28505:28522 2010-04-30 13:00:03 +00:00
66bf58c394 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28496:28505 2010-04-29 15:38:43 +00:00
1315d82a45 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28488:28496 2010-04-28 18:15:43 +00:00
c3b1ebf607 enforce modifier name uniqueness on file load 2010-04-28 17:41:01 +00:00
6ac9845a4d hair tweak 2010-04-28 16:11:18 +00:00
74b06f0785 Render Branch: Fix crash opening certain files with texture nodes
and displacement modifiers.
2010-04-28 15:50:09 +00:00
a2c5fa7916 Render Branch: Fix image tile cache crash with displacement modifier
and preview render running at the same time, now the main thread and
thread 0 for rendering have a separate cache.
2010-04-28 14:36:36 +00:00
76e7b950b1 hair update 2010-04-28 13:43:49 +00:00
ce4d3e7e59 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28485:28488 2010-04-28 11:06:37 +00:00
846aacd7f8 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28473:28485 2010-04-28 08:50:49 +00:00
953bbd33b9 hair collision test is a little better. also fixed a mem leak and hopefully fixed a hang that can happen sometimes. 2010-04-27 22:46:04 +00:00
818807b3f0 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28464:28473 2010-04-27 21:04:05 +00:00
2bc0d59a69 hair collisions are much improved. and rewrote goal code to not suck. 2010-04-27 18:21:38 +00:00
4a4ec8eb09 last merge broke 2010-04-27 17:19:09 +00:00
51370216f8 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28457:28464 2010-04-27 15:56:06 +00:00
14c494070e moved goal code to be an external force processed by the implicit system, not part of the internal solver itself (the code there doesn't work, is hacked, explodes, etc) 2010-04-27 15:55:35 +00:00
3b4a088b92 Render Branch: Fix for last fix... 2010-04-27 12:24:08 +00:00
d692f1c6bf Render Branch: Fix local light groups not working in some cases. 2010-04-27 12:23:01 +00:00
66b6dcea45 Render Branch: Image tile cache was not thread safe combined with threaded
compositing nodes causing crashes.
2010-04-27 12:07:33 +00:00
fd166e53f0 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28425:28457, note: missing changes from properties_particle.py 2010-04-27 10:00:44 +00:00
b9fd67b7f6 =Hair Dampening and Collision=
Some durian features; added a new dampening mode to hair (and cloth, since
they shared the same dynamics code), that blends velocities with what the velocity
would be if the hair or cloth was a stiff rigid body.  It's called "flexibility dampening"
for now.  Note that the code doesn't go through the solver directly, but this *is* an implicit
solver, and integrating this sort of outside stuff is the whole point of implicit systems.

Plus it works better for solving durian issues as quickly as possible (jahka: pin stiffness for hair is totally unusable btw).

Also added collision for hair, extending the existing collision code.  I have more reliable
code then this, but it'd b a bit of work to have it co-exist with the existing collision 
code (the other code replaces all of the collision code, so I'd have to rework it to coexist instead).
2010-04-27 02:30:41 +00:00
Nathan Letwory
f9b9866b7f Sprinkling some winstuff magic dust to make sure blender also links on Windows platforms.
Please remember to put in the BLI_winstuff.h in proper ifdef block whenever using something like snprintf() or seek(). Also good for places where maths defines are used. (the header defines the much-needed _USE_MATH_DEFINES on Windows , gives you nice M_PI and such.).
2010-04-26 20:44:30 +00:00
Nathan Letwory
8dcd8f0645 Fix for compile error where declarations happen *after* statements in a block. (joeedh, next time put those new statements after decs in a block ;) ) 2010-04-26 20:24:51 +00:00
b5f262ca66 fixd hair smoothing crash 2010-04-26 16:53:47 +00:00
2f497caee3 Render Branch: fix for crash with material light groups local option. 2010-04-26 15:55:18 +00:00
2780809160 Render Branch: Fix for FSA update while rendering fix, should set
float rect to NULL.
2010-04-26 11:56:52 +00:00
26325875fd Render Branch: fix for irradiance cache mutex unlock that got lost
in code changes.
2010-04-26 11:28:20 +00:00
c9e25acabd rigify update for modified api 2010-04-26 07:53:44 +00:00
ec19b94634 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28388:28425 2010-04-26 07:26:21 +00:00
eb8044d51d finally! found the evil undo bug(s). hopefully I got 'em all. 2010-04-24 19:36:29 +00:00
12f21a9671 Render Branch: Image Tile Cache
* Loading of tiles from .tx files, so that large images which
  are only partially in view consume less memory.
* Caching of tiles with a memory limit. This is currently disabled
  by default, the memory limit can be set in the user preferences.

More detailed notes here:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache

This should basically be functional now for rendering durian, though
some things should be added still for ease of use:

* Auto-generating .tx files.
* Automatic memory limit, how can you find a reasonable value?
* Included non-tiled images in cache (or perhaps just autogen)?
* Image thumbnails don't use this system yet.
2010-04-23 18:04:16 +00:00
a260e48fc0 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28381:28388 2010-04-23 18:03:06 +00:00
33a7f6de51 Mesh Deform Modifier: also forgot to commit this file.. 2010-04-23 17:42:33 +00:00
c7b7a407ba Render Branch: Fix Full Sample not drawing render result while rendering. 2010-04-23 15:58:39 +00:00
314f0940d0 Render Branch: Use antialiasing for rendering icon previews, also
avoids loading the full image when using tiled .tx files.
2010-04-23 15:54:55 +00:00
736827d3d9 Render Branch: Take border render into account when drawing grid
before for render result becomes visible.
2010-04-23 15:53:29 +00:00
b42336b6d8 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28377:28381 2010-04-23 12:13:58 +00:00
c155cb7831 more detailed render error messages 2010-04-23 11:57:45 +00:00
297c9776dd Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28373:28377 2010-04-23 11:29:46 +00:00
a4a8455bb5 Render Branch: bring properties_texture.py in sync with trunk. 2010-04-23 10:47:57 +00:00
1586cbdf84 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28368:28373 2010-04-23 10:15:01 +00:00
063d7ab7dd console history is now saved in .blends 2010-04-23 09:13:52 +00:00
20cbb966f0 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28357:28368 2010-04-23 06:36:44 +00:00
83a7ba4ffc RenderBranch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28349:28357 2010-04-22 18:22:04 +00:00
4983c00359 Render Branch: merge over revision 27931 from trunk, missed this somehow. 2010-04-22 17:18:03 +00:00
198d2899e0 Render Branch: tweak to SSS code to avoid division by zero, and remove
some comments.
2010-04-22 16:47:25 +00:00
0794c11ac2 fix all layers effector option, it should work on effectors themselves, not simulator objects 2010-04-22 16:37:13 +00:00
46b2417adc RenderBranch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28328:28349 (Note, skipping changes from properties_texture.py) 2010-04-22 16:33:16 +00:00
758f63f500 added option to not restrict effectors based on layer; note it must be enabld on the simulated *object*, *not* the effector 2010-04-22 15:59:27 +00:00
c3bf2391e4 Render Branch:
* Scons compile fix for windows, missing pthread declaration (imbuf refactor commit)
2010-04-21 18:11:34 +00:00
fb98ce62e1 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28321:28328 2010-04-21 16:35:10 +00:00
8a963b1221 Fix crash with speed vectors / raytraced GI / strands combination. 2010-04-21 14:53:01 +00:00
7141e212f6 partial redraw clipping planes do not work; I disabled until there's time to debug them (note partial redraw still exists, it's just theoretically not quite as fast) 2010-04-21 13:13:52 +00:00
705305d6ee Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28313:28321 2010-04-21 09:45:11 +00:00
b02e6fe918 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28301:28313 2010-04-20 21:58:09 +00:00
6a70d75393 excude the over cautiousness, removing changes unintentionally made -r28309, probably harmless but rather match trunk. 2010-04-20 21:57:32 +00:00
49d1960c17 reverted link fix yet again til tomorrow, need to find a good way to propegate a pointer to the host main through lib filedata's 2010-04-20 21:09:57 +00:00
c7f91cd854 missing null check for lamp groups 2010-04-20 20:52:16 +00:00
4978d5a07a pointdensity->point_data must be NULL'd on file read 2010-04-20 16:30:08 +00:00
c15fc55f50 revert 28299 temporarily while I fix it 2010-04-20 11:24:49 +00:00
139b831a5a own stupid mistake in prev commit 2010-04-20 11:18:03 +00:00
62b8685949 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28283:28301 2010-04-20 10:38:15 +00:00
7d5b147664 Render Branch: Fix particle objects instanced from hair having wrong
transform when rendering.
2010-04-20 10:28:54 +00:00
92d5ecd6a3 allow linked or appended files to themselves link data from the host .blend 2010-04-20 09:49:00 +00:00
bdef6b0905 Render Branch: Fix SSS scale + node material problem. 2010-04-19 19:25:40 +00:00
526f5b80c3 Render Branch: SSS scale can now be textured. 2010-04-19 17:53:01 +00:00
dbcd83bab1 Updated rigify scripts for minor driver api change. 2010-04-19 15:20:33 +00:00
ccee38af38 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28280:28283 2010-04-19 13:30:13 +00:00
44a2a7f78b Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28254:28280 2010-04-19 10:01:17 +00:00
c8d3bac3ed Render Branch: Fix missing AO pass with SSS materials, forgot to check for
this case in optimizations.
2010-04-19 09:50:02 +00:00
15598d2de3 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28211:28254 2010-04-18 10:49:45 +00:00
d9510d3ddd Render Branch: Fix some alpha premul problems with mipmap files by moving
the premul code to imbuf, still a small difference that needs to be fixed,
but no very bright pixels anymore hopefully.
2010-04-16 15:25:43 +00:00
046b3a5692 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28211:28234 2010-04-16 15:24:01 +00:00
8597ca0063 Render Branch: Attemp to fix sss + irr cache render crash with displaying
cache samples.
2010-04-16 15:03:11 +00:00
451e169915 Render Branch:
* Fix crash with NULL image texture.
* Add test for render cancel in deep shadow buffer compression.
2010-04-16 14:27:41 +00:00
717f487ee4 Render Branch: SSS now works together with irradiance caching. 2010-04-16 14:09:25 +00:00
dcabcedb88 Render Branch: Fix mistake in imbuf changes, forgot to replace one free()
by MEM_freeN().
2010-04-16 12:00:56 +00:00
78dc0063b9 Render Branch: Fix merge full sample not working after cancelling render,
proper fix would be to get rid of G.afbreek entirely..
2010-04-16 11:19:17 +00:00
ce32a7eb38 Render Branch: Fix for broken raytracing neighbour intersection test. 2010-04-16 10:47:49 +00:00
71b6055bc4 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blend -r28211:28225 2010-04-16 08:35:50 +00:00
bbd70fc38a fix for missing null pointer check. 2010-04-15 21:33:47 +00:00
7037441e9e Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28202:28211 2010-04-15 17:10:46 +00:00
1f0812fe75 Render Branch:
* Forgot to mention this in last commit. Currently image loading will look
  for an .tx file next to the specified image file, and if it exists, use
  that instead automatically. It compares the dates and always used the newest
  of the two.
* Fix uv y derivative being scaled wrong.
* Fix for possible use of invalid mipmap level -1.
2010-04-15 16:59:23 +00:00
44906cd715 Render Branch:
Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines), it's a bit drastic but can add back if it's still useful. 

* Added a ImFileType struct with callbacks to make adding an file format type,
  or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
  a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
  editing the code directly.
* Functions removed that were only used for sequencer plugin API:
  IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
  IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
  IMB_dit0, IMB_dit2, IMB_cspace

Image textures can now lazely load mipmap levels from files, so if an object
is far away only a lower level is loaded. This is supported for the .tx file
format as used by prman, which is basically a tiff image with all the mipmap
levels saved in it. I tested generating them using OpenImageIO maketx utility,
(there is no way to save these from Blender currently).

Added mipmap levels simplify option (couldn't think of a better name). This
makes it possible to force using lower resolution mipmap levels, which helps
reducing memory usage a lot when using .tx files.

Next: tile loading support, then swapping them in and out with a cache.
2010-04-15 15:49:48 +00:00
64a0da7367 Render Branch: three utility functions:
* mul_v4_fl
* BLI_replace_extension: replace extension in a filename
* BLI_file_newer: test if one file is newer than the other
2010-04-15 15:36:51 +00:00
470b86ecdb disable an assert, use a guess assignment instead. 2010-04-15 13:51:02 +00:00
d1b6a820b1 Render Branch: fix for particle duplis not rendering from inside a dupligroup,
not sure why this check was here, will need to find out if something goes wrong.
2010-04-15 11:04:41 +00:00
8824dd6d18 Render Branch: allocate pixel row as part of RenderPart instead of
on the stack, may solve some problems on mac/win.
2010-04-15 10:44:55 +00:00
6092b20cd8 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28181:28201 2010-04-15 10:30:02 +00:00
f3fbcf99d3 Render Branch: Fix irregular shadow buffer + displacement crash. 2010-04-14 16:07:54 +00:00
59c99171a0 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28180:28181 2010-04-13 22:50:09 +00:00
86f41b42e8 cloth init function not being called 2010-04-13 22:20:02 +00:00
e0bb23506c merge from trunk 2010-04-13 20:52:37 +00:00
f7b6f52f7c Render Branch: Fix for incorrect bounds of transformed objects in new
raytracing code.
2010-04-13 17:42:35 +00:00
a19a3bb2ad Render Branch: don't block popup drawing while rendering. 2010-04-13 17:24:29 +00:00
ba2235c5f2 moved over make local fix to render branch 2010-04-13 17:15:33 +00:00
f6e70b94ab dupligroup no_draw option was using layers but not restrict view/render setting.
(not a bugfix exactly but would do display list context switching while drawing for no reason).
2010-04-13 16:24:22 +00:00
04016efc98 Render Branch: https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28156:28164 2010-04-13 16:19:04 +00:00
16d98223ec fix for rare case when icon textures wont load. 2010-04-13 14:46:19 +00:00
c2bfbaa603 Render Branch: forgot to check for NULL here in disabling area drawing
during render.
2010-04-13 14:02:58 +00:00
c18a1a0388 Render Branch: Fix missing type button in texture properties with nodes. 2010-04-13 13:53:24 +00:00
be89f0892b Render Branch: disable drawing of spaces other than the image editor
and info header while rendering. This should be fixed properly, but
for Durian stability is more important now. Also disabled updating
statistic while rendering, the render info also shows it's own stats
anyway.

Added an endjob callback for jobs, which accounts for most of the files
changed.
2010-04-13 11:36:25 +00:00
5ebf98c74e Geometry node uv/color layer now has search list/autocomplete. 2010-04-13 09:23:19 +00:00
2f0ca673d5 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28068:28156 2010-04-13 08:10:23 +00:00
848ec6479a Render Branch: Fix crash drawing dupli lamps with cone visualization. 2010-04-09 15:47:12 +00:00
2f32696b60 Render Branch: Fix stencil + displacement not working; 2010-04-09 15:22:29 +00:00
31b8444778 Render Branch: attempt to fix crashes where scene updates would run while
rendering. G.rendering was set in the job thread, which is too late.
2010-04-09 10:54:19 +00:00
8883671b87 Render Branch: clip displacement values by the displacement bound. Ideally this
should be computed automatic, but this at least helps finding out if it's too low.
2010-04-08 16:19:09 +00:00
6f7486ee6b Render Branch: Fix displacement mapped surfaces not supporting speed vectors yet,
and optimization so displacement does not evaluate e.g. color or bump textures.
2010-04-08 12:21:31 +00:00
2736665558 Render Branch: increase limit on z buffer alpha depth per pixel, far away hair
is hitting this limit. Ideally we should do hair simplification for quicker render
times, or more AA samples per pixel.
2010-04-08 10:54:21 +00:00
a951f7ee4c Fix incorrect object layer for duplifaces. 2010-04-07 20:13:29 +00:00
21a56148f7 Fix for incorrect vector pass with background scenes. 2010-04-07 20:11:12 +00:00
fb1592311e Render Branch: restore surface mode for mesh deform modifier, seems we are
using it in some places still, intentionally only committed in this branch.
2010-04-07 14:01:59 +00:00
310137b550 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28064:28068 2010-04-07 10:26:53 +00:00
5e1c383581 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28045:28064 2010-04-07 09:25:53 +00:00
dfe04f1b84 Fix objects instanced on hair particles not giving consistent results
when the object is transformed.
2010-04-06 15:01:04 +00:00
2b1b1b08a0 Fix texture node image textures not getting correct derivatives for filtering. 2010-04-06 14:41:40 +00:00
84f1df2042 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28042:28045 2010-04-06 10:13:19 +00:00
c7e7df3f58 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27962:28042 2010-04-06 09:29:50 +00:00
8f9c37727b Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27948:27962 2010-04-02 16:04:12 +00:00
f07d389630 Render Branch: should have included this file in last commit. 2010-04-02 14:49:47 +00:00
76f8d5f6f0 Render Branch: Fix a problem with only shadow materials + env light. 2010-04-02 14:40:47 +00:00
19f2d03558 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27929:27948
skipping r27931 and r27944. can be merged later.
2010-04-02 09:23:54 +00:00
1c6e9f61f5 Render Branch: More work on displacement/subdivision.
* Displacement textures are now filtered with derivatives.
* Render subdivision is now a scene level setting, which is automatically
  applied to all objects with displacement.
* Subdivision rate is now a scene level setting with per object relative
  rates for more/less detail.
* The unsubdivided low resolution mesh for raytracing is now displaced as
  well to match the high resolution better.
* Render previews now also do render subdivision.
* All texture coordinates should now work for displacement.

Implementation:
* Change shadeinput uv values to be interpolation weights, simplifies code
  and is easier to understand for me.
* Shadeinput texture coordinates and material setup for displacement now
  uses same code instead of it's own.
* Autosmooth and displacement are now moved from mesh to general postprocess.
* Autosmooth now uses orco's to stay stable under animation, which avoids
  some hacky code to preserve original normals and works for more cases.
* Stress texture coordinates are now supported for nurbs/curves/metaballs too.

Still to do:
* Control over resolution for raytracing/shadows.
* Stitching up grid cracks.
* Smooth derivatives across boundaries.
* Automatic displacement bounds.
2010-04-01 20:03:21 +00:00
4c78027f2c Render Branch: evil "local" option for material light groups. When the material
is linked in, this will use a local group instead of the linked group, so that
some objects in a linked group can be lit by separate lights.

Implementation is just a few lines in material.c, most of the changes do some
clean up for lamp related code.
2010-04-01 17:11:39 +00:00
6e5ba8aef6 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27927:27929 2010-04-01 13:57:24 +00:00
cc2ad1d9a1 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27919:27927 2010-04-01 12:57:44 +00:00
a8ce4600cd svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27889:27919 2010-04-01 08:40:02 +00:00
44fa93f36a support for adding remove action groups, as well as setting an action group from an fcurve (was readonly). 2010-03-31 19:02:39 +00:00
3b7d386e6f Render Branch: Fix ward isotropic slope option not showing in UI. 2010-03-31 13:31:35 +00:00
09eaa531ad Render Branch: Fix unused material node affecting final color. 2010-03-31 11:58:21 +00:00
997d8e0686 FCurve Py/RNA API for adding and removing points fcu.keyframe_points.add()/remove()
mostly rewritten but some parts taken from [#21313] Added API Function to manage F-Curve. By Anthony Hinsinger (atoy40)

Armature NLA baking function, very simple but not in any menu's yet.
- bakes armatures only
- bakes loc/scale/rot
- supports different rotation types
- cleans up unneeded points after.
2010-03-31 10:40:51 +00:00
bf6700849e attempt to fix for dna padding error on some systems 2010-03-31 07:13:54 +00:00
a1fdc4614c fix for own errors in calling ending topology table 2010-03-31 07:09:15 +00:00
2ec1951087 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27866:27889 2010-03-31 06:52:31 +00:00
7320156a53 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27859:27864 2010-03-31 06:49:54 +00:00
1a1465916a appending a data that linked to another blend file would fail to save that link because it didnt tag it as directly linked. 2010-03-30 19:53:30 +00:00
7f9b293f3f Render Branch: Sun lamps now can cast soft shadows again. They look
different however than trunk, because they used to depend on the lamp
location while the light depends only on the rotation. So that has
changed now and only the rotation should have an influence. This also
means the soft size does not define a size in blender units, but rather
a fraction of the hemisphere.
2010-03-30 17:10:24 +00:00
81a61f713b fix for topology mirror table not being freed 2010-03-30 15:49:49 +00:00
24e4a07865 Render Branch:
* Option Use Local Coords for raytracing was enabled when the option
  in the UI was disabled.
* Avoid creating tangents on high res mesh when doing tangents space
  high to low baking.
* Gave memory arena's a name used for allocations for easier memory
  usage debugging.
2010-03-30 15:26:11 +00:00
829076d791 Solidify
- offset option so the surface can be made solid from the middle
- vertex group, so solid distance can be multiplied by a vertex group (invert option also)
2010-03-30 14:58:16 +00:00
bd814d06fd select markers with Ctrl+RMB when sync selection enabled. 2010-03-30 12:31:04 +00:00
2135d519c5 Fix external multires data link getting lost on exiting editmode. 2010-03-30 11:13:23 +00:00
aa00f31dc9 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27742:27859 2010-03-30 10:49:52 +00:00
8b3679faf8 [#21816] bpy.data.add_image has stopped working on Windows
moved to bpy.data.images.load(), missed this call.
2010-03-30 09:54:17 +00:00
c1c669f972 Baking for dupligroup & linked library objects
- library data allows pointcache writing (hard to know how this should work long term so ifdef'd for now)
- changing the frame now updates the dupligroup objects
- BKE_ptcache_ids_from_object(), option to get the id's from duplis

note! scene_update_tagged() is called from the main() loop, and runs BKE_ptcache_quick_cache_all(), this could become a performance issue, especially with duplis, should probably not call BKE_ptcache_quick_cache_all() all the time, even when not playing back animation.
2010-03-30 09:18:37 +00:00
ede49637d0 Render Branch: Fix a problem with particle duplis, due to own bugfix for #20350,
the problem for that seems to be in dupliverts, not particles.
2010-03-29 18:29:54 +00:00
7ead765d93 Render Branch: Tangent space normal map baking should work again now. 2010-03-29 16:13:32 +00:00
712b485957 fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process /usr/bin/blender.bin was killed by signal 6 (SIGABRT)  
 original fix submitted by Jochen Schmitt

made some other changes too
2010-03-29 14:53:19 +00:00
fdefd2cb89 patch by Wahooney, so new template's are internal text and dont get saved over by mistake. 2010-03-29 14:05:21 +00:00
cb3b3924dd on second thaughts this is only useful when shadow option is enabled so only redraw then. 2010-03-29 13:27:31 +00:00
868ad31fe7 update uv window while transforming (useful when used with UVProject modifier) 2010-03-29 13:19:10 +00:00
5efd782a4b Render Branch: Fix missing env/indirect not being properly cleared
with ambient set to zero.
2010-03-29 13:04:26 +00:00
034777fbc5 no-functional changes. new function for id path. 2010-03-29 12:44:44 +00:00
28eb29ae6a ability to pin any object into the context 2010-03-29 12:33:33 +00:00
b771c6e2da error in last commit 2010-03-29 10:37:13 +00:00
4c7d5d4805 copy and initialize uv modifier scale, remove unneeded enum. 2010-03-29 10:15:25 +00:00
6b0b52150e Fix deep shadow not respecting Cast Buffer Shadows option. 2010-03-29 10:09:02 +00:00
8971917e43 spelling: wich --> which 2010-03-29 09:07:03 +00:00
6a92939ae2 some cases of struct name being set where it shouldnt have been. 2010-03-29 07:57:21 +00:00
10f8a1024f Render Branch: Fix cloth pinning not working after rest shape key commit. 2010-03-26 16:38:47 +00:00
aa03d6a882 Render Branch: Add back image pin option in image editor header. 2010-03-26 15:46:57 +00:00
c740757d46 Render Branch: Assign weight from bones in weight paint mode now respects
paint face mask, also avoid making vertex groups if they will not be filled.
2010-03-26 15:28:43 +00:00
1415861365 Render Branch: Forgot to commit the UI for rest shape key. 2010-03-26 15:22:50 +00:00
6341313df0 Render Branch: Rest shape key for cloth option, this makes it possible
to specify different spring lengths.

Implementation is quite ugly because the shape key has to be pulled
through the modifier stack somehow, need a more flexible data mask
system to solve this properly.
2010-03-26 15:06:15 +00:00
5ac1c4f624 Render Branch: Disable group transform stuff temporarily since it still has
some problems, so we can properly render things.
2010-03-25 18:40:06 +00:00
608bc71e37 Render Branch: Avoid doing irradiance/pixel cache on some materials that don't need it. 2010-03-25 16:28:44 +00:00
a3b99b4898 Render Branch: Yet another fix for group transform, it was suffering from
numerical drift, now we backup matrices and restore if they were not modified.
2010-03-25 16:02:00 +00:00
fea78d93f5 Render Branch: Fix vertex paint not getting restored after exiting editmode,
and fix the opposite problem when going to object mode from the menu.
2010-03-25 15:21:31 +00:00
c773d3d5e9 Render Branch: Cloth simulation can now use a group to specify which objects
to collide with, in addition to the effectors group.
2010-03-25 14:58:40 +00:00
2c35d33f6e Render Branch: fix rendering another scene from the compositor not working. 2010-03-25 14:32:29 +00:00
8ac8bb06b3 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27721:27742 2010-03-25 13:23:08 +00:00
c90109a219 Render Branch: SSS now works slightly better with render layers, previously
it would assume the material to be on all layers, now it only assumes it to
be on the layers that have an object with the same SSS material.
2010-03-25 12:02:03 +00:00
ac2b7e91f6 Render Branch: object subdivision/displacement can now be cancelled quicker,
and also fixes compositing not being properly cancelled.
2010-03-25 11:39:21 +00:00
6096c77f5e Render Branch: Optimization for pose channel name lookups using a hash, makes
playback in one particular scene with 3 characters go from 10 to 13 fps.
2010-03-24 18:15:29 +00:00
4dc2e94ec3 Render Branch: Evaluation of objects in a dupli group now also is done
scene_update_tagged instead of only during redraw.
2010-03-24 18:14:57 +00:00
8de1939e5c multiply for panorama cameras 2010-03-24 18:13:08 +00:00
a9b5caf731 Render Branch: more tweaks to group transform, to get dragon tail working. 2010-03-24 17:09:10 +00:00
13d827d344 fix for incorrect args, before pyapi fixes these were ignored. 2010-03-24 16:54:03 +00:00
7b7c07e0ae svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27711:27721 2010-03-24 16:28:13 +00:00
cd5345686b Render Branch: tweak to group transform, now group matrix is applied in
where_is_object_time instead of object_handle_update to ensure it is always
applied. Still a problem with dragon tail, will attempt to fix that next.
2010-03-24 15:59:44 +00:00
37fb6d5f22 Render Branch: forgot a normalize in displacement normal commit. 2010-03-24 15:43:22 +00:00
d91d8b5f12 Render Branch: displacement now preserves smooth normals from the base mesh,
which got lost due to linear subdivision. It now does this:

final normal = displaced normal + (base mesh normal - subdivided normal)
2010-03-24 11:33:39 +00:00
4277f3f424 Render Branch: linked groups object matrix and data evaluation no longer
happens in group space now, but in scene/world space. This ensures e.g.
gravity goes in the right direction if the group is rotated, or collision
with objects outside of the group works. This only works correct if there
is one instance of the group, but that was the case already.

This also fixes collision with objects in groups not working, and removes
some object_handle_update calls that should no longer be needed in 2.5.
2010-03-24 10:14:39 +00:00
b37b60c8e1 missed this in the merge too 2010-03-24 10:07:54 +00:00
4ba6d1d33e fix for merge error 2010-03-24 10:06:49 +00:00
5bcf171bed svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27666:27705 2010-03-24 09:07:13 +00:00
ee6623418b fix for mistake in own recent commit. 2010-03-23 16:12:24 +00:00
3decb02c98 fix for crash on loading some files with composite nodes. 2010-03-23 16:04:33 +00:00
70ba5f0114 workaround for compositor threading copying actions every time. 2010-03-23 15:20:05 +00:00
3e3437deae error when reordering function 2010-03-23 15:18:09 +00:00
73b8067d17 Fix makesrna crash due to missing object_type_curve_items sentinel. 2010-03-23 14:58:25 +00:00
ed288596c5 re-order some args to be more consistant with the previous commit 2010-03-23 13:52:39 +00:00
8af7d689fa rna/py-api fix.
C functions and python used different argument order, this relied on mapping non-keyword arguments to 'REQUIRED' arguments but meant that you could not have an optional, non-keyword argument.

next commit will make order of arguments consistant (currently only changed order that rna wrapped).
2010-03-23 12:42:46 +00:00
8f54bc2a25 Render Branch: lamp distance drawn in 3d view now takes into account
color management so that the cutoff is really at 0.01 of the intensity.
2010-03-23 11:38:47 +00:00
568ca2c61f report an error parsing args, will try fix properly but this involves many changes so do this for now. 2010-03-23 10:44:20 +00:00
dd1ff2745c fix for parsing python args to rna functions, was using allocated size as argument count. 2010-03-23 09:19:46 +00:00
8fd53acd20 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27654:27666 2010-03-22 17:46:49 +00:00
6df5b63ac8 py/rna functions for adding and removing curve data. 2010-03-22 17:25:29 +00:00
c2852409c0 getting an item from a collection wasnt being checked correctly. 2010-03-22 17:24:17 +00:00
500d71f94b bugfix for loading objects saved with the dupli pointer set. 2010-03-22 16:13:17 +00:00
d53f701f8b svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27592:27654 2010-03-22 09:55:58 +00:00
c6f2bebae5 functions for adding curve points
eg.
 curve.splines[0].points.add()
 curve.splines[1].bezier_points.add(10)
2010-03-20 16:25:34 +00:00
f5601b86fb pyrna api
curve.splines.active
 curve.splines.new(type='POLY')
 curve.splines.remove(spline)

- Added BLI_remlink_safe() since in with script input we cant be sure where the data comes from, it may not be apart of the list.
- Added flag defines for flagu and flagv, were using numbers.
2010-03-19 15:10:37 +00:00
d3c53977ba shell script for building and uploading html and pdf reference doc 2010-03-19 11:57:39 +00:00
908e50a866 fix for warning 2010-03-19 09:22:00 +00:00
0eb412a728 option to set the openexr directory for cmake 2010-03-19 09:12:08 +00:00
291a62f2b0 Render Branch: some quick tweaks to make transparent shadow + node materials
performance bareable, new shading system will solve this automatically.
2010-03-18 18:19:49 +00:00
eebc144df3 Render Branch: Fix recursion problem with nodes, indirect light and
transparent shadows.
2010-03-18 17:41:18 +00:00
cb8c105169 operator & menu item in the image editor to edit an image externally. 2010-03-18 17:21:52 +00:00
803e7bfd36 Render Branch: Clamp diffuse/specular to be >= 0 after indirect light,
so that negative lamps also can darken it.
2010-03-18 17:05:17 +00:00
76e118fa03 Render Branch: Fix clipping problem in render subdivide. 2010-03-18 15:29:55 +00:00
f7c6ecc867 Render Branch: Fix render window not redrawing while rendering with FSA. 2010-03-18 11:47:22 +00:00
6ca49f7a15 remove ED_object_apply_obmat(ob) in favor of object_apply_mat4(ob, mat), ED_object_apply_obmat wasnt doing quat/axis-angle or non xyz rotations. 2010-03-18 11:37:43 +00:00
e37c267718 Render Branch: Fix for rendering transparent volume shadows. 2010-03-18 11:34:20 +00:00
ccd5b8e8d4 Render Branch: Fix node material texture slots list not being correct. 2010-03-18 11:18:56 +00:00
c60d558115 revert unintentional files from r27594 2010-03-18 11:14:44 +00:00
a34a9a775f - fcurves with out of range indicies would crash blender (animsys was alredy checking length, just not comparing with the index)
- pythons keyframe_insert/delete(): raise an error when given a keyframe with an invalid index.
2010-03-18 11:12:12 +00:00
9c88a5a062 insertig keyframes from python would crash. 2010-03-18 10:42:13 +00:00
3e6716f0df Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27541:27592 2010-03-18 10:24:40 +00:00
749ede87f2 minor changes to 'Render Only' option.
- display camera border.
- display camera object when in camera view.
2010-03-18 09:30:34 +00:00
3db178aab1 fly mode up/down were inverted. 2010-03-18 09:15:07 +00:00
ae7a22a5f3 [#21649] Display missing scripts in Add-Ons panel
updated patch from Martin Bürbaum (pontiac)

wasnt displaying correctly with filtering
2010-03-17 21:31:34 +00:00
d60b34486d Render Branch: sound fix, in case ffmpeg decode fails, don't use the samples. 2010-03-17 21:11:41 +00:00
f89a5381a4 list missing addons that are enabled in the user prefs 2010-03-17 21:09:25 +00:00
53aa5b4daf RNA/Py API
bpy.data.add_image(filename) --> bpy.data.image.load(filename)
Added bpy.data.images.new(name, width, height, float_buffer)
2010-03-17 19:40:22 +00:00
6a8e79920c Sound bugfixes:
* sound file path was not displayed in sequencer panel.
* sound strip with relative paths would stop working after undo.
2010-03-17 16:13:49 +00:00
123d295e86 option for cyclic time adjustment for nla strips, needed for adjusting the speed of flapping wings 2010-03-17 16:02:29 +00:00
0c28227746 Fix cancelling while computing irradiance cache not responding fast enough. 2010-03-17 11:31:50 +00:00
6ebccc4a40 include library in the tooltip 2010-03-17 10:24:38 +00:00
6b4737c1ea view selected uses display transform bone 2010-03-17 09:31:27 +00:00
bee7113e3b simplify version checking by having addons use same version tuple as bpy.app.version 2010-03-16 19:36:10 +00:00
9362b89de6 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27521:27541 2010-03-16 17:15:21 +00:00
d6874e4022 no need to include the setting names in enum items 2010-03-16 16:11:26 +00:00
254d59ae05 option to lock alpha while projection painting. 2010-03-16 14:39:41 +00:00
982a7f5b19 transform marker sync for extend and grab is back. 2010-03-16 13:46:40 +00:00
4963994fe5 the string 'Environment' is too long for a pass name, was causing crashes in FSA. use Env instead. 2010-03-16 13:22:27 +00:00
25b4eb7832 no need to set flat shading for faces manually 2010-03-16 12:45:13 +00:00
5a1f14805a adding faces was setting the wrong flag, smooth rather then selected. 2010-03-16 12:44:17 +00:00
44be201585 Render Branch: don't do shade once trick for strands now, this does not
work well at the moment. Full shading also leads to blurry color textures
at the moment, will have to think of a way around this.
2010-03-15 22:03:24 +00:00
c919b3ea64 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27511:27521 2010-03-15 20:23:06 +00:00
7006440d41 Render Branch: indirect light shading / bump. The bump method settings
has been removed and replaced with a shading method setting. There are
three options:

* No Shading: no bump mapping and assuming lambert shader.
* Full Shading: execute BSDF for each ray and includes bump mapping. When
  combined with irradiance cache, will generally require many more samples
  for bumped surfaces and execute textures 2x.
* Shade Once: execute BSDF once using averaged ligth direction for each
  RGB channel. Bump mapping is also done after irradiance caching this way.
  Requires fewer samples in irradiance cache and only needs to do textures
  once. This is basically the trick from "An Approximate Global Illumination
  System for Computer Generated Films" used by Dreamworks.

Decided to use averaged light direction instead of spherical harmonics,
uses less memory and these can be used with BSDF's. This trick is not really
accurate but seems believable enough for e.g. Minnaert and Oren-Nayar shaders,
though for example with Toon it fails to give similar results.

This commit also fixes AO falloff strength not being taken into account.
2010-03-15 20:02:47 +00:00
fe6168838e Render Branch: move displacement code into own file, and some code cleaning
for transforming mesh normals.
2010-03-15 14:16:45 +00:00
581a18307d Render Branch: tweak to ambient occlusion multiply mode, now it is also
applied to env/indirect intead of only direct light.
2010-03-15 13:47:35 +00:00
7120dff251 Render Branch: make displacement work with flat shading, previously would not
have properly set normal giving strange result, though in general it's best to
use smooth shading for displacement to avoid discontinuities at the edges.
2010-03-15 12:35:14 +00:00
a314f52a6c Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27446:27511 2010-03-15 12:02:10 +00:00
23b4120107 Wkey in uv editor brings up weld/align menu rather then welding. 2010-03-15 11:45:29 +00:00
ddab33906e implify skipping quad->tri was being done even when the main simplify option was disabled. 2010-03-15 11:20:49 +00:00
da050b61c8 draw option to only display what is rendered, used for sequencer, opengl drawing by default. since we use preview renders a lot the empties & armatures can get in the way also. 2010-03-15 11:00:00 +00:00
61b00d0cb5 made re-project UI less confusing 2010-03-12 16:58:22 +00:00
ac5cf2ca4c Render Branch: fix python script error in lamp buttons. 2010-03-12 16:27:04 +00:00
136e58b2e9 Render Branch: fix volumetric render + area lamp crash. 2010-03-12 15:23:24 +00:00
2a3c82f85c Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27415:27444 2010-03-12 13:52:38 +00:00
2cf520c861 minor changes to rna names for consistancy 2010-03-12 13:50:57 +00:00
76ca1fdf5a change the scene opengl sequence rendering to be a global option with rendering and scrubbing settings.
still need to do a do_versions for this to work right without changing settings.
2010-03-12 13:11:23 +00:00
ab6bfdef1b error in recent commit. 2010-03-12 11:33:07 +00:00
232312f9b3 Render Branch: fixes to get result ramps more similar to trunk. 2010-03-12 11:28:17 +00:00
6f93156e14 library data selector, respect hide dot data, unless the user enters a '.' 2010-03-12 11:14:15 +00:00
f9fb3aee90 - menu for selecting add scenes for the sequencer.
- update internal 'btempdir' from userprefs on changing and initializing the temp dir.
- add sequence strip operators nolonger require the sequence view to be active (better for automation).
2010-03-12 10:33:48 +00:00
46d86471bd fix for nasty bug where registering properties would register them in the parent classes SRNA, made for confusing rigify args turning up in add sequencer adding collection. 2010-03-12 09:36:42 +00:00
13d5fc988c made argument conversion for much more verbose, wasnt giving enough info with bad operator args. 2010-03-12 08:21:09 +00:00
f9dd86f090 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27381:27415 2010-03-11 16:40:30 +00:00
ff354ce9fa Render Branch: fix crash in compositing nodes passing on NULL compbuf. 2010-03-11 16:11:25 +00:00
ce84e82983 Render Branch: per tile subdivision now supports uvs and vertex colors. 2010-03-11 14:23:40 +00:00
efc45e7961 error in last commit 2010-03-11 14:07:02 +00:00
b864110eed rna/py api function for removing ID blocks, id.unused_clear() 2010-03-11 13:56:48 +00:00
1fa78eb265 minor changes to work in python 2.6 which is useful in some cases since this runs outside of blender. 2010-03-11 10:46:49 +00:00
735c6731df standalone python module for reading scene, start, end frames from the blendfile (without blender). from blender 2.4x, ported to python3, added gzip support. 2010-03-11 10:39:05 +00:00
be2c534119 Render Branch: some more changes to go with recent commit. 2010-03-10 20:21:09 +00:00
836b590c8a Render Branch: strands rendering now does raytraced ao/env/indirect at the
root of the strand just like approximate.
2010-03-10 19:16:56 +00:00
f7a4fb46cd Render Branch: render subdivide for displacement now works with orco's
(generated coordinates), still not for uvs.
2010-03-10 19:02:50 +00:00
4cbec7f5e0 Render Branch: fix a crash in preview rendering. 2010-03-10 17:52:50 +00:00
ae340993b8 Render Branch: pass on object to get orco cube mapping again. 2010-03-10 16:06:50 +00:00
4948ae3f90 Render Branch: strand coords now use same storage system as others tex coords. 2010-03-10 15:12:56 +00:00
adc922f3c4 re-project paint failed on no-camera when a camera wasnt needed. 2010-03-10 15:11:24 +00:00
684000caff Render Branch: attempt to fix merge problem, addons directory seems to
still be local and using external repository at the same time? Also fix
two differences in python scripts.
2010-03-10 15:00:11 +00:00
b6c0cd7688 Render Branch: orco's now use same storage system as other texture coordinates. 2010-03-10 14:36:49 +00:00
0cb79296d1 Render Branch: move particle conversion into own file. 2010-03-10 14:02:31 +00:00
407b5d7e37 Render Branch: fix SSS being a bit too dark compared to trunk. 2010-03-10 13:35:07 +00:00
625e62bffe Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27366:27381 2010-03-10 11:01:26 +00:00
1d8d450078 Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r27217:27366 2010-03-09 18:48:15 +00:00
4b0ff16387 Render Branch: make approximate AO work with bump mapping. 2010-03-09 18:43:58 +00:00
b6a762fa99 Render Branch:
* add lamp option "indirect" to indicate if the lamp should be used
  as part of indirect lighting
* add shadow buffer option to indicate if strands should be part of
  the shadow buffer
* revert some dupli debugging code that wasn't supposed to be comitted
2010-03-09 13:03:03 +00:00
aa2cde38a2 Render Branch:
* AO/env/indirect now optionally supports bump mapping.
* Irradiance cache code was extended to support storing spherical
  harmonics, for more efficiently dealing with bump maps without
  adding loads of samples. This does not work yet however, and so
  the code is still disabled.
* Move ao/env/indirect computation inside the shading loop.
2010-03-08 18:55:11 +00:00
10509d4022 Render Branch: temporary hack option to allow material traceble to be ignored,
just for easier testing in durian because we currently have this option
disabled on all but a few materials.
2010-03-04 13:42:07 +00:00
5479f23559 Render Branch: implement area lamp form factor usage again like in old material
system, it works better. Though it also completely breaks the material/lamp
separation, and I'm not sure how this could work in a node system. Still, quick
area lamps with no noise seems to be useful..
2010-03-04 11:14:29 +00:00
455822f295 Render Branch:
* Fix inaccurate shading position calculation in non-planar quad, the face
  normal is not accurate in that case, so compute it again now. Not sure
  yet what performance impact is of this, but would actually like to get
  rid of normal entirely to save memory.
* Fix self-intersection problem with non-planar quads, the raytracer was
  splitting quads in a different way than other parts of the render engine,
  now it does the same.
2010-03-03 20:52:13 +00:00
9fa3117841 Render Branch: restored area lamp form factor code, but using the code
from AAO which is faster and matches exactly the simple multi sampled
result for lambert and no shadow.

Also some other tweaks to lamp code, and wrote down some dev notes about
current behavior:
http://wiki.blender.org/index.php/Dev:2.5/Source/ShadingSystem/RandomNotes
2010-03-03 17:12:24 +00:00
f24d1c27fe Render Branch: fix for cmake/windows compile, patch from Guillaume. 2010-03-03 17:04:03 +00:00
a725c0dcef Render Branch: fix game engine compile and remove path tracer from UI
to avoid confusion with rasterizer indirect light (it's still editable
via RNA as a debugging feature).
2010-03-03 12:43:44 +00:00
a5aed840f4 Render Branch: another file that needs the pthreads include for scons. 2010-03-03 12:34:49 +00:00
b38ad1ea71 Render Branch: attempt to fix pthread compile errors on scons/windows. 2010-03-03 12:23:21 +00:00
0934694a2b Render Branch: move hemi-polygon form factor code form approximate AO
into math library.
2010-03-03 10:35:50 +00:00
7635acf71e Render Branch: use math lib spherical harmonics functions in
approximate AO code.
2010-03-03 10:21:04 +00:00
59be099e87 Render Branch: fix problem in lamp shadow cache code, remove debug print. 2010-03-03 10:17:22 +00:00
4708eadbdd Render Branch: another small compatibility tweak. 2010-03-02 20:58:57 +00:00
82f11c0c85 Render Branch: compatibility related fixes for lamp power/energy/fallof,
trying to get conversion to match existing renders better.
2010-03-02 19:21:35 +00:00
ddbcdd13ee Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r26768:27217 2010-03-02 15:05:40 +00:00
8777e9add3 Render Branch: some WIP code before svn merge, saving irradiance cache to
file, and fix for indirect light intensity.
2010-03-02 11:35:57 +00:00
0f4f0557c5 Render Branch: some hacked code to test per tile subdivision, and
how it would interact with GI, it has no catmull-clark, grid cracks,
slow performance, no shadow, sss, raytrace, etc. Example file:

http://users.pandora.be/blendix/snow_subdiv.blend
http://users.pandora.be/blendix/snow_subdiv.png
2010-03-01 20:01:40 +00:00
bf74b10a53 Render Branch: fix for lowres raytracing of instanced objects, and some
cache test code that's still disabled.
2010-02-25 20:21:09 +00:00
109c502d44 Render Branch: increase max number of AO samples from 32*32 to 128*128. 2010-02-25 15:26:49 +00:00
769a1fc8de Render Branch: remove some test code left in accidentially, should fix
compile on windows.
2010-02-24 18:57:21 +00:00
4f579b8be7 Render Cache: irradiance cache:
* increase truncated SVD epsilon to avoid avoid large color changes when
  interpolating between near colinear points.
* added neighbour clamping. it doesn't seem to help much and make things
  a bit slower at the moment, but hopefully can be used to get better
  distribution later.

Main remaining causes of artifacts seem to be:

* even 32x32 (1024) samples can still be noisy leading to low frequency
  noise after interpolation
* borders between tiles can have discontinuities. this is mostly visible
  in combination with the above problem, i.e. if the result is splotchy
  it will have a different splotches in the next tile.
* very small features may be missed still, leading to missing shadows in
  some cases or even stippled patterns instead if they are detected part
  of the time, neighbour clamping helps somewhat here.
2010-02-24 17:27:29 +00:00
6c0ea32d92 Rende Branch: irradiance caching, fix part of the black pixels with
a division by zero check in the TNT SVD code.
2010-02-24 12:42:15 +00:00
069698f4d8 Render Branch: tweak irradiance cache clamping for reconstruction to
avoid corner samples leaking into open areas.
2010-02-24 10:57:13 +00:00
2538d92a31 Render Branch:
Should have mentioned a few more things in my previous commit log:
* Indirect light now also includes lamps.
* Adaptive sampling is currently not working.
* Teaser image (spot the artifacts)

http://users.pandora.be/blendix/indirect_teaser.png
2010-02-23 19:56:36 +00:00
f9de69cfbd Render Branch: Irradiance Cache
Implementation borrows some code from Pixie though has changed quite
a bit. This is work in progress and has artifacts and hardcoded
parameters still.

I tried irradiance gradients and found them problematic, they seem
to reduce part of the artifacts but for others have no effect, and
can even make things worse. There's a clamping trick that helps a
bit here, but I couldn't get that reliable either.

Currently it is using least squares reconstruction to smooth out the
results, it's too smooth now, still trying to find out the best way
to weight samples without introducing problems, but I'm finding this
much more promising than gradients.
2010-02-23 19:48:55 +00:00
35464b55ce Render Branch: quick hack to support 4x4 matrix SVD decomposition
in C, by using the TNT matrix library from the IK solver.
2010-02-23 19:34:12 +00:00
a65758f261 Render Branch: math functions
* add len_squared_v3v3
* add mul_v4_m4v4
* add box_minmax_bounds_m4
* rename disc_to_sh to vec_fac_to_sh
2010-02-23 19:27:36 +00:00
c023733331 Render Branch: redrawing while render would miss a few scanlines each time
with antialiasing enabled.
2010-02-23 19:24:59 +00:00
f081872ab0 Render Branch: disable ray trace epsilon for testing, not using it
gives artifacts with overlapping faces, but it also seems to lead
to self intersections.
2010-02-23 19:23:49 +00:00
34f32f16e3 Render Branch: WIP commit
* Pixel cache now works for raytraced AO/env/indirect.
* Falloff distance value is now only used for custom curve, linear and
  quadratic now have a smooth factor (range 0-1).
* Lamp multisampling code moved from shadow to shading, so that both
  shading and shadow can be multisampled. This should give correct area
  lights at the cost of noise.
* Halo now uses same lamp code as surface instead of duplicating it.
* Fix in volume code, was too bright now with lamp changes.
* Only shadow materials are now computed different, sharing more code
  but not matching old behavior yet.
2010-02-11 19:29:43 +00:00
bf062301c0 Render Branch: copy 2nd order spherical harmonics code from render to math lib. 2010-02-11 19:20:49 +00:00
d1de9ea043 Render Branch:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r26366:26768
2010-02-10 14:54:38 +00:00
48e7f4f92f Render Branch: move pixel & surface cache code to own file for reuse,
not really generic yet but getting there.
2010-02-05 12:45:23 +00:00
a500d3fb92 Render Branch: some lowres geometry raytracing test code, just a test
that is far from usable but might as well commit it.
2010-02-04 21:00:16 +00:00
9e3b526771 Render Branch: stupid path tracer I'm using for consistency testing,
only does environment lighting + diffuse at the moment, don't expect
this to make it into trunk.
2010-02-04 20:48:35 +00:00
bca8e744a3 Render Branch: lamp falloff
* Change lamp falloff formula which was dist/(r^2 + dist) with dist
   a user specified value, whereas the correct value is 1/(r^2). Now
   it is 1/(r^2 + dist) with dist = 0 as the default.
* Deprecated the Lin/Quad weighted mode.
* Still more work needed to make sun/area/hemi work better with this,
  results are too bright now.
* Also this gives quite harsh results when the lamp is near geometry,
  perhaps because we are not using tonemapping by default.
2010-02-04 20:41:49 +00:00
898909e425 Render Branch: fix memory leak when cancelling preview render. 2010-02-04 20:33:04 +00:00
be12dc312a Render Branch: different method to compute only shadow lamps, rather
than subtracting colors it now subtracts in grayscale, helps avoid
ugly discolorations when used with colored lamps.
2010-02-04 17:38:39 +00:00
bbee3ceb94 Render Branch: trying to get units figured out for materials and lamps,
see comments in material.h and lamp.h. Change in UI is that lamp energy
is now called power and is specified in Watts. It's still off by a large
factor due to the lamp falloff code, that will be fixed in a separate
commit.
2010-02-04 17:17:01 +00:00
062410f657 Render Branch: temporary workaround for extern texture access, previously this
was using the global R, with whatever contents it had from last render. For now
just introduce a static local R for this case.
2010-02-04 16:55:20 +00:00
18fb90a1eb Render Branch: make the raycounter code work again, broke it in refactoring. 2010-02-04 16:53:39 +00:00
503f0c85c5 Render Branch: fix for sampler.c, hemisphere sampling code was wrong,
also added back cosine weighted hemisphere.
2010-02-04 16:35:22 +00:00
610fc5653d Render Branch: fixes for crashes in bake and occlusion caching. 2010-01-28 22:23:56 +00:00
75d9256ef7 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r26191:26366 2010-01-28 16:02:26 +00:00
1c39a14d05 Render branch: use lamp_sample in ray_shadow_qmc. 2010-01-23 17:50:38 +00:00
c558625db6 Render branch: fix halo rendering bug in hairball.blend. 2010-01-23 17:26:39 +00:00
9a3282cd39 Render Branch
Some refactoring of blender rendering code, various code changes to clean
up the code and make it easier to extend and fit in the new shading system.
This also deprecates a number of features, so breaks backwards compatibility
already. No new shading system or new features in this commit.

Also, don't report bugs or problems for this branch yet.

Deprecated features:
* World exposure/range.
* Backbuf image.
* Specular transparency.
* Energy Ramps.
* Jittered sampling for AO and Area lamps.
* Warping and stencils in the texture stack.
* Sticky texture coordinates. 

Code changes:
* Many file and function renames, splitting, keeping the working of the
  code intact but making the existing structure more clear.
* Render global R replaced by local variables.
* Shading and pass combining for solid and z-transp is now unified. 
* Render and ShadeInput structs have been split up into nested structs.
* Threaded render no longer uses sleep().
* Lamp shading loop has been reorganized. This will make some renders
  look different, some due to bugs being fixed, and some due to new bugs.
* Texture nodes are now a texture type rather using the "use nodes"
  button.

More details on second part of this page:
http://wiki.blender.org/index.php/BlenderDev/ShadingSystem/Notes
2010-01-22 16:17:24 +00:00
2eb2b8c2ff svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r26172:26191 2010-01-22 13:57:35 +00:00
b510128ec7 Create branch for experimental 2.5 rendering work. 2010-01-21 21:48:30 +00:00
14561 changed files with 1257343 additions and 4369817 deletions

View File

@@ -1,8 +0,0 @@
{
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"phabricator.uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "master"
}

View File

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

View File

@@ -1,52 +0,0 @@
# 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.
Checks: >
-*,
readability-*,
-readability-uppercase-literal-suffix,
-readability-magic-numbers,
-readability-isolate-declaration,
-readability-convert-member-functions-to-static,
-readability-implicit-bool-conversion,
-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-function-cognitive-complexity,
bugprone-*,
-bugprone-narrowing-conversions,
-bugprone-unhandled-self-assignment,
-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,
modernize-*,
-modernize-use-auto,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-use-nodiscard,
-modernize-loop-convert,
-modernize-pass-by-value,
# Cannot be enabled yet, because using raw string literals in tests breaks
# the windows compiler currently.
-modernize-raw-string-literal,
-modernize-return-braced-init-list
CheckOptions:
- key: modernize-use-default-member-init.UseAssignment
value: 1

View File

@@ -1,53 +0,0 @@
# C/C++
[*.{c,cc,h,hh,inl,glsl}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 99
# CMake & Text
[*.{cmake,txt}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 99
# Python
[*.py]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
max_line_length = 120
# Shell
[*.sh]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 99
# reStructuredText
[*.rst]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 3
max_line_length = 120
# 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,104 +0,0 @@
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# After running the above, commits listed in this file will be
# ignored by git blame. The blame will be shifted to the person
# who edited the line(s) before the ignored commit.
#
# To disable this ignorance for a command, run as follows
# git blame --ignore-revs-file="" <other options>
#
# Changes that belong here:
# - Massive comment, doxy-sections, or spelling corrections.
# - Clang-format, PEP8 or other automated changes which are *strictly* "no functional change".
# - Several commits should be added to this list at once, because adding
# one extra commit (to edit this file) after every cleanup is noisy.
# - No clang-tidy changes.
#
# Note:
# - The comment above the SHA should be the first line of the commit.
# - It is fine to pack together similar commits if they have the same explanatory comment.
# - Use only 40 character git SHAs; not smaller ones, not prefixed with rB.
#
# https://git-scm.com/docs/git-blame/2.23.0
# white space commit. (2 spaces -> tab).
0a3694cd6ebec710da7110e9f168a72d47c71ee0
# Cycles: Cleanup, spacing after preprocessor
cb4b5e12abf1fc6cf9ffc0944e0a1bc406286c63
# ClangFormat: apply to source, most of intern
e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1
# Code Style: use "#pragma once" in source directory
91694b9b58ab953f3b313be9389cc1303e472fc2
# Code Style: use "#pragma once" in some newer headers
8198dbb888856b8c11757586df02aca15f132f90
# Code Style: use "#pragma once" in intern/ghost
1b1129f82a9cf316b54fbc025f8cfcc1a74b8589
# Cleanup: mostly comments, use doxy syntax & typos
e0cb02587012b4b2f4b18363dc7d0a7da2c02093
# Cleanup: use C comments for descriptive text
2abfcebb0eb7989e3d1e7d03f37ecf5c088210af
# use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed.
afacd184982e58a9c830a3d5366e25983939a7ba
# Spelling: It's Versus Its
3a7fd309fce89213b0224b3c6807adb2d1fe7ca8
# Spelling: Then Versus Than
d1eefc421544e2ea632fb35cb6bcaade4c39ce6b
# Spelling: Miscellaneous
84ef3b80de4915a24a9fd2fd214d0fa44e59b854
# Spelling: Loose Versus Lose
c0a6bc19794c69843c38451c762e91bc10136e0f
# Spelling: Apart Versus A Part
3d26cd01b9ba6381eb165e11536345ae652dfb41
# Cleanup: use 2 space indentation for CMake
3076d95ba441cd32706a27d18922a30f8fd28b8a
# Cleanup: use over-line for doxy comments
4b188bb08cf5aaae3c68ab57bbcfa037eef1ac10
# Cleanup: General comment style clean up of graph_edit.c and fcurve.c
0105f146bb40bd609ccbda3d3f6aeb8e14ad3f9e
# Cleanup: pep8 (indentation, spacing, long lines)
41d2d6da0c96d351b47acb64d3e0decdba16cb16
# Cleanup: pep8, blank lines
bab9de2a52929fe2b45ecddb1eb09da3378e303b
# Cleanup: PEP8 for python changes
1e7e94588daa66483190f45a9de5e98228f80e05
# GPencil: Cleanup pep8
a09cc3ee1a99f2cd5040bbf30c8ab8c588bb2bb1
# Cleanup: trailing space, remove tabs, pep8
c42a6b77b52560d257279de2cb624b4ef2c0d24c
# Cleanup: use C style doxygen comments
8c1726918374e1d2d2123e17bae8db5aadde3433
# Cleanup: use doxy sections for imbuf
c207f7c22e1439e0b285fba5d2c072bdae23f981
# Cleanup: clang-format
c4d8f6a4a8ddc29ed27311ed7578b3c8c31399d2
b5d310b569e07a937798a2d38539cfd290149f1c
8c846cccd6bdfd3e90a695fabbf05f53e5466a57
4eac03d821fa17546f562485f7d073813a5e5943
1166110a9d66af9c5a47cee2be591f50fdc445e8
# Cleanup: clang-format.
40d4a4cb1a6b4c3c2a486e8f2868f547530e0811

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

22
.github/stale.yml vendored
View File

@@ -1,22 +0,0 @@
# Configuration for probot-stale - https://github.com/probot/stale
# This file is used on Blender's GitHub mirror to automatically close any pull request
# and invite contributors to join the official development platform on blender.org
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 1
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 1
# Label to use when marking as stale
staleLabel: stale
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
This issue has been automatically closed, because this repository is only
used as a mirror of git.blender.org. Blender development happens on
developer.blender.org.
To get started contributing code, please read:
https://wiki.blender.org/wiki/Process/Contributing_Code

51
.gitignore vendored
View File

@@ -1,51 +0,0 @@
# generic files to ignore
.*
# python temp paths
__pycache__/
*.py[cod]
# editors
*~
*.swp
*.swo
*#
# Indexes for emacs, vi & others
TAGS
tags
# QtCreator
CMakeLists.txt.user
# ms-windows
Thumbs.db
ehthumbs.db
Desktop.ini
# commonly used paths in blender
/blender.bin
/BUILD_NOTES.txt
# local patches
/*.patch
/*.diff
# in-source doc-gen
/doc/doxygen/html/
/doc/python_api/sphinx-in-tmp/
/doc/python_api/sphinx-in/
/doc/python_api/sphinx-out/
/doc/python_api/rst/bmesh.ops.rst
# in-source lib downloads
/build_files/build_environment/downloads
# in-source buildbot signing configuration
/build_files/buildbot/codesign/config_server.py
# smoke simulation noise tile (generated)
waveletNoiseTile.bin
# testing environment
/Testing

20
.gitmodules vendored
View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@ Blender uses the GNU General Public License, which describes the rights
to distribute or change the code.
Please read this file for the full license.
doc/license/GPL-license.txt
doc/GPL-license.txt
Apart from the GNU GPL, Blender is not available under other licenses.

View File

@@ -1,568 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This Makefile does an out-of-source CMake build in ../build_`OS`_`CPU`
# eg:
# ../build_linux_i386
# This is for users who like to configure & build blender with a single command.
define HELP_TEXT
Blender Convenience Targets
Provided for building Blender (multiple targets can be used at once).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* release: Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
* developer: Enable faster builds, error checking and tests, recommended for developers.
* 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.
Other Convenience Targets
Provided for other building operations.
* 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.
These must be manually removed from '../lib/' to go back to using the pre-compiled libraries.
Project Files
Generate project files for development environments.
* project_qtcreator: QtCreator Project Files.
* project_netbeans: NetBeans Project Files.
* project_eclipse: Eclipse CDT4 Project Files.
Package Targets
* package_archive: Build an archive package.
Testing Targets
Not associated with building Blender.
* test:
Run automated tests with ctest.
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.
* check_spelling_c: Check for spelling errors (C/C++ only),
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
Note: an additional word-list is maintained at: 'source/tools/check_source/check_spelling_c_config.py'
Note: that spell checkers can take a 'CHECK_SPELLING_CACHE' filepath argument,
so re-running does not need to re-check unchanged files.
Example:
make check_spelling_c CHECK_SPELLING_CACHE=../spelling_cache.data
Utilities
Not associated with building Blender.
* icons:
Updates PNG icons from SVG files.
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
otherwise default paths are used.
Example
make icons INKSCAPE_BIN=/path/to/inkscape
* icons_geom:
Updates Geometry icons from BLEND file.
Optionally pass in variable: 'BLENDER_BIN'
otherwise default paths are used.
Example
make icons_geom BLENDER_BIN=/path/to/blender
* source_archive:
Create a compressed archive of the source code.
* source_archive_complete:
Create a compressed archive of the source code and all the libraries of dependencies.
* update:
Updates git and all submodules and svn.
* update_code:
Updates git and all submodules but not svn.
* format:
Format source code using clang (uses PATHS if passed in). For example::
make format PATHS="source/blender/blenlib source/blender/blenkernel"
Environment Variables
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
* BUILD_DIR: Override default build path.
* PYTHON: Use this for the Python command (used for checking tools).
* NPROCS: Number of processes to use building (auto-detect when omitted).
Documentation Targets
Not associated with building Blender.
* doc_py: Generate sphinx python api docs.
* doc_doxy: Generate doxygen C/C++ docs.
* doc_dna: Generate blender file format reference.
* doc_man: Generate manpage.
Information
* help: This help message.
* help_features: Show a list of optional features when building.
endef
# HELP_TEXT (end)
# This makefile is not meant for Windows
ifeq ($(OS),Windows_NT)
$(error On Windows, use "cmd //c make.bat" instead of "make")
endif
# System Vars
OS:=$(shell uname -s)
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
CPU:=$(shell uname -m)
# Source and Build DIR's
BLENDER_DIR:=$(shell pwd -P)
BUILD_TYPE:=Release
# CMake arguments, assigned to local variable to make it mutable.
CMAKE_CONFIG_ARGS := $(BUILD_CMAKE_ARGS)
ifndef BUILD_DIR
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
endif
# Dependencies DIR's
DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
ifndef DEPS_BUILD_DIR
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
endif
ifndef DEPS_INSTALL_DIR
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
# Add processor type to directory name, except for darwin x86_64
# which by convention does not have it.
ifeq ($(OS_NCASE),darwin)
ifneq ($(CPU),x86_64)
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
else
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
endif
# Allow to use alternative binary (pypy3, etc)
ifndef PYTHON
PYTHON:=python3
endif
# For macOS python3 is not installed by default, so fallback to python binary
# 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
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=python
endif
endif
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
# support 'make debug'
ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_debug
BUILD_TYPE:=Debug
endif
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_full
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_lite
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring release, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_release
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_release.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_cycles
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake" $(CMAKE_CONFIG_ARGS)
endif
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)
endif
ifneq "$(findstring ccache, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-DWITH_COMPILER_CCACHE=YES $(CMAKE_CONFIG_ARGS)
endif
# -----------------------------------------------------------------------------
# build tool
ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=$(CMAKE_CONFIG_ARGS) -G Ninja
BUILD_COMMAND:=ninja
DEPS_BUILD_COMMAND:=ninja
else
ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
BUILD_COMMAND:=ninja
else
BUILD_COMMAND:=make -s
endif
ifneq ("$(wildcard $(DEPS_BUILD_DIR)/build.ninja)","")
DEPS_BUILD_COMMAND:=ninja
else
DEPS_BUILD_COMMAND:=make -s
endif
endif
# -----------------------------------------------------------------------------
# Blender binary path
# Allow passing in own BLENDER_BIN so developers who don't
# use the default build path can still use utility helpers.
ifeq ($(OS), Darwin)
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
else
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
endif
# -----------------------------------------------------------------------------
# Get the number of cores for threaded build
ifndef NPROCS
NPROCS:=1
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD))
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
# -----------------------------------------------------------------------------
# Macro for configuring cmake
CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
-H"$(BLENDER_DIR)" \
-B"$(BUILD_DIR)" \
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
# -----------------------------------------------------------------------------
# Tool for 'make config'
# X11 specific.
ifdef DISPLAY
CMAKE_CONFIG_TOOL = cmake-gui
else
CMAKE_CONFIG_TOOL = ccmake
endif
# -----------------------------------------------------------------------------
# Build Blender
all: .FORCE
@echo
@echo Configuring Blender in \"$(BUILD_DIR)\" ...
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# # $(CMAKE_CONFIG); \
# # fi
# # do this always incase of failed initial build, could be smarter here...
@$(CMAKE_CONFIG)
@echo
@echo Building Blender ...
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
@echo
@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
full: all
lite: all
release: all
cycles: all
headless: all
bpy: all
developer: all
ninja: all
ccache: all
# -----------------------------------------------------------------------------
# Build dependencies
DEPS_TARGET = install
ifneq "$(findstring clean, $(MAKECMDGOALS))" ""
DEPS_TARGET = clean
endif
deps: .FORCE
@echo
@echo Configuring dependencies in \"$(DEPS_BUILD_DIR)\"
@cmake -H"$(DEPS_SOURCE_DIR)" \
-B"$(DEPS_BUILD_DIR)" \
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
@echo
@echo Building dependencies ...
$(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
@echo
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
@echo
# -----------------------------------------------------------------------------
# Configuration (save some cd'ing around)
config: .FORCE
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
# -----------------------------------------------------------------------------
# Help for build targets
export HELP_TEXT
help: .FORCE
@echo "$$HELP_TEXT"
# -----------------------------------------------------------------------------
# Packages
#
package_archive: .FORCE
make -C "$(BUILD_DIR)" -s package_archive
@echo archive in "$(BUILD_DIR)/release"
# -----------------------------------------------------------------------------
# Tests
#
test: .FORCE
@$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
# -----------------------------------------------------------------------------
# Project Files
#
project_qtcreator: .FORCE
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
project_netbeans: .FORCE
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
project_eclipse: .FORCE
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
# -----------------------------------------------------------------------------
# Static Checking
#
check_cppcheck: .FORCE
@$(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)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
check_splint: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
check_sparse: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
check_smatch: .FORCE
@$(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"
check_spelling_py: .FORCE
@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)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_osl: .FORCE
@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_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
source_archive_complete: .FORCE
@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"
INKSCAPE_BIN?="inkscape"
icons: .FORCE
@BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
@INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
@INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/alert_icons_update.py"
icons_geom: .FORCE
@BLENDER_BIN=$(BLENDER_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
update: .FORCE
@$(PYTHON) ./build_files/utils/make_update.py
update_code: .FORCE
@$(PYTHON) ./build_files/utils/make_update.py --no-libraries
format: .FORCE
@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)
# -----------------------------------------------------------------------------
# Documentation
#
# 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} \
$(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
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
doc_doxy: .FORCE
@cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: .FORCE
@$(BLENDER_BIN) \
--background -noaudio --factory-startup \
--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
help_features: .FORCE
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
clean: .FORCE
$(BUILD_COMMAND) -C "$(BUILD_DIR)" clean
.PHONY: all
.FORCE:

60
Makefile Normal file
View File

@@ -0,0 +1,60 @@
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
# vim: tabstop=8
# $Id$
#
# ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2002 by Wouter van Heyst
# All rights reserved.
#
# The Original Code is: revision 1.1
#
# Contributor(s): Hans Lambermont, GSR
#
# ***** END GPL LICENSE BLOCK *****
#
# Toplevel Makefile for blender. Bounces make to subdirectories.
# Available targets: 'all' 'debug' 'release'
# If the user wants to override some of the build
# vars they can put it in the file user-def.mk which
# will get included if it exists (please do not commit
# user-def.mk to the revision control server).
sinclude user-def.mk
# To build without openAL, set it as an environment variable,
# or put it uncommented in user-def.mk:
# export NAN_NO_OPENAL=true
export NANBLENDERHOME=$(shell pwd)
MAKEFLAGS=-I$(NANBLENDERHOME)/build_files/make --no-print-directory
SOURCEDIR =
ifeq ($(FREE_WINDOWS),true)
DIRS ?= dlltool extern intern source po
else
DIRS ?= extern intern source po
endif
include build_files/make/nan_subdirs.mk
.PHONY: release
release:
@echo "====> $(MAKE) $@ in $(SOURCEDIR)/$@" ;\
$(MAKE) -C $@ $@ || exit 1;

678
SConstruct Normal file
View File

@@ -0,0 +1,678 @@
#!/usr/bin/env python
# $Id$
# ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Nathan Letwory.
#
# ***** END GPL LICENSE BLOCK *****
#
# Main entry-point for the SCons building system
# Set up some custom actions and target/argument handling
# Then read all SConscripts and build
import platform as pltfrm
# Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
if pltfrm.architecture()[0] == '64bit':
bitness = 64
else:
bitness = 32
import sys
import os
import os.path
import string
import shutil
import glob
import re
from tempfile import mkdtemp
# store path to tools
toolpath=os.path.join(".", "build_files", "scons", "tools")
# needed for importing tools
sys.path.append(toolpath)
import Blender
import btools
import bcolors
EnsureSConsVersion(1,0,0)
BlenderEnvironment = Blender.BlenderEnvironment
B = Blender
VERSION = btools.VERSION # This is used in creating the local config directories
### globals ###
platform = sys.platform
quickie = None
quickdebug = None
##### BEGIN SETUP #####
B.possible_types = ['core', 'player', 'intern', 'extern']
B.binarykind = ['blender' , 'blenderplayer']
##################################
# target and argument validation #
##################################
# XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
use_color = ARGUMENTS.get('BF_FANCY', '1')
if platform=='win32':
use_color = None
if not use_color=='1':
B.bc.disable()
#on defaut white Os X terminal, some colors are totally unlegible
if platform=='darwin':
B.bc.OKGREEN = '\033[34m'
B.bc.WARNING = '\033[36m'
# arguments
print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
btools.print_arguments(B.arguments, B.bc)
# targets
print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
btools.print_targets(B.targets, B.bc)
##########################
# setting up environment #
##########################
# handling cmd line arguments & config file
# first check cmdline for toolset and we create env to work on
quickie = B.arguments.get('BF_QUICK', None)
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
if quickdebug:
B.quickdebug=string.split(quickdebug, ',')
else:
B.quickdebug=[]
if quickie:
B.quickie=string.split(quickie,',')
else:
B.quickie=[]
toolset = B.arguments.get('BF_TOOLSET', None)
if toolset:
print "Using " + toolset
if toolset=='mstoolkit':
env = BlenderEnvironment(ENV = os.environ)
env.Tool('mstoolkit', [toolpath])
else:
env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
# xxx commented out, as was supressing warnings under mingw..
#if env:
# btools.SetupSpawn(env)
else:
if bitness==64 and platform=='win32':
env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64')
else:
env = BlenderEnvironment(ENV = os.environ)
if not env:
print "Could not create a build environment"
Exit()
cc = B.arguments.get('CC', None)
cxx = B.arguments.get('CXX', None)
if cc:
env['CC'] = cc
if cxx:
env['CXX'] = cxx
if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
if bitness == 64:
platform = 'win64-vc'
else:
platform = 'win32-vc'
elif env['CC'] in ['gcc'] and sys.platform=='win32':
platform = 'win32-mingw'
env.SConscriptChdir(0)
crossbuild = B.arguments.get('BF_CROSS', None)
if crossbuild and platform not in ('win32-vc', 'win64-vc'):
platform = 'linuxcross'
env['OURPLATFORM'] = platform
configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
if os.path.exists(configfile):
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
else:
print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
if crossbuild and env['PLATFORM'] != 'win32':
print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
env.Tool('crossmingw', [toolpath])
# todo: determine proper libs/includes etc.
# Needed for gui programs, console programs should do without it
# Now we don't need this option to have console window
# env.Append(LINKFLAGS=['-mwindows'])
userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
# first read platform config. B.arguments will override
optfiles = [configfile]
if os.path.exists(userconfig):
print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
optfiles += [userconfig]
else:
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
opts = btools.read_opts(env, optfiles, B.arguments)
opts.Update(env)
if not env['BF_FANCY']:
B.bc.disable()
# remove install dir so old and new files are not mixed.
# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
# TODO: perhaps we need an option (off by default) to not do this altogether...
if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
if os.path.isdir(scriptsDir):
print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
shutil.rmtree(scriptsDir)
SetOption('num_jobs', int(env['BF_NUMJOBS']))
print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
# BLENDERPATH is a unix only option to enable typical style paths this is
# spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
# because the blender binary is installed in $BF_INSTALLDIR/bin/blender
if env['WITH_BF_FHS']:
BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
else:
BLENDERPATH = env['BF_INSTALLDIR']
if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
env['CXXFLAGS'].append('/openmp')
else:
if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
env['CXXFLAGS'].append('-openmp')
else:
env.Append(CCFLAGS=['-fopenmp'])
env.Append(CPPFLAGS=['-fopenmp'])
env.Append(CXXFLAGS=['-fopenmp'])
if env['WITH_GHOST_COCOA'] == True:
env.Append(CFLAGS=['-DGHOST_COCOA'])
env.Append(CXXFLAGS=['-DGHOST_COCOA'])
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
if env['USE_QTKIT'] == True:
env.Append(CFLAGS=['-DUSE_QTKIT'])
env.Append(CXXFLAGS=['-DUSE_QTKIT'])
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):
B.quickdebug += env['BF_DEBUG_LIBS']
printdebug = B.arguments.get('BF_LISTDEBUG', 0)
if len(B.quickdebug) > 0 and printdebug != 0:
print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
for l in B.quickdebug:
print "\t" + l
# remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
if env['WITH_BF_STATICCXX']:
if 'stdc++' in env['LLIBS']:
env['LLIBS'].remove('stdc++')
else:
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
# check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
if 'blenderplayer' in B.targets:
env['WITH_BF_PLAYER'] = True
if 'blendernogame' in B.targets:
env['WITH_BF_GAMEENGINE'] = False
if 'blenderlite' in B.targets:
target_env_defs = {}
target_env_defs['WITH_BF_GAMEENGINE'] = False
target_env_defs['WITH_BF_OPENAL'] = False
target_env_defs['WITH_BF_OPENEXR'] = False
target_env_defs['WITH_BF_OPENMP'] = False
target_env_defs['WITH_BF_ICONV'] = False
target_env_defs['WITH_BF_INTERNATIONAL'] = False
target_env_defs['WITH_BF_OPENJPEG'] = False
target_env_defs['WITH_BF_FFMPEG'] = False
target_env_defs['WITH_BF_QUICKTIME'] = False
target_env_defs['WITH_BF_REDCODE'] = False
target_env_defs['WITH_BF_DDS'] = False
target_env_defs['WITH_BF_ZLIB'] = False
target_env_defs['WITH_BF_SDL'] = False
target_env_defs['WITH_BF_JPEG'] = False
target_env_defs['WITH_BF_PNG'] = False
target_env_defs['WITH_BF_BULLET'] = False
target_env_defs['WITH_BF_BINRELOC'] = False
target_env_defs['BF_BUILDINFO'] = False
target_env_defs['BF_NO_ELBEEM'] = True
target_env_defs['WITH_BF_PYTHON'] = False
# Merge blenderlite, let command line to override
for k,v in target_env_defs.iteritems():
if k not in B.arguments:
env[k] = v
# disable elbeem (fluidsim) compilation?
if env['BF_NO_ELBEEM'] == 1:
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
B.root_build_dir = env['BF_BUILDDIR']
B.doc_build_dir = os.path.join(BLENDERPATH, 'doc')
if not B.root_build_dir[-1]==os.sep:
B.root_build_dir += os.sep
if not B.doc_build_dir[-1]==os.sep:
B.doc_build_dir += os.sep
# We do a shortcut for clean when no quicklist is given: just delete
# builddir without reading in SConscripts
do_clean = None
if 'clean' in B.targets:
do_clean = True
if not quickie and do_clean:
if os.path.exists(B.doc_build_dir):
print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
dirs = os.listdir(B.doc_build_dir)
for entry in dirs:
if os.path.isdir(B.doc_build_dir + entry) == 1:
print "clean dir %s"%(B.doc_build_dir+entry)
shutil.rmtree(B.doc_build_dir+entry)
else: # remove file
print "remove file %s"%(B.doc_build_dir+entry)
os.remove(B.root_build_dir+entry)
if os.path.exists(B.root_build_dir):
print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
dirs = os.listdir(B.root_build_dir)
for entry in dirs:
if os.path.isdir(B.root_build_dir + entry) == 1:
print "clean dir %s"%(B.root_build_dir+entry)
shutil.rmtree(B.root_build_dir+entry)
else: # remove file
print "remove file %s"%(B.root_build_dir+entry)
os.remove(B.root_build_dir+entry)
for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
if os.path.exists(confile):
print "clean file %s"%confile
if os.path.isdir(confile):
for root, dirs, files in os.walk(confile):
for name in files:
os.remove(os.path.join(root, name))
else:
os.remove(confile)
print B.bc.OKGREEN+'...done'+B.bc.ENDC
else:
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
Exit()
if not os.path.isdir ( B.root_build_dir):
os.makedirs ( B.root_build_dir )
os.makedirs ( B.root_build_dir + 'source' )
os.makedirs ( B.root_build_dir + 'intern' )
os.makedirs ( B.root_build_dir + 'extern' )
os.makedirs ( B.root_build_dir + 'lib' )
os.makedirs ( B.root_build_dir + 'bin' )
if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
os.makedirs ( B.doc_build_dir )
Help(opts.GenerateHelpText(env))
# default is new quieter output, but if you need to see the
# commands, do 'scons BF_QUIET=0'
bf_quietoutput = B.arguments.get('BF_QUIET', '1')
if env['BF_QUIET']:
B.set_quiet_output(env)
else:
if toolset=='msvc':
B.msvc_hack(env)
print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
env.SConsignFile(B.root_build_dir+'scons-signatures')
B.init_lib_dict()
##### END SETUP ##########
Export('env')
BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
SConscript(B.root_build_dir+'/intern/SConscript')
BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
SConscript(B.root_build_dir+'/extern/SConscript')
BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
SConscript(B.root_build_dir+'/source/SConscript')
# now that we have read all SConscripts, we know what
# libraries will be built. Create list of
# libraries to give as objects to linking phase
mainlist = []
for tp in B.possible_types:
if not tp == 'player':
mainlist += B.create_blender_liblist(env, tp)
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
B.propose_priorities()
dobj = B.buildinfo(env, "dynamic") + B.resources
thestatlibs, thelibincs = B.setup_staticlibs(env)
thesyslibs = B.setup_syslibs(env)
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
if env['WITH_BF_PLAYER']:
playerlist = B.create_blender_liblist(env, 'player')
playerlist += B.create_blender_liblist(env, 'intern')
playerlist += B.create_blender_liblist(env, 'extern')
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
##### Now define some targets
#------------ INSTALL
#-- binaries
blenderinstall = []
if env['OURPLATFORM']=='darwin':
for prg in B.program_list:
bundle = '%s.app' % prg[0]
bundledir = os.path.dirname(bundle)
for dp, dn, df in os.walk(bundle):
if '.svn' in dn:
dn.remove('.svn')
dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
source=[dp+os.sep+f for f in df]
blenderinstall.append(env.Install(dir=dir,source=source))
else:
if env['WITH_BF_FHS']: dir= os.path.join(env['BF_INSTALLDIR'], 'bin')
else: dir= env['BF_INSTALLDIR']
blenderinstall = env.Install(dir=dir, source=B.program_list)
#-- local path = config files in install dir: installdir\VERSION
#- dont do config and scripts for darwin, it is already in the bundle
dotblendlist = []
datafileslist = []
datafilestargetlist = []
dottargetlist = []
scriptinstall = []
if env['OURPLATFORM']!='darwin':
for dp, dn, df in os.walk('bin/.blender'):
if '.svn' in dn:
dn.remove('.svn')
for f in df:
if not env['WITH_BF_INTERNATIONAL']:
if 'locale' in dp:
continue
if f == '.Blanguages':
continue
if not env['WITH_BF_FREETYPE']:
if f.endswith('.ttf'):
continue
if 'locale' in dp:
datafileslist.append(os.path.join(dp,f))
if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:])) # skip bin/.blender
else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
datafilestargetlist.append(dir + os.sep + f)
else:
dotblendlist.append(os.path.join(dp, f))
if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender
else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
dottargetlist.append(dir + os.sep + f)
dotblenderinstall = []
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
if env['WITH_BF_PYTHON']:
#-- local/VERSION/scripts
scriptpaths=['release/scripts']
for scriptpath in scriptpaths:
for dp, dn, df in os.walk(scriptpath):
if '.svn' in dn:
dn.remove('.svn')
if env['WITH_BF_FHS']: dir = BLENDERPATH
else: dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
scriptinstall.append(env.Install(dir=dir,source=source))
#-- icons
if env['OURPLATFORM']=='linux2':
iconlist = []
icontargetlist = []
for tp, tn, tf in os.walk('release/freedesktop/icons'):
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
iconlist.append(os.path.join(tp, f))
icontargetlist.append( os.path.join(*([BLENDERPATH] + tp.split(os.sep)[2:] + [f])) )
iconinstall = []
for targetdir,srcfile in zip(icontargetlist, iconlist):
td, tf = os.path.split(targetdir)
iconinstall.append(env.Install(dir=td, source=srcfile))
# dlls for linuxcross
# TODO - add more libs, for now this lets blenderlite run
if env['OURPLATFORM']=='linuxcross':
dir=env['BF_INSTALLDIR']
source = []
if env['WITH_BF_OPENMP']:
source += ['../lib/windows/pthreads/lib/pthreadGC2.dll']
scriptinstall.append(env.Install(dir=dir, source=source))
#-- plugins
pluglist = []
plugtargetlist = []
for tp, tn, tf in os.walk('release/plugins'):
if '.svn' in tn:
tn.remove('.svn')
df = tp[8:] # remove 'release/'
for f in tf:
pluglist.append(os.path.join(tp, f))
plugtargetlist.append( os.path.join(BLENDERPATH, df, f) )
# header files for plugins
pluglist.append('source/blender/blenpluginapi/documentation.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'documentation.h'))
pluglist.append('source/blender/blenpluginapi/externdef.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'externdef.h'))
pluglist.append('source/blender/blenpluginapi/floatpatch.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'floatpatch.h'))
pluglist.append('source/blender/blenpluginapi/iff.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'iff.h'))
pluglist.append('source/blender/blenpluginapi/plugin.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.h'))
pluglist.append('source/blender/blenpluginapi/util.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'util.h'))
pluglist.append('source/blender/blenpluginapi/plugin.DEF')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.def'))
plugininstall = []
for targetdir,srcfile in zip(plugtargetlist, pluglist):
td, tf = os.path.split(targetdir)
plugininstall.append(env.Install(dir=td, source=srcfile))
textlist = []
texttargetlist = []
for tp, tn, tf in os.walk('release/text'):
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
textlist.append(tp+os.sep+f)
textinstall = env.Install(dir=BLENDERPATH, source=textlist)
if env['OURPLATFORM']=='darwin':
allinstall = [blenderinstall, plugininstall, textinstall]
elif env['OURPLATFORM']=='linux2':
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
else:
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources = []
if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'):
# For MinGW and linuxcross static linking will be used
dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
#currently win64-vc doesn't appear to have libpng.dll
if env['OURPLATFORM'] != 'win64-vc':
dllsources += ['${BF_PNG_LIBPATH}/libpng.dll']
dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
# Used when linking to libtiff was dynamic
# keep it here until compilation on all platform would be ok
# dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
if env['OURPLATFORM'] != 'linuxcross':
# pthreads library is already added
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
if env['WITH_BF_SDL']:
if env['OURPLATFORM'] == 'win64-vc':
pass # we link statically already to SDL on win64
else:
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
if env['WITH_BF_PYTHON']:
if env['BF_DEBUG']:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
else:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
if env['WITH_BF_ICONV']:
if env['OURPLATFORM'] == 'win64-vc':
pass # we link statically to iconv on win64
elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
#gettext for MinGW and cross-compilation is compiled staticly
dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
if env['WITH_BF_SNDFILE']:
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
if env['WITH_BF_FFMPEG']:
dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll',
'${BF_FFMPEG_LIBPATH}/avformat-52.dll',
'${BF_FFMPEG_LIBPATH}/avdevice-52.dll',
'${BF_FFMPEG_LIBPATH}/avutil-50.dll',
'${BF_FFMPEG_LIBPATH}/swscale-0.dll']
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
installtarget = env.Alias('install', allinstall)
bininstalltarget = env.Alias('install-bin', blenderinstall)
nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
nsiscmd = env.Command('nsisinstaller', None, nsisaction)
nsisalias = env.Alias('nsis', nsiscmd)
if 'blender' in B.targets:
blenderexe= env.Alias('blender', B.program_list)
Depends(blenderexe,installtarget)
if env['WITH_BF_PLAYER']:
blenderplayer = env.Alias('blenderplayer', B.program_list)
Depends(blenderplayer,installtarget)
if not env['WITH_BF_GAMEENGINE']:
blendernogame = env.Alias('blendernogame', B.program_list)
Depends(blendernogame,installtarget)
if 'blenderlite' in B.targets:
blenderlite = env.Alias('blenderlite', B.program_list)
Depends(blenderlite,installtarget)
Depends(nsiscmd, allinstall)
Default(B.program_list)
if not env['WITHOUT_BF_INSTALL']:
Default(installtarget)
#------------ EPYDOC
if env['WITH_BF_DOCS']:
try:
import epydoc
except ImportError:
epydoc = None
if epydoc:
SConscript('source/gameengine/PyDoc/SConscript')
else:
print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "

23
bin/.blender/.Blanguages Normal file
View File

@@ -0,0 +1,23 @@
English:en_US
Japanese:ja_JP
Dutch:nl_NL
Italian:it_IT
German:de_DE
Finnish:fi_FI
Swedish:sv_SE
French:fr_FR
Spanish:es_ES
Catalan:ca_ES
Czech:cs_CZ
Brazilian Portuguese:pt_BR
Simplified Chinese:zh_CN
Russian:ru_RU
Croatian:hr_HR
Serbian:sr
Ukrainian:uk_UA
Polish:pl_PL
Romanian:ro
Arabic:ar
Bulgarian:bg
Greek:el
Korean:ko

BIN
bin/.blender/.bfont.ttf Normal file

Binary file not shown.

View File

@@ -1,160 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
####################################################################################################
#
# This is a build system used by platform maintainers to build library dependencies on
# Windows, macOS and Linux.
#
# For users building Blender, we recommend using the precompiled libraries from lib/ on
# Windows and macOS, and install_deps.sh on Linux.
#
# WINDOWS USAGE:
# Don't call this cmake file yourself, use build_deps.cmd
# build_deps 2013 x64 / build_deps 2013 x86
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake bison cmake libtool pkg-config yasm
# Additional requirements for macOS arm64: brew install flex
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler cmake autoconf automake libtool yasm tcl
# Run "make deps" from main Blender directory
#
####################################################################################################
project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
include(cmake/versions.cmake)
include(cmake/download.cmake)
if(ENABLE_MINGW64)
include(cmake/setup_mingw64.cmake)
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
include(cmake/zlib.cmake)
include(cmake/zstd.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/openexr.cmake)
include(cmake/brotli.cmake)
include(cmake/freetype.cmake)
include(cmake/freeglut.cmake)
include(cmake/glew.cmake)
include(cmake/alembic.cmake)
include(cmake/glfw.cmake)
include(cmake/clew.cmake)
include(cmake/cuew.cmake)
include(cmake/opensubdiv.cmake)
include(cmake/sdl.cmake)
include(cmake/opencollada.cmake)
include(cmake/llvm.cmake)
if(APPLE)
include(cmake/openmp.cmake)
endif()
if(UNIX)
include(cmake/nasm.cmake)
endif()
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
if(WIN32)
include(cmake/flexbison.cmake)
elseif(UNIX AND NOT APPLE)
include(cmake/flex.cmake)
endif()
include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/nanovdb.cmake)
include(cmake/python.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)
else()
include(cmake/numpy.cmake)
endif()
include(cmake/python_site_packages.cmake)
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.
include(cmake/boost.cmake)
include(cmake/pugixml.cmake)
include(cmake/ispc.cmake)
include(cmake/openimagedenoise.cmake)
include(cmake/embree.cmake)
if(NOT APPLE)
include(cmake/xr_openxr.cmake)
endif()
# OpenColorIO and dependencies.
include(cmake/expat.cmake)
include(cmake/yamlcpp.cmake)
include(cmake/opencolorio.cmake)
if(BLENDER_PLATFORM_ARM)
include(cmake/sse2neon.cmake)
endif()
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/gmp.cmake)
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/opus.cmake)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
endif()
endif()
endif()
endif()
if(UNIX)
include(cmake/bzip2.cmake)
include(cmake/ffi.cmake)
include(cmake/lzma.cmake)
include(cmake/ssl.cmake)
include(cmake/sqlite.cmake)
endif()
if(UNIX AND NOT APPLE)
include(cmake/libglu.cmake)
include(cmake/mesa.cmake)
include(cmake/wayland_protocols.cmake)
endif()
include(cmake/harvest.cmake)

View File

@@ -1,60 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(ALEMBIC_EXTRA_ARGS
-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=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
URL file://${PACKAGE_DIR}/${ALEMBIC_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ALEMBIC_HASH_TYPE}=${ALEMBIC_HASH}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_alembic
external_zlib
external_openexr
)

View File

@@ -1,57 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(BLOSC_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
# Prevent blosc from including its own local copy of zlib in the object file
# and cause linker errors with everybody else.
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
ExternalProject_Add(external_blosc
URL file://${PACKAGE_DIR}/${BLOSC_FILE}
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
)
add_dependencies(
external_blosc
external_zlib
)
if(WIN32)
add_dependencies(
external_blosc
external_pthreads
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,101 +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()
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND b2)
set(BOOST_BUILD_OPTIONS runtime-link=shared )
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-${BOOST_VERSION_NODOTS_SHORT}/ ${HARVEST_TARGET}/boost/include/)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
endif()
if(WITH_BOOST_PYTHON)
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
set(BOOST_PYTHON_OPTIONS
--with-python
--user-config=${JAM_FILE}
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(BOOST_PYTHON_OPTIONS
${BOOST_PYTHON_OPTIONS}
define=BOOST_DEBUG_PYTHON
)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
-sNO_BZIP2=1
-sNO_LZMA=1
-sNO_ZSTD=1
${BOOST_TOOLSET}
${BOOST_PYTHON_OPTIONS}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL file://${PACKAGE_DIR}/${BOOST_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WITH_BOOST_PYTHON)
add_dependencies(
external_boost
external_python
external_numpy
)
endif()

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,25 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(BZIP2_PREFIX "${LIBDIR}/bzip2")
set(BZIP2_CONFIGURE_ENV echo .)
set(BZIP2_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(BZIP2_LDFLAGS "-Wl,--as-needed")
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
else()
set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_bzip2
URL file://${PACKAGE_DIR}/${BZIP2_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BZIP2_HASH_TYPE}=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
INSTALL_DIR ${LIBDIR}/bzip2
)

View File

@@ -1,69 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(UNIX)
if(APPLE)
set(_libtoolize_name glibtoolize)
else()
set(_libtoolize_name libtoolize)
endif()
set(_required_software
autoconf
automake
bison
${_libtoolize_name}
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)
set(_software_missing "${_software_missing}${_software} ")
endif()
unset(_software_find CACHE)
endforeach()
if(APPLE)
# Homebrew has different default locations for ARM and Intel macOS.
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(HOMEBREW_LOCATION "/opt/homebrew")
else()
set(HOMEBREW_LOCATION "/usr/local")
endif()
if(NOT EXISTS "${HOMEBREW_LOCATION}/opt/bison/bin/bison")
string(APPEND _software_missing " bison")
endif()
endif()
if(_software_missing)
message(
"\n"
"Missing software for building Blender dependencies:\n"
" ${_software_missing}\n"
"\n"
"On Debian and Ubuntu:\n"
" apt install autoconf automake libtool yasm tcl ninja-build meson python3-mako\n"
"\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")
message(FATAL_ERROR "Install missing software before continuing")
endif()
endif()

View File

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

@@ -1,13 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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,104 +0,0 @@
# 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()
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
message("Checking source : ${dep} (${TARGET_FILE})")
if(NOT EXISTS ${TARGET_FILE})
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
file(DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
TIMEOUT 1800 # seconds
EXPECTED_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
TLS_VERIFY ON
SHOW_PROGRESS
)
endif()
endfunction(download_source)
download_source(ZLIB)
download_source(OPENAL)
download_source(PNG)
download_source(JPEG)
download_source(BOOST)
download_source(BLOSC)
download_source(PTHREADS)
download_source(OPENEXR)
download_source(FREETYPE)
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)
download_source(OPENCOLORIO)
download_source(LLVM)
download_source(OPENMP)
download_source(OPENIMAGEIO)
download_source(TIFF)
download_source(OSL)
download_source(PYTHON)
download_source(TBB)
download_source(OPENVDB)
download_source(NANOVDB)
download_source(NUMPY)
download_source(LAME)
download_source(OGG)
download_source(VORBIS)
download_source(THEORA)
download_source(FLAC)
download_source(VPX)
download_source(OPUS)
download_source(X264)
download_source(XVIDCORE)
download_source(OPENJPEG)
download_source(FFMPEG)
download_source(FFTW)
download_source(ICONV)
download_source(SNDFILE)
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)
download_source(FLEXBISON)
download_source(BZIP2)
download_source(FFI)
download_source(LZMA)
download_source(SSL)
download_source(SQLITE)
download_source(EMBREE)
download_source(USD)
download_source(OIDN)
download_source(LIBGLU)
download_source(MESA)
download_source(NASM)
download_source(XR_OPENXR_SDK)
download_source(WL_PROTOCOLS)
download_source(ISPC)
download_source(GMP)
download_source(POTRACE)
download_source(HARU)
download_source(ZSTD)
download_source(FLEX)
download_source(BROTLI)

View File

@@ -1,88 +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(EMBREE_EXTRA_ARGS
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_TASKING_SYSTEM=TBB
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
)
if(TBB_STATIC_LIBRARY)
set(EMBREE_EXTRA_ARGS
${EMBREE_EXTRA_ARGS}
-DEMBREE_TBB_LIBRARY_NAME=tbb_static
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_static
)
endif()
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
external_tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,19 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(EXPAT_EXTRA_ARGS
-DEXPAT_BUILD_DOCS=OFF
-DEXPAT_BUILD_EXAMPLES=OFF
-DEXPAT_BUILD_TESTS=OFF
-DEXPAT_BUILD_TOOLS=OFF
-DEXPAT_SHARED_LIBS=OFF
)
ExternalProject_Add(external_expat
URL file://${PACKAGE_DIR}/${EXPAT_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EXPAT_HASH_TYPE}=${EXPAT_HASH}
PREFIX ${BUILD_DIR}/expat
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/expat ${DEFAULT_CMAKE_FLAGS} ${EXPAT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/expat
SOURCE_SUBDIR expat
)

View File

@@ -1,24 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_ffi
URL file://${PACKAGE_DIR}/${FFI_FILE}
URL_HASH ${FFI_HASH_TYPE}=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
--enable-shared=no
--enable-static=yes
--with-pic
--libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
)
if(UNIX AND NOT APPLE)
ExternalProject_Add_Step(external_ffi after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
DEPENDEES install
)
endif()

View File

@@ -1,148 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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:)
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
--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}
--enable-static
--disable-shared
--enable-libopenjpeg
)
endif()
if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
elseif(UNIX)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
endif()
ExternalProject_Add(external_ffmpeg
URL file://${PACKAGE_DIR}/${FFMPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FFMPEG_HASH_TYPE}=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
# will fail. This patch does that in a way that is compatible with multiple distributions.
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--enable-libopus
--prefix=${LIBDIR}/ffmpeg
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl2
--disable-gnutls
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
--disable-crystalhd
--disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
if(MSVC)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_ffmpeg
external_zlib
external_openjpeg
external_xvidcore
external_x264
external_opus
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
)
if(WIN32)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
endif()
if(UNIX)
add_dependencies(
external_ffmpeg
external_nasm
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
endif()

View File

@@ -1,36 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
set(FFTW_EXTRA_ARGS --disable-static --enable-shared)
set(FFTW_INSTALL install-strip)
else()
set(FFTW_EXTRA_ARGS --enable-static)
set(FFTW_INSTALL install)
endif()
ExternalProject_Add(external_fftw3
URL file://${PACKAGE_DIR}/${FFTW_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FFTW_HASH_TYPE}=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make ${FFTW_INSTALL}
INSTALL_DIR ${LIBDIR}/fftw3
)
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)
endif()
endif()

View File

@@ -1,16 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_flac
URL file://${PACKAGE_DIR}/${FLAC_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FLAC_HASH_TYPE}=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
)
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,12 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_flex
URL file://${PACKAGE_DIR}/${FLEX_FILE}
URL_HASH ${FLEX_HASH_TYPE}=${FLEX_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/flex
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flex
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && make install
INSTALL_DIR ${LIBDIR}/flex
)

View File

@@ -1,15 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL file://${PACKAGE_DIR}/${FLEXBISON_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FLEXBISON_HASH_TYPE}=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
)

View File

@@ -1,19 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
ExternalProject_Add(external_freeglut
URL file://${PACKAGE_DIR}/${FREEGLUT_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FREEGLUT_HASH_TYPE}=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
endif()

View File

@@ -1,33 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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
-DPC_BROTLIDEC_INCLUDEDIR=${LIBDIR}/brotli/include
-DPC_BROTLIDEC_LIBDIR=${LIBDIR}/brotli/lib
)
ExternalProject_Add(external_freetype
URL file://${PACKAGE_DIR}/${FREETYPE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FREETYPE_HASH_TYPE}=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freetype
)
add_dependencies(
external_freetype
external_brotli
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
endif()

View File

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

@@ -1,12 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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,85 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(GMP_EXTRA_ARGS -enable-cxx)
if(WIN32)
# Shared for windows because static libs will drag in a libgcc dependency.
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
else()
set(GMP_OPTIONS --enable-static --disable-shared )
endif()
if(APPLE AND NOT BLENDER_PLATFORM_ARM)
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
)
elseif(UNIX AND NOT APPLE)
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
--enable-fat
)
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
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
INSTALL_DIR ${LIBDIR}/gmp
)
if(MSVC)
set_target_properties(external_gmp PROPERTIES FOLDER Mingw)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
DEPENDEES install
)
endif()
if(WIN32)
# gmpxx is somewhat special, it builds on top of the C style gmp library but exposes C++ bindings
# given the C++ ABI between MSVC and mingw is not compatible, we need to build the bindings
# with MSVC, while GMP can only be build with mingw.
ExternalProject_Add(external_gmpxx
URL file://${PACKAGE_DIR}/${GMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GMP_HASH_TYPE}=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmpxx
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_gmpxx.txt ${BUILD_DIR}/gmpxx/src/external_gmpxx/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/config_gmpxx.h ${BUILD_DIR}/gmpxx/src/external_gmpxx/config.h
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
INSTALL_DIR ${LIBDIR}/gmpxx
)
set_target_properties(external_gmpxx PROPERTIES FOLDER Mingw)
add_dependencies(
external_gmpxx
external_gmp
)
ExternalProject_Add_Step(external_gmpxx after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmpxx/ ${HARVEST_TARGET}/gmp
DEPENDEES install
)
endif()

View File

@@ -1,30 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(HARU_EXTRA_ARGS
-DLIBHPDF_SHARED=OFF
-DLIBHPDF_STATIC=ON
-DLIBHPDF_EXAMPLES=OFF
-DLIBHPDF_ENABLE_EXCEPTIONS=ON
)
ExternalProject_Add(external_haru
URL file://${PACKAGE_DIR}/${HARU_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${HARU_HASH_TYPE}=${HARU_HASH}
PREFIX ${BUILD_DIR}/haru
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/haru/src/external_haru < ${PATCH_DIR}/haru.diff
CMAKE_ARGS
-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/haru
${DEFAULT_CMAKE_FLAGS} ${HARU_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/haru
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_haru after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/haru/include ${HARVEST_TARGET}/haru/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/haru/lib/libhpdfs.lib ${HARVEST_TARGET}/haru/lib/libhpdfs.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,190 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
########################################################################
# Copy all generated files to the proper structure as blender prefers
########################################################################
if(NOT DEFINED HARVEST_TARGET)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# 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(WIN32)
function(harvest from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
endfunction()
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest(alembic/bin alembic/bin "*")
harvest(brotli/include brotli/include "*.h")
harvest(brotli/lib brotli/lib "*.a")
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(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,25 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL file://${PACKAGE_DIR}/${ICONV_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ICONV_HASH_TYPE}=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
)
if(MSVC)
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_iconv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
DEPENDEES install
)
endif()
endif()

View File

@@ -1,76 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(ISPC_EXTRA_ARGS_WIN
-DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
-DARM_ENABLED=Off
)
elseif(APPLE)
# Use bison and flex installed via Homebrew.
# The ones that come with Xcode toolset are too old.
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison
-DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex
-DARM_ENABLED=On
)
else()
set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
-DFLEX_EXECUTABLE=/usr/local/opt/flex/bin/flex
-DARM_ENABLED=Off
)
endif()
elseif(UNIX)
set(ISPC_EXTRA_ARGS_UNIX
-DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang
-DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++
-DARM_ENABLED=Off
-DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex
)
endif()
set(ISPC_EXTRA_ARGS
-DISPC_NO_DUMPS=On
-DISPC_INCLUDE_EXAMPLES=Off
-DISPC_INCLUDE_TESTS=Off
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_EXECUTABLE=${LIBDIR}/llvm/bin/clang
-DCLANGPP_EXECUTABLE=${LIBDIR}/llvm/bin/clang++
-DISPC_INCLUDE_TESTS=Off
-DCLANG_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_INCLUDE_DIRS=${LIBDIR}/llvm/include
${ISPC_EXTRA_ARGS_WIN}
${ISPC_EXTRA_ARGS_APPLE}
${ISPC_EXTRA_ARGS_UNIX}
)
ExternalProject_Add(external_ispc
URL file://${PACKAGE_DIR}/${ISPC_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ISPC_HASH_TYPE}=${ISPC_HASH}
PREFIX ${BUILD_DIR}/ispc
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ispc/src/external_ispc < ${PATCH_DIR}/ispc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ispc -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ISPC_EXTRA_ARGS} ${BUILD_DIR}/ispc/src/external_ispc
INSTALL_DIR ${LIBDIR}/ispc
)
add_dependencies(
external_ispc
ll
)
if(WIN32)
add_dependencies(
external_ispc
external_flexbison
)
elseif(UNIX AND NOT APPLE)
add_dependencies(
external_ispc
external_flex
)
endif()

View File

@@ -1,12 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_jemalloc
URL file://${PACKAGE_DIR}/${JEMALLOC_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JEMALLOC_HASH_TYPE}=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
)

View File

@@ -1,46 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
# 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}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# cmake for unix
set(JPEG_EXTRA_ARGS
-DWITH_JPEG8=ON
-DENABLE_STATIC=ON
-DENABLE_SHARED=OFF
-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}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif()

View File

@@ -1,31 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(LAME_EXTRA_ARGS)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
URL file://${PACKAGE_DIR}/${LAME_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LAME_HASH_TYPE}=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--disable-frontend
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
)
if(MSVC)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,24 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(LIBGLU_CFLAGS "-static-libgcc")
set(LIBGLU_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(LIBGLU_LDFLAGS "-pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(LIBGLU_EXTRA_FLAGS
CFLAGS=${LIBGLU_CFLAGS}
CXXFLAGS=${LIBGLU_CXXFLAGS}
LDFLAGS=${LIBGLU_LDFLAGS}
)
ExternalProject_Add(external_libglu
URL file://${PACKAGE_DIR}/${LIBGLU_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LIBGLU_HASH_TYPE}=${LIBGLU_HASH}
PREFIX ${BUILD_DIR}/libglu
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/libglu/src/external_libglu/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/libglu ${LIBGLU_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make install
INSTALL_DIR ${LIBDIR}/libglu
)

View File

@@ -1,76 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(BLENDER_PLATFORM_ARM)
set(LLVM_TARGETS AArch64$<SEMICOLON>ARM)
else()
set(LLVM_TARGETS X86)
endif()
if(APPLE)
set(LLVM_XML2_ARGS
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
)
set(LLVM_BUILD_CLANG_TOOLS_EXTRA ^^clang-tools-extra)
set(BUILD_CLANG_TOOLS ON)
endif()
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MD
-DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS}
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_BUILD_LLVM_C_DYLIB=OFF
-DLLVM_ENABLE_UNWIND_TABLES=OFF
-DLLVM_ENABLE_PROJECTS=clang${LLVM_BUILD_CLANG_TOOLS_EXTRA}
${LLVM_XML2_ARGS}
)
if(WIN32)
set(LLVM_GENERATOR "Ninja")
else()
set(LLVM_GENERATOR "Unix Makefiles")
endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL file://${PACKAGE_DIR}/${LLVM_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LLVM_HASH_TYPE}=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
LIST_SEPARATOR ^^
PREFIX ${BUILD_DIR}/ll
SOURCE_SUBDIR llvm
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib ${HARVEST_TARGET}/llvm/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include ${HARVEST_TARGET}/llvm/include &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/llvm/bin/clang-format.exe ${HARVEST_TARGET}/llvm/bin/clang-format.exe
)
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()
# We currently do not build libxml2 on Windows.
if(APPLE)
add_dependencies(
ll
external_xml2
)
endif()

View File

@@ -1,16 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL file://${PACKAGE_DIR}/${LZMA_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LZMA_HASH_TYPE}=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
--disable-shared
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
INSTALL_DIR ${LIBDIR}/lzma
)

View File

@@ -1,55 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(MESA_CFLAGS "-static-libgcc")
set(MESA_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(MESA_LDFLAGS "-L${LIBDIR}/zlib/lib -pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a -l:libz_pic.a")
# The 'native-file', used for overrides with the meson build system.
# meson does not provide a way to do this using command line arguments.
#
# Note that we can't output to "${BUILD_DIR}/mesa/src/external_mesa" as
# it doesn't exist when CMake first executes.
file(WRITE ${BUILD_DIR}/mesa/tmp/native-file.ini "\
[binaries]
llvm-config = '${LIBDIR}/llvm/bin/llvm-config'"
)
set(MESA_EXTRA_FLAGS
-Dbuildtype=release
-Dc_args=${MESA_CFLAGS}
-Dcpp_args=${MESA_CXXFLAGS}
-Dc_link_args=${MESA_LDFLAGS}
-Dcpp_link_args=${MESA_LDFLAGS}
-Dglx=gallium-xlib
-Dgallium-drivers=swrast
-Ddri-drivers=
-Dvulkan-drivers=
-Dgbm=disabled
-Degl=disabled
-Dgles1=disabled
-Dgles2=disabled
-Dshared-llvm=disabled
# Without this, the build fails when: `wayland-scanner` is not found.
# At some point we will likely want to support Wayland.
# Disable for now since it's not officially supported.
-Dplatforms=x11
--native-file ${BUILD_DIR}/mesa/tmp/native-file.ini
)
ExternalProject_Add(external_mesa
URL file://${PACKAGE_DIR}/${MESA_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${MESA_HASH_TYPE}=${MESA_HASH}
PREFIX ${BUILD_DIR}/mesa
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/mesa/src/external_mesa/ &&
meson ${BUILD_DIR}/mesa/src/external_mesa-build --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja install
INSTALL_DIR ${LIBDIR}/mesa
)
add_dependencies(
external_mesa
ll
)

View File

@@ -1,39 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/nanovdb/src/nanovdb < ${PATCH_DIR}/nanovdb.diff
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,22 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_nasm
URL file://${PACKAGE_DIR}/${NASM_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NASM_HASH_TYPE}=${NASM_HASH}
PREFIX ${BUILD_DIR}/nasm
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/nasm/src/external_nasm < ${PATCH_DIR}/nasm.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && ./autogen.sh && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/nasm
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make -j${MAKE_THREADS} && make manpages
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make install
INSTALL_DIR ${LIBDIR}/nasm
)
if(UNIX)
# `touch nasm.1 ndisasm.1` helps to create the manual pages files, even when
# local `asciidoc` and `xmlto` packages are not installed.
ExternalProject_Add_Step(external_nasm after_configure
COMMAND ${CMAKE_COMMAND} -E touch ${BUILD_DIR}/nasm/src/external_nasm/nasm.1 ${BUILD_DIR}/nasm/src/external_nasm/ndisasm.1
DEPENDEES configure
)
endif()

View File

@@ -1,34 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(MSVC)
message("BIN >${PYTHON_BINARY}<")
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif()
endif()
set(NUMPY_POSTFIX)
ExternalProject_Add(external_numpy
URL file://${PACKAGE_DIR}/${NUMPY_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NUMPY_HASH_TYPE}=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ""
)
add_dependencies(
external_numpy
external_python
external_python_site_packages
)

View File

@@ -1,17 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_ogg
URL file://${PACKAGE_DIR}/${OGG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OGG_HASH_TYPE}=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ogg/src/external_ogg < ${PATCH_DIR}/ogg.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
)
if(MSVC)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,50 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(BUILD_MODE STREQUAL Release)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=OFF
-DALSOFT_NO_CONFIG_UTIL=ON
-DALSOFT_EXAMPLES=OFF
-DALSOFT_TESTS=OFF
-DALSOFT_CONFIG=OFF
-DALSOFT_HRTF_DEFS=OFF
-DALSOFT_INSTALL=ON
-DALSOFT_BACKEND_SNDIO=OFF
)
if(UNIX)
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DLIBTYPE=STATIC
)
endif()
if(UNIX AND NOT APPLE)
# Ensure we have backends for playback.
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DALSOFT_REQUIRE_ALSA=ON
-DALSOFT_REQUIRE_OSS=ON
-DALSOFT_REQUIRE_PULSEAUDIO=ON
)
endif()
ExternalProject_Add(external_openal
URL file://${PACKAGE_DIR}/${OPENAL_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENAL_HASH_TYPE}=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
)
if(WIN32)
ExternalProject_Add_Step(external_openal after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
DEPENDEES install
)
endif()
endif()

View File

@@ -1,49 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(UNIX)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
endif()
ExternalProject_Add(external_opencollada
URL file://${PACKAGE_DIR}/${OPENCOLLADA_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENCOLLADA_HASH_TYPE}=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
)
if(UNIX)
add_dependencies(
external_opencollada
external_xml2
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,85 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYTHON=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_BUILD_JAVA=OFF
-DBUILD_SHARED_LIBS=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_TESTS=OFF
-DOCIO_BUILD_GPU_TESTS=OFF
-DOCIO_USE_SSE=ON
# 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
)
if(BLENDER_PLATFORM_ARM)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_SSE=OFF
)
endif()
if(WIN32)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_INLINES_HIDDEN=OFF
)
else()
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
endif()
ExternalProject_Add(external_opencolorio
URL file://${PACKAGE_DIR}/${OPENCOLORIO_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENCOLORIO_HASH_TYPE}=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
add_dependencies(
external_opencolorio
external_yamlcpp
external_expat
external_openexr
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib ${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 ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
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 ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring_d.lib
DEPENDEES install
)
endif()
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 ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libpystring.a ${LIBDIR}/opencolorio/lib/
DEPENDEES install
)
endif()

View File

@@ -1,48 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OPENEXR_EXTRA_ARGS
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
)
else()
set(OPENEXR_EXTRA_ARGS
)
endif()
set(OPENEXR_EXTRA_ARGS
${OPENEXR_EXTRA_ARGS}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-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_BUILD_UTILS=OFF
-DPYILMBASE_ENABLE=OFF
-DOPENEXR_VIEWERS_ENABLE=OFF
-DILMBASE_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
-DOPENEXR_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
)
ExternalProject_Add(external_openexr
URL file://${PACKAGE_DIR}/${OPENEXR_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENEXR_HASH_TYPE}=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
if(WIN32)
ExternalProject_Add_Step(external_openexr after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
DEPENDEES install
)
endif()
add_dependencies(
external_openexr
external_zlib
)

View File

@@ -1,60 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(OIDN_EXTRA_ARGS
-DOIDN_APPS=OFF
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
-DOIDN_STATIC_LIB=ON
-DOIDN_STATIC_RUNTIME=OFF
-DISPC_EXECUTABLE=${LIBDIR}/ispc/bin/ispc
)
if(WIN32)
set(OIDN_EXTRA_ARGS
${OIDN_EXTRA_ARGS}
-DTBB_DEBUG_LIBRARY=${LIBDIR}/tbb/lib/tbb.lib
-DTBB_DEBUG_LIBRARY_MALLOC=${LIBDIR}/tbb/lib/tbbmalloc.lib
)
else()
set(OIDN_EXTRA_ARGS
${OIDN_EXTRA_ARGS}
-Dtbb_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbb_static.a
-Dtbbmalloc_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbbmalloc_static.a
)
endif()
ExternalProject_Add(external_openimagedenoise
URL file://${PACKAGE_DIR}/${OIDN_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OIDN_HASH_TYPE}=${OIDN_HASH}
PREFIX ${BUILD_DIR}/openimagedenoise
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimagedenoise
)
add_dependencies(
external_openimagedenoise
external_tbb
external_ispc
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/include ${HARVEST_TARGET}/openimagedenoise/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,145 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(BUILD_MODE STREQUAL Release)
set(OIIO_TOOLS ON)
else()
set(OIIO_TOOLS OFF)
endif()
if(UNIX AND NOT APPLE)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
else()
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
endif()
if(WITH_WEBP)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg_msvc
)
else()
set(OPENJPEG_FLAGS
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
${OPENIMAGEIO_LINKSTATIC}
-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
-DUSE_OPENVDB=OFF
-DUSE_BZIP2=OFF
-DUSE_FREETYPE=OFF
-DUSE_DCMTK=OFF
-DUSE_LIBHEIF=OFF
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_OPENCOLORIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-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}
-DSTOP_ON_WARNING=OFF
-DUSE_EXTERNAL_PUGIXML=ON
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL file://${PACKAGE_DIR}/${OPENIMAGEIO_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENIMAGEIO_HASH_TYPE}=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(
external_openimageio
external_png
external_zlib
external_openexr
external_jpeg
external_boost
external_tiff
external_pugixml
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimageio after_install
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()
endif()

View File

@@ -1,48 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
# library itself does not depend on them, so should give no problems.
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
ExternalProject_Add(external_openjpeg
URL 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 -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
INSTALL_DIR ${LIBDIR}/openjpeg
)
# On windows ffmpeg wants a mingw build, while oiio needs a msvc build.
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openjpeg_msvc after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
DEPENDEES install
)
endif()
endif()
set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,23 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(APPLE)
set(OPENMP_PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openmp/src/external_openmp < ${PATCH_DIR}/openmp.diff)
else()
set(OPENMP_PATCH_COMMAND)
endif()
ExternalProject_Add(external_openmp
URL file://${PACKAGE_DIR}/${OPENMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENMP_HASH_TYPE}=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
PATCH_COMMAND ${OPENMP_PATCH_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @rpath/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
)
add_dependencies(
external_openmp
ll
)

View File

@@ -1,84 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(OPENSUBDIV_EXTRA_ARGS
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
)
if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.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}
-DNO_CUDA=ON
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
)
endif()
ExternalProject_Add(external_opensubdiv
URL file://${PACKAGE_DIR}/${OPENSUBDIV_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENSUBDIV_HASH_TYPE}=${OPENSUBDIV_HASH}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
)

View File

@@ -1,98 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
if(WIN32)
set(OPENVDB_SHARED ON)
set(OPENVDB_STATIC OFF)
else()
set(OPENVDB_SHARED OFF)
set(OPENVDB_STATIC ON)
endif()
set(OPENVDB_EXTRA_ARGS
-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
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBlosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-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
-DCMAKE_DEBUG_POSTFIX=_d
-DILMBASE_USE_STATIC_LIBS=On
-DOPENEXR_USE_STATIC_LIBS=On
)
if(WIN32)
# Namespaces seem to be buggy and cause linker errors due to things not
# being in the correct namespace
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-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()
ExternalProject_Add(openvdb
URL file://${PACKAGE_DIR}/${OPENVDB_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENVDB_HASH_TYPE}=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
)
add_dependencies(
openvdb
external_tbb
external_boost
external_openexr
external_zlib
external_blosc
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include/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
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb_d.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb_d.dll ${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
DEPENDEES install
)
endif()
endif()

View File

@@ -1,211 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
endif()
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")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
set(DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads" CACHE STRING "Path for downloaded files")
# 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 sources 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)
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
message("LIBDIR = ${LIBDIR}")
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
message("PACKAGE_DIR = ${PACKAGE_DIR}")
message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
set(LIBEXT ".lib")
set(LIBPREFIX "")
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
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=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=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=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=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/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)
set(PLATFORM_CMAKE_FLAGS)
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${PERL_SHELL} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
else()
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(LIBPREFIX "lib")
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
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 ${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()
set(PLATFORM_BUILD_TARGET --build=aarch64-apple-darwin20.0.0) # macOS 11.00
endif()
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
set(BLENDER_PLATFORM_ARM ON)
endif()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export MACOSX_SDK_VERSION=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
endif()
set(DEFAULT_CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
else()
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
endif()
else()
set(ZLIB_LIBRARY libz${LIBEXT})
endif()
if(MSVC)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
set(CMAKE_INSTALL_MESSAGE LAZY)

View File

@@ -1,19 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_opus
URL file://${PACKAGE_DIR}/${OPUS_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPUS_HASH_TYPE}=${OPUS_HASH}
PREFIX ${BUILD_DIR}/opus
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
--disable-shared
--enable-static
--with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make install
INSTALL_DIR ${LIBDIR}/opus
)
if(MSVC)
set_target_properties(external_opus PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,105 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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}/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
-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
-DPNG_ROOT=${LIBDIR}/png
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILD_SHARED_LIBS=OFF
-DLINKSTATIC=ON
-DOSL_BUILD_PLUGINS=OFF
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DLLVM_ROOT=${LIBDIR}/llvm/
-DLLVM_DIRECTORY=${LIBDIR}/llvm/
-DUSE_PARTIO=OFF
-DUSE_QT=OFF
-DUSE_Qt5=OFF
-DINSTALL_DOCS=OFF
${OSL_SIMD_FLAGS}
-Dpugixml_ROOT=${LIBDIR}/pugixml
-DUSE_PYTHON=OFF
-DCMAKE_CXX_STANDARD=14
)
ExternalProject_Add(external_osl
URL file://${PACKAGE_DIR}/${OSL_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH ${OSL_HASH_TYPE}=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
add_dependencies(
external_osl
external_boost
ll
external_openexr
external_zlib
external_openimageio
external_pugixml
)
if(WIN32)
add_dependencies(
external_osl
external_flexbison
)
elseif(UNIX AND NOT APPLE)
add_dependencies(
external_osl
external_flex
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,44 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(MSVC)
set(PYTARGET ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS})
set(PYSRC ${LIBDIR}/python/)
if(BUILD_MODE STREQUAL Release)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should output at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python3${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python3${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS}/bin/python${PYTHON_POSTFIX}.exe)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should output at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python3${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python3${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe)
endif()
endif()

View File

@@ -1,32 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(PNG_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
)
if(BLENDER_PLATFORM_ARM)
set(PNG_EXTRA_ARGS ${PNG_EXTRA_ARGS} -DPNG_HARDWARE_OPTIMIZATIONS=ON -DPNG_ARM_NEON=on -DCMAKE_SYSTEM_PROCESSOR="aarch64")
endif()
ExternalProject_Add(external_png
URL file://${PACKAGE_DIR}/${PNG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PNG_HASH_TYPE}=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
)
add_dependencies(
external_png
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -1,22 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(POTRACE_EXTRA_ARGS
)
if((WIN32 AND BUILD_MODE STREQUAL Release) OR UNIX)
ExternalProject_Add(external_potrace
URL file://${PACKAGE_DIR}/${POTRACE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${POTRACE_HASH_TYPE}=${POTRACE_HASH}
PREFIX ${BUILD_DIR}/potrace
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_potrace.txt ${BUILD_DIR}/potrace/src/external_potrace/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/potrace ${DEFAULT_CMAKE_FLAGS} ${POTRACE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/potrace
)
if(WIN32)
ExternalProject_Add_Step(external_potrace after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/potrace ${HARVEST_TARGET}/potrace
DEPENDEES install
)
endif()
endif()

View File

@@ -1,38 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
ExternalProject_Add(external_pthreads
URL file://${PACKAGE_DIR}/${PTHREADS_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PTHREADS_HASH_TYPE}=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
INSTALL_DIR ${LIBDIR}/pthreads
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pthreads after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,27 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL file://${PACKAGE_DIR}/${PUGIXML_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PUGIXML_HASH_TYPE}=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pugixml ${HARVEST_TARGET}/pugixml
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/pugixml/lib/pugixml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,98 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
set(PYTHON_EXTRA_INSTLAL_FLAGS -d)
endif()
if(WIN32)
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
ExternalProject_Add(external_python
URL file://${PACKAGE_DIR}/${PYTHON_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYTHON_HASH_TYPE}=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p 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
)
else()
if(APPLE)
# Disable functions that can be in 10.13 sdk but aren't available on 10.9 target.
#
# Disable libintl (gettext library) as it might come from Homebrew, which makes
# it so test program compiles, but the Python does not. This is because for Python
# we use isysroot, which seems to forbid using libintl.h.
# The gettext functionality seems to come from CoreFoundation, so should be all fine.
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
export ac_cv_func_basename_r=no &&
export ac_cv_func_clock_getres=no &&
export ac_cv_func_clock_gettime=no &&
export ac_cv_func_clock_settime=no &&
export ac_cv_func_dirname_r=no &&
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no &&
export ac_cv_header_libintl_h=no &&
export ac_cv_lib_intl_textdomain=no
)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(PYTHON_FUNC_CONFIGS ${PYTHON_FUNC_CONFIGS} && export PYTHON_DECIMAL_WITH_MACHINE=ansi64)
endif()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
# Link against zlib statically (Unix). Avoid rpath issues (macOS).
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_unix.diff)
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include ${PLATFORM_CFLAGS}")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib ${PLATFORM_LDFLAGS}")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
ExternalProject_Add(external_python
URL file://${PACKAGE_DIR}/${PYTHON_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYTHON_HASH_TYPE}=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
endif()
if(UNIX)
add_dependencies(
external_python
external_bzip2
external_ffi
external_lzma
external_ssl
external_sqlite
external_zlib
)
endif()

View File

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

View File

@@ -1,33 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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}
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} --no-binary :all:
)
if(USE_PIP_NUMPY)
# Use only wheel (and not build from source) to stop NumPy from linking against buggy
# Accelerate framework backend on macOS. Official wheels are built with OpenBLAS.
ExternalProject_Add_Step(external_python_site_packages after_install
COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir numpy==${NUMPY_VERSION} --only-binary :all:
DEPENDEES install
)
endif()
add_dependencies(
external_python_site_packages
external_python
)

View File

@@ -1,33 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
else()
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
endif()
ExternalProject_Add(external_sdl
URL file://${PACKAGE_DIR}/${SDL_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SDL_HASH_TYPE}=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
endif()

View File

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

View File

@@ -1,57 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
# Shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(UNIX)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL 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
INSTALL_DIR ${LIBDIR}/sndfile
)
if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_sndfile
external_ogg
external_vorbis
)
if(UNIX)
add_dependencies(
external_sndfile
external_flac
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sndfile after_install
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
DEPENDEES install
)
endif()

View File

@@ -1,12 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_spnav
URL file://${PACKAGE_DIR}/${SPNAV_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SPNAV_HASH_TYPE}=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
)

View File

@@ -1,56 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(SQLITE_CONFIGURE_ENV echo .)
set(SQLITE_CONFIGURATION_ARGS)
if(UNIX)
if(NOT APPLE)
set(SQLITE_LDFLAGS -Wl,--as-needed)
endif()
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS
${SQLITE_CONFIGURATION_ARGS}
--enable-threadsafe
--enable-load-extension
--enable-json1
--enable-fts4
--enable-fts5
# While building `tcl` is harmless, it causes problems when the install step
# tries to copy the files into the system path.
# Since this isn't required by Python or Blender this can be disabled.
# Note that Debian (for example), splits this off into a separate package,
# so it's safe to turn off.
--disable-tcl
--enable-shared=no
)
endif()
ExternalProject_Add(external_sqlite
URL file://${PACKAGE_DIR}/${SQLITE_FILE}
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
INSTALL_DIR ${LIBDIR}/sqlite
)

View File

@@ -1,12 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_sse2neon
GIT_REPOSITORY ${SSE2NEON_GIT}
GIT_TAG ${SSE2NEON_GIT_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/sse2neon
CONFIGURE_COMMAND echo sse2neon - Nothing to configure
BUILD_COMMAND echo sse2neon - nothing to build
INSTALL_COMMAND mkdir -p ${LIBDIR}/sse2neon && cp ${BUILD_DIR}/sse2neon/src/external_sse2neon/sse2neon.h ${LIBDIR}/sse2neon
INSTALL_DIR ${LIBDIR}/sse2neon
)

View File

@@ -1,34 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
else()
if(BLENDER_PLATFORM_ARM)
set(SSL_OS_COMPILER "blender-linux-aarch64")
elseif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
set(SSL_OS_COMPILER "blender-linux-x86")
endif()
endif()
ExternalProject_Add(external_ssl
URL file://${PACKAGE_DIR}/${SSL_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SSL_HASH_TYPE}=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
--openssldir=${LIBDIR}/ssl
no-shared
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
${SSL_OS_COMPILER}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
INSTALL_DIR ${LIBDIR}/ssl
)

View File

@@ -1,25 +0,0 @@
my %targets = (
"blender-linux-x86" => {
inherit_from => [ "linux-x86" ],
cflags => add("-fPIC"),
},
"blender-linux-x86_64" => {
inherit_from => [ "linux-x86_64" ],
cflags => add("-fPIC"),
},
"blender-linux-aarch64" => {
inherit_from => [ "linux-aarch64" ],
cxxflags => add("-fPIC"),
cflags => add("-fPIC"),
},
"blender-darwin-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc" ],
cflags => add("-fPIC"),
},
"blender-darwin-arm64" => {
inherit_from => [ "darwin-common" ],
cxxflags => add("-fPIC -arch arm64"),
cflags => add("-fPIC -arch arm64"),
},
);

View File

@@ -1,73 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=On
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=On
-DTBB_BUILD_STATIC=Off
-DTBB_BUILD_TESTS=Off
-DCMAKE_DEBUG_POSTFIX=_debug
)
set(TBB_LIBRARY tbb)
set(TBB_STATIC_LIBRARY Off)
else()
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
-DTBB_BUILD_TESTS=Off
)
set(TBB_LIBRARY tbb_static)
set(TBB_STATIC_LIBRARY On)
endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL file://${PACKAGE_DIR}/${TBB_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TBB_HASH_TYPE}=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/build/version_string.ver.in &&
${PATCH_CMD} -p 1 -d ${BUILD_DIR}/tbb/src/external_tbb < ${PATCH_DIR}/tbb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
# findtbb.cmake in some deps *NEEDS* to find tbb_debug.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${LIBDIR}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${LIBDIR}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb.dll ${LIBDIR}/tbb/bin/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc.dll ${LIBDIR}/tbb/bin/tbbmalloc_debug.dll
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb.dll ${HARVEST_TARGET}/tbb/bin/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
# findtbb.cmake in some deps *NEEDS* to find tbb.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb_debug.dll ${HARVEST_TARGET}/tbb/bin/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_debug.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy_debug.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_debug.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_proxy_debug.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy_debug.dll
DEPENDEES install
)
endif()
endif()

View File

@@ -1,35 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(UNIX)
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV} && export HAVE_PDFLATEX=no)
else()
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_theora
URL file://${PACKAGE_DIR}/${THEORA_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${THEORA_HASH_TYPE}=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/theora/src/external_theora < ${PATCH_DIR}/theora.diff
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
)
add_dependencies(
external_theora
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,39 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
-Dzstd=OFF
-Dwebp=${WITH_TIFF_WEBP}
)
ExternalProject_Add(external_tiff
URL file://${PACKAGE_DIR}/${TIFF_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TIFF_HASH_TYPE}=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
)
add_dependencies(
external_tiff
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -1,98 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(USD_EXTRA_ARGS
-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
URL file://${PACKAGE_DIR}/${USD_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${USD_HASH_TYPE}=${USD_HASH}
PREFIX ${BUILD_DIR}/usd
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/usd/src/external_usd < ${PATCH_DIR}/usd.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${USD_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/usd
)
add_dependencies(
external_usd
external_tbb
external_boost
)
# 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 (USD_VERSION VERSION_LESS 21.11)
set(PXR_LIB_PREFIX "")
else()
set(PXR_LIB_PREFIX "usd_")
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/${PXR_LIB_PREFIX}usd_m.lib ${HARVEST_TARGET}/usd/lib/lib${PXR_LIB_PREFIX}usd_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/${PXR_LIB_PREFIX}usd_m_d.lib ${HARVEST_TARGET}/usd/lib/lib${PXR_LIB_PREFIX}usd_m_d.lib
DEPENDEES install
)
endif()
else()
# USD has two build options. The default build creates lots of small libraries,
# whereas the 'monolithic' build produces only a single library. The latter
# makes linking simpler, so that's what we use in Blender. However, running
# 'make install' in the USD sources doesn't install the static library in that
# 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
DEPENDEES install
)
endif()

View File

@@ -1,494 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(ZLIB_HASH_TYPE MD5)
set(ZLIB_FILE zlib-${ZLIB_VERSION}.tar.gz)
set(OPENAL_VERSION 1.20.1)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
set(OPENAL_HASH_TYPE MD5)
set(OPENAL_FILE openal-soft-${OPENAL_VERSION}.tar.bz2)
set(PNG_VERSION 1.6.37)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
set(PNG_HASH_TYPE SHA256)
set(PNG_FILE libpng-${PNG_VERSION}.tar.xz)
set(JPEG_VERSION 2.0.4)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 44c43e4a9fb352f47090804529317c88)
set(JPEG_HASH_TYPE MD5)
set(JPEG_FILE libjpeg-turbo-${JPEG_VERSION}.tar.gz)
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 4036cd27ef7548b8d29c30ea10956196)
set(BOOST_HASH_TYPE MD5)
set(BOOST_FILE boost_${BOOST_VERSION_NODOTS}.tar.gz)
# 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 6e4a49c8c06f05aa543f3312cfce3d55)
set(BLOSC_HASH_TYPE MD5)
set(BLOSC_FILE blosc-${BLOSC_VERSION}.tar.gz)
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://prdownloads.sourceforge.net/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(PTHREADS_HASH_TYPE MD5)
set(PTHREADS_FILE pthreads4w-code-${PTHREADS_VERSION}.zip)
set(OPENEXR_VERSION 2.5.5)
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH 85e8a979092c9055d10ed103062d31a0)
set(OPENEXR_HASH_TYPE MD5)
set(OPENEXR_FILE openexr-${OPENEXR_VERSION}.tar.gz)
if(WIN32)
# Openexr started appending _d on its own so now
# we need to tell the build the postfix is _s while
# telling all other deps the postfix is _s_d
if(BUILD_MODE STREQUAL Release)
set(OPENEXR_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
else()
set(OPENEXR_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
endif()
else()
set(OPENEXR_VERSION_BUILD_POSTFIX)
set(OPENEXR_VERSION_POSTFIX)
endif()
set(FREETYPE_VERSION 2.11.1)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH bd4e3b007474319909a6b79d50908e85)
set(FREETYPE_HASH_TYPE MD5)
set(FREETYPE_FILE freetype-${FREETYPE_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)
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(FREEGLUT_HASH_TYPE MD5)
set(FREEGLUT_FILE freeglut-${FREEGLUT_VERSION}.tar.gz)
set(ALEMBIC_VERSION 1.7.16)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_HASH effcc86e42fe6605588e3de57bde6677)
set(ALEMBIC_HASH_TYPE MD5)
set(ALEMBIC_FILE alembic-${ALEMBIC_VERSION}.tar.gz)
# 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 7bbfa275d021fb829e521df749160edb)
set(OPENSUBDIV_HASH_TYPE MD5)
set(OPENSUBDIV_FILE opensubdiv-${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.12)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
set(SDL_HASH_TYPE MD5)
set(SDL_FILE SDL2-${SDL_VERSION}.tar.gz)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLLADA_HASH_TYPE MD5)
set(OPENCOLLADA_FILE opencollada-${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLORIO_VERSION 2.0.0)
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 1a2e3478b6cd9a1549f24e1b2205e3f0)
set(OPENCOLORIO_HASH_TYPE MD5)
set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz)
set(LLVM_VERSION 12.0.0)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH 5a4fab4d7fc84aefffb118ac2c8a4fc0)
set(LLVM_HASH_TYPE MD5)
set(LLVM_FILE llvm-project-${LLVM_VERSION}.src.tar.xz)
if(APPLE)
# Cloth physics test is crashing due to this bug:
# https://bugs.llvm.org/show_bug.cgi?id=50579
set(OPENMP_VERSION 9.0.1)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
else()
set(OPENMP_VERSION ${LLVM_VERSION})
set(OPENMP_HASH ac48ce3e4582ccb82f81ab59eb3fc9dc)
endif()
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${OPENMP_VERSION}/openmp-${OPENMP_VERSION}.src.tar.xz)
set(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
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)
set(TIFF_VERSION 4.1.0)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
set(TIFF_HASH_TYPE MD5)
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
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.2)
set(PYTHON_SHORT_VERSION 3.10)
set(PYTHON_SHORT_VERSION_NO_DOTS 310)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 14e8c22458ed7779a1957b26cde01db9)
set(PYTHON_HASH_TYPE MD5)
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
set(TBB_VERSION 2020_U2)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 1b711ae956524855088df3bbf5ec65dc)
set(TBB_HASH_TYPE MD5)
set(TBB_FILE oneTBB-${TBB_VERSION}.tar.gz)
set(OPENVDB_VERSION 8.0.1)
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 01b490be16cc0e15c690f9a153c21461)
set(OPENVDB_HASH_TYPE MD5)
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
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(IDNA_VERSION 3.3)
set(CHARSET_NORMALIZER_VERSION 2.0.10)
set(URLLIB3_VERSION 1.26.8)
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(NUMPY_VERSION 1.22.0)
set(NUMPY_SHORT_VERSION 1.22)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH 252de134862a27bd66705d29622edbfe)
set(NUMPY_HASH_TYPE MD5)
set(NUMPY_FILE numpy-${NUMPY_VERSION}.zip)
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(OGG_VERSION 1.3.4)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
set(OGG_HASH_TYPE SHA256)
set(OGG_FILE libogg-${OGG_VERSION}.tar.gz)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 6ed40e0241089a42c48604dc00e362beee00036af2d8b3f46338031c9e0351cb)
set(VORBIS_HASH_TYPE SHA256)
set(VORBIS_FILE libvorbis-${VORBIS_VERSION}.tar.gz)
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(THEORA_HASH_TYPE SHA256)
set(THEORA_FILE libtheora-${THEORA_VERSION}.tar.bz2)
set(FLAC_VERSION 1.3.3)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
set(FLAC_HASH_TYPE SHA256)
set(FLAC_FILE flac-${FLAC_VERSION}.tar.xz)
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 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
set(VPX_HASH_TYPE SHA256)
set(VPX_FILE libvpx-v${VPX_VERSION}.tar.gz)
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(OPUS_HASH_TYPE SHA256)
set(OPUS_FILE opus-${OPUS_VERSION}.tar.gz)
set(X264_VERSION 33f9e1474613f59392be5ab6a7e7abf60fa63622)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/${X264_VERSION}/x264-${X264_VERSION}.tar.gz)
set(X264_HASH 5456450ee1ae02cd2328be3157367a232a0ab73315e8c8f80dab80469524f525)
set(X264_HASH_TYPE SHA256)
set(X264_FILE x264-${X264_VERSION}.tar.gz)
set(XVIDCORE_VERSION 1.3.7)
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
set(XVIDCORE_HASH_TYPE SHA256)
set(XVIDCORE_FILE xvidcore-${XVIDCORE_VERSION}.tar.gz)
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 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9)
set(OPENJPEG_HASH_TYPE SHA256)
set(OPENJPEG_FILE openjpeg-v${OPENJPEG_VERSION}.tar.gz)
set(FFMPEG_VERSION 4.4)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 42093549751b582cf0f338a21a3664f52e0a9fbe0d238d3c992005e493607d0e)
set(FFMPEG_HASH_TYPE SHA256)
set(FFMPEG_FILE ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(FFTW_HASH_TYPE MD5)
set(FFTW_FILE fftw-${FFTW_VERSION}.tar.gz)
set(ICONV_VERSION 1.16)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
set(ICONV_HASH_TYPE MD5)
set(ICONV_FILE libiconv-${ICONV_VERSION}.tar.gz)
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(WEBP_VERSION 0.6.1)
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_HASH b49ce9c3e3e9acae4d91bca44bb85a72)
set(WEBP_HASH_TYPE MD5)
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
set(SPNAV_VERSION 0.2.3)
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
set(SPNAV_HASH_TYPE MD5)
set(SPNAV_FILE libspnav-${SPNAV_VERSION}.tar.gz)
set(JEMALLOC_VERSION 5.2.1)
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 3d41fbf006e6ebffd489bdb304d009ae)
set(JEMALLOC_HASH_TYPE MD5)
set(JEMALLOC_FILE jemalloc-${JEMALLOC_VERSION}.tar.bz2)
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.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(EXPAT_VERSION 2_2_10)
set(EXPAT_URI https://github.com/libexpat/libexpat/archive/R_${EXPAT_VERSION}.tar.gz)
set(EXPAT_HASH 7ca5f09959fcb9a57618368deb627b9f)
set(EXPAT_HASH_TYPE MD5)
set(EXPAT_FILE libexpat-${EXPAT_VERSION}.tar.gz)
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(FLEXBISON_VERSION 2.5.24)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison/win_flex_bison-${FLEXBISON_VERSION}.zip)
set(FLEXBISON_HASH 6b549d43e34ece0e8ed05af92daa31c4)
set(FLEXBISON_HASH_TYPE MD5)
set(FLEXBISON_FILE win_flex_bison-${FLEXBISON_VERSION}.zip)
set(FLEX_VERSION 2.6.4)
set(FLEX_URI https://github.com/westes/flex/releases/download/v${FLEX_VERSION}/flex-${FLEX_VERSION}.tar.gz)
set(FLEX_HASH 2882e3179748cc9f9c23ec593d6adc8d)
set(FLEX_HASH_TYPE MD5)
set(FLEX_FILE flex-${FLEX_VERSION}.tar.gz)
# Libraries to keep Python modules static on Linux.
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
# sources from Debian packaging.
set(BZIP2_VERSION 1.0.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(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(LZMA_VERSION 5.2.5)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
set(LZMA_HASH_TYPE SHA256)
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
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()
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-src-3240000.zip)
set(EMBREE_VERSION 3.10.0)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
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 21.02)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH 1dd1e2092d085ed393c1f7c450a4155a)
set(USD_HASH_TYPE MD5)
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
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 df4007b0ab93b1c41cdf223b075d01c0)
set(OIDN_HASH_TYPE MD5)
set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz)
set(LIBGLU_VERSION 9.0.1)
set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz)
set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(LIBGLU_HASH_TYPE MD5)
set(LIBGLU_FILE glu-${LIBGLU_VERSION}.tar.xz)
set(MESA_VERSION 21.1.5)
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(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(XR_OPENXR_SDK_VERSION 1.0.22)
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_TYPE MD5)
set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(WL_PROTOCOLS_VERSION 1.21)
set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz)
set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/${WL_PROTOCOLS_FILE})
set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a)
set(WL_PROTOCOLS_HASH_TYPE MD5)
set(ISPC_VERSION v1.16.0)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
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_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH 0b82665c4a92fd2ade7440c13fcaa42b)
set(GMP_HASH_TYPE MD5)
set(GMP_FILE gmp-${GMP_VERSION}.tar.xz)
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(HARU_VERSION 2_3_0)
set(HARU_URI https://github.com/libharu/libharu/archive/RELEASE_${HARU_VERSION}.tar.gz)
set(HARU_HASH 4f916aa49c3069b3a10850013c507460)
set(HARU_HASH_TYPE MD5)
set(HARU_FILE libharu-${HARU_VERSION}.tar.gz)
set(ZSTD_VERSION 1.5.0)
set(ZSTD_URI https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz)
set(ZSTD_HASH 5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94)
set(ZSTD_HASH_TYPE SHA256)
set(ZSTD_FILE zstd-${ZSTD_VERSION}.tar.gz)
set(SSE2NEON_GIT https://github.com/DLTcollab/sse2neon.git)
set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)
set(BROTLI_VERSION v1.0.9)
set(BROTLI_URI https://github.com/google/brotli/archive/refs/tags/${BROTLI_VERSION}.tar.gz)
set(BROTLI_HASH f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46)
set(BROTLI_HASH_TYPE SHA256)
set(BROTLI_FILE brotli-${BROTLI_VERSION}.tar.gz)

View File

@@ -1,25 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_vorbis
URL file://${PACKAGE_DIR}/${VORBIS_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${VORBIS_HASH_TYPE}=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
)
add_dependencies(
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,50 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
else()
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(VPX_EXTRA_FLAGS --target=generic-gnu)
else()
set(VPX_EXTRA_FLAGS --target=x86_64-darwin17-gcc)
endif()
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL file://${PACKAGE_DIR}/${VPX_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${VPX_HASH_TYPE}=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
--enable-vp8
--enable-vp9
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
)
if(MSVC)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,11 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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
CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
BUILD_COMMAND ninja
INSTALL_COMMAND ninja install
)

View File

@@ -1,34 +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(WEBP_EXTRA_ARGS
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
)
if(WIN32)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
else()
set(WEBP_BUILD_DIR)
endif()
ExternalProject_Add(external_webp
URL file://${PACKAGE_DIR}/${WEBP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${WEBP_HASH_TYPE}=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_webp after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
DEPENDEES install
)
endif()
endif()

View File

@@ -1,44 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
endif()
if(BLENDER_PLATFORM_ARM)
set(X264_EXTRA_ARGS ${X264_EXTRA_ARGS} "--disable-asm")
endif()
if((APPLE AND NOT BLENDER_PLATFORM_ARM) OR (UNIX AND NOT APPLE))
set(X264_CONFIGURE_ENV
export AS=${LIBDIR}/nasm/bin/nasm
)
else()
set(X264_CONFIGURE_ENV echo .)
endif()
ExternalProject_Add(external_x264
URL file://${PACKAGE_DIR}/${X264_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${X264_HASH_TYPE}=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
)
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()
if(UNIX)
add_dependencies(
external_x264
external_nasm
)
endif()

View File

@@ -1,20 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_xml2
URL file://${PACKAGE_DIR}/${XML2_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XML2_HASH_TYPE}=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
)

View File

@@ -1,44 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Keep flags in sync with install_deps.sh ones in compile_XR_OpenXR_SDK()
set(XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_FORCE_GENERATION=OFF
-DBUILD_LOADER=ON
-DDYNAMIC_LOADER=OFF
)
if(UNIX AND NOT APPLE)
list(APPEND XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_WITH_WAYLAND_HEADERS=OFF
-DBUILD_WITH_XCB_HEADERS=OFF
-DBUILD_WITH_XLIB_HEADERS=ON
-DBUILD_WITH_SYSTEM_JSONCPP=OFF
-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1
)
endif()
ExternalProject_Add(external_xr_openxr_sdk
URL file://${PACKAGE_DIR}/${XR_OPENXR_SDK_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XR_OPENXR_SDK_HASH_TYPE}=${XR_OPENXR_SDK_HASH}
PREFIX ${BUILD_DIR}/xr_openxr_sdk
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/xr_openxr_sdk ${DEFAULT_CMAKE_FLAGS} ${XR_OPENXR_SDK_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/xr_openxr_sdk
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/include/openxr ${HARVEST_TARGET}/xr_openxr_sdk/include/openxr
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/lib ${HARVEST_TARGET}/xr_openxr_sdk/lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/xr_openxr_sdk/lib/openxr_loaderd.lib ${HARVEST_TARGET}/xr_openxr_sdk/lib/openxr_loaderd.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -1,28 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL file://${PACKAGE_DIR}/${XVIDCORE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XVIDCORE_HASH_TYPE}=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
)
ExternalProject_Add_Step(external_xvidcore after_install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
)
if(MSVC)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,23 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(YAMLCPP_EXTRA_ARGS
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
)
if(WIN32)
set(YAMLCPP_EXTRA_ARGS
${YAMLCPP_EXTRA_ARGS}
-DBUILD_GMOCK=OFF
-DYAML_MSVC_SHARED_RT=ON)
endif()
ExternalProject_Add(external_yamlcpp
URL file://${PACKAGE_DIR}/${YAMLCPP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${YAMLCPP_HASH_TYPE}=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp
)

View File

@@ -1,30 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_zlib
URL file://${PACKAGE_DIR}/${ZLIB_FILE}
URL_HASH ${ZLIB_HASH_TYPE}=${ZLIB_HASH}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
DEPENDEES install
)
endif()
else()
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
DEPENDEES install
)
endif()

View File

@@ -1,23 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_zlib_mingw
URL file://${PACKAGE_DIR}/${ZLIB_FILE}
URL_HASH ${ZLIB_HASH_TYPE}=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,35 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(ZSTD_EXTRA_ARGS
-DZSTD_BUILD_PROGRAMS=OFF
-DZSTD_BUILD_SHARED=OFF
-DZSTD_BUILD_STATIC=ON
-DZSTD_BUILD_TESTS=OFF
-DZSTD_LEGACY_SUPPORT=OFF
-DZSTD_LZ4_SUPPORT=OFF
-DZSTD_LZMA_SUPPORT=OFF
-DZSTD_MULTITHREAD_SUPPORT=ON
-DZSTD_PROGRAMS_LINK_SHARED=OFF
-DZSTD_USE_STATIC_RUNTIME=OFF
-DZSTD_ZLIB_SUPPORT=OFF
)
ExternalProject_Add(external_zstd
URL file://${PACKAGE_DIR}/${ZSTD_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ZSTD_HASH_TYPE}=${ZSTD_HASH}
PREFIX ${BUILD_DIR}/zstd
SOURCE_SUBDIR build/cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zstd ${DEFAULT_CMAKE_FLAGS} ${ZSTD_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/zstd
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zstd after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zstd/lib/zstd_static${LIBEXT} ${HARVEST_TARGET}/zstd/lib/zstd_static${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zstd/include/ ${HARVEST_TARGET}/zstd/include/
DEPENDEES install
)
endif()
endif()

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