1
1

Compare commits

..

1064 Commits

Author SHA1 Message Date
bcc020b1bc Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-07-25 19:33:55 +02:00
3f36cd3f33 Changed most of ID_IS_LINKED_foo checks as needed.
Basically, due to new 'virtual' libraries & 'path' assets, we consider those 'virtualmy  linked' IDs as:
* Local for editing purpose (i.e. they are editable).
* Linked for datablock management purposes (i.e. they can be made local, etc.).

Note: all this is more like a quick hack to test 'file-based' asset repositories (like cloud)
in comming weeks. I really do not think we should use that in the end, an full-featured
'overriding ID' system (as proposed in replacement of proxies for 2.8) would be much saner imho.
2016-07-25 17:37:34 +02:00
521222b545 Merge branch 'master' into asset-engine 2016-07-25 16:42:35 +02:00
4a298b10ec Merge branch 'master' into asset-engine 2016-07-25 15:07:44 +02:00
784f7f3264 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2016-07-24 18:13:36 +02:00
70e3f86809 Some more small fixes regarding ID/library asset handling. 2016-07-24 15:58:16 +02:00
d8da816a7c Add more macros to differentiate actual linked datablocks from 'virtually' linked ones (assets only).
Not yet used in code.
2016-07-16 15:54:46 +02:00
5e469bbd95 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_init_exit.c
2016-07-16 15:39:50 +02:00
99bb1accbb Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_init_exit.c
2016-07-12 09:15:49 +02:00
b0760a5c8f Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-07-07 15:15:48 +02:00
581a819432 Merge branch 'master' into asset-engine 2016-07-02 15:30:54 +02:00
6ba8498307 Fix memleak whene deleting IDs with uuid! 2016-06-30 13:02:09 +02:00
b18270f43a Add utility to print UUID (could make it nicer, but for now will do). 2016-06-30 10:44:10 +02:00
3db91def28 Reduce re-allocation while fetching UUIDs per asset engine (asset reload area). 2016-06-30 10:41:03 +02:00
4dd6ffaf37 Split Library/ID asset-related management into own library_asset file.
This is specific enough to deserve its own file imho, and though rather small
currently, it's likely to grow...
2016-06-29 22:38:49 +02:00
4137cc79f2 Cleanup: rename BKE_asset to BKE_asset_engine.
Since this file mostly defines/handles interactions with asset engines...

Asset handling itself is more done in library area (will split it too in next commit).
2016-06-29 22:09:37 +02:00
b25c224d90 Merge branch 'master' into asset-engine 2016-06-29 18:01:35 +02:00
732cd96737 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/writefile.c
2016-06-28 18:21:53 +02:00
71278cc22a Merge branch 'master' into asset-experiments 2016-06-27 17:44:15 +02:00
99869dab7c Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/brush.c
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenkernel/intern/mesh.c
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/writefile.c
	source/blender/editors/space_action/space_action.c
	source/blender/editors/space_clip/space_clip.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_graph/space_graph.c
	source/blender/editors/space_image/space_image.c
	source/blender/editors/space_logic/space_logic.c
	source/blender/editors/space_nla/space_nla.c
	source/blender/editors/space_node/space_node.c
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_sequencer/space_sequencer.c
	source/blender/editors/space_text/space_text.c
	source/blender/editors/space_view3d/space_view3d.c
	source/blender/makesrna/intern/rna_ID.c
	source/blender/makesrna/intern/rna_main_api.c
	source/blender/windowmanager/intern/wm_files_link.c
	source/blender/windowmanager/wm_files.h
2016-06-27 17:29:09 +02:00
d012380cae Merge branch 'asset-engine' into asset-experiments 2016-06-16 23:45:02 +02:00
4c086f6b80 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/library.c
2016-06-16 23:44:43 +02:00
56677f4f14 Fix remaining cases of datablocks' BKE_foo_free() touching usercount of their IDs.
Note that a few sub-data (like animdata) needs to keep option to unlink their
own ID usages themselves for now, this is not ideal, but need some more time
to mumble on this and find an elegant fix. Nothing blocking here anyway.
2016-06-16 22:06:32 +02:00
bb4c87a130 Merge branch 'master' into asset-engine 2016-06-16 21:17:45 +02:00
4853f75073 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-06-16 21:13:15 +02:00
04ee81a081 Merge branch 'master' into id-remap 2016-06-16 19:24:14 +02:00
42dda95e89 Merge branch 'master' into id-remap 2016-06-16 18:12:53 +02:00
21b5ce57f5 Fix bad handling of RegionView3Ds in View3D ID remap callback. 2016-06-16 18:10:44 +02:00
c24ba18d7a Found more id-remap missing cases in spaces (new(?) ads of anim editors). 2016-06-16 17:16:25 +02:00
1eac4fde27 Fix missing mask ID pointer update in Clip/Image spaces' remap callbacks. 2016-06-16 16:56:20 +02:00
fc10e42de3 Finish TODOs related to buttons space and ID remapping. 2016-06-16 16:47:32 +02:00
0256d5dde9 Fix reload/relocate trying to use invalid lib path. 2016-06-16 16:06:10 +02:00
7cbe356c4f Fix broken compilation after recent refactor. 2016-06-16 15:59:30 +02:00
bde19b57d6 Cleanup from review comments. 2016-06-16 15:54:22 +02:00
dbf7d30744 Merge branch 'master' into id-remap 2016-06-16 15:39:54 +02:00
d430237282 Cleanup: headers 2016-06-16 20:43:34 +10:00
5fd97c6e85 Move remapping functions into BKE_library_remap.h
This is done since remapping is quite an involved process.
2016-06-16 20:28:54 +10:00
1880cb6c75 Merge branch 'master' into id-remap 2016-06-16 20:03:53 +10:00
25e0f5e9f2 Fixes/updates needed to make asset reload work with new virtual lib stuff. 2016-06-14 17:41:29 +02:00
b74ad975fd Merge branch 'id-remap' into asset-experiments 2016-06-14 16:39:53 +02:00
0d8e70600b Merge branch 'asset-engine' into asset-experiments 2016-06-14 16:39:47 +02:00
beaf33dfb2 Merge branch 'master' into id-remap 2016-06-14 16:36:42 +02:00
46cf8ba269 Cleanup. 2016-06-14 16:36:15 +02:00
f7b21186b5 Merge branch 'master' into asset-engine 2016-06-14 16:31:58 +02:00
fe41942a90 Cleanup: move 'virtual lib' linking code into own helper. 2016-06-14 15:56:32 +02:00
c6d3f76e69 Fix save/load issues with new virtual-lib assets. 2016-06-14 15:47:54 +02:00
69ae86193c Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/writefile.c
2016-06-14 15:07:18 +02:00
5aaf18c39c WIP experimental support of direct image-as-linkeddata.
Works okish, but break on load (or save) of .blend file currently...
2016-06-13 21:40:48 +02:00
cbf241510d First step towards supporting non-blender-data as assets.
Idea is to avoid the need for asset engines to generate whole .blend files
with relevant datablocks in case they just need/want to provide files (images, videos, sounds...).

This commit introduces the concept of 'virtual' library, which in fact only exists to store
asset repository data. Datablocks from those virtual libs are then fully written in .blend file.

Much to do still, this is only preliminary/experimental work.
2016-06-13 17:39:02 +02:00
088d32d159 Some minor fixes/enhancements.
Asset engines are now only selectable and used in link/append case. Makes no real sense to have
those in other cases (like regular file opening, or even worse when saving a file!).
Also allows to get back asset engine persistance accross filebrowser usage.
2016-06-13 15:06:52 +02:00
d24c85fc12 Merge branch 'asset-engine' into asset-experiments 2016-06-13 12:54:44 +02:00
595159614f Merge branch 'id-remap' into asset-experiments 2016-06-13 12:54:38 +02:00
98654a9c9a Merge branch 'master' into asset-experiments 2016-06-13 12:54:32 +02:00
4286b606b3 Merge branch 'master' into asset-engine 2016-06-13 12:50:06 +02:00
09df8bd2e0 Merge branch 'master' into id-remap 2016-06-13 12:47:09 +02:00
836ecc6142 Merge branch 'asset-engine' into asset-experiments 2016-06-07 10:17:23 +02:00
0f5642b155 Merge branch 'id-remap' into asset-experiments 2016-06-07 10:17:16 +02:00
b1171ea31c Merge branch 'master' into asset-engine 2016-06-07 10:12:59 +02:00
3f4113ce3e Merge branch 'master' into id-remap 2016-06-07 10:10:14 +02:00
aa5f4d98fc Merge branch 'asset-engine' into asset-experiments 2016-06-07 09:44:08 +02:00
6f20d64f3a Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/makesdna/DNA_ID.h
2016-06-07 09:43:56 +02:00
fd12edebf4 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/makesdna/DNA_ID.h
2016-06-07 09:42:52 +02:00
18f87c8dcb Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-06-07 09:27:56 +02:00
434a851703 Merge branch 'asset-engine' into asset-experiments 2016-05-31 09:58:19 +02:00
7282c6592a Merge branch 'id-remap' into asset-experiments 2016-05-31 09:58:08 +02:00
77cdf1fb49 Merge branch 'master' into asset-engine 2016-05-31 09:53:40 +02:00
2c9f6714a7 Fix merge error. 2016-05-31 09:53:16 +02:00
9400ea0647 Merge branch 'master' into id-remap 2016-05-31 09:38:38 +02:00
8346805963 Merge branch 'asset-engine' into asset-experiments 2016-05-24 15:49:11 +02:00
050209d16e Merge branch 'id-remap' into asset-experiments 2016-05-24 15:49:03 +02:00
0929283ddc Merge branch 'master' into asset-experiments 2016-05-24 15:48:55 +02:00
5afc102357 Fix alignement issues in some DNA struct due to ID one now being properly aligned. 2016-05-24 15:48:15 +02:00
6bae015985 Merge branch 'master' into asset-engine 2016-05-24 14:44:13 +02:00
ba1af2e1bf Some cleanup. 2016-05-24 14:43:48 +02:00
adbd9cb1de Better name handling in case we remap an ID adn cannot replace it totally. 2016-05-24 14:10:28 +02:00
16641d4c02 Merge branch 'master' into id-remap 2016-05-24 12:29:07 +02:00
4795d6bdb1 Merge branch 'master' into id-remap 2016-05-23 18:18:36 +02:00
542302e3f6 Revert "Squashed commit of the atomic-operations branch."
This reverts commit ffe7f4175a.
2016-05-09 15:12:16 +02:00
ffe7f4175a Squashed commit of the atomic-operations branch. 2016-05-09 15:11:40 +02:00
cb530ad07e Merge branch 'asset-engine' into asset-experiments 2016-05-06 13:34:15 +02:00
084f5e9a4d Merge branch 'id-remap' into asset-experiments 2016-05-06 13:34:06 +02:00
4c8e2ebde2 Merge branch 'master' into asset-experiments 2016-05-06 13:33:59 +02:00
d27bae4432 Merge branch 'master' into asset-engine 2016-05-06 13:30:37 +02:00
cbe6475383 Merge branch 'master' into id-remap 2016-05-06 13:28:20 +02:00
93c9ff858a First 'working' version of asset reload.
Dead dummy simplistic test runs (nearly) OK here (only have a memleak from versionning code...),
but obviously will need much serious tests to validate everything.

Also, many things in code will need cleanup/refactor. Not to mention UI/UX.

But we do have asset version check & reload on file opening now! :D

Process summary:
I) Open .blend file exactly as in master, load assets just like any other linked data (add placeholders in case not found).
II) Check all asset engines and ask them whether each asset is OK, needs to be updated/reloaded, is missing...
III) User then can decide to actually reload the asset, or not.

Step II) happens in an async job (since engines using remote storage/database could take some time to answer),
step III) is a locking task (just like initial linking). This should allow user to not be blocked at all by that
asset update process.
2016-05-06 13:16:24 +02:00
7cf890e126 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-05-06 13:05:49 +02:00
961ebfa8c4 Set a main's version to current one after do_version is done.
With current master this is not an issue, but with all the reload stuff,
a same main could end up going several time into 'do_version', which is absolutely
not desired (multi-allocations, repeating conversions over some values, etc.).
2016-05-06 13:03:31 +02:00
341237035f Merge branch 'asset-engine' into asset-experiments 2016-05-06 11:09:56 +02:00
82359a7997 Do not update asset repo info inside link code.
Whole 'database' is rebuilt later anyway, and in more complex 'asset reload' cases
(where we may actually be reloading same asset with same uuid from same lib file),
this creates confusion...
2016-05-06 11:07:53 +02:00
4a429f1525 Merge branch 'asset-engine' into asset-experiments 2016-05-05 17:20:10 +02:00
fa21019745 Add global 'asset search by uuid' helper. 2016-05-05 17:19:27 +02:00
f4e4575e3c Merge branch 'asset-engine' into asset-experiments 2016-05-03 17:52:31 +02:00
a6f085f3c9 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2016-05-03 17:52:19 +02:00
39da83e974 Merge branch 'master' into asset-experiments 2016-05-03 17:45:25 +02:00
783d63f6af Merge branch 'master' into asset-engine 2016-05-03 17:45:05 +02:00
a6a8ff103d Lib relocate/reload: serious rework of code.
Idea here is to both factorize it seriously (reload and relocate are very similar, let's
avoid as much as possible twice the same code...), and make new `lib_relocate_do()`
much more flexible - now it should be able to reload individual IDs as well
(plan is to use it to reload assets in relelvant branch too).
2016-05-03 17:42:23 +02:00
a97da9842c Merge branch 'master' into id-remap 2016-05-03 16:58:34 +02:00
861318bbb9 Merge branch 'master' into asset-engine 2016-05-03 15:32:30 +02:00
41c5ec21b3 Merge branch 'master' into id-remap 2016-05-03 15:32:05 +02:00
b7525de284 Merge branch 'asset-engine' into asset-experiments 2016-05-03 09:57:24 +02:00
071a27f918 Amber: Fix load_pre not using correct repo! 2016-05-03 09:56:44 +02:00
90af45d5b5 Merge branch 'asset-engine' into asset-experiments 2016-05-02 20:51:58 +02:00
56ea898ade Merge branch 'id-remap' into asset-experiments 2016-05-02 20:51:51 +02:00
d95671442d Merge branch 'master' into asset-experiments 2016-05-02 20:51:44 +02:00
26658afad1 Amber: fix missing '..' parent dir entry when inside a repo. 2016-05-02 20:50:57 +02:00
70eb04328c Change how Amber (and all other engines) are expected to work.
So far, we were accepting the idea of several repositories per asset engine (e.g. different
directories in case of Amber). However, if this works OK during listing/initial linking,
it makes things way more complicated later in asset management, since asset uuid is no more
enough to unically indentify an asset!

Now an asset UUID is assumed to be really unique inside an asset engine.

For Amber, we 'salt' assets' uuids with new repo uuids (both being only 2 ints long now),
and keep a config 'cache' of mapping repo uuid -> path to repo.
2016-05-02 20:35:08 +02:00
a47653e5d4 Merge branch 'master' into asset-engine 2016-05-02 14:31:25 +02:00
dd63b849f8 Merge branch 'master' into id-remap 2016-05-02 14:28:49 +02:00
266d99ee42 More WIP code for actual assets reload.
Nothing working yet, need to solve some issue with rootpath actually...
2016-04-28 23:15:46 +02:00
5ad251770b Merge branch 'asset-engine' into asset-experiments 2016-04-28 22:40:03 +02:00
6c478490ea Refactor load_pre helper to work from both DirEntries and uuids... 2016-04-28 22:39:12 +02:00
e451d9b56a WIP (mostly empty for now) code to actually reload assets reported as needing it by update_check. 2016-04-28 21:44:59 +02:00
8bf511ef0b Merge branch 'asset-engine' into asset-experiments 2016-04-28 21:34:46 +02:00
ef14700089 Cleanup: get rid of blocking asset update_check code. 2016-04-28 21:32:32 +02:00
20bf7d949f Some refactor in asset update_check code.
Fetching assets' uuids by engines is now in own func (will be used by update op itself too).

Also, each AssetRef has only *one* asset ID, the first one, avoids us a useless loop!

And early out of update_check op in case we have no asset in current Main, no need to start
job in this case.
2016-04-28 21:30:14 +02:00
60cd55692d Merge branch 'asset-engine' into asset-experiments 2016-04-27 13:16:04 +02:00
b3be710e19 Some tweaks to flags & versionning handling for assets update check. 2016-04-27 13:15:39 +02:00
03d23c42a2 Merge branch 'master' into asset-experiments 2016-04-27 11:02:04 +02:00
42ea7490e5 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
	source/blender/windowmanager/wm_files.h
2016-04-27 11:01:48 +02:00
d4a9111f08 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-04-27 10:58:41 +02:00
e812fb4825 Add some header info about asset errors or reload needs.
Again, rather rough UI but enough to be useful for now.
2016-04-26 16:42:00 +02:00
cf08eec187 Add simple dummy code in outliner to show assets and their status.
This is purely WIP helper stuff, final UI will need real work - but that's for later.
2016-04-26 16:02:51 +02:00
32c83ba950 Merge branch 'master' into asset-engine 2016-04-26 14:42:05 +02:00
c2a5f95122 Merge branch 'master' into id-remap 2016-04-26 14:33:54 +02:00
b1c715a5fa Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/blender.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_init_exit.c
2016-04-25 16:55:41 +02:00
60474d11c7 Merge branch 'master' into id-remap 2016-04-25 16:41:26 +02:00
6e1fdd6f2d Actually hook async job of asset updating! 2016-04-20 17:11:14 +02:00
6cdc7c9587 Add 'ensure_uuids' callback to API, fix some flags in RNA code. 2016-04-20 17:08:42 +02:00
8154ee7bb2 Make opening .blend file use new async 'check asset updates' operator.
Nothing much exciting really, just not blocking anymore.
2016-04-20 16:44:07 +02:00
68eaa00290 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-04-19 23:21:05 +02:00
8055eae905 Merge branch 'master' into id-remap
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-04-19 23:03:53 +02:00
7cb1438035 Asset update: WIP proof-of-concept async (job-based) update code.
Builds, but not tested nor hoocked to anything yet!
2016-04-19 13:07:33 +02:00
e1c0b2ff25 Merge branch 'master' into asset-engine 2016-04-16 15:02:16 +02:00
54307d778d Merge branch 'master' into id-remap 2016-04-16 14:59:16 +02:00
1d40cfafea Move core of update check to BKE's asset area, add an operator for that too. 2016-04-15 10:38:49 +02:00
f36307db4b Merge branch 'master' into asset-engine 2016-04-12 12:30:40 +02:00
9437647f5d Merge branch 'master' into id-remap 2016-04-12 12:21:00 +02:00
9804f9181f Make 'check update' async, and add possibilities for engines to make async callbacks 'immediate'.
So now, jobs callback (async ones) of asset may return a specific job id value in case they actually
complete (or fail) on the first run.

This allows engines that do not need slow async stuff to perform an action to use simpler code
(e.g. imagine an engine able to list its assets from a cached DB, in most cases its list_dir
callback can execute instantaneously (from a user PoV), no need for a listing job then).
2016-04-11 17:35:31 +02:00
09f134aa6c Make asset engine's load_pre callback mandatory now.
Reason is, even if paths returned by `list_dir` are OK, we will also use `load_pre`
during 'reload'/'update' scenarii, where we only have uuids, to retrieve final
.blend datablock paths.
2016-04-11 16:14:05 +02:00
cb926ab6c9 Merge branch 'master' into asset-engine 2016-04-09 15:44:26 +02:00
28382bad00 Merge branch 'master' into id-remap 2016-04-09 15:41:46 +02:00
5b67ec9c9f Always reset to default asset engine (i.e. regular filebrowser code) when opening a new browser.
Else we'd have the last used engine even when saving a .blend or picture, ugly!
2016-04-07 16:35:34 +02:00
7dea5c2462 Finish implementing 'reports' in asset engine (not used yet). 2016-04-07 16:18:42 +02:00
f53c4dd29e Some minor fixes/updates of AE API comments. 2016-04-07 15:50:53 +02:00
1e3d75604d Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/blender.c
2016-04-07 15:26:32 +02:00
897249b254 Merge branch 'id-remap' into asset-experiments 2016-04-07 15:25:42 +02:00
718f8fe55f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_library_query.h
	source/blender/blenkernel/intern/blender.c
	source/blender/blenkernel/intern/library_query.c
2016-04-07 15:25:23 +02:00
698b15538b Fix issue with uuid generation in Amber. 2016-04-06 18:05:02 +02:00
aec80da8f8 More or less finished shell of 'update' code.
Code only reports which datablocks/assets shall be reloaded etc. so far, actual
reloading needs id-remap code (and hence will be implemented in asset-experiment
branch later).
2016-04-06 17:38:12 +02:00
9a31359e07 Merge branch 'master' into asset-engine 2016-04-06 15:23:45 +02:00
b111e0f645 Merge branch 'master' into id-remap 2016-04-06 15:16:39 +02:00
8b81b71cf2 Merge branch 'master' into asset-engine 2016-04-04 14:45:52 +02:00
46206fd9a5 Merge branch 'master' into id-remap 2016-04-04 14:39:59 +02:00
96aa445527 Add a 'check_dir' callback to asset engines, allowing them to control current 'root dir'.
Note that this is hacked around bpyrna incapacity to handle strings as return values of functions callbacks...
2016-03-31 20:50:29 +02:00
d63895ee30 Merge branch 'master' into asset-engine 2016-03-30 21:39:09 +02:00
f820643e9f Merge branch 'master' into id-remap 2016-03-30 21:37:49 +02:00
e9d7c741ca Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-03-30 21:31:21 +02:00
826ba124b6 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-03-30 21:10:10 +02:00
0ab784332a Merge branch 'libquery-recursive' into asset-engine 2016-03-23 17:16:52 +01:00
cab4bd90c1 Merge branch 'master' into asset-engine 2016-03-23 17:16:45 +01:00
c1452617fb Merge branch 'libquery-recursive' into id-remap 2016-03-23 17:08:32 +01:00
50d2c7f8f4 Merge branch 'master' into id-remap 2016-03-23 17:08:26 +01:00
f0f46e9ef6 Rework library_query foreach looper - add optional recursivity.
This commit:
* Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually
  stop in helper functions too, and jumping to a finalize label instead of raw return, to
  allow propper clean up).
* Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp
  from recursion. Note that this implies 'readonly', modifying IDs while recursing is not
  something we want to support!
* Changes callback signature/expected behavior: return behavior is now handled through flags,
  and 'parent' ID of id_pp is also passed (since it may not always be root id anymore).

Used this new recursive behavior in ID preview generation as an example, would obviously be committed separately.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1869
2016-03-23 13:15:41 +01:00
be5c2a5266 Finish RNA flags for asset UUIDs! 2016-03-17 14:54:29 +01:00
484f1bc226 Merge branch 'libquery-recursive' into asset-engine 2016-03-17 12:52:10 +01:00
97cb96720c Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/blender.c
2016-03-17 12:51:53 +01:00
37c4db1125 Merge branch 'libquery-recursive' into id-remap 2016-03-17 12:26:34 +01:00
cb770e58ad Merge branch 'master' into id-remap 2016-03-17 12:26:25 +01:00
09444bca5f Merge branch 'master' into libquery-recursive 2016-03-17 12:23:42 +01:00
a639446614 More WIP work towards designing Updated feature for assets/engines. 2016-03-09 20:33:38 +01:00
22f5772b44 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/creator/creator.c
2016-03-07 16:42:19 +01:00
8403577397 Merge branch 'id-remap' into asset-experiments 2016-03-07 15:37:43 +01:00
ebe52b71a5 Merge branch 'libquery-recursive' into asset-experiments 2016-03-07 15:37:35 +01:00
59aeb07895 Merge branch 'master' into asset-experiments
Conflicts:
	source/creator/creator.c
2016-03-07 15:37:22 +01:00
b0a541a76c Slightly modified way to check for assets on loadfile.
Since we now build a list of assets and their dependencies in Library datablocks, use it!
2016-03-07 15:03:28 +01:00
c93a86909c Merge branch 'libquery-recursive' into asset-engine 2016-03-06 14:57:20 +01:00
204ec489b8 Merge branch 'master' into asset-engine 2016-03-06 14:57:10 +01:00
873e90be65 Merge branch 'libquery-recursive' into id-remap 2016-03-06 14:54:06 +01:00
30b90cbb01 Merge branch 'master' into id-remap 2016-03-06 14:53:57 +01:00
f500019eac Merge branch 'master' into libquery-recursive 2016-03-06 14:51:03 +01:00
3cfea6eadc Merge branch 'libquery-recursive' into asset-engine 2016-03-04 14:35:18 +01:00
304cdfa476 Merge branch 'master' into asset-engine 2016-03-04 14:35:05 +01:00
cea847738a Merge branch 'libquery-recursive' into id-remap 2016-03-04 14:25:27 +01:00
bb3d3cc9cf Merge branch 'master' into id-remap 2016-03-04 14:25:20 +01:00
3d4ac80157 Merge branch 'master' into libquery-recursive 2016-03-04 14:24:59 +01:00
8b4997c6c7 WIP dummy code to update assets on file (re)load.
Actual code will be implemented in asset-experiment (we need id-remap code for this),
but will first try to define dummy API in this branch.
2016-03-01 16:58:31 +01:00
beff4ca725 Merge branch 'libquery-recursive' into asset-engine 2016-02-29 15:33:21 +01:00
982dd93357 Merge branch 'master' into asset-engine 2016-02-29 15:33:07 +01:00
2fa8db4ec6 Merge branch 'libquery-recursive' into id-remap 2016-02-29 15:21:54 +01:00
fa4d7deac0 Merge branch 'master' into id-remap 2016-02-29 15:21:39 +01:00
2a09cb62e2 Merge branch 'master' into libquery-recursive 2016-02-29 15:15:49 +01:00
0588ca9c08 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_operators.c
2016-02-25 15:07:27 +01:00
bb75900289 Merge branch 'id-remap' into asset-experiments 2016-02-25 14:55:56 +01:00
49e2a441cb Merge branch 'libquery-recursive' into asset-engine 2016-02-25 14:45:49 +01:00
ae9ae24c95 Merge branch 'libquery-recursive' into id-remap 2016-02-25 14:43:04 +01:00
d1dd9b6261 Merge branch 'master' into id-remap 2016-02-25 14:42:55 +01:00
5b5f55067b Merge branch 'master' into libquery-recursive 2016-02-25 14:21:30 +01:00
37f58ffec9 Forgot to include AnimationData into new recursive libquery foreach... 2016-02-25 14:20:58 +01:00
59a1340714 Add asset dependencies (re)build.
Is rebuilt when we link a new asset, or when we (re)load a .blend file.
Runtime data only, not saved in .blend file.
2016-02-24 20:42:58 +01:00
adfd89d9bd Merge branch 'libquery-recursive' into asset-engine 2016-02-24 10:35:00 +01:00
85959e8b4a Merge branch 'master' into asset-engine 2016-02-24 10:34:50 +01:00
c448d4422e Merge branch 'libquery-recursive' into id-remap 2016-02-24 10:34:14 +01:00
3dfd063697 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-02-24 10:26:50 +01:00
e714e1c5ef Merge branch 'master' into libquery-recursive 2016-02-24 10:18:38 +01:00
3054a8a91b Merge branch 'master' into libquery-recursive 2016-02-20 18:06:13 +01:00
dc34313dc9 Merge branch 'libquery-recursive' into asset-engine 2016-02-19 10:53:52 +01:00
afdf2a3fb2 Merge branch 'master' into asset-engine 2016-02-19 10:53:38 +01:00
aabe83d4c0 Merge branch 'libquery-recursive' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-02-19 10:50:26 +01:00
9bb32dd445 Merge branch 'master' into id-remap 2016-02-19 10:48:24 +01:00
87a385b838 Cleanup (remove some useless diff compared to master). 2016-02-19 10:47:32 +01:00
3652a0e7da Merge branch 'master' into libquery-recursive 2016-02-19 10:29:18 +01:00
b6022f1488 Fix for new libquery callback API. 2016-02-18 23:11:03 +01:00
6a951054d0 Merge branch 'libquery-recursive' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-02-18 18:10:57 +01:00
6ec0026f8d Merge branch 'libquery-recursive' into asset-engine 2016-02-18 17:56:58 +01:00
827b1457ca Rework library_query foreach looper - add optional recursivity.
This commit:
* Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually
  stop in helper functions too, and jumping to a finalize label instead of raw return, to
  allow propper clean up).
* Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp
  from recursion. Note that this implies 'readonly', modifying IDs while recursing is not
  something we want to support!
* Changes callback signature/expected behavior: return behavior is now handled through flags,
  and 'parent' ID of id_pp is also passed (since it may not always be root id anymore).

Used this new recursive behavior in ID preview generation as an example, still needs more testing!
2016-02-18 17:53:42 +01:00
40562d0e11 Merge branch 'master' into asset-engine 2016-02-18 17:35:12 +01:00
cd43bd241f Merge branch 'master' into asset-engine 2016-02-16 14:35:54 +01:00
a9054360c6 Merge branch 'master' into id-remap 2016-02-15 19:46:24 +01:00
66375326b4 Merge branch 'master' into asset-engine 2016-02-15 19:39:57 +01:00
3eefdc0ed7 WIP Add asset sub-data dependency info.
We need that info (knowing which non-asset IDs are used by which asset-IDs),
otherwise managing reloading, updates etc. of assets would be impossible
(or rather, would leave a mess of unused IDs behind them).
Only partially done, non-functional yet.

This commit also adds asset repository references in libraries.
2016-02-15 16:52:12 +01:00
14d11c1609 Merge branch 'asset-engine' into asset-experiments 2016-02-14 20:31:37 +01:00
6b61c25815 Merge branch 'id-remap' into asset-experiments 2016-02-14 20:31:31 +01:00
576eca8ab3 Merge branch 'master' into asset-engine 2016-02-14 20:27:48 +01:00
ad72025611 Merge branch 'master' into id-remap 2016-02-14 20:24:53 +01:00
65e357fe56 Merge branch 'asset-engine' into asset-experiments 2016-02-12 10:06:03 +01:00
46903fbccf Merge branch 'id-remap' into asset-experiments 2016-02-12 10:05:56 +01:00
ac2e25986c Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-02-12 10:05:28 +01:00
71b65b417c Merge branch 'master' into id-remap 2016-02-12 09:55:22 +01:00
30db6e0cb7 Merge branch 'master' into asset-engine 2016-02-03 10:06:45 +01:00
2ca8421987 Assets: add uuid to linked data, write and read it from file.
Note that this is only very first steps, I think we'll need to 'propagate'
uuid to all data used/linked by asset itself, otherwise most things won't get
updated/reloaded. Still have to think about this.
2016-02-02 14:14:15 +01:00
11c6fed3ee Merge branch 'master' into asset-engine 2016-02-02 14:10:27 +01:00
f3de9752fd Merge branch 'id-remap' into asset-experiments 2016-02-01 14:05:11 +01:00
1b34246af2 Merge branch 'master' into id-remap 2016-02-01 14:04:48 +01:00
dded3bb21f Merge branch 'asset-engine' into asset-experiments 2016-01-31 15:09:24 +01:00
3f63cb8843 Merge branch 'id-remap' into asset-experiments 2016-01-31 15:09:17 +01:00
d1b4471012 Merge branch 'master' into asset-engine 2016-01-31 15:05:09 +01:00
5b16d59ffc Merge branch 'master' into id-remap 2016-01-31 14:59:57 +01:00
f1fc8959db Assets: add uuid to linked data, write and read it from file.
Note that this is only very first steps, I think we'll need to 'propagate'
uuid to all data used/linked by asset itself, otherwise most things won't get
updated/reloaded. Still have to think about this.
2016-01-21 16:12:08 +01:00
955cb4a8db Merge branch 'asset-engine' into asset-experiments 2016-01-21 09:46:46 +01:00
351f74dee9 Merge branch 'id-remap' into asset-experiments 2016-01-21 09:46:39 +01:00
da81c78fc7 Merge branch 'master' into asset-engine 2016-01-21 09:45:52 +01:00
911095d372 Merge branch 'master' into id-remap
Conflicts:
	source/blender/editors/space_outliner/outliner_tools.c
2016-01-21 09:45:18 +01:00
d9a93eb3bd Merge branch 'asset-engine' into asset-experiments 2016-01-20 15:31:01 +01:00
27470754b6 Merge branch 'id-remap' into asset-experiments 2016-01-20 15:30:53 +01:00
6b1065b11c Merge branch 'master' into asset-engine 2016-01-20 15:02:49 +01:00
1705fd66d8 Merge branch 'master' into id-remap 2016-01-20 15:02:29 +01:00
28adc7d248 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-01-20 14:27:45 +01:00
f4214d1d1c Merge branch 'asset-engine' into asset-experiments 2016-01-15 16:31:13 +01:00
48f9931257 Merge branch 'id-remap' into asset-experiments 2016-01-15 16:31:06 +01:00
a0803fabfe Merge branch 'master' into asset-engine 2016-01-15 16:24:55 +01:00
6eec8eaa57 Merge branch 'master' into id-remap 2016-01-15 15:26:34 +01:00
498b712a37 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-01-14 20:32:03 +01:00
0fa187e4b5 Fix handling of asset uuid in WMLinkAppendDataItem helper struct.
We need a pointer here (reduces mem footprint, and allows to say 'we have no uuid' with a NULL value!).
2016-01-14 20:29:40 +01:00
a9284fd093 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-12 16:23:06 +01:00
8af7d783c7 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-12 16:21:34 +01:00
a7cfb5fc22 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-12 16:08:05 +01:00
a414edc0af Merge branch 'master' into id-remap 2016-01-12 16:01:17 +01:00
4c535c07c6 Fix & cleanup in outliner area.
Now all new entries in items' menus should behave correctly!
2016-01-07 21:47:47 +01:00
22f5a17b9c Fix some bad id->flag/tag mismatch from not-so-recent merge with master... 2016-01-07 16:14:16 +01:00
07b8b90f39 Fix assert when deleting obdata.
Issue here is again with NEVER_NULL usages: obdata (& co) would be dereferenced twice.

I'm not totally happy with this solution, ideally remap should never leave Main
in invalid state, but for now it will do...
2016-01-07 16:11:14 +01:00
5a65830830 Fix a crash when deleting a lib featuring some proxyob source... 2016-01-07 14:51:37 +01:00
f2db96fbaf Merge branch 'master' into id-remap 2016-01-07 10:28:55 +01:00
2e8297108d Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/BKE_library_query.h
	source/blender/blenkernel/intern/library_query.c
	source/blender/makesrna/intern/rna_ID.c
2016-01-06 21:40:12 +01:00
eaa892c14f Merge branch 'asset-engine' into asset-experiments 2016-01-04 20:41:15 +01:00
f3077f411d Merge branch 'id-remap' into asset-experiments 2016-01-04 20:41:08 +01:00
46e6f3b420 Merge branch 'master' into asset-engine 2016-01-04 20:35:05 +01:00
fc7f086f4b Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-04 20:34:31 +01:00
74393f8f15 Merge branch 'asset-engine' into asset-experiments 2016-01-04 12:10:26 +01:00
9c3e0b558c Merge branch 'id-remap' into asset-experiments 2016-01-04 12:10:19 +01:00
e49966dd96 Merge branch 'master' into asset-engine 2016-01-04 11:55:56 +01:00
e921ecabaf Merge branch 'master' into id-remap 2016-01-04 10:58:39 +01:00
e58cae1b7a Merge branch 'asset-engine' into asset-experiments 2015-12-31 12:56:53 +01:00
e28986aa8f Merge branch 'id-remap' into asset-experiments 2015-12-31 12:56:45 +01:00
19e6c23b75 Merge branch 'master' into asset-engine 2015-12-31 12:50:34 +01:00
9ae928ff9d Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/BKE_material.h
2015-12-31 12:50:08 +01:00
b40d4ba517 Merge branch 'asset-engine' into asset-experiments 2015-12-27 13:09:54 +01:00
8d3129cba2 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/windowmanager/intern/wm_operators.c
2015-12-27 13:09:42 +01:00
009ccfecb6 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/windowmanager/intern/wm_operators.c
2015-12-27 13:06:34 +01:00
f4e7fec73c Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/makesdna/DNA_ID.h
2015-12-27 12:54:57 +01:00
a6e9aba17f Merge branch 'master' into id-remap 2015-12-20 15:41:27 +01:00
b9c5da9ba8 Merge branch 'master' into id-remap
Conflicts:
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_outliner/outliner_intern.h
	source/blender/editors/space_outliner/outliner_tools.c
2015-12-18 22:17:25 +01:00
4eaa6c4a7b Merge branch 'master' into id-remap 2015-12-18 21:23:27 +01:00
b46b921738 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
2015-12-17 19:39:05 +01:00
dab1a1dd5f Merge main remap funcs' bool parameters into a single bitflag.
Too much bools kill bools.
2015-12-17 19:32:33 +01:00
24556b3c3d More cleanup - remove unused stuff, some simplifications. 2015-12-17 14:56:15 +01:00
817fee305f Cleanup: mostly removes useless diff from master. 2015-12-17 13:21:18 +01:00
613bf6755e Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_operators.c
2015-12-16 22:28:31 +01:00
f2ce01f844 Merge branch 'asset-engine' into asset-experiments 2015-12-16 21:50:17 +01:00
3de18048b3 Merge branch 'master' into asset-experiments 2015-12-16 21:50:02 +01:00
d02c201814 Merge branch 'master' into asset-engine 2015-12-16 21:39:49 +01:00
c089f28504 Merge branch 'master' into id-remap 2015-12-16 21:34:04 +01:00
cddbeaeec8 Merge branch 'master' into asset-engine 2015-12-14 16:26:49 +01:00
d0b037d0ef Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/text.c
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_outliner/outliner_tools.c
2015-12-14 16:26:14 +01:00
8bbfd2729a Merge branch 'master' into id-remap 2015-12-07 17:45:41 +01:00
6dffedc75e Fix several issues with logic of core id-remap:
* We need to clear the 'user-one' flags and potential usercount for old_id.
* We need to consider ID usages inside a same lib as **never** being indirect ones.

Also re-enabled proxy checking for now (not sure why I commented it, think testing stuff or so...).
2015-12-07 17:33:35 +01:00
49b67b58aa Fix id-remap looper not 'freeing' 'use-one' id usercount. 2015-12-07 15:54:03 +01:00
67cc51d32d Merge branch 'master' into id-remap 2015-12-07 11:01:09 +01:00
574d63cf65 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_intern.h
	source/blender/editors/space_file/file_ops.c
2015-12-07 11:00:38 +01:00
05bd9572a6 Some more fixes, and make Outliner's delete available for all IDs, not only libraries! 2015-12-04 17:48:00 +01:00
56679ae31c Merge branch 'master' into id-remap 2015-12-04 17:24:43 +01:00
705a247e2e Better handling of usercount during ID deletion, also add this to ID RNA API.
Seems to work for simple cases, but deletion of complex libs from complex files
(Gooseberry ones) still generates lots of assert failures, and crashes in some cases.
2015-12-03 16:34:11 +01:00
e8b46461e6 Merge branch 'master' into id-remap 2015-12-03 14:25:05 +01:00
9584c88b6b Fix a bunch of more stuff, more correct handling of ID/Lib deletion...
Still have some usercount issues here, though things seems to start working...
2015-12-01 21:37:25 +01:00
84d25cb87a Merge branch 'master' into id-remap.
Also, changing how library delete works (not functional currently).

Conflicts:
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_outliner/outliner_ops.c
	source/blender/editors/space_outliner/outliner_tools.c
2015-12-01 17:45:22 +01:00
1da2edfb25 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2015-11-30 15:38:42 +01:00
6f90aa2016 Fix issue when reloading a lib with selected object. 2015-11-30 10:48:55 +01:00
81edad9966 Merge branch 'master' into id-remap 2015-11-28 21:45:12 +01:00
3319e460e6 Merge branch 'master' into id-remap 2015-11-28 15:00:57 +01:00
f66e14611d Attempt to fix RNA nightmare with ListBase used as Collection return type for functions.
This is hacky to make work on Linux, and seems to totally break on Windows.

So now, instead, we define a CollectionListBase (exact copy of ListBase), to be used inside RNA...

Seems to work nicely on Linux, lets see what win buildbot says.
2015-11-26 15:26:05 +01:00
7ce594b544 Merge branch 'master' into id-remap 2015-11-26 15:04:45 +01:00
a0df6ce03b Merge branch 'master' into id-remap 2015-11-26 12:42:56 +01:00
df10b4d7a8 Fix mysterious AC IDs refcount issue when reloading some gooseberry files' libs.
Turned out our libquery ID looper was ignoring constraints' 'reference' parameter in callback, grrr...
2015-11-26 12:00:50 +01:00
bfad4bba7a Add helpers to BKE_library_query to find which datablocks are using/referencing a given ID.
Also expose this in RNA. Priceless to debug ID usages...
2015-11-25 20:48:22 +01:00
d35d72893e Merge branch 'master' into id-remap 2015-11-25 16:23:22 +01:00
b47b035f57 Merge branch 'master' into id-remap 2015-11-25 15:16:26 +01:00
0c161e23d9 Merge branch 'master' into id-remap 2015-11-25 12:48:38 +01:00
a6df054b02 Merge branch 'master' into id-remap 2015-11-24 15:52:04 +01:00
7fa92ad950 Merge branch 'master' into id-remap 2015-11-24 09:50:29 +01:00
91be63e127 Merge branch 'master' into id-remap 2015-11-23 14:21:50 +01:00
387b120579 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenloader/intern/readfile.c
2015-11-19 22:39:11 +01:00
f1a7118c04 Add missing AnimData ID to foreach_ID_loop.
Atempt to fix missing action remapping, but no luck so far. :|
2015-11-12 11:50:01 +01:00
c9df632175 Merge branch 'master' into id-remap 2015-11-12 09:54:20 +01:00
11d4cbb04c Merge branch 'master' into id-remap 2015-11-11 20:22:02 +01:00
e74ce5bd86 Merge branch 'master' into id-remap 2015-11-11 19:53:14 +01:00
ab5a591f91 Do not try to reload directly non-linkable datablocks (shapekeys),
those will get reloaded by 'owner' mesh anyway.

Why, why, why are shapekeys datablocks???
2015-11-11 18:12:08 +01:00
483247d756 Fix Text usage by TextEditor (USER_REAL, not USER_ONE). 2015-11-11 17:43:26 +01:00
ded1333f3c Rework a bit IDRemap struct to separate input flags from output status, and fix
issues with unlinking ParticleSettings.

We now have the option to still decrement user count of old_id, even if we could not
replace it with NULL new_id (aka unlinking), needed to keep proper user count when
unlinking and ID from datablocks it uses, to delete it.
2015-11-11 16:52:15 +01:00
4cf00de7d4 Merge branch 'master' into id-remap 2015-11-11 16:15:53 +01:00
61bad3cfe0 Merge branch 'master' into id-remap 2015-11-11 15:06:32 +01:00
75c5f6135c Silence a bit debug prints! 2015-11-11 12:44:47 +01:00
73c8d3abcc Merge branch 'master' into id-remap 2015-11-11 12:43:51 +01:00
12292d441d Merge branch 'master' into id-remap 2015-11-11 11:49:33 +01:00
9e6cdd8e3a Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/library.c

Also clears now useless 'bool is_user_one' flag from editors' ID remap callback.
2015-11-11 10:48:11 +01:00
7a62ac4127 Some minor tweaks. 2015-11-10 20:15:01 +01:00
d2913c1409 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/object.c
2015-11-10 19:59:44 +01:00
5f0299898d Hopefully fix the 'real user' nightmare.
Idea is to add two new flags, one saying 'we need to ensure a real user exists',
the other 'we had to increment user count to ensure we have a real user'.

