Commit Graph

2983 Commits

Author SHA1 Message Date
1640fbe7c6 CMake: add ^NANOVDB to variables to reset after library upgrade
Cycles needed this to build properly after switching to the newly built
libraries.
2022-04-25 14:28:06 +02:00
7c55a7ccca CMake: add harvesting of fmt library
The library was built with `make deps`, but not installed. Now it is.
2022-04-25 14:26:42 +02:00
Bastien Montagne
75a9830d84 install_deps: Update USD to 22.03.
Add back a patch wrongly removed by rBb9c37608a9e9, and add another fix,
for gcc11 build support.

Re {T95206}.
2022-04-21 15:35:12 +02:00
Brecht Van Lommel
604c33e694 Build: updates for Blender to build against new 3.2 libraries
Building against the existing 3.1 libraries should continue to work, until
the precompiled libraries are committed for all platforms.

* Enable WebP by default.
* Update Windows for new library file names.
* Automatically clear outdated CMake cache variables when upgrading to new
  libraries.
* Fix static library linking order issues on Linux for OpenEXR and OpenVDB.

Implemented by Ray Molenkamp, Sybren Stüvel and Brecht Van Lommel.

Ref T95206
2022-04-20 16:42:16 +02:00
Ray Molenkamp
b9c37608a9 Build: upgrade many library dependencies to new versions for Blender 3.2
This only updates the build system, precompiled libraries for the various
platforms will be committed over the coming week.

New:
fmt 8.0.0
level_zero v1.7.15
pystring v1.1.3
robinmap v0.6.2
webp 1.2.2

Updated:
alembic 1.8.3
blosc 1.21.1
boost 1.78.0
embree 3.13.3
ffmpeg 5.0
fftw 3.3.10
flac 1.3.4
imath 3.1.4
ispc v1.17.0
jpeg 2.1.3
ogg 1.3.5
oidn 1.4.3
openal 1.21.1
opencolorio 2.1.1
openexr 3.1.4
openimageio v2.3.13.0
openjpeg 2.4.0
opensubdiv v3_4_4
openvdb 9.0.0
osl 1.11.17.0
sdl 2.0.20
tbb 2020_u3
tiff 4.3.0
usd 22.03
vorbis 1.3.7
vpx 1.11.0
x264 35fe20d1b
zlib 1.2.12

Implemented by Ray Molenkamp, Sybren Stüvel and Brecht Van Lommel.

Ref T95206
2022-04-20 16:42:16 +02:00
Campbell Barton
df3316cbe9 Cleanup: run autopep8 on build_files/
Replace multiple hashes with over-lines for make_source_archive.py.
2022-04-20 15:08:46 +10:00
Brecht Van Lommel
fc58368263 Build: link with GameController and CoreHaptics frameworks on macOS
In preparation of upcoming SDL upgrade, which uses these.
2022-04-18 19:14:36 +02:00
Bastien Montagne
043555c78f install_deps: Tweak rBbc9c9631a46f, libwebp is not only a dependency from ffmpeg. 2022-04-11 14:52:26 +02:00
Bastien Montagne
bc9c9631a4 install_deps: only install codecs libs if building ffmpeg.
Avoid installing all the ogg, theora, xvid etc. codec lib dev packages
unless we actually build ffmpeg itself. Otherwise they are not necessary
for Blender build itself.
2022-04-08 18:58:55 +02:00
Bastien Montagne
d55a64a4fa install_deps: Add pystring and libwebp.
Re. {T95206}.
2022-04-08 18:12:20 +02:00
Bastien Montagne
f2455c7939 install_deps: Update OpenEXR to 3.1.4, Add Imath 3.1.4.
This has been... painful to get working.
2022-04-08 15:31:09 +02:00
Bastien Montagne
db918ae9a4 install_deps: proper update of OpenVDB to 9.0.
Previous commit (rBrB59681a7ccdcf) was effectively doing nothing, due to
weird hacks we had to do with OpenVDB 8.0 to 'integrate' NanoVDB.

