Build: fix macOS OpenImageDenoise 2.1 library not loading correctly

Version symlinks are not used on macOS due to notarization issues.
This commit is contained in:
Brecht Van Lommel
2023-11-16 19:19:29 +01:00
parent 4d7274b7f4
commit cb9b7eaa34
@@ -34,3 +34,15 @@ diff -Naur oidn-2.0.1/devices/CMakeLists.txt external_openimagedenoise/devices/C
BUILD_ALWAYS TRUE
DEPENDS
OpenImageDenoise_core
--- a/core/module.cpp 2023-11-16 19:07:32
+++ b/core/module.cpp 2023-11-16 19:08:01
@@ -37,7 +37,8 @@
"." + toString(OIDN_VERSION_MINOR) +
"." + toString(OIDN_VERSION_PATCH);
#if defined(__APPLE__)
- filename = "lib" + filename + versionStr + ".dylib";
+ // BLENDER: version string is stripped on macOS.
+ filename = "lib" + filename + ".dylib";
#else
filename = "lib" + filename + ".so" + versionStr;
#endif