This allows us to easily control the extra user in release/delete/remap cases,
and also fixes the infamous 'add new image to texture, open image in ImageEditor,
delete image from texture, have a zero-user red image in Image Editor' issue.

There is still much to be done here, more places where we can use those flags,
also clear them when we force usercount to zero, etc.

All this allows us to fix unsolvable issues (like Group being ensure_user'ed
in loading code, but only if they do have objects in them), and to avoid returning
ugly bool from editors' callbacks (this is still to be cleaned up in the branch too).

Bad news - this means we cannot use short ID->flag anymore (not enough flags), for now
added a new int ID->flag2 (replacing pad int), not sure how to best manage change here,
maybe for 2.8 we can totally wipe ID->flag? But this would totally break forward compat.
2015-11-10 16:56:54 +01:00
9ddc60bc10 Merge branch 'master' into id-remap 2015-11-10 16:21:37 +01:00
959e2e8cfe Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library.c
2015-11-10 14:51:42 +01:00
965d9649c4 Minor update/cleanup on usercount, from work done in master. 2015-11-10 14:47:38 +01:00
033a89957c Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/curve.c
	source/blender/blenkernel/intern/linestyle.c
	source/blender/blenkernel/intern/material.c
	source/blender/blenkernel/intern/mball.c
	source/blender/blenkernel/intern/mesh.c
	source/blender/blenkernel/intern/object.c
	source/blender/blenkernel/intern/particle.c
	source/blender/blenkernel/intern/scene.c
	source/blender/blenkernel/intern/world.c
2015-11-10 12:45:42 +01:00
e43d70a60f Merge branch 'master' into id-remap 2015-11-08 17:59:08 +01:00
7f53cbb556 Cleanup: get rid of bmain in foreach ID callback.
messing with depsgraph here is not a good idea I think... and makes things simpler!
2015-11-07 11:31:28 +01:00
8b6928b2fb Merge branch 'master' into id-remap 2015-11-07 10:54:48 +01:00
f0c6c85788 Attempt to fix the 'user_one' mess...
Seems to work (though will need much more tests), but makes code more ugly. :|
2015-11-06 18:00:09 +01:00
0c8b1a8c37 Merge branch 'master' into id-remap 2015-11-06 12:35:45 +01:00
77231eeb2f Merge branch 'master' into asset-engine 2015-11-02 19:27:48 +01:00
9521d71735 Merge branch 'master' into id-remap 2015-11-02 19:22:14 +01:00
3ad17b9405 Merge branch 'master' into asset-engine 2015-10-27 15:05:17 +01:00
6bf915e925 Merge branch 'master' into id-remap 2015-10-27 15:04:51 +01:00
c7f48be47c Merge branch 'master' into asset-engine 2015-10-17 11:47:35 +02:00
2d7bc36462 Merge branch 'missing-libs' into id-remap 2015-10-17 11:39:48 +02:00
177295f856 Merge branch 'master' into missing-libs 2015-10-17 11:34:29 +02:00
06b38491f1 Merge branch 'master' into asset-engine 2015-10-15 17:13:29 +02:00
de71f7ab8a Fix deadlock. Would be really cool if Main spinlock could be re-entrant. :| 2015-10-15 17:03:54 +02:00
6da735e81c Merge branch 'missing-libs' into id-remap 2015-10-15 16:55:43 +02:00
59ff3b5498 Merge branch 'master' into missing-libs 2015-10-15 16:12:57 +02:00
9a9796564a Fix broken ID placeholder code (from recent merges).
Here we need a bit different handling than in missing-lib branch...
2015-10-15 15:33:24 +02:00
a2aafbe656 Merge branch 'master' into asset-engine 2015-10-15 14:29:50 +02:00
d899710952 Merge branch 'missing-libs' into id-remap
Huge load of conflicts, hope it did not break too much things...
Current code build, but crashes easily :|
2015-10-14 21:24:14 +02:00
a6028f8e6b Merge branch 'master' into id-remap 2015-10-14 20:38:27 +02:00
3ffc5c9209 Moar cleanup. 2015-10-14 20:24:05 +02:00
f15741f830 Merge branch 'master' into missing-libs 2015-10-14 17:17:30 +02:00
b89530845a Cleanup. 2015-10-14 16:22:57 +02:00
4dac0afa9c Merge branch 'free-refcount-ids' into missing-libs 2015-10-13 15:48:18 +02:00
168604ecbe Revert to master - those changes are globally valid, but remain incomplete,
and total new code is being done in id-remap anyway, not worth bothering with this for now...
2015-10-13 15:44:58 +02:00
9d5cdf92b2 Merge branch 'master' into free-refcount-ids 2015-10-13 15:41:54 +02:00
67d922f61a Merge branch 'master' into free-refcount-ids 2015-10-13 14:41:33 +02:00
4ed3a36e31 Merge branch 'missing-libs' into id-remap 2015-10-12 21:01:53 +02:00
9442a43853 Merge branch 'free-refcount-ids' into id-remap 2015-10-12 21:00:47 +02:00
13faefaf6a Merge branch 'master' into id-remap 2015-10-12 21:00:02 +02:00
5f2276a553 Merge branch 'free-refcount-ids' into missing-libs 2015-10-12 20:46:28 +02:00
e95ba11ce6 Merge branch 'master' into free-refcount-ids 2015-10-12 20:31:39 +02:00
7d1e429d7c Attempt to fix the NodeTree issue.
So, idea is, since mat/tex/scene/etc. nodetrees are owned by their respective IDs
(those nodetree do not exist in Main, they are systematically freed with their ower IDs, etc.),
we should not treat them as IDs in IDlooper, but rather as mere sub-data, and hence directly
loop over the IDs of those nodetrees.

From quick check it seems to work, but this needs to be confirmed as a valid idea!
2015-10-08 20:35:47 +02:00
cb08f47121 Merge branch 'master' into id-remap 2015-10-08 15:18:08 +02:00
84c6bcac0d Merge branch 'master' into id-remap 2015-10-08 13:15:29 +02:00
74ac2beba2 Again, fix for stupid broken relinking of Objects... 2015-10-08 13:07:06 +02:00
741ceed378 Fix stupid crash... 2015-10-08 12:54:10 +02:00
f0ffe42858 Merge branch 'missing-libs' into id-remap 2015-10-08 12:45:48 +02:00
d8a171f8a7 Merge branch 'lib-link-rework-temp' into id-remap 2015-10-08 12:44:35 +02:00
d4b5b8f1bc Merge branch 'free-refcount-ids' into id-remap 2015-10-08 12:44:28 +02:00
e0c7dcba5b Merge branch 'master' into id-remap 2015-10-08 12:43:41 +02:00
6188d17623 Merge branch 'lib-link-rework-temp' into missing-libs 2015-10-08 12:13:43 +02:00
a219728914 Merge branch 'free-refcount-ids' into missing-libs 2015-10-08 12:13:28 +02:00
92bcc7dd19 Merge branch 'master' into missing-libs 2015-10-08 12:08:29 +02:00
32d9f75660 Merge branch 'master' into lib-link-rework-temp 2015-10-08 12:06:57 +02:00
249aa6c649 Merge branch 'master' into free-refcount-ids 2015-10-08 12:03:03 +02:00
f2293df9a6 Replace 'do_id_user' param of BKE_xxx_free() funcs by generic BKE_libblock_relink().
Heavily simplfies that freeing area, but again a rather risky and likely-to-break change.

At least, NodeTree is known to be a trouble-maker here, due to how it seems to be
'owned' by its mat/tex/sce/etc. Have to dig deeper here, this is still quite unclear
what exactly happens with those, and how to handle them correctly.
2015-10-07 23:15:03 +02:00
1daa502f87 Add BKE_libblock_relink(), which works as _libblock_remap(), but only over one given ID
(instead of whole Main content).

Could replace maybe things like constraint, rigisbody world, etc. '_relink' func,
but for now it's only intended to replace custom 'id releasing' code in _free()
funcs of all IDs!
2015-10-07 21:56:27 +02:00
06c6492d7d Avoid fexplicit conversion to ID * for remap parameters (use void pointers instead).
Also found another missing ID in foreach_id (sound pointer of sequences).
2015-10-07 21:10:50 +02:00
6ed0fcc187 Merge branch 'master' into id-remap 2015-10-07 20:56:54 +02:00
dca705d1c3 Huuuuuuuge commit - replace ugly scene/object/group_unlink by new generic libblock_unlink.
Previous situation was pretty much horrible, a few data types having their own coocking to
unlink, often doing more than only unlinking, often doing the same thing two times or more,
often messing with areas they should not have touched (like editors from withing BKE)...

Now we hope to have something generic, working the same way for all ID types
(we do have to add some specific handling for groups/objects/scene unfortunately,
but this remains reasonable).

Needless to say such a change is calling for troubles - I tried to follow and reproduce
as best as I could previous code, but most likely some areas will become buggy. Do not think
previous code was 100% correct anyway, things like Objects have a really big and complicated
usage of IDs...

Also, foreach_id tool has been enhanced, again for complex types like objects & co, we should
cover much better all possible IDs now (e.g. rigidbody & logic bricks were
totally missing from there).

And there is more to come...
2015-10-07 20:32:59 +02:00
ad8fa268a4 Adding game sensors/controllers/actuators to foreachid libquery.
Those were totally missing, cannot see a good reason for it...
Seems to work OK, but only very quickly tested code.
2015-10-07 10:31:36 +02:00
34c608d010 Make use of new IDWALK_REFCOUNTED flag in our ID remap code.
Think core of the system is getting pretty much OK, now we'll likely have to deal
with tons of specific cases, given how Blender is totally inconsistent when it comes to
handling user counts (e.g. spaceimage...).

Also, still have to make generic ID_unlink and ID_release_datablocks func to replace
redundant code in BKE we have currently.
2015-10-06 14:47:35 +02:00
b8e224507f Merge branch 'missing-libs' into id-remap 2015-10-06 12:25:56 +02:00
f3e2e92f5c Merge branch 'lib-link-rework-temp' into id-remap 2015-10-06 12:25:49 +02:00
64f0cd7b33 Merge branch 'free-refcount-ids' into id-remap 2015-10-06 12:25:38 +02:00
7a7b5bc6d3 Merge branch 'master' into missing-libs 2015-10-06 12:23:50 +02:00
2a3e261554 Merge branch 'master' into lib-link-rework-temp 2015-10-06 12:20:57 +02:00
913938514d Merge branch 'master' into free-refcount-ids 2015-10-06 12:19:29 +02:00
bb6da9cbea ID foreach: add support for modifiers to indicate whether given ID pointer is refcounted or not. 2015-10-05 16:30:33 +02:00
45b83f6fd5 Merge branch 'master' into id-remap 2015-10-05 16:00:33 +02:00
650efcf2d9 Update foreach ID (add a few missing IDs, and add new flag, REFCOUNTED, to indicate when a given ID pointer affects id->us count).
Still missing: at least modifiers (have to change all modifiers callbacks, yuck).
AFAIK constraints never refcount thier IDs so we can keep current code here.
2015-10-05 15:04:39 +02:00
09dcfbbe46 Merge branch 'free-refcount-ids' into id-remap 2015-10-05 13:58:49 +02:00
a33cc08a99 Fix for object freeing. 2015-10-05 13:58:21 +02:00
5327de0f40 Merge branch 'missing-libs' into id-remap 2015-10-05 12:32:19 +02:00
e0adc0b705 Merge branch 'lib-link-rework-temp' into id-remap 2015-10-05 12:32:10 +02:00
0548a1dc6f Merge branch 'free-refcount-ids' into id-remap 2015-10-05 12:32:00 +02:00
3b37921e01 Merge branch 'master' into id-remap 2015-10-05 12:31:52 +02:00
8bb7031dec Minor cleanup. 2015-10-05 12:17:51 +02:00
d7d236ce5c Merge branch 'master' into lib-link-rework-temp 2015-10-05 12:09:19 +02:00
a5d1709771 Merge branch 'master' into missing-libs 2015-10-05 12:05:50 +02:00
794a977bad Merge branch 'master' into free-refcount-ids 2015-10-05 12:05:00 +02:00
44e62635c5 Cleanup , and remove public '_release_datablocks' funcs for now.
On second thaought, will end up doing this differently in id-remap branch,
so for now just make this branch a cleanup, consistency-fixing one.
2015-10-05 10:59:38 +02:00
f00f3496a0 Merge branch 'master' into free-refcount-ids 2015-10-05 09:23:08 +02:00
d5f35c6c4e Merge branch 'free-refcount-ids' into id-remap 2015-10-03 19:22:35 +02:00
e2aab5750b Merge branch 'master' into asset-engine 2015-10-03 19:03:38 +02:00
a4c3d645ed Add note about object release func... 2015-10-01 17:44:02 +02:00
b63872cd5e Free IDs: MovieClip & Mask.
Mask freeing was doing really bad (as in, not consistent with other ID freeing code) things (unlinking, and even not freeing animdata!).
2015-10-01 17:38:04 +02:00
e734bef9d6 Free IDs: Nodes & Groups. 2015-10-01 17:13:16 +02:00
105c6a6c26 Free IDs: Action & Armature. 2015-10-01 16:57:28 +02:00
45f25c6241 Free IDs: Sound & Speaker.
Also cleanup, removed horrible `BKE_sound_delete()`!
2015-10-01 16:47:12 +02:00
1a8727fea0 Free IDs: vfont & text. 2015-10-01 16:34:09 +02:00
ad6495d14b ID free: another round of cleanup & fixes (mostly insconsitancies among IDs code)... 2015-09-30 21:59:24 +02:00
fe3c796c31 Free ID: Brush & World. 2015-09-30 21:34:57 +02:00
099eb3111e ID free: GP & particles... 2015-09-30 21:15:20 +02:00
dd266202b0 ID free: freestylelinestyle & other minor types, some cleanups (mostly use MEM_SAFE_FREE where possible). 2015-09-30 20:52:33 +02:00
1636b12d4d Merge branch 'master' into free-refcount-ids 2015-09-30 20:23:47 +02:00
9e64ad1ad5 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-30 20:23:14 +02:00
6fb87bc545 Merge branch 'master' into missing-libs 2015-09-30 20:23:07 +02:00
919a887399 Merge branch 'master' into lib-link-rework-temp 2015-09-30 20:22:37 +02:00
921a86b51f Free IDs; lattice & camera. 2015-09-27 15:50:28 +02:00
5b02b2429a Free IDs: images & lamps. 2015-09-27 15:28:57 +02:00
2282a80697 ID freeing: materials and textures. 2015-09-27 15:12:27 +02:00
931570b480 ID free: tackle Scene (and Library, but not much to do there). 2015-09-27 14:43:49 +02:00
063aea9124 Merge branch 'asset-experiments' into asset-engine 2015-09-27 11:30:21 +02:00
b5ee93c1a3 Merge branch 'master' into asset-engine 2015-09-27 11:30:08 +02:00
e6fa18cebf Merge branch 'master' into asset-experiments 2015-09-27 11:29:39 +02:00
0b4439994f Merge branch 'missing-libs' into id-remap 2015-09-27 11:28:20 +02:00
f330da10db Merge branch 'lib-link-rework-temp' into id-remap 2015-09-27 11:28:15 +02:00
53c28a790b Merge branch 'master' into id-remap 2015-09-27 11:28:07 +02:00
ff7b6d36e3 Merge branch 'master' into free-refcount-ids 2015-09-27 11:26:46 +02:00
0b8a47d1b0 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-27 11:24:50 +02:00
9960295484 Merge branch 'master' into missing-libs 2015-09-27 11:24:42 +02:00
113979e658 Merge branch 'master' into lib-link-rework-temp 2015-09-27 11:19:31 +02:00
c4a3c9d006 Merge branch 'free-refcount-ids' into id-remap 2015-09-24 20:49:58 +02:00
a7e540d7c8 Clean up BKE_object_free() and add BKE_object_release_datablocks().
Similar changed to those done for mesh/curve/mball.

Also, systematically nullify pointers in `_free()` functions, this does not cost
much and can help troubleshooting later.

And tag `BKE_object_unlink()` as an horrible piece of code...
2015-09-24 20:43:35 +02:00
56dae06c56 Cleanup of free/unlink/release of ID: mesh/curve/mball.
Renamed their `_unlink()` functions to `_release_datablocks()`, since they do not
unlink anything (not in the sense `BKE_object_unklink()` does, at least)!