Now OpenVDB 9.0 natively includes NanoVDB, which allows us to greatly
simplify that part of the code in install_deps.
2022-04-08 14:51:01 +02:00
Patrick Mours
f60cffad38 Cycles: Use USD dependencies when building Hydra render delegate
Adds support for linking with some of the dependencies of a USD
build instead of the precompiled libraries from Blender, specifically
OpenSubdiv, OpenVDB and TBB. Other dependencies keep using the
precompiled libraries from Blender, since they are linked statically
anyway so it does't matter as much. Plus they have interdependencies
that are difficult to resolve when only using selected libraries from
the USD build and can't simply assume that USD was built with all
of them.

This patch also makes building the Hydra render delegate via the
standalone repository work and fixes various small issues I ran into
in general on Windows (e.g. the use of both fixed paths and
`find_package` did not seem to work correctly). Building both the
standalone Cycles application and the Hydra render delegate at the
same time is supported now as well (the paths in the USD plugin JSON
file are updated accordingly).

All that needs to be done now to build is to specify a `PXR_ROOT`
or `USD_ROOT` CMake variable pointing to the USD installation,
everything else is taken care of automatically (CMake targets are
loaded from the `pxrTargets.cmake` of USD and linked into the
render delegate and OpenSubdiv, OpenVDB and TBB are replaced
with those from USD when they exist).

Differential Revision: https://developer.blender.org/D14523
2022-04-05 17:23:52 +02:00
Bastien Montagne
8bec875586 install_deps: Update Embree to 3.13.3 and OIDN to 1.4.3.
Re {T95206}.
2022-04-01 17:47:15 +02:00
Bastien Montagne
1de051a7a9 install_deps: Updated Alembic to 1.8.3 and OSD to 3.4.4.
Re {T95206}.
2022-04-01 16:43:29 +02:00
Bastien Montagne
ce5428b294 install_deps: Update OCIO to 2.1.1 and OIIO to 2.3.13.
Re {T95206}.
2022-03-31 17:40:37 +02:00
Bastien Montagne
59681a7ccd install_deps: Update openVDB to 9.0.
Re {T95206}.
2022-03-31 16:56:34 +02:00
Bastien Montagne
3d5085375f install_deps: default boost version to 1.78 and TBB to 2020_U3.
Re  T95206.
2022-03-31 16:25:02 +02:00
Ray Molenkamp
1909fd2781 Windows/Installer: Fix capital B in shortcut
the shortcut placed on the desktop and in the start
menu on windows were labelled `blender` rather than `Blender`

spotted by @Severin
2022-03-25 15:17:48 -06:00
Ray Molenkamp
59de9ceda0 MSVC: Fix build issue with webp
The webp variables should only be set if
the libs actually exist in the lib folder
2022-03-25 07:31:15 -06:00
Campbell Barton
1d2dfc5e9e Cleanup: sort cmake file lists 2022-03-25 12:04:14 +11:00
Aaron Carlisle
4fd0a69d7b ImBuf: Add support for WebP image format
Currently only supports single image frames (no animation possible).

If quality slider is set to 100 then lossless compression will be used,
otherwise lossy compression is used.

Gives about 35% reduction of filesize  save when re-saving splash screens with lossless
compression.
Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus.

Note, this is currently left disabled until we have WebP libs (see T95206)

For testing precompiled libs can be downloaded from Google:
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html

Differential Revision: https://developer.blender.org/D1598
2022-03-24 18:24:06 -04:00
Dalai Felinto
643da14a4e Fix make source_archive_complete for release branches
In Blender 3.1 we can't run the source_archive_complete because the
cmake program is trying to download the packages from svn trunk. However
3.2 (aka master) already changed the version of some of the source
packages.

For example the OpenXR-SDK. It should be looking for
OpenXR-SDK-1.0.17.tar.gz in:
https://svn.blender.org/svnroot/bf-blender/tags/blender-3.1-release/lib/packages/

But instead it tries to look for it in:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/

Which can't be found since it was replaced with OpenXR-SDK-1.0.22.tar.gz

---

Release checklist: https://wiki.blender.org/wiki/Process/Release_Checklist