Also, added a `const bool do_id_user` to their `_free()`, for consistency, now
relevant `_release_datablocks()` func only gets called when this option is set.
2015-09-24 19:53:38 +02:00
2cdd19de0b Merge branch 'missing-libs' into id-remap 2015-09-24 13:19:08 +02:00
96092913fb Merge branch 'lib-link-rework-temp' into id-remap 2015-09-24 13:18:59 +02:00
6e88990a4b Merge branch 'master' into id-remap 2015-09-24 13:18:51 +02:00
19f05f274a Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-24 13:15:24 +02:00
4c486c075e Merge branch 'master' into missing-libs 2015-09-24 13:14:48 +02:00
6b49cc1221 Merge branch 'master' into lib-link-rework-temp 2015-09-24 13:13:02 +02:00
4058333c49 Half-working workaround for image refcount in SpaceImage.
Our ID refcount handling is really flacky in many places, this is going to be a serious
issue for this work I'm afraid... :/
2015-09-24 13:10:20 +02:00
d5c69ffeb9 Fix bad handling of non-linkable IDs on reload.
They would be removed from bmain, but never added again nor freed - in this case
we can simply explicitely reload them in fact, non-linkable is only a user-related status...
2015-09-22 21:26:41 +02:00
8da4413ba3 Merge branch 'missing-libs' into id-remap 2015-09-22 10:03:37 +02:00
fc3822988c Merge branch 'lib-link-rework-temp' into id-remap 2015-09-22 10:03:23 +02:00
2665b3ee83 Merge branch 'master' into id-remap 2015-09-22 10:01:20 +02:00
5186e5a0c9 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-22 10:00:28 +02:00
cf7e75ad53 Merge branch 'master' into missing-libs 2015-09-22 10:00:20 +02:00
1b75f74086 We do not require anymore linking datablocks grouped by types, makes code even simpler. 2015-09-22 09:58:59 +02:00
7a5edf3b45 Merge branch 'master' into lib-link-rework-temp 2015-09-22 09:49:24 +02:00
2c0faad6d5 Minor picky fix... 2015-09-22 09:44:14 +02:00
a508d49e33 Better handling of missing datablocks in reload case.
We need to generate a placeholder for those here... Also, enhances handling
of direct/indirect flags & co.
2015-09-21 21:57:54 +02:00
5bc6608ea5 Merge branch 'missing-libs' into id-remap 2015-09-21 21:37:49 +02:00
06eb69b892 Correct handling of name in placeholder generator (this is a name, not an idname...). 2015-09-21 21:37:05 +02:00
9b9dbb5865 Merge branch 'missing-libs' into id-remap 2015-09-21 21:27:25 +02:00
f0d843cf56 Sort placeholder in its listbase! 2015-09-21 21:25:28 +02:00
47328499cb Merge branch 'missing-libs' into id-remap 2015-09-21 21:09:21 +02:00
62fdf030c6 Change ID placeholder generator to not need an ID as reference (we only need type, name and flag here). 2015-09-21 21:08:25 +02:00
db33f64a89 Fix cases where previously indirect lib becomes direct one after some relocate... 2015-09-21 20:48:31 +02:00
3f9a6f9fea Unlock around core of linking code in reload/relocate context too, for now. 2015-09-21 20:40:46 +02:00
d990888686 Fix for recent merges. 2015-09-21 18:11:26 +02:00
37e21ea855 Merge branch 'missing-libs' into id-remap 2015-09-21 18:04:38 +02:00
1d75fe5b95 Merge branch 'lib-link-rework-temp' into id-remap 2015-09-21 18:04:17 +02:00
5a53d20efc Merge branch 'master' into id-remap 2015-09-21 18:04:08 +02:00
bcf4cc37ff Make placeholder ID creation its own function (we'll need it too in reload context...). 2015-09-21 18:02:56 +02:00
e6a84d5a48 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-21 17:50:27 +02:00
3391a5ed2f Merge branch 'master' into missing-libs 2015-09-21 17:48:12 +02:00
e91d614e4e Merge branch 'master' into lib-link-rework-temp 2015-09-21 17:46:09 +02:00
ac797f03ef Fix broken multi-lib linking, and remove Main locking around core linking code for now.
We need to append to linklist, or our library indices would be reversed compared to lib list...

As for locking, we need reentrant one here if we want to use it. :(
2015-09-21 17:42:32 +02:00
c18849bb1b Lock bmain around core part of linking code now, this is much safer imho!
This also means we need to ensure no code called from there tries to lock again bmain
(no reentrant spinlock, arg :/).
2015-09-21 16:35:29 +02:00
8cbc05c1cd Add reload lib code, and various fixes (some to be backported to other working branches actually). 2015-09-21 16:15:21 +02:00
99008d4841 Merge branch 'lib-link-rework-temp' into id-remap 2015-09-21 15:11:17 +02:00
d02aa8c4fd Merge branch 'missing-libs' into id-remap 2015-09-21 15:11:10 +02:00
0e62a00bc4 Merge branch 'master' into id-remap 2015-09-21 15:11:00 +02:00
33b7772563 Merge branch 'master' into missing-libs 2015-09-21 15:10:39 +02:00
f7a3ead1c7 Merge branch 'master' into lib-link-rework-temp 2015-09-21 15:10:20 +02:00
c7d931b6d2 Merge branch 'lib-link-rework-temp' into id-remap 2015-09-20 15:46:38 +02:00
2e564ce19c Merge branch 'missing-libs' into id-remap 2015-09-20 15:46:30 +02:00
1d4e36a4c9 Merge branch 'master' into lib-link-rework-temp 2015-09-20 15:41:37 +02:00
bcbbee4f73 Merge branch 'master' into missing-libs 2015-09-20 14:54:33 +02:00
f5b0c53531 Relocate: remove old lib datablocks after relocate, if no ID comes from it anymore. 2015-09-19 20:03:25 +02:00
aaab73d54d Attempt to handle correctly LIB_EXTERN vs. LIB_INDIRECT ID flags.
This is far from simple, and most likely not yet fully working, but we have a base...
2015-09-19 19:56:43 +02:00
38670bc9a9 Some fixes, add basic wrapper code needed for reload feature (not yet implemented). 2015-09-19 18:26:36 +02:00
98efbb312c Merge branch 'lib-link-rework-temp' into id-remap
Also, fix some issues in previous code.
2015-09-18 22:42:05 +02:00
5ac9844083 Some naming cleanup. 2015-09-18 22:27:35 +02:00
856ef065b2 Rework a bit new liblink code, to use our beloved memarena instead of ugly pile of malloc.
Performances are not an issue at all here, but it makes code slightly simpler, avoids
a loop over ghash of libs, avoids some potential mem fragmentation, and will be easier
with lib relocate code too in future...
2015-09-18 22:22:56 +02:00
f011cdcc11 Consider proxy objects as 'linked' ones when it comes to ID remapping.
Reason is, on next fileread, proxy will be assigned with its target's data again...
Note that this may not be true about all its datablocks pointers - but proxy objects
are really brittle in current code anyway, they could use a serious work as well.
2015-09-18 21:31:56 +02:00
32ea612fcc Moar cleanup, some fixes towards sanier handling of remap & indirect data...
Proxy are still not correctly handled here though.
2015-09-18 18:09:13 +02:00
80ddd9afd9 Merge branch 'master' into asset-engine 2015-09-18 16:20:21 +02:00
5d8b0a8bcc Merge branch 'lib-link-rework-temp' into id-remap 2015-09-18 16:12:58 +02:00
33a4a4ed8f Merge branch 'missing-libs' into id-remap 2015-09-18 16:12:40 +02:00
7df45b2a49 Merge branch 'master' into id-remap 2015-09-18 16:12:31 +02:00
1ba2646706 Some cleanup & tweaks. 2015-09-18 16:11:55 +02:00
c7e14ac1f8 Merge branch 'master' into lib-link-rework-temp 2015-09-18 15:47:07 +02:00
87a3de5852 Merge branch 'master' into missing-libs 2015-09-18 15:44:10 +02:00
f9eef9a678 Some cleanup & tweaks. 2015-09-18 15:01:59 +02:00
185c216743 Relocate library: first working code.
Basics seem to be working, proving idea is valid. There is much to do yet though,
handling correctly all possible scenarii (especially those including indirect libs
used by several libraries, or libs used both directly and indirectly, etc.)
is not going to be a piece of cake...
2015-09-18 14:44:08 +02:00
4ee210857a Merge branch 'lib-link-rework-temp' into id-remap 2015-09-17 21:00:55 +02:00
49156ee77b Serious rework (again) of append/link code, to make it more generic.
Making the code in WM area more generic (will be used by relocate libs feature too in future).
And multi-append/link shall no more close & re-open lib files for each and every idcode!

Also, serious cleanup of BLO_append_... API (renamed BLO_link_..., since it links and never appends!),
main real changes there are removing the bContext arg in favor of scene/v3d (a bit more verbose, but does
not requires a valid context anymore to be able to instanciate ob/groups!). And logic behind instanciating
or not has been simplified, previous code was really obscure and sometimes redondant, from quick tests
it still works as expected.

This is temp branch for until 2.76 is over, shall be merged in master asap then.
2015-09-17 20:45:51 +02:00
0df9a4ae3d Merge branch 'master' into id-remap 2015-09-17 19:12:01 +02:00
18cddb58c4 Merge branch 'master' into id-remap 2015-09-17 13:54:36 +02:00
3cce86e4d3 Merge branch 'master' into id-remap 2015-09-16 17:46:32 +02:00
ab9126b7b5 Move most of (currently NoP) relocate code to WM area. 2015-09-16 15:28:19 +02:00
2622e4b208 More work towards relocate operator for libraries (still pretty much empty shell).
Note that this op will have to be moved to WM area in fact, it's way too generic for Outliner only...
and we need to re-use most of append/link operator code!
2015-09-15 22:14:35 +02:00
258725cf49 Merge branch 'master' into id-remap 2015-09-15 14:24:44 +02:00
962751c1a0 Outliner: add a dedicated ID_LI operation handler, and add skeletton for 'relocate' tool... 2015-09-14 22:30:48 +02:00
2f43d7a099 Merge branch 'master' into id-remap 2015-09-14 15:55:15 +02:00
648ce6a080 Some minor fixes and refactor of core id-remap code. Will also allow us to call it when bmain is already locked higher in code. 2015-09-13 15:41:13 +02:00
b428df5408 Merge branch 'missing-libs' into id-remap 2015-09-13 15:19:53 +02:00
6fda73fe0e Merge branch 'master' into missing-libs 2015-09-13 15:19:31 +02:00
68096bb8e8 Merge branch 'missing-libs' into id-remap 2015-09-13 15:19:11 +02:00
8f496e7ebf Add remaining missing id_remap editors' callbacks.
This is far from being done though... :/
2015-09-12 17:15:06 +02:00
8ae125e946 Merge branch 'master' into id-remap 2015-09-12 15:40:35 +02:00
5c029b1628 Add support id-remap for 3Dview bgpic and Image space.
SpaceImage seems to have a weird handling of image ID user count :/
2015-09-11 17:22:40 +02:00
15f08697e7 Rework our 'space id remapping' code by adding a new 'id_remap' callback to SpaceType, and add one for View3D.
Think it's much cleaner this way.

View3D new id_remap only handles camera/ob_center pointers for now, images will need some more work I think...
2015-09-11 16:27:42 +02:00
efb2d755c1 Merge branch 'master' into id-remap 2015-09-11 15:53:37 +02:00
07136e6176 Merge branch 'master' into id-remap 2015-09-10 22:47:25 +02:00
0abb0ee156 Merge branch 'master' into missing-libs 2015-09-10 22:39:39 +02:00
1fd6979bdb Some minor UI updates... 2015-09-10 14:35:49 +02:00
13d9d33158 Merge branch 'asset-experiments' into asset-engine 2015-09-10 14:14:25 +02:00
93fb699e20 Merge branch 'master' into asset-experiments 2015-09-10 14:13:57 +02:00
6d2519250a Add some (mostly commented) debug prints... 2015-09-10 14:13:18 +02:00
06f937c9b1 Fix nasty hidden RNA/bool related bug.
**NEVER** pass a boolean as address (pointer) to a RNA property function - it will read (or write) it as an integer!
2015-09-10 14:08:36 +02:00
8094de89ce Fix filelist_file_create_entry() adding the generated entry twice to the cached list in AE case. 2015-09-10 13:01:37 +02:00
b4861a9ec1 Merge branch 'asset-experiments' into asset-engine 2015-09-09 21:45:37 +02:00
283da2a596 Merge branch 'master' into asset-experiments 2015-09-09 21:38:07 +02:00
2d861d68a7 Merge branch 'asset-experiments' into asset-engine 2015-09-09 17:25:22 +02:00
ec99859c44 Merge branch 'master' into asset-experiments 2015-09-09 17:20:14 +02:00
a77cd3e953 Fix 3DView and others not updating after ID remapping.
Notifiers usage could really use a good cleanup imho...
2015-09-03 17:56:03 +02:00
3f22fbf32b Merge branch 'master' into id-remap 2015-09-03 16:16:50 +02:00
65a108cf35 Merge branch 'master' into missing-libs 2015-09-03 16:16:26 +02:00
62ff31971a Merge branch 'master' into id-remap 2015-08-30 12:06:02 +02:00
75db37e80f Merge branch 'master' into missing-libs 2015-08-30 11:55:38 +02:00
baa1513603 Merge branch 'asset-experiments' into asset-engine 2015-08-30 11:44:35 +02:00
2420f8a32e Merge branch 'master' into asset-experiments 2015-08-30 11:40:49 +02:00
e8af25479d Merge branch 'asset-experiments' into asset-engine 2015-08-30 11:29:03 +02:00
aa4896317d Merge branch 'master' into id-remap 2015-08-23 18:45:13 +02:00
031aab8d0c Some minor tweaks & cleanup. 2015-08-23 16:34:19 +02:00
317474e231 Merge branch 'master' into id-remap 2015-08-23 15:08:17 +02:00
b9110048f9 Merge branch 'master' into id-remap 2015-08-22 15:38:58 +02:00
6711e9d15f Merge branch 'master' into missing-libs 2015-08-22 15:11:32 +02:00
173ffb140a Minor tweak: adjust icon size to thumbnail size.
Avoids too big 'data type' icon in tiny display...
2015-08-19 22:38:27 +02:00
211ef292ba Merge branch 'master' into asset-experiments 2015-08-19 21:54:20 +02:00
f5140d4e82 Merge branch 'asset-experiments' into asset-engine 2015-08-18 14:51:52 +02:00
03829f7c48 Merge branch 'master' into asset-experiments 2015-08-18 14:35:56 +02:00
9fc2d1e35b Merge branch 'master' into asset-experiments 2015-08-18 13:24:09 +02:00
f5f06db832 Merge branch 'master' into asset-experiments 2015-08-18 12:43:35 +02:00
3a21279bc8 Merge branch 'master' into asset-experiments 2015-08-18 12:24:06 +02:00
0baa1469d0 Merge branch 'master' into asset-experiments 2015-08-11 12:01:12 +02:00
dc659c05d4 Merge branch 'master' into asset-experiments 2015-08-10 18:04:13 +02:00
47e73e6b72 Merge branch 'master' into asset-experiments 2015-08-10 17:47:00 +02:00
67282959af Fix bug in preview generator. 2015-08-10 17:21:11 +02:00
979d22b361 Some cleanup re master... 2015-08-10 15:52:18 +02:00
53312d1fac Merge branch 'master' into asset-experiments 2015-08-10 15:44:20 +02:00
a2a3e40cf1 Merge branch 'master' into asset-experiments 2015-08-10 15:10:16 +02:00
2aab8c7a95 Some ultimate cleanups. 2015-08-10 14:36:39 +02:00
14786d653a Merge branch 'master' into asset-experiments 2015-08-10 14:18:23 +02:00
386efee483 Minor tweak - adapt a bit number of preview workers to number of available physical threads! 2015-08-09 18:08:33 +02:00
9ebdab0e17 Merge branch 'master' into asset-experiments 2015-08-09 16:09:23 +02:00
6b34b4f066 Merge branch 'master' into id-remap 2015-08-02 18:02:16 +02:00
d2bdc66143 Merge branch 'master' into missing-libs 2015-08-02 17:50:29 +02:00
231237f1b5 Merge branch 'asset-experiments' into asset-engine 2015-08-02 17:17:57 +02:00
37e679772e Merge branch 'master' into asset-experiments 2015-08-02 17:13:42 +02:00
574a7da03e Fix several issues, add a quick and dirty new action in Outliner to remap IDs.
We have to take care of Object->data aside from main foreach loop, since we can
only replace that pointer if object is **not** in Edit mode!

Also, added a "Remap" action to ID context menu of outliner. This is **very far**
from nice and pretty code/feature, but it allows to quickly test the code.

Only did very quick tests with meshes so far...
2015-07-21 22:42:06 +02:00
1ebdfb4d45 Fix some dummy mistake, add simple RNA callback to 'remap' IDs.
Also, added Object.data to BKE_library_foreach_ID_link(), wonder if there was a good reason
for this to not be here???
2015-07-21 22:42:06 +02:00
df50b8cabf Add main 'ID remap' function.
Theoretical code, compiles, but needs to be tested!
2015-07-21 22:42:06 +02:00
f2d6e85212 ID remapping: first step - modify some editors callback to not only support ID freeing, but also ID remapping.
This seems to be OK, but will obviously need much more testing - and is useless as-is, we need
the big ID remapping code itself still.

Also, Nodetrees' remapping of Scene IDs is still TODO, not sure yet how to do this.
2015-07-21 22:42:06 +02:00
313fabd310 Merge branch 'master' into missing-libs 2015-07-21 08:07:42 +02:00
93563c5522 Merge branch 'asset-experiments' into asset-engine 2015-07-21 08:01:47 +02:00
c1589b71c5 Merge branch 'master' into asset-experiments 2015-07-21 07:55:51 +02:00
aee44d5070 Merge branch 'master' into missing-libs 2015-07-17 21:13:03 +02:00
09787f03b7 Merge branch 'master' into missing-libs 2015-07-16 19:53:31 +02:00
4e2f5a6461 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-07-16 19:46:35 +02:00
f37adc4312 Merge branch 'master' into asset-experiments 2015-07-16 19:45:22 +02:00
2bfd60e54f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-07-16 16:53:55 +02:00
610a04ab5d Fix rebase mess :/ 2015-07-15 20:38:51 +02:00
222a199f99 Add outliner's visualization for broken libs, and also tag lib ID itself as missing. 2015-07-15 20:36:22 +02:00
82d166df72 Add remaning 'init' callbacks for needed ID types.
Note all this remains a bit theoretical, some cases (ID types) are a bit delicate to handle here.7
Time and tests will say if it's OK as is.
2015-07-15 20:36:22 +02:00
83dd16a6d6 Add some checks in BKE_xxx_init() that data is really NULLified.
Needed, since trying to (re)init data already set could lead to many issues,
and handling this is not in the scope of this function.

Note that definition of BLI_memcmp_null stuff is rather bad currently, no good idea where to place this. :|
2015-07-15 20:36:22 +02:00
4181f35014 Handling missing libs: changed idea, now adding 'real' empty data.
Just having 'NULL' data as placeholder is not really possible, too much places
to check against that.

WIP commit, still much to be done!

See T43351 for details.

Differential Revision: https://developer.blender.org/D1394
2015-07-15 20:36:22 +02:00
266f0d3e77 Very first step to handle missing libs/datablocks when reading a file.
Idea is, instead of ignoring completely missing linked datablocks, to
create void placeholders for them.

That way, you can work on your file, save it, and find again your missing data once
lib becomes available again.

Plans are also to be able to locate missing libs and reload them at runtime.

To support all that, we must be able to make Blender survive those missing data
(i.e. empty datablocks) all over the place. This commit contains some early work
in that direction, but this will need much much more work!
2015-07-15 20:36:21 +02:00
9a2ae72156 Icons: Add new 'library_data_broken' one. 2015-07-15 20:36:21 +02:00
37a6a92f76 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-07-11 23:00:56 +02:00
5a16f29700 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
2015-07-11 22:51:30 +02:00
80acaa3009 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-07-04 13:16:30 +02:00
05017bc9a3 Merge branch 'master' into asset-experiments 2015-07-04 12:59:37 +02:00
047525019a Expose fewest more generic ID filtering options.
Full precise filtering remains possible in new 'Advanced filter' panel.
2015-07-04 12:56:09 +02:00
6cb2f6e870 UI-fix (bad 'recusion level' value in RNA enum, 1 is only valid in library listing case). 2015-07-04 01:48:43 +02:00
9f176db5ea Merge branch 'master' into asset-experiments 2015-07-04 01:42:37 +02:00
c2049e740e Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/BLI_ghash.h
2015-07-02 21:22:07 +02:00
665ac71aee Add API to IMB_thumb to enable thread safety.
Indeed, though rather unlucky, we may end up handling same source file from
different preview threads, which could lead to conflicts and bugs.

So idea is to add a simple way of locking a given source file path, since
thumb handling of different paths shall never conflict.

Note that this adds some 'generic' stuff to GHash and Threads area, that are to
be committed separately of course.
2015-07-02 13:31:38 +02:00
dd15ef2528 Previews: do not keep preview task and timer running continuously in 'Preview' mode.
The task was not so annoying (workers are just sleeping anyway), but having the timer
always checking for updates was not so nice. This remains quite minor optimization probably...

So now, we do not start anymore preview task when enabling previews. This is deferred
to the moment we really need it (i.e. when we cache block of entries currently visible).
Preview timer is started at the same time.

Further more, when preview task has been inactive for about one second (i.e. all
queued previews have been handled, and no new one have been queued), we free it
(switching to some kind of 'standby' mode).

This also allows to avoid stoping/restarting preview tasks on each redraw when user is scrolling.
2015-07-02 12:01:09 +02:00
effabf0ce7 Remove queing TODO previews when starting preview task, this is already handled
(in a better way) by filelist_file_cache_block().
2015-07-01 17:43:49 +02:00
a1c8d693a8 Fix windows bug with scons builds.
Classical bool vs char value mismatch... Here it was leading to a constant re-filtering
of the list, which invalidates cached previews.

Strange thing is, it would look as if Windows CMake builds are using 'real' bool,
while scons ones are using fake char-based one?
2015-07-01 16:40:07 +02:00
2cac2ec784 Merge branch 'master' into asset-experiments 2015-07-01 16:28:57 +02:00
23c81d8990 Merge branch 'master' into asset-experiments 2015-06-30 19:17:34 +02:00
633e3d2545 Merge branch 'master' into asset-experiments 2015-06-29 14:55:38 +02:00
cd980e85d7 Merge branch 'master' into asset-experiments 2015-06-28 20:22:14 +02:00
857d5f3580 Be much smarter with file size display... 2015-06-28 00:16:14 +02:00
b5a65fd7be Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
2015-06-27 23:42:06 +02:00
9379b7f968 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/editors/space_file/filelist.c
2015-06-27 23:26:32 +02:00
fb43c07681 Merge branch 'master' into asset-experiments 2015-06-27 23:15:58 +02:00
6c8e34e59b Filebrowser internal listing & UUIDs: simpler & safer UUIDs generation.
Instead of computing MD5sum of paths, just use incremental UUIDs!
There meaning and lifetime for internal listing is very limited anyway,
they shall only be unique for a given listing.

Note about using atomic op here: did it because it's nice use case,
not sure it's worth adding atomic stuff to /editors area though?
2015-06-19 14:31:00 +02:00
011061ab5e Remove copying of preview data for objects and groups datablocks.
Those get temporarily duplicated by renderers (Cycles, Freestyle),
not nice to have useless memory usage here.
2015-06-19 13:04:04 +02:00
7b84fa5927 Various minor cleanup & fixes from review. 2015-06-19 13:01:39 +02:00
6f236221c6 Merge branch 'master' into asset-experiments 2015-06-19 12:33:18 +02:00
c3492716ee Merge branch 'master' into asset-experiments 2015-06-19 11:44:23 +02:00
ae569a4e76 Merge branch 'master' into asset-experiments 2015-06-18 11:53:14 +02:00
924ff970cc Merge branch 'asset-experiments' into asset-engine 2015-06-17 14:28:53 +02:00
d6b5f82bae Merge branch 'master' into asset-experiments 2015-06-17 14:28:24 +02:00
1e1cc1409b Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
2015-06-16 18:11:21 +02:00
9a7d5130ec Cleanup: get rid of ugly bool in structs, replaced by bitflags. 2015-06-16 17:32:46 +02:00
649b09debb Make selection & co really working even during listing process.
This commit replaces `filelist_numfiles()` by `filelist_files_ensure()`. The later
also returns number of visible files (i.e. filtered ones), but also ensures filelist
is filetered and sorted.

Otherwise, during listing process, operators could be executed between an update of the listing job,
and the refresh from the file space - i.e. at a time filelist is virtually empty (from filebrowser PoV).

Also, got rid of 'need_refresh', this ended up being unused...
2015-06-16 16:59:29 +02:00
f616871e62 Selection/UUIDs handling enhancements:
* Do not systematically clear selection_state's uuids GHash when updating filelist
  during listing process - uuids used here should remain valid.
  Allows to not lose selections during listing background job!
* Use new BLI_ghash_lookup_p to handle selection state setting, symbolic optimization but...
2015-06-16 16:19:06 +02:00
3d9da00815 Make imbuf_thumb for .blend a bit less stupid & noisy regarding missing previews.
A file which does not have *any* preview is perfectly valid, error is only when there
are some previews, but not the same number as actual datablocks...
2015-06-16 15:45:52 +02:00
bfb6155466 Fix some fileops operators that could try to get out-of-bound indices.
Also, some minor reordering in full-block-recaching, currently could not create
issues but better be safe & logic here.
2015-06-16 15:40:58 +02:00
edb87ecd75 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-06-16 14:24:05 +02:00
bc43854651 Merge branch 'asset-experiments' into asset-engine 2015-06-12 10:43:14 +02:00
5fbd8997c2 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
2015-06-12 10:42:44 +02:00
27ed6ef95c Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-06-11 20:17:30 +02:00
c3866a0fe1 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-06-11 20:07:29 +02:00
04f7493588 Fix/adapt new 'keyboard select' code to changes from branch. 2015-06-11 19:58:23 +02:00
a4965036a7 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/space_file.c

NOTE: Tagged some parts in new code to be fixed, rather do that in a separate commit.
      This means this commit is broken and won't compile.
2015-06-11 18:16:43 +02:00
22abc19145 Merge branch 'asset-experiments' into asset-engine 2015-06-11 16:35:53 +02:00
b5635fb70d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/idcode.c
2015-06-11 16:31:30 +02:00
7793df2491 Merge branch 'asset-experiments' into asset-engine 2015-06-03 17:11:27 +02:00
edf50e3a5d Fix error when batch-rendering preview of scene with no world. 2015-06-03 17:07:48 +02:00
7cc52cc8dd Fix bad ID preview clearing in RNA API.
Logic here was piece of crap... sigh.
2015-06-03 16:55:35 +02:00
44adb244bc Merge branch 'master' into asset-experiments 2015-06-03 16:48:17 +02:00
e1a3c1d4e7 Arg, missed those in previous 'review' commit. 2015-06-03 16:29:03 +02:00
aab3ec8624 Merge branch 'asset-experiments' into asset-engine 2015-06-03 15:49:33 +02:00
89db98c0be Address new review points. 2015-06-03 15:47:43 +02:00
221142275c Merge branch 'master' into asset-experiments 2015-06-03 14:15:53 +02:00
c436a00372 Fix broken behavior e.g. for 'save as' operator...
We need to set filename/filepath from sfile->params in case operator does not support multi-files!
2015-06-02 15:34:10 +02:00
f2f4c4c93d WIP more work towards inclusion of asset engine/asset uuids in linking process. 2015-06-02 14:04:06 +02:00
d4e5cad70e Merge branch 'asset-experiments' into asset-engine 2015-06-02 10:20:13 +02:00
0f285b566d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/imbuf/intern/thumbs.c
2015-06-02 10:19:50 +02:00
b57abacd8c Merge branch 'asset-experiments' into asset-engine 2015-05-29 10:56:19 +02:00
7f59c846a7 Add comment about why we need to store fileselection state outside of filelist items now. 2015-05-29 10:38:55 +02:00
21e498acdd Tweaks and fixes in py part (preview handling). 2015-05-29 10:32:31 +02:00
5301ea7b96 Address most points from first reviewing pass.
Nothing new here, just some cleanup and refactor.
2015-05-29 10:12:46 +02:00
2a5d07773e Merge branch 'master' into asset-experiments 2015-05-29 09:30:08 +02:00
ab049a335d More WIP towards integrating AE/assets_uuids in append/link process... 2015-05-28 19:51:25 +02:00
74aeb8ef11 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2015-05-28 14:46:10 +02:00
99a3e09088 Refactor code in multi-append/link operator.
Avoid writing a big chunck of code doing nearly the same thing twice...
2015-05-28 14:42:12 +02:00
b87e275429 WIP more AE/uuid in append/link operator. 2015-05-28 10:37:01 +02:00
a4c5aa208d Merge branch 'asset-experiments' into asset-engine 2015-05-27 15:47:19 +02:00
bae3805edb Merge branch 'master' into asset-experiments 2015-05-27 15:44:38 +02:00
9ab309901d Add asset engine version to uuids list struct. 2015-05-26 21:18:28 +02:00
bd0e78bb23 Add needed asset-related data to Library and ID structs. 2015-05-26 20:47:43 +02:00
f34c098f0c Add 'bl_version' to asset engine type, needed to support asset engine in file read/write! 2015-05-26 17:21:10 +02:00
23beab242a Fix asset engine resetting on every resize!
Only reset AE type to default in `file_init()` if current type is invalid!

Also, better handling of getting default AE type now.
2015-05-26 17:02:45 +02:00
99cf8b2188 Merge branch 'asset-experiments' into asset-engine 2015-05-26 16:32:36 +02:00
180958cb2c Merge branch 'master' into asset-experiments 2015-05-26 15:50:19 +02:00
f6dc0573f8 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/makesrna/intern/rna_space.c
2015-05-25 15:58:24 +02:00
ac516fddb2 Merge branch 'master' into asset-experiments 2015-05-25 15:38:14 +02:00
a5c580c9e4 Some tweaking to UI, try to make filebrowser header a bit more compact... 2015-05-21 15:20:53 +02:00
b5db0c903c Merge branch 'asset-experiments' into asset-engine 2015-05-21 14:37:02 +02:00
59a8cbc49b Merge branch 'master' into asset-experiments 2015-05-21 14:36:41 +02:00
0a52a358fa Better handling of tags in Amber.
Also adds some 'state' flags to AssetEngine, so that custom AE's setting changes
can be notified to filebrowser, as default internal ones are.

For now, we only have 'dirty filtering' and 'dirty sorting'.
2015-05-21 14:15:46 +02:00
223e098ca1 Some minor cleanup in Amber code. 2015-05-20 10:28:46 +02:00
7f7f296475 Merge branch 'asset-experiments' into asset-engine 2015-05-20 09:39:06 +02:00
a9efb6a5ae Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-05-20 09:19:23 +02:00
b5c72b15ed Merge branch 'master' into asset-experiments 2015-05-13 17:14:46 +02:00
85499bb5e8 Fix crash in append/link on windows (sigh). 2015-05-13 17:06:44 +02:00
952ef0fedf Fix newly created dir not going into rename state anymore.
Due to async dir listing...
2015-05-13 14:07:49 +02:00
044398c786 Merge branch 'master' into asset-experiments 2015-05-13 13:58:39 +02:00
b0f1a9e27f Merge branch 'master' into asset-experiments 2015-05-13 12:52:11 +02:00
3bef09f672 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/blenkernel/CMakeLists.txt
2015-05-12 19:39:44 +02:00
9706ec852d Restore drag'n'drop from filebrowser.
We need to store non-static data here, so had to tweak drag and drop button code...
2015-05-12 19:21:13 +02:00
ade786b30c Some cleanup and reducing diff from master. 2015-05-12 17:00:12 +02:00
63d52d7bb1 Merge branch 'master' into asset-experiments 2015-05-12 15:33:32 +02:00
113c17ea76 Merge branch 'asset-experiments' into asset-engine 2015-05-11 17:25:43 +02:00
9346891c3c Merge branch 'master' into asset-experiments 2015-05-11 17:24:24 +02:00
acd076a9f3 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_icons.h
	source/blender/blenkernel/intern/icons.c
	source/blender/editors/include/UI_interface_icons.h
	source/blender/editors/interface/interface_icons.c
	source/blender/makesrna/intern/rna_ID.c
2015-05-11 17:09:53 +02:00
51a3024f33 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-05-11 09:46:17 +02:00
bf583c8c95 Merge branch 'master' into asset-experiments 2015-05-11 09:36:20 +02:00
f2ceb38ce8 Add variable sliding window for cached filebrowser items.
With big screens and tiny drawing, we can show much more than 1k items at once...
Also allows to reduce number of cached items in case we show few things big!
2015-05-10 17:15:59 +02:00
47a7246a5c Merge branch 'master' into asset-experiments 2015-05-10 15:26:26 +02:00
dd2034623c Merge branch 'asset-experiments' into asset-engine 2015-05-09 16:43:22 +02:00
b1ce5e6772 Fix bad behavior in case of 'refresh' while still listing.
Mismatch in 'owner' of job, not giving right one to stoping helper, sigh.

Note that this was also affecting any 'interrupting' task (like changing level of flat listing...).
2015-05-09 16:42:13 +02:00
c77f3b57bc Fix flickering of previews during listing process.
We cannot keep 'stable' list of items during listing process (each time new
entries are added, we have to filter and sort the whole lot again, which
means rebuilding 'draw' data from scratch - previews included).

Just wait until our filelist is complete to generate/use previews.
2015-05-09 16:06:30 +02:00
abed546672 Fix crash due to some missing final jop update in some rare cases. 2015-05-09 16:00:07 +02:00
71a061bc1a Merge branch 'master' into asset-experiments 2015-05-09 14:29:46 +02:00
6cae0ccded Merge branch 'asset-experiments' into asset-engine 2015-05-07 19:31:48 +02:00
4767de15b8 Fix win build... 2015-05-07 19:30:56 +02:00
97798c6125 Merge branch 'master' into asset-experiments 2015-05-07 19:17:45 +02:00
9d9ee6699a Get rid of nice 'static' in array args of functions, MSVC does not like them. :( 2015-05-06 19:59:02 +02:00
b943f6fd28 Merge branch 'master' into asset-experiments 2015-05-06 18:13:20 +02:00
3745062bf9 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-05-05 17:23:32 +02:00
0e5789c43c Some cleanup and addressing TODOs in ID preview generation module. 2015-05-05 17:18:49 +02:00
ef484c7a59 Expose preview/icon render sizes in bpy.app 2015-05-05 17:18:30 +02:00
d0799901f7 Merge branch 'master' into asset-experiments 2015-05-05 14:26:58 +02:00
fc5adb63a0 Merge branch 'master' into asset-experiments 2015-05-04 21:14:47 +02:00
85406569e1 FileBrowser: enhance handling of most compact drawing by also reducing size of static strings like file size. 2015-05-04 17:00:45 +02:00
54e753f85e Fix size of files not showing in default Filebrowser mode. 2015-05-04 16:23:54 +02:00
0bdf85afde FileBrowser: make (fixed) column size user-configurable (re[ab]using new thumbnail size). 2015-05-04 16:15:12 +02:00
1ca9c549f9 Merge branch 'asset-experiments' into asset-engine 2015-05-04 15:55:56 +02:00
056f11ec8d Merge branch 'master' into asset-engine 2015-05-04 15:55:45 +02:00
bc8ad4c739 Cleanup/reduce needless diff with master. 2015-05-04 15:54:48 +02:00
870c2040bc Merge branch 'master' into asset-experiments 2015-05-04 14:59:13 +02:00
2f477065a0 Merge branch 'asset-experiments' into asset-engine 2015-05-02 17:05:17 +02:00
cc02a0a7e5 Merge branch 'master' into asset-experiments 2015-05-02 17:03:45 +02:00
e0c275e239 Merge branch 'master' into asset-engine 2015-05-02 17:03:22 +02:00
92123e578a Fix T44586: Viet language problem for Blender Interface
We were missing many of the complex diacritics combinations in latin extended additional code block...

Alawyas a pleasure to edit this font... :|
2015-05-02 16:49:12 +02:00
56b3d8d273 Fix stupid crash. 2015-05-02 15:25:35 +02:00
40dd7cbe21 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-05-02 15:10:31 +02:00
756bb6b404 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/makesrna/intern/rna_space.c
2015-05-02 15:01:34 +02:00
839cc7b2a1 Merge branch 'asset-experiments' into asset-engine 2015-04-27 18:25:48 +02:00
59d5f5c253 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/object.c
	source/blender/windowmanager/intern/wm_operators.c
2015-04-27 18:21:59 +02:00
c31c62c7ec Merge branch 'asset-experiments' into asset-engine 2015-04-18 12:20:18 +02:00
863f19431d Merge branch 'master' into asset-experiments 2015-04-18 12:05:23 +02:00
45164ac6e3 WIP work to pass asset data to operator.
Asset engine ID, asset/variant/revision uuids, root path...
First goal is link code!
2015-04-16 18:28:59 +02:00
eca9cb2adb Merge branch 'asset-experiments' into asset-engine 2015-04-16 14:55:58 +02:00
31e89b1fcf Merge branch 'master' into asset-experiments 2015-04-16 14:49:04 +02:00
ba20e06227 Merge branch 'asset-experiments' into asset-engine 2015-04-16 10:46:37 +02:00
b3c8192715 Merge branch 'master' into asset-experiments 2015-04-16 10:45:24 +02:00
00e451015b Merge branch 'asset-experiments' into asset-engine 2015-04-15 19:21:11 +02:00
399b2927df Merge branch 'master' into asset-experiments 2015-04-15 19:18:57 +02:00
a9d5eddc52 Rename RNA's 'IDPreview' to 'Preview' - there is no reason to keep that for IDs only,
we likely will want to use it in other cases...
2015-04-15 19:17:34 +02:00
eb9784dea2 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-15 17:48:26 +02:00
b239c249ac FileBrowser: only generate size/date/time strings when needed!
Also, cleanup remaining cruft from modes/owner stuff.
2015-04-15 17:43:05 +02:00
ab9f937bd8 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/makesrna/intern/rna_space.c
2015-04-15 16:45:35 +02:00
8124e69a91 Backport some changes from asset-engine branch:
* uuids as int[4] instead of char[16];
* move use_library_browsing to params instead of spacefile.
2015-04-15 16:40:52 +02:00
5ffbf49439 AssetEngine: Various fixes and new features:
* Let asset engine draw most of header bar itself!
* Pass whole FileSelectParams to AE's sort_filter function.
* Move 'use_library_browsing' to params level (this way AE's sort_filter can be ware of it too).

Amber:
* Now supports real basic sorting/filtering modes
* Also basic support of tags (needs a way to refresh though, currently).
2015-04-15 16:26:33 +02:00
fde14db489 Switch definitively to int32[4] for uuid's, mixing mixing it with char[16] is confusing at least.
This is only on human-level anyway... And endianess should not be an issue
either, hopefully, that way!
2015-04-15 12:50:04 +02:00
c4a1d5143e Merge branch 'asset-experiments' into asset-engine 2015-04-15 12:23:00 +02:00
163ad29b58 Merge branch 'master' into asset-experiments 2015-04-15 12:20:32 +02:00
52db10355b WIP better/fixed support of uuid's in asset engines.
Still not working as expected it seems... Not having a real bytes type in RNA is a real PITA. :/
2015-04-14 22:49:28 +02:00
68bab334e0 More fixes...
Amber engine seems to be running nice again in new system, pfew!
2015-04-14 16:58:38 +02:00
18f18ec8b3 Fix issue in final selection in some cases. 2015-04-14 16:23:26 +02:00
80c0f3da22 Merge branch 'asset-experiments' into asset-engine 2015-04-14 16:10:00 +02:00
63318a2a4c Merge branch 'master' into asset-experiments 2015-04-14 16:07:04 +02:00
476a1b9eff Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-13 22:13:16 +02:00
2842949e13 Add uuids ghash to filelist's cache. 2015-04-13 21:54:37 +02:00
b3ad658b45 Merge branch 'master' into asset-experiments 2015-04-13 21:19:53 +02:00
449e1d8074 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c

... And fixes for code specific to that branch.
2015-04-13 20:22:27 +02:00
11ef8d9797 Small refactor (will allow better factorization with AE listing code). 2015-04-13 17:40:32 +02:00
2feeea8328 Caching of FileDirEntry: simplify things, fix some more mem bugs. 2015-04-13 17:36:11 +02:00
026f967dff Various fixes with asset engine and new code...
Still not working completely, and need small rework in asset-experiments first.
2015-04-13 17:27:06 +02:00
6adc839e40 Fix stupid freeing issues. 2015-04-13 16:20:24 +02:00
e39242c4ce Merge branch 'asset-experiments' into asset-engine 2015-04-13 15:55:30 +02:00
0e3a9530da Merge branch 'master' into asset-experiments 2015-04-13 15:53:37 +02:00
23bba70da5 Merge branch 'asset-experiments' into asset-engine 2015-04-10 23:43:20 +02:00
bf19bf0110 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
	source/blender/imbuf/IMB_thumbs.h
	source/blender/imbuf/intern/thumbs.c
2015-04-10 23:42:43 +02:00
eb8b2413de Merge branch 'master' into asset-experiments 2015-04-10 14:27:18 +02:00
336c7f9ba5 AssetEngine WIP support of new filelisting behavior in filebrowser...
Nearly working, still have some mem issues to fix.
2015-04-09 20:35:36 +02:00
96f060d32d Merge branch 'asset-experiments' into asset-engine 2015-04-09 12:05:47 +02:00
126e1aa60a Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
	source/blender/editors/space_file/filelist.c
2015-04-09 12:05:09 +02:00
bfb977534f Merge branch 'asset-experiments' into asset-engine 2015-04-08 14:38:44 +02:00
57786fda42 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-08 14:38:18 +02:00
9763ba8f72 Merge branch 'asset-experiments' into asset-engine 2015-04-08 14:21:32 +02:00
990598e60c Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/filelist.c
	source/blender/imbuf/IMB_thumbs.h
	source/blender/imbuf/intern/thumbs.c
	source/blender/imbuf/intern/thumbs_blend.c
2015-04-08 14:21:00 +02:00
485a9abf29 Merge branch 'asset-experiments' into asset-engine 2015-04-07 15:40:34 +02:00
d9c690b559 Misc cleanup, fix previews memleak. 2015-04-07 15:38:06 +02:00
a2b4d96b65 Merge branch 'asset-experiments' into asset-engine 2015-04-07 15:07:47 +02:00
b3de44cc01 Cleanup: get rid of preview handling in lib listing code. 2015-04-07 15:07:09 +02:00
6e8cc0bc05 Move handling of ID blocks previews in thumbnail handler.
this is mandatory, since we do not keep previews for all listed items anymore
(with 10k datablocks would start to take too much mem). So we now generate (read)
them from thumbnailing threaded task as any other image, has several advantages:
* Quicker initial listing of data from .blend files.
* Since thumbnails are cached on disk, re-generating them is rather quick.
* General consistency!

Note thumbnail generation of datablocks could (should!) be enhanced, right now
it reads all previews for a given datatype in a file each time it has to generate
a single datablock thumbnail, we should generate all of those previews in a single
run. But this means handling cache dirty things (TBH_FAIL, outdating, etc.) on another
level so need some more work.

Also, still some memleaks issues with thumbnails, have to track those dose!
2015-04-07 15:00:40 +02:00
b6ef6da231 Merge branch 'master' into asset-experiments 2015-04-07 09:30:50 +02:00
fc543da843 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-06 20:27:04 +02:00
eaf71f7f17 Some minor tweaks for asset-engine branch... 2015-04-06 20:23:22 +02:00
bdf2e64255 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-06 20:15:29 +02:00
5cee945744 Merge branch 'master' into asset-experiments 2015-04-06 19:51:34 +02:00
c539aaf19d FileBrowser: internal listing: use own, much lighter struct to store whole list.
Since with internal listing we have no choice but to list everything, store
those data in the smallest possible struct - note we do not even store preview
here, these are only handled in full FileDirEntry cache (re-loading them from
cached thumbnails is really quick anyway).

Still not complete, have to re-do ID previews now, among other things...
And some memleaks again with previews, ugh.
2015-04-06 19:51:07 +02:00
979d16e52f BLI filelist: get rid of strings for size/time/mode/etc.
Those were eating quite a bit of bites, not neglectable with thousands of entries...
Also, useless to print those info most of the time, they are not used!

So now, we only store 'raw' stat data, and expose funcs to convert them to readable
strings on demand.
2015-04-05 15:47:59 +02:00
718e84201a Merge branch 'master' into asset-experiments 2015-04-05 11:49:35 +02:00
5e593dd851 Resurrect filelist_selection_get()...
Still not working though.
2015-04-04 15:14:03 +02:00
75ef507e70 Merge branch 'asset-experiments' into asset-engine 2015-04-04 15:07:21 +02:00
51bb1cef39 FileBrowser: add dummy accessor to entries from their uuid.
Needed for assets branch, to be rework seriously later of course.
2015-04-04 15:06:23 +02:00
6704abce7f Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-04 13:19:25 +02:00
868a4288ab FileBrowser: block caching: minor tweak (mostly needed in ae branch actually). 2015-04-04 13:17:43 +02:00
4696bce257 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
2015-04-04 13:15:17 +02:00
bbfe0652eb FileBrowser: rewrite 'entry selection' code.
Since we do not store anymore ell entries, we cannot use them to hold selection status.

So we now use a ghash in FileList struct, with entry UUID's as keys.

Also cleanuped up / refactored selection handling, filelist.c now features a nice intern
api and all other code uses it instead of accessing directly entries' selflag!
2015-04-04 12:43:53 +02:00
c0748c4292 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/storage.c
	source/blender/editors/space_file/filesel.c
2015-04-04 10:50:17 +02:00
e836c116ac Internal FileListing: generate a valid UUID, we'll need this for things like selection state... 2015-04-02 20:12:18 +02:00
f2e55db040 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-02 17:34:47 +02:00
e75c5c35cc FileBrowser Preview: enhance handling of previews when modifying cache of entries... 2015-04-02 17:29:31 +02:00
744c029d01 AssetEngine: Add needed API for new 'on demand' entries listing from FileBrowser.
Also use that new API in filebrowser - only partially for now, at least
it does not crash anymore even if 100% empty...
2015-04-02 17:11:33 +02:00
0d4ac96da0 Fixes needed to make it compile again. Remains broken though! 2015-04-02 15:29:21 +02:00
e70139964d Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/makesrna/intern/rna_internal.h

Notes:
* asset-experiments branch still needs some work (e.g. entires selection is to be reworked too),
  but was more than time to do a first merge...
* This is raw merge, code is hence broken and needs more fixes to take into account new changes!
2015-04-02 15:20:52 +02:00
6ec52ce5eb Merge branch 'master' into asset-experiments 2015-04-02 14:53:27 +02:00
d07aeb2fce FileBrowser: cleanup.
Get rid of cache iterator code (not needed, and don't think we'll need it later,
easy to add back if needed). Also comment some debug prints.

New preview (thumbnails) handling seems to be working pretty nice now.
2015-04-02 14:41:19 +02:00
7bfe994093 FileBrowser: Fix stupid cache clear on each redraw while previews where updating.
Missing 'need filter' flag clearing...
2015-04-02 14:06:56 +02:00
d8169c2db7 FileBrowser - fix two crashers.
* Full path is no more static, so we need dynamic tooltips to use it (still an
  issue with drag stuff here :| ).
* Remove timer would attempt to free timer's customdata, which is mere int-in-pointer
  in case of new notifier timer, so we need a special tweak on remove here.
2015-04-02 13:51:13 +02:00
a592525a7e FileBrowser: cleanup (remove) all the thumbnails job stuff, no more needed. 2015-04-02 10:38:19 +02:00
c61d6e36ba FileBrowser: Fix sorting/filtering (we need to clear the cache in those cases!). 2015-04-02 10:27:07 +02:00
49951df23d Merge branch 'master' into asset-experiments 2015-04-02 10:17:11 +02:00
0dc6b92fe6 FileBrowser new preview code: bunch of fixes.
Start to looks good... This commit adds a new timer helper, that only send notifiers
(kind of very restricted subset of wm_job stuff), since using jobs for previews
would be now counter-productive and way too much heavy.

Also fix/enhance how previews are generated (order), etc. etc.

Still WIP though, having some weird crashes and such lurking around.
2015-04-01 22:26:25 +02:00
ce3a8f9f5b Merge branch 'master' into asset-experiments 2015-04-01 15:07:24 +02:00
46d777f017 FileBrowser previews: first fixing round.
Nearly working now (no more freeze or huge mem leak), still need to
find a way to get refresh as long as all previews have not been generated...
2015-03-31 16:44:46 +02:00
fd5e70fc99 Merge branch 'master' into asset-experiments 2015-03-31 15:43:06 +02:00
f970994cd3 Some minor cleanups. 2015-03-31 15:42:51 +02:00
982fdbf506 FileBrowser: Various fixes...
Stupid useless allocations, memleaks, etc.

WIP, thumbnails still not working.
2015-03-31 15:41:04 +02:00
c1617cccd1 Merge branch 'master' into asset-experiments 2015-03-30 22:02:34 +02:00
e7c7b00fe0 WIP FileBrowser thumbnails: get rid of job here, use lighter threaded tasks.
Fully WIP, compiles but not yet working!
2015-03-30 21:35:56 +02:00
8093c5c2a8 Merge branch 'master' into asset-experiments 2015-03-30 14:59:25 +02:00
bf3bba802d Quick attempt to resume thumbnails generation on cache.
Note this is rather stupid anyway, we need to rewrite this from scratch,
using a	 job for that makes no sense now, we should stick to a lighter
threading schema with a queue, or something like that!
2015-03-30 14:54:31 +02:00
2984d39a46 Fix and use block caching from UI draw code.
Seems to work nice now.
2015-03-30 12:24:00 +02:00
11df07e53f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/include/UI_interface_icons.h
	source/blender/editors/space_file/filelist.h
2015-03-30 11:56:35 +02:00
ef0367d094 Merge branch 'master' into asset-experiments 2015-03-27 22:23:47 +01:00
188419ac3d WIP cache system for filebrowser entries.
Core part seems to be working, but this is still heavy WIP, much to do
to resume complete features from existing code. Mainly:

* Previews (those should only be ran on cached items now).
* Use block-caching to load in-display entries.
* Rework things like selection (cannot store selected states in entires anymore).

Also, internal listing is stupid currently (since it still stores everything
as FileDirEntry & co), not really crucial currently, but ultimately it'll
use its own, compact struct to keep full listing!

Also did some minor cleanup/renaming.
2015-03-27 22:05:36 +01:00
7a749ebbcf BLI listbase: add an helper to remove a constinuous chunk of the list in a single call. 2015-03-26 17:49:15 +01:00
e7dbb4b217 FileBrowser: First step towards allowing partial "storage" of entries.
That code is currently pretty stupid, but we need to clearly separate
what is handled by filebrowser itself, and what is by listing code
(be it internal one or future asset engines).

Plan/idea is to have a dual cache system (one 'block' of entries - centered
on currently viewed ones -, and one 'random' FIFO for random access to any entry).

This implies filebrowser itself shall now only be aware of the number of (filtered)
entries, and it then requests entries as needed.

Also, made size of columns in filebrowser fixed (ultimately, user configurable),
since it has no more access to the whole list of entries!

Still heavy WIP.
2015-03-26 15:24:03 +01:00
fca4cda7f9 Merge branch 'master' into asset-experiments 2015-03-26 11:04:37 +01:00
26d28b755b Reduce uuids size to 16 (as 'official' ones), more than enough! 2015-03-23 15:55:52 +01:00
9fbec44247 Merge branch 'master' into asset-experiments 2015-03-23 15:25:21 +01:00
a9f02fda07 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/makesdna/DNA_space_types.h
2015-03-21 16:48:34 +01:00
8834875281 Merge branch 'master' into asset-experiments 2015-03-21 16:44:40 +01:00
8bc8015657 WIP Amber: very quick, dirty, primitive and broken first implementation of tags handling.
We cannot do that correctly with current listdir system, have to rework again
in asset-experiments brnach first, so that listing, filtering and sorting is
completely "delocalized" to asset engine (will also try to solve scalability issues).
2015-03-21 16:42:00 +01:00
9553016ec1 WIP 2015-03-19 16:15:42 +01:00
01b6fd1f3e Merge branch 'master' into asset-experiments 2015-03-19 14:01:16 +01:00
3f860e0e73 AssetEngine: add IDProps, and RNA access to actual asset engine from filespace.
Also, some quick dummy test/demo code for that in Amber.
2015-03-17 21:07:57 +01:00
cdfd3c17f5 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-03-17 16:27:39 +01:00
bc40f4852d Fix broken 'sort by type' in filebrowser.
Also, take advantage of blentype stored in entries now,
this greatly simplifies (and make quicker) that sorting
for blendlib items!
2015-03-17 16:02:12 +01:00
99373c918f Add a 'comment' field to listdir revisions.
Also, make clear tags are only informative here.

Reason is, if the project is a success, we have to think big and
imagine asset engines managing catalogs of tens or hundreds of thousands
of entries (web ones e.g.), we cannot hold list of those in filebrowser!
So most of filetring will be 'deffered' to asset-engine.

We'll also probably have to implement a 'chunck listing' behavior
(to only list at most n entries in a row), for same reasons.

This will make things slightly more complicated :|
2015-03-17 15:39:20 +01:00
920bf9f2f3 Merge branch 'master' into asset-experiments 2015-03-17 14:47:54 +01:00
18baac2502 Amber: Some cleanup and atempt to fix repeated entries, not yet working. 2015-03-16 21:23:43 +01:00
9cf2583126 I18n: update for new akward algo names in UI messages... 2015-03-16 20:51:35 +01:00
0661b80aa0 Continue fleshing out Amber.
Start to add real asset engine behavior. Still completely uncomplete and not even half working.
2015-03-16 20:18:42 +01:00
0473ff213e Merge branch 'asset-experiments' into asset-engine 2015-03-16 13:51:42 +01:00
025b502f98 Merge branch 'master' into asset-experiments 2015-03-16 13:48:19 +01:00
f3c6cc9f32 Fix nasty bug preventing any navigation in directories!
Think issue also exists in master code actually, where some op properties
could be left uninitialized in 'params_to_op' helper func... But it does not
backfire like that for sure.
2015-03-15 20:34:42 +01:00
60783fd64e Amber: only list dirs from real filesystem.
Actual data (assets) are to be 'listed' by another way!

Also, fix mem leak.
2015-03-15 17:28:10 +01:00
7059cd538f Merge branch 'asset-experiments' into asset-engine 2015-03-15 15:48:40 +01:00
4621ac3ac1 Merge branch 'master' into asset-experiments 2015-03-15 15:31:10 +01:00
f9adc7fbac Start to make Amber a bit more serious!
Still useless - behaves more or less like a very basic, broken filebrowser.

But basics are here, and listing process seems to be working pretty well.
2015-03-13 22:26:22 +01:00
e615009ae4 Revert "Revert "Merge branch 'asset-engine' into asset-experiments""
This reverts commit f751e34f91.
2015-03-13 15:21:55 +01:00
f751e34f91 Revert "Merge branch 'asset-engine' into asset-experiments"
This reverts commit ccd1479200, reversing
changes made to 8da3bb3885.

Conflicts:
	release/scripts/startup/bl_operators/__init__.py
	release/scripts/startup/bl_operators/amber.py
	source/blender/blenkernel/BKE_asset.h
	source/blender/blenkernel/intern/asset.c
	source/blender/editors/space_file/file_ops.c
	source/blender/makesrna/intern/rna_asset.c
2015-03-13 15:18:24 +01:00
47ce2c5574 Merge branch 'master' into asset-experiments 2015-03-13 14:45:08 +01:00
ec3eec1ac5 Add load_pre callback to RNA, and stupid dummy code in Amber to make quick test of it. 2015-03-12 19:41:12 +01:00
47e3d34d94 RNA listdir: add some more accessors, and ability to remove/clear list of entries (assets). 2015-03-12 15:19:27 +01:00
ab463cb324 Rename 'Flame' to 'Amber'! 2015-03-12 11:07:10 +01:00
ccd1479200 Merge branch 'asset-engine' into asset-experiments 2015-03-12 11:03:40 +01:00
8da3bb3885 Merge branch 'master' into asset-experiments 2015-03-12 11:00:14 +01:00
473e702d5d First step to add 'load_pre' behavior.
This will allow asset engines to:
* Actually ensure requested data is available (downloading it, generating it, etc. as needed).
* Change entries generated for user by actual data paths (allows e.g. to present
  a set of different paths to load as a single 'asset' to user).

As usual, had to change existing filebrowser code... Seems to be working fine
from quick tests (i.e. regular filebrowser not being broken).
2015-03-12 10:59:10 +01:00
da53656be1 Add refcounting and shallow copy to AssetEngine.
Reason is, we want operator to 'inherit' ae instance from spacefile too.
2015-03-10 12:52:25 +01:00
99404d3a70 Fix initialization of AssetEngine type in new filebrowser. 2015-03-10 12:11:07 +01:00
4504d50012 Merge branch 'asset-experiments' into asset-engine 2015-03-09 16:26:04 +01:00
9c6abdff3a Merge branch 'master' into asset-experiments 2015-03-09 15:32:52 +01:00
8f0709f9eb Add more stuff to filelist RNA. 2015-03-05 10:08:33 +01:00
32f4fb952a Cleanup - remove big commented blocks from renderengine initial copy/paste. 2015-03-05 10:08:33 +01:00
5d732ddcae Add some asset engine-aware stuff in filebrowser.
Basically, filelisting code in space_file becomes default, internal 'asset engine',
and user can switch to any other available engine instead.

Note filelisting with asset engines is fully main-thread from C code PoV,
parallelization/asynchronism is responsability of the py code!

Also, added a basic (dummy currently) AssetEngine py implementation.
Not much there, but helps checking things works as expected before
writing whole interface!

All this is very basic early code yet, much much to do before we get anything really usable...
2015-03-05 10:08:33 +01:00
9f61207b23 Minor updates to asset engine API, and add some more basic file listing stuff to RNA. 2015-03-05 10:08:33 +01:00
1dcff09045 Further rework of file listing handling - complete decouple from OS-related direntry.
Remove everything not really related to OS representation of file entries.

FileBrowser will now use a complete decoupled version of file representation,
much easier to keep sane behavior this way, easy integration with RNA, etc.
2015-03-05 10:08:33 +01:00
7142e653b6 Add RNA structs for assets listing (with variants, revisions, etc.). 2015-03-05 10:08:33 +01:00
f6c3f08690 WIP start defining asset engine API. 2015-03-05 10:08:33 +01:00
beee21d045 Void skeleton of asset engine.
Mostly copied from RenderEngines code. Compiles, now we have to flesh this!
2015-03-05 10:08:33 +01:00
c5fde2845e Merge branch 'master' into asset-experiments 2015-03-05 09:48:28 +01:00
f2bff41cd5 Merge branch 'master' into asset-experiments 2015-03-03 17:10:30 +01:00
65b49051fb Add name/description fields to entries themselves too.
This allows us to greatly simplifies sorting (and avoid recomputing UI name each and everytime!).
Also, correctly free entries/variants names/descriptions.
2015-03-01 11:42:28 +01:00
de58d865b6 Spread (future assets) uuid over entries/variants/revisions.
Makes more sense this way, and will probably save memory in the end even.
2015-03-01 11:21:01 +01:00
6771aeeff5 Merge branch 'master' into asset-experiments 2015-03-01 10:54:02 +01:00
02c09be238 Merge branch 'master' into asset-experiments 2015-02-28 15:21:44 +01:00
25e0d0d63d Filelisting: switch from mere arrays to listbases.
Was not sure about that (adds two pointers to entries, variants **and** revisions :/ ),
but with the incremental process of listing we are using now, it makes things sooooo
much easy to handle (and also avoids tons of (deep)copy and mem (re)alloc), that it's
definitively worth it.

And since most (if not all) of 'public' access to filelist is done through filtered ones,
we can easily keep this a mere array of pointers, and hence keep quick index lookup.

Also, quite noticiably simplified the whole listing code (less functions, less levels of subcalls...).

Note: for now we stick to mere alloc, we may benefit from either memarena or mempool,
but those are not threadsafe (which means we could not so easily pass mem from worker
thread to main one), so not quite sure it would be worth it.

Note: thumbnail stuff is to be reworked from scratch too, have the feeling it's not yet
100% thread safe, and using a job here is probably way overkill, since we do not show
any progress in UI.
2015-02-27 19:18:33 +01:00
543984ffff Merge branch 'master' into asset-experiments 2015-02-27 14:23:37 +01:00
a35de360d0 Merge branch 'master' into asset-experiments 2015-02-26 15:38:59 +01:00
ae294763aa Merge branch 'master' into asset-experiments 2015-02-24 20:15:13 +01:00
52d3e71302 Move back path, image etc. to FileDirEntry.
Also, reduce revision's uuid to 64bytes, should be more than enough!

Thing is, we can expect tens (if not hundreds) of thousands of revisions from a
big assets repository with history storage (vcs). So we want that struct
to be as small as possible.

Also, we do not expect to handle several variants/revisions of a same asset within
a same 'context' (there is always only one active variant & rev). So storing
path & co at entry level shall be enough. And helps make code simpler/nicer.
2015-02-24 16:20:19 +01:00
21ae02a327 Get rid of abspath storage, this is storing twice the same data, not nice memory-wise.
We may suffer a little performance loss here, but would not expect it to be really important,
since rebuilding a full abspath is not needed that often.
2015-02-24 14:46:45 +01:00
da7092ff7d Restore size/date sorting.
Also, get rid of modes/owner crap, this is quite advanced UNIX fs info, not much to
do in our filebrowser imho, and takes time, UI space and Mem space!
2015-02-24 14:14:27 +01:00
cf89c7aa28 Merge branch 'master' into asset-experiments 2015-02-24 12:48:23 +01:00
f7f71bb152 Merge branch 'master' into asset-experiments 2015-02-23 16:13:26 +01:00
fb94004e6f Merge branch 'master' into asset-experiments 2015-02-23 15:08:14 +01:00
29d3cbc6f9 Filelisting: First step of sanitanization...
Move typeflag and selflag back to FileDirEntry, and add blentype there too,
this will be needed by asset engines, and avoids rechecking lib ID types over and over!

There's much more to do here though. Also, FileDirEntryRevision is going to be
used quite higly, we want to keep it as light as possible (much lighter than
its current state for sure!). Think we can move back to FileDirEntry paths
(and try to get rid of abspath on the run, too), but also most likely
preview (we won't store a preview for all possible revisions anyway),
owner/permissions, etc.

Rev should probably only have its uuid, and date/time.

Also, simplified filetype generation (from extensions for real files, and BLO helpers
for libdata), now it's nicely encapsulated into each reading callback.
2015-02-23 14:47:34 +01:00
156c5bc41e Merge branch 'master' into asset-experiments 2015-02-23 12:27:29 +01:00
e08fd1ebe5 Merge branch 'master' into asset-experiments 2015-02-22 15:21:38 +01:00
b32de3eaff Merge branch 'master' into asset-experiments 2015-02-19 15:30:51 +01:00
a759d0190b Big refactor of filelisting in filebrowser - decouple os/fs-related direntry from actual blender listing.
Main idea is that direntry had quite a bit of things already absolutely useless
in the mere 'file listing' context (image pointer, void 'data' pointer, etc.).

On the other end, to handle future asset stuff, we need *more* 'meta data' for our 'files'
(tags, variants, revisions...).

Further more, we need all this to be easily usable through RNA, i.e. we need it to
be defined in DNA.

So instead of trying to use direntry in DNA, mixing low-level system stuff like stat
where we do not want to see it, we define our own 'file' representation,
with only what we really need (who cares about chars or block or dev files in filebrowser?
we only need to know whether it's a regular file or a directory, period).

That way, low-level dirlisting remains clean, and we can easily extend our own
data as needed.

Note this new code works, does not crash (so far...) nor memleak, but it
needs quite a bit of work still, we are still storing useless stuff in direntry
(all those strings representing modes, size etc.!), and mem handling
during dir/lib listing is confusing at best (would like to use a memarena
or mempool here, but it's not that easy).
2015-02-18 21:36:48 +01:00
3e6aa7bd08 Merge branch 'master' into asset-experiments 2015-02-18 19:30:06 +01:00
a35ced0b97 Merge branch 'master' into asset-experiments 2015-02-17 15:37:20 +01:00
14ff7cdf76 Merge branch 'master' into asset-experiments 2015-02-16 16:21:28 +01:00
ecb79a5bd5 Preview generation on Windows: attempt to fix mysterious error by using even more ID's names.
Passing around ID's themselves is not safe - they may change their mem addresses.

Yet, I had no issue on linux, but on win build this is still not enough,
have to use a super strange hack (add an 'import sys' line just before where error happens)
to get things running...
2015-02-16 14:54:19 +01:00
d893c9f198 Merge branch 'master' into asset-experiments 2015-02-16 14:01:44 +01:00
07042a8d5d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/filelist.c
2015-02-15 16:54:08 +01:00
d78819caf9 Cleanup of ugly allocation stuff (cast of void pointer, not-so-safe sizeof()'s, etc.). 2015-02-15 15:28:43 +01:00
ec071eb76a Merge branch 'master' into asset-experiments 2015-02-15 15:10:34 +01:00
5e25fdd514 Merge branch 'master' into asset-experiments 2015-02-15 10:39:38 +01:00
fb2c646dee Rework job multi-level listing - factorize even more and avoid recursion.
This is much cleaner than previous code...
2015-02-13 22:28:36 +01:00
3e603b606c Merge branch 'master' into asset-experiments 2015-02-13 19:47:00 +01:00
4c02644a58 Merge branch 'master' into asset-experiments 2015-02-12 19:45:25 +01:00
c6ea9e8f48 Merge branch 'master' into asset-experiments 2015-02-12 19:35:41 +01:00
05390dc4b5 Cleanup. 2015-02-12 18:01:02 +01:00
09a09c1010 Merge branch 'master' into asset-experiments 2015-02-12 17:55:07 +01:00
5144dcaeab Add previews to scenes, and enhance batch preview generation.
Batch preview generation can now also generate 'internal' previews (materials, textures etc.),
as well as scene ones. Also, some basic Cycles handling is there now.
You can now chose which kind of data to generate previews for, and whether the files are
trusted or not (for py autorun and drivers).
And rendering happens in background again, issue was actually a bug in creator.c, fixed in master.
Main TODOs reamining here: OpenGL rendering, and find a way to prevent '.blend1' when
saving over (either as a new option of save op, or simply by removing those files in script?).

Added a batch cleanup of previews too.

Also, added path of files as their tooltip 'image' button in main filebrowser view,
quite useful with the 'recursive' option...
2015-02-12 17:53:00 +01:00
e9484fa25e Merge branch 'master' into asset-experiments 2015-02-11 17:32:41 +01:00
92ef1b997b Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/space_file.c
2015-02-11 11:18:42 +01:00
6f603ea0d2 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
	source/blender/editors/include/ED_fileselect.h
	source/blender/editors/interface/interface_intern.h
	source/blender/editors/interface/interface_templates.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/fsmenu.c
	source/blender/editors/space_file/space_file.c
	source/blender/makesrna/intern/rna_space.c
2015-02-11 11:14:42 +01:00
67eb234783 Merge branch 'master' into asset-experiments 2015-02-10 12:40:24 +01:00
ec4b79fb60 Merge branch 'master' into asset-experiments 2015-02-09 10:15:02 +01:00
08bccfed6c Merge branch 'master' into asset-experiments 2015-02-09 09:20:39 +01:00
d8567fc45d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-02-06 17:31:55 +01:00
51bc0a2b5d Fix crash when appending/linking (double free...). 2015-02-04 20:41:13 +01:00
8374fe855e Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-02-04 20:14:04 +01:00
399ae5d41a Make 'recursion' work as expected.
Now, recursion  0 = previous behavior,
     recursion  1 = only show content of immediate .blend files, do not recurse in actual dir hierarchy,
     recursion >1 = complete recursion!
2015-02-03 21:47:51 +01:00
ad1399acc4 Flat listing of libs: do not show the 'categories' directories unless we are
inside a single .blend lib in this case, useless and heavily clutters space.
2015-02-03 21:18:07 +01:00
d04a0baae7 Merge branch 'master' into asset-experiments 2015-02-03 20:45:25 +01:00
c0d0b3db66 Merge branch 'master' into asset-experiments 2015-02-02 12:16:00 +01:00
8b19837b83 Cleanup: add 'ED_' prefix to public fsmenu functions... 2015-02-01 21:02:29 +01:00
f6b9cad064 Cleanup: get rid of unused stuff! 2015-02-01 20:49:45 +01:00
9a4eb983be Merge branch 'master' into asset-experiments 2015-02-01 20:35:48 +01:00
93da0a8187 Prepare assets UI: switch filebrowser to tools + tool props areas, instead of channels.
This will allow us to keep op panel independent, and have tabs for future assets tools!

Note 'conversion' from previous file area (channels) is not perfect, you have to hit 'T'
twice currently if you had a filebrowser in your .blend file...
2015-01-30 18:38:02 +01:00
b3cd561032 Merge branch 'master' into asset-experiments 2015-01-30 13:58:45 +01:00
8ebe85f733 Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_operators/wm.py
2015-01-29 19:37:50 +01:00
9efd36bac0 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2015-01-27 19:51:35 +01:00
d41e1c00e6 Merge branch 'master' into asset-experiments 2015-01-27 12:02:40 +01:00
1c83d9ddbb Fix filtering in new UIList bookmarks & co. 2015-01-26 21:41:31 +01:00
ce765ad441 Better sorting when we are displaying several levels at once, for 'lib' append/link.
Consider blendfiles and 'categories' inside them as regular dirs, but with this hierachy:
    real dir > blende file lib > category in a blend lib.

This gives a much better sorting (among other things, gives more importance to
blend files!).
2015-01-26 21:30:00 +01:00
b3c0b59825 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
2015-01-26 17:38:16 +01:00
6f1e2e562d Merge branch 'master' into asset-experiments 2015-01-26 12:28:00 +01:00
6199ce89a8 Reworked from scratch 'icon over previews' feature.
Previous implementation was horribly complicated in the end... sigh.
2015-01-25 15:30:46 +01:00
bdda315260 Fix crasher (Looks like PointerRNA->type can be NULL...). 2015-01-25 14:59:04 +01:00
50d25aa395 Merge branch 'master' into asset-experiments 2015-01-25 12:43:36 +01:00
b1a885ab16 Merge branch 'master' into asset-experiments 2015-01-20 14:07:41 +01:00
8ff6e455fa Merge branch 'master' into asset-experiments 2015-01-18 18:50:31 +01:00
f1d1073046 Merge branch 'master' into asset-experiments 2015-01-17 20:09:37 +01:00
956d8e0ddd Fix for Windows - 'foobar.blend\' is a valid file path to that OS, sigh...
Also, store temp nullified pathsep in chars now, better.
2015-01-17 20:08:12 +01:00
03b7104b72 Fix stupid UI/py bug after recent refactor. 2015-01-17 00:04:06 +01:00
2d98ce2e72 Merge branch 'master' into asset-experiments 2015-01-17 00:03:33 +01:00
de3fd8a45c Merge branch 'master' into asset-experiments 2015-01-15 16:23:19 +01:00
d7b0bc9522 Merge branch 'master' into asset-experiments 2015-01-13 16:44:36 +01:00
548029c000 Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-01-13 16:42:33 +01:00
0715b73e18 Recursive listdir: let user set level of recursion... 2015-01-13 15:41:10 +01:00
912cdb2acb Merge branch 'master' into asset-experiments 2015-01-13 14:57:27 +01:00
5fccc64f6d Merge branch 'master' into asset-experiments 2015-01-13 14:15:01 +01:00
c944362fcd Merge branch 'master' into asset-experiments 2015-01-12 19:58:43 +01:00
27ce761880 Reorganization:
* Make 'clear preview' a C operator;
* Move 'object preview generator' op in wm namespace;
* Add those two to file-> data preview submenu.
2015-01-12 17:45:45 +01:00
517b06c296 Reorganization: move ID filters to DNA_ID.h, and add helpers in bke's idcode.c to convert between idcode and idfilter. 2015-01-12 17:44:44 +01:00
3118756854 Merge branch 'master' into asset-experiments 2015-01-12 15:50:35 +01:00
d35bbc2a15 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/group.c
	source/blender/blenkernel/intern/object.c
2015-01-10 10:18:23 +01:00
2c7ee72167 Add moving around bookmarks (same system as for vgroups etc.). 2015-01-07 21:13:45 +01:00
884603573a Merge branch 'master' into asset-experiments 2015-01-07 14:22:12 +01:00
67231a22a2 Merge branch 'master' into asset-experiments 2015-01-07 12:47:51 +01:00
e53cdbf62f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/include/UI_interface_icons.h
	source/blender/editors/interface/interface_icons.c
	source/blender/windowmanager/intern/wm_files.c
2015-01-07 12:44:45 +01:00
d46c9b876c Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-01-07 12:05:23 +01:00
dbd766f827 Nearly finished 'UIList for bookmarks'.
Got completely rid of C code for those panels.

Added full path in ttips of each 'bookmark' entry, as in current master.
Note this forced me to make tip in uiBut dynamic (like label). Not so sure
about this, but seems to me forcing tooltips to be static is actually quite
bad and limitating? we'll see...

Only remaining TODO (new feature) is reordering of bookmarks, should be easy now.

Also fixed some stupid (again!) mistake with RNA access to paths of bookmark entries.
2015-01-05 21:12:23 +01:00
de229b4085 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/space_file.c
2015-01-05 16:15:37 +01:00
3993965bd7 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filesel.c
	source/blender/makesdna/DNA_space_types.h
	source/blender/windowmanager/intern/wm_operators.c
2015-01-04 18:43:08 +01:00
97a00b9199 Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
	source/blender/makesdna/DNA_space_types.h
	source/blender/makesrna/intern/rna_space.c
2015-01-03 22:05:01 +01:00
d237ac45fe Get rid of this stupid string len def, RNA knows this better! 2015-01-03 21:34:17 +01:00
0f44f5506f Fix some issues with image previews.
* When overlaying icon, we have to also ensure background pict is always the same size
  (else you get usgly icon size changes). Still not perfect though, suspect some more issues
  in filrdraw code, probably should systematiacally run the 'ensure size' code during thumbnail
  generation?
* Sharing of img ImBuf between thumbnail job and main thread could still happen,
  leading to random crashes.
2015-01-03 18:43:51 +01:00
d730ff663b Fix py script generating obj/group previews after recent merge. 2015-01-03 17:39:23 +01:00
8f4d6f62ea Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_camera.h
	source/blender/blenkernel/intern/camera.c
	source/blender/blenlib/BLI_fileops.h
	source/blender/blenlib/intern/storage.c
	source/blender/editors/space_file/filelist.c
	source/blender/makesrna/intern/rna_object_api.c
	tests/gtests/blenlib/BLI_path_util_test.cc
2015-01-03 17:07:16 +01:00
55c792df8e Add 'dup_poin' callback param to new BLI_duplicate_filelist() func, to allow handling direntry's poin if needed. 2015-01-02 17:38:25 +01:00
7b05fd5830 Merge branch 'master' into asset-experiments 2015-01-02 17:24:39 +01:00
67040e08d3 Fix issues when giving a non-existent dir to filebrowser.
Note: unlike in current master, path is checked immediately when setting it
into filelist (simpler now that filelist building itself is threaded).
`filelist_setdir()` modifies in place given path if this one is not valid.
2015-01-01 16:58:30 +01:00
87518faa20 Use new BLI fnmatch helpers to fix wrong update in some cases when editing
string search filter.
2015-01-01 15:30:02 +01:00
e660793896 Add BLI helpers for fnmatch head/tail wildcards handling.
`BLI_fnmatch_strncpy_add_endswildcards()` will copy and add '*' wildcards on both ends of given string, if needed.

`BLI_fnmatch_strcmp_ignore_endswildcards()` is same as strcmp, but ignores any '*' wildcards on both ends of given strings.
2015-01-01 15:23:16 +01:00
224eb0025f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/interface/interface_icons.c
2015-01-01 15:18:38 +01:00
31043d87cd Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
2015-01-01 11:35:21 +01:00
de0b270014 Merge branch 'master' into asset-experiments 2015-01-01 11:11:10 +01:00
0fa91e1723 SpaceFile: Cleanup: fix stupid indices in filelist_from_main()
Dead code (currently), but still...
2015-01-01 11:10:12 +01:00
aa336809fa Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
2015-01-01 11:08:21 +01:00
425e8119de SpaceFile: Tweak thumbnail to avoid restarting the job needlessly. 2014-12-31 20:45:39 +01:00
4f241d3d36 SpaceFile: Refactor sorting and filtering of filelist.
New code shall be more easy to maintain and extend.
Sorting is now handled quite the same as filtering, and all filtering parameters
are now packed into a sub-struct to help extending it later.

Also done some optimizations in filelist refresh, and sorting/filtering area.
Now we should avoid re-sorting and re-filtering too often, also removed
calls to those in read_xxx funcs.

Note thumbnail job is still started basically on each call to `file_refresh()`,
will be addressed in next commit.
2014-12-31 20:13:21 +01:00
6a7076c9d4 SpaceFile: Filelist: reorder a bit things, also cleanup some unused and pure-private funcs. 2014-12-31 19:25:41 +01:00
ba0294cfe0 Merge branch 'master' into asset-experiments 2014-12-31 12:00:06 +01:00
0350111424 Merge branch 'master' into asset-experiments 2014-12-29 16:50:37 +01:00
8fa24594ce Merge branch 'master' into asset-experiments 2014-12-28 12:52:52 +01:00
1d42f07d58 Change timer of readdir job to 10ms, this gives an 'immediate' listing for most
usual cases, as in current master.
2014-12-28 12:49:24 +01:00
dc0a4fde63 Merge branch 'master' into asset-experiments 2014-12-27 17:26:17 +01:00
00cb0035a7 Fix one more issue - we need a string length callback too, for pure 'virtual' RNA strings... 2014-12-26 21:50:36 +01:00
4e19102964 Fix a mem leak in file listing threaded code, and another bug in fsmenu.c (new named bookmarks). 2014-12-26 19:58:08 +01:00
3c52c4ab0a Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_ui/__init__.py
	source/blender/editors/interface/interface_utils.c
2014-12-26 18:37:01 +01:00
0357a4928f Fix some 'minor' errors in fsmenuentry RNA name handling.
Still have a nice mem leak somewhere too... :/
2014-12-22 16:01:19 +01:00
4b1f410012 Add buttons to add/remove bookmarks, and to reset recent list. 2014-12-22 15:20:33 +01:00
cfc61a9337 Filebrowser uilist bookmarks: add icons as expected. 2014-12-22 14:47:12 +01:00
acaa5b2748 You can now edit bookmarks (and recent) names... 2014-12-22 14:39:54 +01:00
aa87764d13 WIP UILists for filebrowser: add access to three remaining types.
This also change update of active bookmark indices to happen in file_refresh().

Still not fully working, of course.
2014-12-22 12:25:40 +01:00
1a5caea321 Merge branch 'master' into asset-experiments 2014-12-22 10:26:07 +01:00
242fdf5e60 WIP: merge work on local branch about using UILists for bookmarks, be able to rename them, etc.
Doing it mostly because I need some update work done here so far to get py uilists/bookmarks working.

This exposes/moves part of bookmark code to ED_ area, so that it becomes available from e.g. RNA.
And adds RNA struct and such to represent a bookmark entry.

Also, Bookmark format is ammended to store optional custom names.

All this is still *very* crappy, should probably take some time soon to cleanup the whole branch!

See also T42777.
2014-12-21 16:02:12 +01:00
b734d9bf17 Merge branch 'master' into asset-experiments 2014-12-21 15:20:21 +01:00
4478ddc3d9 Add group preview generation too. 2014-12-20 16:47:41 +01:00
aa24a7d0a5 Merge branch 'master' into asset-experiments 2014-12-20 13:44:41 +01:00
d1743e3783 Fix stupid error (CMake install does not clean removed files it seems :/ ) 2014-12-19 14:54:35 +01:00
1dab208eb8 Various improvements to obj preview generation:
* Do not render cameras, lamps etc. for now.
* Generate bbox in camera local space, gives much better results.
* Add an op to clear previews from files.
2014-12-19 14:29:06 +01:00
db9310ac67 Merge branch 'master' into asset-experiments 2014-12-19 13:59:13 +01:00
d0187bf624 Merge branch 'master' into asset-experiments 2014-12-18 19:38:29 +01:00
baeeacc62d First basic pyscripts to generate previews for objects.
Much to be done still, but with it you can select some blender file,
and generate a basic rendered preview of each object.
2014-12-18 19:36:51 +01:00
88ffc9767c Finalized working new 'fit in camera view' code.
Now for any object, we have an rna func to call with a set of (flatten :/)
coordinates, and we get back location this object should be to 'see'
all given points.

Would need more refinements, but will do for now.
2014-12-18 15:26:34 +01:00
95b103c73b Merge branch 'master' into asset-experiments 2014-12-18 12:37:32 +01:00
a79a8fa111 Full WIP work to get better control regarding 'camera' aspect of objects.
First expose a method in Object RNA to get camera projection matrix (done).

Then, expose a method to get camera position (and scale for ortho) so that
it fits a given set of coordinates (still unfinished).

this among other things implied rewriting `BKE_camera_view_frame_fit_to_scene()`
underlying logic so that it uses `CameraParams` system, instead of `BKE_camera_view_frame()` one.
2014-12-17 21:56:09 +01:00
5cc7df849f Fix stupid merge error. 2014-12-17 10:43:31 +01:00
12e3347a5a Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/writefile.c
2014-12-17 10:42:52 +01:00
c440c22d18 RNA access to previews (image and icons).
Note since this gives python possibility to change those previews,
we add flags to PreviewImage to tag as user_defined.

TODO: replace all those shorts-used-as-bools by bitflags!
2014-12-16 18:03:28 +01:00
46d6d74386 Merge branch 'master' into asset-experiments 2014-12-16 16:59:01 +01:00
e1a345b3fe Ensure previews are up to date when saving .blend file.
Previuosly, we would only write existing data - and big previews were
nearly never generated by default.

Now, if saving previews is enabled, `wm_file_write()` will ensure
all 'common' previewable datablocks do have up-to-date previews
(brushes remain TODO here for now, they have both a preview **and**
an icon_imbuf, sigh...).

This implied adding an 'immediate' non-job-background version of
`ED_preview_icon_job()`.

Note this does not include objects/groups/etc. It's not simple to generate
previews for those, will probably go for a user-launched py operator here...

Also, cleanup some debug prints!
2014-12-16 14:41:44 +01:00
3c738b301f Never write preview data when doing memsave (i.e. undo).
Takes useless space, and they even could easily get out of sync.

Also, some minor preparative work to (re)generate previews on file write,
if needed!
2014-12-16 11:50:15 +01:00
b3b362a212 Reshufle a bit icon/preview size defines.
We now have a _RENDER_ variant of those, used when creating the previews,
so that we create 32x32 icons needed for those special screens...
2014-12-16 11:12:14 +01:00
9516d3fafc Some minor refinement regarding overlayed icons.
Note, even when unpremultiplying alpha, we still have 'breadcrumbs' around
icons, not sure why...
2014-12-16 09:56:57 +01:00
ddf519096d Merge branch 'master' into asset-experiments 2014-12-16 09:18:45 +01:00
02290ec582 A bit crappy, but working 'ID icons' over previews. 2014-12-15 19:55:15 +01:00
b36d5570c8 Refactor 'immediate search'
Previous implementation was uglyly relying on button using a specific
icon (VIEWZOOM) to enable this feature. Now we have a dedicated button flag
(UI_BUT_TEXTEDIT_UPDATE) and a dedicated RNA subtype (PROP_SEARCH) for that.

Also, if no icon is specified, it automatically set VIEWZOOM for it,
which saves us explicitely defining it in UI py code!

NOTE: this is to be committed asap in master, but has to wait for
after 2.73, so storing it here for now.
2014-12-15 14:52:10 +01:00
66f3def3b4 Cleanup: use ICON_DEFAULT_HEIGHT everywhere for ICON_SIZE_ICON
If we need bigger icon size for previews (like 32 instead of 16), then
it should be handled everywhere!
2014-12-15 13:02:54 +01:00
05926f7253 Do not set filetype to IMAGEFILE when we get a preview, this is absolutely stupid! 2014-12-15 12:28:17 +01:00
002e71f255 Merge branch 'master' into asset-experiments 2014-12-15 12:02:07 +01:00
f12f6ddd04 Fix stupid buggy behavior when init (root) dir had no trailing slash. 2014-12-15 11:19:43 +01:00
dfe8884e7a Add missing 'ID' icons, and a 'blenlib' filter to filetypes. 2014-12-15 11:03:44 +01:00
4f2e8c0315 Merge branch 'master' into asset-experiments 2014-12-15 09:37:56 +01:00
812f40c493 More borring boiling code for ob/group previews.
Also, try to make brushes also save their previews.

Anyway, something fishy is going on here, in theory we should get
previews for brushes, worlds, lamps... for free, but so far looks like
lib 'peek' code only handles mat/texture previews correctly?
2014-12-13 15:48:18 +01:00
3c634400a0 Add preview pointers to Object and Group, with read/write logic.
Doing nothing useful yet, though!

Note: ultimately we may want to move that preview stuff to ID struct,
so that we get a real basic generic handling of it, but for now
simpler to keep it as is.
2014-12-13 15:14:04 +01:00
8058d7d04f Merge branch 'master' into asset-experiments 2014-12-13 14:25:59 +01:00
35554d43b1 Merge branch 'master' into asset-experiments 2014-12-11 20:10:47 +01:00
8644862fac Add progressbar to dirlist job.
Progressbar value is quite chaotic currently, will check that later.

Also, fixed G.main still being used in job, and factorized once more time code.
2014-12-11 20:07:32 +01:00
5cf39b228d More cleanup, rename and commentting.
Also, definitively removed 'G.main.name protection' from lib reading
code. I do absolutely not see how listing a separate blend file handle
could possibly affect that anyway - and we do not want to access
G from non-main thread I'd bet...
2014-12-11 18:37:58 +01:00
b81d5a194a Atomic Cleanup: get rid of 'old' stuff no more used (mostly non-job read/list funcs)! 2014-12-11 18:16:32 +01:00
d211c58856 Merge branch 'master' into asset-experiments 2014-12-11 17:49:47 +01:00
7cb8a89aa0 Fix that stupid memleak in job-dir-listing code. 2014-12-11 17:46:46 +01:00
cb0272ceab Full rework of job (background) filereading code.
Now it works reasonably OK for filesystem, and also for .blend libs.

Code is even quite simpler than previous one. Now it needs some serious cleanup,
and find where (new) memleak comes from too.
2014-12-11 17:33:16 +01:00
9a7ff0f4fe Merge branch 'master' into asset-experiments 2014-12-11 09:57:06 +01:00
769de4ff1e Merge branch 'master' into asset-experiments 2014-12-10 21:16:42 +01:00
5d3ee3d695 WIP code to make readfilelists jobs.
Only very partially working in this state, still needs some work.
Proof of concept seems rather interesting though.

Also, only pure filesystem stuff is implemented for now.
2014-12-10 21:14:26 +01:00
3ff51cd5df Merge branch 'master' into asset-experiments 2014-12-10 17:05:04 +01:00
e4d9f9b772 Merge branch 'master' into asset-experiments 2014-12-10 15:58:39 +01:00
09b3e44b22 Reduce recursion to one level (.blend libs do not take that into account anyway).
Quicker, and in most cases I think this will be enough for libs and file browsing.

Real asset handling is another question.
2014-12-10 11:51:25 +01:00
c5fccb7caf Merge branch 'master' into asset-experiments 2014-12-10 11:40:01 +01:00
0add26e60b Merge branch 'master' into asset-experiments 2014-12-09 17:46:10 +01:00
c725d868af Filter completely 'dot-files', even when hidden in paths. 2014-12-09 17:44:29 +01:00
8f1df9fbba Fix wrong update when switching 'flat' state, also fix remaining memleak. 2014-12-09 17:23:32 +01:00
f06ed97ce7 Do not show ID-types filtering when we are not browsing libs! 2014-12-09 14:56:30 +01:00
f13f85676d Merge branch 'master' into asset-experiments 2014-12-09 14:15:35 +01:00
21030e3ae6 Merge branch 'master' into asset-experiments 2014-12-09 11:10:35 +01:00
677c716c0f Fix two very stupid bugs! 2014-12-08 19:21:39 +01:00
e28fb66186 More sorting fixes and tweaks (things should work rather OK now). 2014-12-08 18:51:38 +01:00
da7f20e385 Merge branch 'master' into asset-experiments 2014-12-08 17:37:49 +01:00
6b07e8e31d Take IDTypes into account when sorting by types.
Also:
* Changed BLO_library_path_explode, now r_group and r_name must be pointers of char pointer,
  if found they will point to right place in r_dir 'memspace'.
* Select everything in IDTypes filtering by default.
2014-12-08 16:40:43 +01:00
ffb0fc35a9 Get rid of BLO_is_a_library. 2014-12-08 13:59:32 +01:00
4e96fe77b1 Add ID-types filtering. 2014-12-08 12:45:54 +01:00
337d7b2a6a Merge branch 'master' into asset-experiments 2014-12-08 10:56:15 +01:00
f92e64f207 Merge branch 'master' into asset-experiments 2014-12-06 18:12:09 +01:00
5eaa8739c5 Moar fixes (re ;ostly filtering mixed lib/data and regular files). 2014-12-06 18:10:59 +01:00
c689af14d8 Make 'append/link' code handle data from several different sources at once.
Nothing really magic here, just grouping the imports by libfile/grouptype.
We could probably get better code (loop less on given list of 'files' to import)
but not sure it'd be worth it, this is not supposed to be a performance-critical point.
2014-12-06 18:05:54 +01:00
951dbff60e Moar fixes to sorting code and such. 2014-12-06 15:40:00 +01:00
53148b5ebc Some flatmode fixes:
* Delete filelist when changing flat setting (so that we get immediate update when changing that setting).
* Disable flat when going up in tree (we ;ight actually want to do this everytime).
2014-12-06 14:50:03 +01:00
429cc6072f Merge branch 'master' into asset-experiments 2014-12-06 12:57:54 +01:00
b3e2cbac79 Merge branch 'master' into asset-experiments 2014-12-05 16:47:05 +01:00
9939e783a9 Reworked 'flat' mode, added it outside of blendfiles (libraries).
Note this is WIP, it 'breaks' load/append/etc. operators to some points,
and many other 'details' that need to be addressed.
2014-12-05 16:43:57 +01:00
276286aa85 Merge branch 'master' into asset-experiments 2014-12-05 12:45:31 +01:00
5ceec532b7 Merge branch 'master' into asset-experiments 2014-12-04 18:46:11 +01:00
9ea42ae3ba Add basic 'glob' filter by name feature.
Not much to add, we'll likely add more filtering options (tags, categories...) later,
maybe for now we just need an 'exclude' option for name filter...
2014-12-04 18:43:17 +01:00
f8f82821ef Refactor: do not filter each item twice! Mem usage here is not really an issue anyway. 2014-12-04 17:45:55 +01:00
d9b4186e6e Refactor filtering code, should be easier to add new filter options now. 2014-12-04 17:30:51 +01:00
c728f537ae Fix issues when data name have slash inside.
Adding `BLO_library_path_explode` simplies things. We might end getting rid of
`BLO_is_a_library` (or rather, merge back both things) later, though.
2014-12-04 16:51:46 +01:00
1089d97f04 Fix stupid mistake preventing 'traditional' append/link 2014-12-04 15:23:56 +01:00
d00d1d5622 Cleanup: more. 2014-12-04 15:03:33 +01:00
f02bc0cda8 Cleanup, remove tons of debug prints 2014-12-04 14:53:55 +01:00
b65d8de56a Add icons to datatypes (IDs) in browser, when appending/linking.
Not yet previews, but still better than anonymous icon!
2014-12-04 14:48:56 +01:00
158e6fd7f3 Merge branch 'master' into asset-experiments 2014-12-04 11:19:31 +01:00
ff1ff9823d Merge branch 'master' into asset-experiments 2014-12-04 11:11:33 +01:00
ca70271876 Append/link from 'global' level works.
Note I had to implement 'relative' path handling for 'filenames' in
append/link op, we may want to do this a bit differently later?
2014-12-03 18:55:07 +01:00
b29258922f Fix name issue (stupid really), show them better in UI. 2014-12-03 16:39:05 +01:00
99a1f8172b Do not shoz/consider at all inner '..'
Also more debug code that'll need to be cleaned up
2014-12-03 16:07:28 +01:00
74ae847cfa First (awful) tests to get a whole blend file content shown flat
Main goal is to see whether we can use existing filelist to handle that
(by default it is 100% tree-oriented).

Also, getting some strange issues with ID name currently...
2014-12-03 15:29:18 +01:00
14374 changed files with 2129560 additions and 3542226 deletions

View File

@@ -1,8 +1,6 @@
{
"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"
"arc.land.update.default" : "rebase"
}

View File

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

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

18
.gitignore vendored
View File

@@ -11,10 +11,6 @@ __pycache__/
*.swo
*#
# Indexes for emacs, vi & others
TAGS
tags
# QtCreator
CMakeLists.txt.user
@@ -25,6 +21,7 @@ Desktop.ini
# commonly used paths in blender
/blender.bin
/user-config.py
/BUILD_NOTES.txt
# local patches
@@ -36,16 +33,3 @@ Desktop.ini
/doc/python_api/sphinx-in-tmp/
/doc/python_api/sphinx-in/
/doc/python_api/sphinx-out/
/doc/python_api/rst/bmesh.ops.rst
# in-source lib downloads
/build_files/build_environment/downloads
# in-source buildbot signing configuration
/build_files/buildbot/codesign/config_server.py
# smoke simulation noise tile (generated)
waveletNoiseTile.bin
# testing environment
/Testing

4
.gitmodules vendored
View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# -*- mode: gnumakefile; tab-width: 4; indent-tabs-mode: t; -*-
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
# vim: tabstop=4
#
# ##### BEGIN GPL LICENSE BLOCK #####
@@ -24,207 +24,30 @@
# ../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 existance 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_debian: Build a debian package.
* package_pacman: Build an arch linux pacman package.
* package_archive: Build an archive package.
Testing Targets
Not associated with building Blender.
* test:
Run automated tests with ctest.
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
* test_pep8:
Checks all python script are pep8
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
Static Source Code Checking
Not associated with building Blender.
* check_cppcheck: Run blender source through cppcheck (C & C++).
* check_clang_array: Run blender source through clang array checking script (C & C++).
* check_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.
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)
# CPU:=$(shell uname -m) # UNUSED
# 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_CMAKE_ARGS
BUILD_CMAKE_ARGS:=
endif
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.7m
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=python
endif
endif
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
@@ -236,67 +59,23 @@ ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
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)
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
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)
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
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)
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
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)
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
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"
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
endif
@@ -307,10 +86,13 @@ ifndef NPROCS
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD))
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
@@ -319,10 +101,10 @@ endif
# -----------------------------------------------------------------------------
# Macro for configuring cmake
CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
-H"$(BLENDER_DIR)" \
-B"$(BUILD_DIR)" \
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
# -----------------------------------------------------------------------------
@@ -331,7 +113,7 @@ CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
# X11 spesific
ifdef DISPLAY
CMAKE_CONFIG_TOOL = cmake-gui
else
else
CMAKE_CONFIG_TOOL = ccmake
endif
@@ -345,50 +127,25 @@ all: .FORCE
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# # $(CMAKE_CONFIG); \
# # fi
# # do this always incase of failed initial build, could be smarter here...
@$(CMAKE_CONFIG)
@echo
@echo Building Blender ...
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
@echo
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo Blender successfully built, run from: $(BLENDER_BIN)
@echo Blender successfully built, run from: "$(BUILD_DIR)/bin/blender"
@echo
debug: all
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)
@@ -398,9 +155,81 @@ config: .FORCE
# -----------------------------------------------------------------------------
# Help for build targets
export HELP_TEXT
help: .FORCE
@echo "$$HELP_TEXT"
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@echo " * full - enable all supported dependencies & options"
@echo " * lite - disable non essential features for a smaller binary and faster build"
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * cycles - build Cycles standalone only, without Blender"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo ""
@echo " * config - run cmake configuration tool to set build options"
@echo ""
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
@echo " Note, passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments."
@echo ""
@echo ""
@echo "Project Files for IDE's"
@echo " * project_qtcreator - QtCreator Project Files"
@echo " * project_netbeans - NetBeans Project Files"
@echo " * project_eclipse - Eclipse CDT4 Project Files"
@echo ""
@echo "Package Targets"
@echo " * package_debian - build a debian package"
@echo " * package_pacman - build an arch linux pacman package"
@echo " * package_archive - build an archive package"
@echo ""
@echo "Testing Targets (not associated with building blender)"
@echo " * test - run ctest, currently tests import/export,"
@echo " operator execution and that python modules load"
@echo " * test_cmake - runs our own cmake file checker"
@echo " which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8"
@echo " which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
@echo " * test_style_c - checks C/C++ conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo ""
@echo "Static Source Code Checking (not associated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@echo " * check_clang_array - run blender source through clang array checking script (C & C++)"
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo " * check_smatch - run blenders source through smatch (C only)"
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
@echo " * check_spelling_py - check for spelling errors (Python only)"
@echo " * check_descriptions - check for duplicate/invalid descriptions"
@echo ""
@echo "Utilities (not associated with building blender)"
@echo " * icons - updates PNG icons from SVG files."
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Environment Variables"
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
@echo " * BUILD_DIR - override default build path."
@echo " * PYTHON - use this for the Python command (used for checking tools)."
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_doxy - generate doxygen C/C++ docs"
@echo " * doc_dna - generate blender file format reference"
@echo " * doc_man - generate manpage"
@echo ""
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
# -----------------------------------------------------------------------------
# Packages
@@ -420,7 +249,7 @@ package_archive: .FORCE
# Tests
#
test: .FORCE
$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
cd $(BUILD_DIR) ; ctest . --output-on-failure
# run pep8 check check on scripts we distribute.
test_pep8: .FORCE
@@ -436,13 +265,52 @@ test_cmake: .FORCE
test_deprecated: .FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
test_style_osl: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
# -----------------------------------------------------------------------------
# Project Files
#
project_qtcreator: .FORCE
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
project_netbeans: .FORCE
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
@@ -458,8 +326,7 @@ project_eclipse: .FORCE
check_cppcheck: .FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
$(PYTHON) \
"$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
@@ -483,9 +350,6 @@ check_smatch: .FORCE
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) \
@@ -496,60 +360,49 @@ 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_c_qtc: .FORCE
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
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 \
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
# -----------------------------------------------------------------------------
# Utilities
#
source_archive: .FORCE
python3 ./build_files/utils/make_source_archive.py
tgz: .FORCE
./build_files/utils/build_tgz.sh
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:
python3 ./build_files/utils/make_source_archive.py --include-packages "$(BUILD_DIR)/source_archive/packages"
INKSCAPE_BIN?="inkscape"
icons: .FORCE
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_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"
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_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)
if [ -d "../lib" ]; then \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule foreach git pull --rebase origin master
# -----------------------------------------------------------------------------
@@ -558,31 +411,36 @@ format: .FORCE
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py: .FORCE
ASAN_OPTIONS=halt_on_error=0:${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'"
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_doxy: .FORCE
cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: .FORCE
$(BLENDER_BIN) \
--background -noaudio --factory-startup \
--python doc/blender_file_format/BlendFileDnaExporter_25.py
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
--python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man: .FORCE
$(PYTHON) doc/manpage/blender.1.py $(BLENDER_BIN) blender.1
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
help_features: .FORCE
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
@$(PYTHON) -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
if not l.lstrip().startswith('#') \
for w in (re.sub(\
r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
if w.startswith('WITH_')]))" | uniq
clean: .FORCE
$(BUILD_COMMAND) -C "$(BUILD_DIR)" clean
$(MAKE) -C "$(BUILD_DIR)" clean
.PHONY: all

View File

@@ -1,175 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################
#
# This is a build system used by platform maintainers to build library dependencies on
# Windows, macOS and Linux.
#
# For users building Blender, we recommend using the precompiled libraries from lib/ on
# Windows and macOS, and install_deps.sh on Linux.
#
# WINDOWS USAGE:
# Don't call this cmake file yourself, use build_deps.cmd
# build_deps 2013 x64 / build_deps 2013 x86
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install 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/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,76 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,73 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BLOSC_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
# 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,112 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BOOST_ADDRESS_MODEL 64)
if(BLENDER_PLATFORM_ARM)
set(BOOST_ARCHITECTURE arm)
else()
set(BOOST_ARCHITECTURE x86)
endif()
if(WIN32)
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND b2)
set(BOOST_BUILD_OPTIONS runtime-link=shared )
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,41 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,85 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
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,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL 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,29 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CUEW_EXTRA_ARGS)
ExternalProject_Add(external_cuew
URL 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,96 +0,0 @@
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})
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)

View File

@@ -1,104 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the utility apps may use png/tiff/gif system libraries, but the
# library itself does not depend on them, so should give no problems.
set(EMBREE_EXTRA_ARGS
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_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,35 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
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,40 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ffi
URL 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,164 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/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,52 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,32 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL 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,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_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,31 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL 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,35 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
ExternalProject_Add(external_freeglut
URL 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,44 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FREETYPE_EXTRA_ARGS
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE)
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
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
endif()

View File

@@ -1,32 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLEW_EXTRA_ARGS
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
)
ExternalProject_Add(external_glew
URL 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,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL 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,101 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,46 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,204 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
########################################################################
# Copy all generated files to the proper 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(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,41 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL 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,92 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(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,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL 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,62 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
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,47 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LAME_EXTRA_ARGS)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
URL 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,40 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,92 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(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,32 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL 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,71 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,55 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,38 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_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,50 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(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,33 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_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,66 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=OFF
-DALSOFT_NO_CONFIG_UTIL=ON
-DALSOFT_EXAMPLES=OFF
-DALSOFT_TESTS=OFF
-DALSOFT_CONFIG=OFF
-DALSOFT_HRTF_DEFS=OFF
-DALSOFT_INSTALL=ON
-DALSOFT_BACKEND_SNDIO=OFF
)
if(UNIX)
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DLIBTYPE=STATIC
)
endif()
if(UNIX AND NOT APPLE)
# Ensure we have backends for playback.
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DALSOFT_REQUIRE_ALSA=ON
-DALSOFT_REQUIRE_OSS=ON
-DALSOFT_REQUIRE_PULSEAUDIO=ON
)
endif()
ExternalProject_Add(external_openal
URL 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,65 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
endif()
ExternalProject_Add(external_opencollada
URL 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,101 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,64 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
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,76 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OIDN_EXTRA_ARGS
-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,161 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OIIO_TOOLS ON)
else()
set(OIIO_TOOLS OFF)
endif()
if(UNIX AND NOT APPLE)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
else()
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
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,64 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
# library itself does not depend on them, so should give no problems.
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
ExternalProject_Add(external_openjpeg
URL 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,39 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
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,100 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OPENSUBDIV_EXTRA_ARGS
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
)
if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.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,114 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
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,227 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
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,35 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
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,121 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -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,60 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(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,48 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,38 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,54 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
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,43 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL 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,114 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
set(PYTHON_EXTRA_INSTLAL_FLAGS -d)
endif()
if(WIN32)
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
ExternalProject_Add(external_python
URL 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,49 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32 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 ${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,49 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
else()
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
endif()
ExternalProject_Add(external_sdl
URL 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,235 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################################
# Mingw64 Builds
####################################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/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,73 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
# Shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(UNIX)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL 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,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL 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,72 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SQLITE_CONFIGURE_ENV echo .)
set(SQLITE_CONFIGURATION_ARGS)
if(UNIX)
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,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_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,50 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
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,89 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(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,51 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV} && export HAVE_PDFLATEX=no)
else()
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_theora
URL 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,55 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(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,106 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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
)
if(WIN32)
# USD currently demands python be available at build time
# and then proceeds not to use it, but still checks that the
# version of the interpreter it is not going to use is atleast 2.7
# so we need this dep currently since there is no system python
# on windows.
add_dependencies(
external_usd
external_python
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/ ${HARVEST_TARGET}/usd
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/usd_m.lib ${HARVEST_TARGET}/usd/lib/libusd_m.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/lib ${HARVEST_TARGET}/usd/lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/usd_m_d.lib ${HARVEST_TARGET}/usd/lib/libusd_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/libusd_m.a ${HARVEST_TARGET}/usd/lib/libusd_m.a
DEPENDEES install
)
endif()

View File

@@ -1,502 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(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.10.2)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
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.9.7)
set(PYTHON_SHORT_VERSION 3.9)
set(PYTHON_SHORT_VERSION_NO_DOTS 39)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH fddb060b483bc01850a3f412eea1d954)
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.2)
set(CHARSET_NORMALIZER_VERSION 2.0.6)
set(URLLIB3_VERSION 1.26.7)
set(CERTIFI_VERSION 2021.10.8)
set(REQUESTS_VERSION 2.26.0)
set(CYTHON_VERSION 0.29.24)
set(ZSTANDARD_VERSION 0.15.2 )
set(NUMPY_VERSION 1.21.2)
set(NUMPY_SHORT_VERSION 1.21)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH 5638d5dae3ca387be562912312db842e)
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.17)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH bf0fd8828837edff01047474e90013e1)
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)