The release checklist was updated to include the new instructions:
`In the release branch, update and uncomment BLENDER_VERSION in download.cmake`

Differential Revision: http://developer.blender.org/D14292
2022-03-24 11:39:34 +01:00
Patrick Mours
5d38b13e61 CMake: Rename "USD_LIBRARY_PREFIX" to "PXR_LIB_PREFIX" for consistency
rBc1909770e7f192574ea62449dd14b4254637e604 introduced "PXR_LIB_PREFIX" for building the
dependencies, so only makes sense to use the same name in the Hydra render delegate CMake too
2022-03-23 16:52:02 +01:00
Patrick Mours
d350976ba0 Cycles: Add Hydra render delegate
This patch adds a Hydra render delegate to Cycles, allowing Cycles to be used for rendering
in applications that provide a Hydra viewport. The implementation was written from scratch
against Cycles X, for integration into the Blender repository to make it possible to continue
developing it in step with the rest of Cycles. For this purpose it follows the style of the rest of
the Cycles code and can be built with a CMake option
(`WITH_CYCLES_HYDRA_RENDER_DELEGATE=1`) similar to the existing standalone version
of Cycles.

Since Hydra render delegates need to be built against the exact USD version and other
dependencies as the target application is using, this is intended to be built separate from
Blender (`WITH_BLENDER=0` CMake option) and with support for library versions different
from what Blender is using. As such the CMake build scripts for Windows had to be modified
slightly, so that the Cycles Hydra render delegate can e.g. be built with MSVC 2017 again
even though Blender requires MSVC 2019 now, and it's possible to specify custom paths to
the USD SDK etc. The codebase supports building against the latest USD release 22.03 and all
the way back to USD 20.08 (with some limitations).

Reviewed By: brecht, LazyDodo

Differential Revision: https://developer.blender.org/D14398
2022-03-23 16:39:05 +01:00
c1909770e7 CMake: prep USD build & find scripts for USD >= 21.11
Since USD 21.11 the libraries are prefixed with "usd_", i.e.
"libusd_m.a" became "libusd_usd_m.a". This commit adjusts our
`usd.cmake` (for building USD) and `FindUSD.cmake` (for finding the USD
libraries) so that they work with and without this `usd_` prefix.

See for more info:
https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01

Reviewed By: LazyDodo, brecht, mont29

Differential Revision: https://developer.blender.org/D14334
2022-03-22 10:56:21 +01:00
Brecht Van Lommel
f130d4f211 Cleanup: fix various typos
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D14203
2022-03-07 17:28:39 +01:00
Campbell Barton
c6df7266c7 CMake: move cmake_consistency_check.py into source/tools/ repo
This isn't needed for building Blender so move this along side
other source checking scripts.
2022-02-23 12:31:46 +11:00
Sergey Sharybin
b861d3e4c1 Merge branch 'blender-v3.1-release' 2022-02-22 16:08:38 +01:00
Sergey Sharybin
ca991e3012 Fix compilation error on certain platforms
Atomic operations performed by the C++ standard library might require
libatomic on platforms which do not have hardware support for those
operations.

This change makes it that such configurations are automatically detected
and -latomic is added when needed.

Differential Revision: https://developer.blender.org/D14106
2022-02-22 15:47:43 +01:00
Campbell Barton
ca12696257 Merge branch 'blender-v3.1-release' 2022-02-22 10:18:15 +11:00
Campbell Barton
ec5bbebf3e Python: bump minimum version to 3.10
Since Python 3.10 is now supported on all platform,
bump the minimum version to reduce the number of Python versions that
need to be supported simultaneously.

Reviewed By: LazyDodo, sybren, mont29, brecht

Ref D13943
2022-02-22 10:16:25 +11:00
Sebastian Parborg
b6fe1b0c65 Merge branch 'blender-v3.1-release' 2022-02-17 18:44:18 +01:00
Sebastian Parborg
a04300c436 Cleanup: Move more cmake library variables to be advanced
I noticed that there were a few variables that should not be visible per default.
It seems to me to simply be an oversight, so I went ahead and cleaned them up.