View File

@@ -1,41 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_vorbis
URL 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,66 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
else()
if(APPLE)
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,27 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_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,50 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# 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,60 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
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,36 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL 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,60 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# 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,44 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL 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,39 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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,46 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL 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,39 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL 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,51 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(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()

View File

@@ -1,100 +0,0 @@
strict graph {
graph[autosize = false, size = "25.7,8.3!", resolution = 300, overlap = false, splines = false, outputorder=edgesfirst ];
node [style=filled fillcolor=white];
external_alembic -- external_boost;
external_alembic -- external_zlib;
external_alembic -- external_openexr;
external_blosc -- external_zlib;
external_blosc -- external_pthreads;
external_boost -- Make_Python_Environment;
external_clang -- ll;
external_ffmpeg -- external_zlib;
external_ffmpeg -- external_faad;
external_ffmpeg -- external_openjpeg;
external_ffmpeg -- external_xvidcore;
external_ffmpeg -- external_x264;
external_ffmpeg -- external_vpx;
external_ffmpeg -- external_theora;
external_ffmpeg -- external_vorbis;
external_ffmpeg -- external_ogg;
external_ffmpeg -- external_lame;
external_ffmpeg -- external_zlib_mingw;
external_numpy -- Make_Python_Environment;
external_opencollada -- external_xml2;
external_opencolorio -- external_boost;
external_opencolorio -- external_tinyxml;
external_opencolorio -- external_yamlcpp;
external_openexr -- external_zlib;
external_openimageio -- external_png;
external_openimageio -- external_zlib;
external_openimageio -- external_openexr;
external_openimageio -- external_openexr;
external_openimageio -- external_jpeg;
external_openimageio -- external_boost;
external_openimageio -- external_tiff;
external_openimageio -- external_opencolorio;
external_openimageio -- external_openjpeg;
external_openimageio -- external_webp;
external_openimageio -- external_opencolorio_extra;
external_openmp -- external_clang;
external_opensubdiv -- external_glew;
external_opensubdiv -- external_glfw;
external_opensubdiv -- external_clew;
external_opensubdiv -- external_cuew;
external_opensubdiv -- external_tbb;
openvdb -- external_tbb;
openvdb -- external_boost;
openvdb -- external_openexr;
openvdb -- external_openexr;
openvdb -- external_zlib;
openvdb -- external_blosc;
external_osl -- external_boost;
external_osl -- ll;
external_osl -- external_clang;
external_osl -- external_openexr;
external_osl -- external_openexr;
external_osl -- external_zlib;
external_osl -- external_flexbison;
external_osl -- external_openimageio;
external_osl -- external_pugixml;
external_png -- external_zlib;
external_python_site_packages -- Make_Python_Environment;
external_sndfile -- external_ogg;
external_sndfile -- external_vorbis;
external_sndfile -- external_flac;
external_theora -- external_vorbis;
external_theora -- external_ogg;
external_tiff -- external_zlib;
external_vorbis -- external_ogg;
blender-- external_ffmpeg;
blender-- external_alembic;
blender-- external_openjpeg;
blender-- external_opencolorio;
blender-- external_openexr;
blender-- external_opensubdiv;
blender-- openvdb;
blender-- external_osl;
blender-- external_boost;
blender-- external_jpeg;
blender-- external_png;
blender-- external_python;
blender-- external_sndfile;
blender-- external_iconv;
blender-- external_fftw3;
external_python-- external_python_site_packages;
external_python_site_packages-- requests;
external_python_site_packages-- idna;
external_python_site_packages-- chardet;
external_python_site_packages-- urllib3;
external_python_site_packages-- certifi;
external_python-- external_numpy;
external_usd-- external_boost;
external_usd-- external_tbb;
blender-- external_opencollada;
blender-- external_sdl;
blender-- external_freetype;
blender-- external_pthreads;
blender-- external_zlib;
blender-- external_openal;
blender-- external_usd;
}

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@@ -1,2 +0,0 @@
# Files contains mixed line endings, patch needs to preserve them to apply.
opencollada.diff binary

View File

@@ -1,131 +0,0 @@
diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
--- src/blosc/CMakeLists.txt 2016-02-03 10:26:28 -0700
+++ external_blosc/blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
@@ -61,6 +61,8 @@
set(SOURCES ${SOURCES} win32/pthread.c)
else(NOT Threads_FOUND)
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
+ set(LIBS ${LIBS} ${PTHREAD_LIBS})
+ include_directories( ${PTHREAD_INCLUDE_DIR} )
endif(NOT Threads_FOUND)
else(WIN32)
find_package(Threads REQUIRED)
diff -Naur src/CMakeLists.txt external_blosc/CMakeLists.txt
--- src/CMakeLists.txt 2016-02-03 10:26:28 -0700
+++ external_blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
@@ -17,8 +17,8 @@
# do not include support for the Snappy library
# DEACTIVATE_ZLIB: default OFF
# do not include support for the Zlib library
-# PREFER_EXTERNAL_COMPLIBS: default ON
-# when found, use the installed compression libs instead of included sources
+# PREFER_EXTERNAL_ZLIB: default ON
+# when found, use the installed zlib instead of included sources
# TEST_INCLUDE_BENCH_SINGLE_1: default ON
# add a test that runs the benchmark program passing "single" with 1 thread
# as first parameter
@@ -80,29 +80,23 @@
"Do not include support for the SNAPPY library." OFF)
option(DEACTIVATE_ZLIB
"Do not include support for the ZLIB library." OFF)
-option(PREFER_EXTERNAL_COMPLIBS
- "When found, use the installed compression libs instead of included sources." ON)
+option(PREFER_EXTERNAL_ZLIB
+ "When found, use the installed zlib instead of included sources." ON)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
-if(NOT PREFER_EXTERNAL_COMPLIBS)
+if(NOT PREFER_EXTERNAL_ZLIB)
message(STATUS "Finding external libraries disabled. Using internal sources.")
-endif(NOT PREFER_EXTERNAL_COMPLIBS)
+endif(NOT PREFER_EXTERNAL_ZLIB)
if(NOT DEACTIVATE_LZ4)
- if(PREFER_EXTERNAL_COMPLIBS)
- find_package(LZ4)
- endif(PREFER_EXTERNAL_COMPLIBS)
# HAVE_LZ4 will be set to true because even if the library is
# not found, we will use the included sources for it
set(HAVE_LZ4 TRUE)
endif(NOT DEACTIVATE_LZ4)
if(NOT DEACTIVATE_SNAPPY)
- if(PREFER_EXTERNAL_COMPLIBS)
- find_package(Snappy)
- endif(PREFER_EXTERNAL_COMPLIBS)
# HAVE_SNAPPY will be set to true because even if the library is not found,
# we will use the included sources for it
set(HAVE_SNAPPY TRUE)
@@ -110,13 +104,13 @@
if(NOT DEACTIVATE_ZLIB)
# import the ZLIB_ROOT environment variable to help finding the zlib library
- if(PREFER_EXTERNAL_COMPLIBS)
+ if(PREFER_EXTERNAL_ZLIB)
set(ZLIB_ROOT $ENV{ZLIB_ROOT})
find_package( ZLIB )
if (NOT ZLIB_FOUND )
message(STATUS "No zlib found. Using internal sources.")
endif (NOT ZLIB_FOUND )
- endif(PREFER_EXTERNAL_COMPLIBS)
+ endif(PREFER_EXTERNAL_ZLIB)
# HAVE_ZLIB will be set to true because even if the library is not found,
# we will use the included sources for it
set(HAVE_ZLIB TRUE)
diff -Naur external_blosc.orig/blosc/blosc.c external_blosc/blosc/blosc.c
--- external_blosc.orig/blosc/blosc.c 2018-07-30 04:56:38 -0600
+++ external_blosc/blosc/blosc.c 2018-08-11 15:27:26 -0600
@@ -41,12 +41,7 @@
#include <inttypes.h>
#endif /* _WIN32 */
-#if defined(_WIN32)
- #include "win32/pthread.h"
- #include "win32/pthread.c"
-#else
- #include <pthread.h>
-#endif
+#include <pthread.h>
/* Some useful units */
diff --git a/blosc/shuffle.c b/blosc/shuffle.c
index 84b5095..23053b4 100644
--- a/blosc/shuffle.c
+++ b/blosc/shuffle.c
@@ -490,12 +490,12 @@ void unshuffle(size_t bytesoftype, size_t blocksize,
#else /* no __SSE2__ available */
void shuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_shuffle(bytesoftype, blocksize, _src, _dest);
}
void unshuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_unshuffle(bytesoftype, blocksize, _src, _dest);
}
--- a/cmake/FindSSE.cmake
+++ b/cmake/FindSSE.cmake
@@ -49,6 +49,17 @@
set(AVX_FOUND false CACHE BOOL "AVX available on host")
ENDIF (AVX_TRUE)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Detected architecture ${ARCHITECTURE}")
+ IF("${ARCHITECTURE}" STREQUAL "arm64")
+ set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
+ set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
+ set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
+ set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+ set(AVX_FOUND false CACHE BOOL "AVX available on host")
+ return()
+ ENDIF()
+
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
CPUINFO)

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