Reviewed By: Sybren, Ray molenkamp

Differential Revision: http://developer.blender.org/D14132
2022-02-17 18:42:06 +01:00
Brecht Van Lommel
a4c800ed02 Merge branch 'blender-v3.1-release' 2022-02-17 15:24:29 +01:00
Brecht Van Lommel
e5100ca3ad Build: update CMake to support OpenImageIO 2.3.4
FindOpenImageIO was updated to link to separate OpenImageIO_Util for new
versions, where it is required. For older versions, we can not link to it
because there will be duplicated symbols.

Ref D14128
2022-02-17 15:21:09 +01:00
Brecht Van Lommel
2c9931699e Build: update CMake to support OpenEXR 3
FindOpenEXR was updated to find new lib names and separate Imath. It's all
added to the list of OpenEXR include dirs and libs.

This keeps it compatible with both version 2 and 3 for now, and doesn't
require changes outside the find module.

Ref D14128
2022-02-17 15:21:09 +01:00
Michael
b22db23aee Define CLANG_FORMAT_VERSION in install_deps.sh
When running `./blender/build_files/build_environment/install_deps.sh` on Ubuntu 20.04.3 LTS the following error can be seen:
```
./blender/build_files/build_environment/install_deps.sh: line 1266: [: too many arguments
```
This error results from the call:
```
  check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION
```
with `CLANG_FORMAT_VERSION` being undefined.
Also as `clang-format` 13 is already released and hopefully didn't break anything `CLANG_FORMAT_VERSION_MEX` could use version bump.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D13924
2022-02-15 14:12:21 +01:00
Campbell Barton
88b6e5571e License headers: use SPDX for remaining CMake find modules & gtests 2022-02-15 17:45:39 +11:00
Campbell Barton
281ba8a063 File headers: add missing copyright, add MIT to SPDX licenses 2022-02-11 14:56:03 +11:00
Campbell Barton
f7bbec290d File headers: add license to Python scripts 2022-02-11 14:30:21 +11:00
Campbell Barton
1df8a5f8fb File headers: use SPDX license for CMake files 2022-02-11 14:23:56 +11:00
Campbell Barton
bff0cf1030 Cleanup: remove white-space before headers 2022-02-11 14:23:54 +11:00
Campbell Barton
c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Peter Kim
84f30ac3a2 Deps: upgrade OpenXR 1.0.17 -> 1.0.22
Simple upgrade of OpenXR to 1.0.22, following the steps from
https://wiki.blender.org/wiki/Source/OpenXR_SDK_Dependency and
rBb69ab42982a1. No changes to Blender code were necessary, only a version
bump.

The primary motivation for this upgrade is to utilize the
`XR_HTCX_vive_tracker_interaction` extension introduced in ver. 1.0.20.
However, the latest release (1.0.22) also adds a number of potentially
useful extensions such as:
- `XR_FB_render_model`
- `XR_HTC_facial_expression`
- `XR_HTC_vive_focus3_controller_interaction`

Ref T95206

Reviewed By: LazyDodo, sybren, mont29

Maniphest Tasks: T95206

Differential Revision: https://developer.blender.org/D13950
2022-02-10 19:15:29 +09:00
Campbell Barton
6345032a49 Cleanup: non-standard license formatting, minor changes 2022-02-09 23:57:12 +11:00
Clément Foucault
afc2cc393d Merge branch 'blender-v3.1-release' 2022-02-04 19:35:35 +01:00
Ray Molenkamp
b2e43a4a9d deps_builder: Update to freetype 2.11.1
Required to solve a crash on windows (T95367)

Mostly an uneventful update, except for FreeType
giving its cmake options a rename.

Reviewed By: brecht, sybren
Differential Revision: https://developer.blender.org/D13968
2022-02-04 09:19:10 -07:00
Campbell Barton
caaec3e0c5 Merge branch 'blender-v3.1-release' 2022-02-01 00:02:08 +11:00
Campbell Barton
b9718899fa Python: default to version to 3.10 for Linux
This doesn't bump the minimum version, see D13943.
2022-01-31 23:57:10 +11:00