deps_builder: build fixes for oidn

- OIDN doesn't need to be build for debug builds on windows, while
it's mostly C++ code its public API is C
- Python was not found by the HIP build
- Level Zero was downloaded during the build.
This commit is contained in:
Ray Molenkamp 2023-12-23 11:45:11 -07:00
parent bd7c217f17
commit c6ae08b06b
3 changed files with 21 additions and 6 deletions

View File

@ -105,7 +105,6 @@ if(NOT APPLE)
endif()
endif()
include(cmake/ispc.cmake)
include(cmake/openimagedenoise.cmake)
# Embree needs to be included after dpcpp as it uses it for compiling with GPU support
include(cmake/embree.cmake)
include(cmake/openpgl.cmake)
@ -133,6 +132,7 @@ if(NOT WIN32 OR ENABLE_MSYS2)
include(cmake/gmp.cmake)
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
include(cmake/openimagedenoise.cmake)
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)

View File

@ -15,7 +15,7 @@ if(NOT APPLE)
-DOIDN_DEVICE_SYCL=ON
-DOIDN_DEVICE_SYCL_AOT=OFF
-DOIDN_DEVICE_HIP=ON
-DLEVEL_ZERO_ROOT=${LIBDIR}/level-zero/lib
-DLEVEL_ZERO_ROOT=${LIBDIR}/level-zero
)
endif()
@ -72,6 +72,13 @@ if(UNIX AND NOT APPLE)
)
endif()
if(NOT APPLE)
add_dependencies(
external_openimagedenoise
external_level-zero
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/bin ${HARVEST_TARGET}/openimagedenoise/bin

View File

@ -22,18 +22,26 @@ diff -Naur oidn-2.0.1/core/module.cpp external_openimagedenoise/core/module.cpp
#if defined(_WIN32)
filename += ".dll";
#else
diff -Naur oidn-2.0.1/devices/CMakeLists.txt external_openimagedenoise/devices/CMakeLists.txt
--- oidn-2.0.1/devices/CMakeLists.txt 2023-06-26 09:06:31.000000000 -0600
+++ external_openimagedenoise/devices/CMakeLists.txt 2023-07-01 10:57:36.987238700 -0600
diff -Naur oidn-2.1.0/devices/CMakeLists.txt external_openimagedenoise/devices/CMakeLists.txt
--- oidn-2.1.0/devices/CMakeLists.txt 2023-10-11 14:04:08 -0600
+++ external_openimagedenoise/devices/CMakeLists.txt 2023-12-23 09:34:17 -0700
@@ -59,6 +59,8 @@
-DOIDN_API_NAMESPACE:STRING=${OIDN_API_NAMESPACE}
-DOIDN_WARN_AS_ERRORS:BOOL=${OIDN_WARN_AS_ERRORS}
-DOIDN_SANITIZER:STRING=${OIDN_SANITIZER}
+ -DPYTHON_EXECUTABLE:STRING=${PYTHON_EXECUTABLE}
+ -DPython_EXECUTABLE:STRING=${Python_EXECUTABLE}
+ -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
BUILD_ALWAYS TRUE
DEPENDS
OpenImageDenoise_core
@@ -149,6 +151,7 @@
-DOIDN_API_NAMESPACE:STRING=${OIDN_API_NAMESPACE}
-DOIDN_WARN_AS_ERRORS:BOOL=${OIDN_WARN_AS_ERRORS}
-DOIDN_SANITIZER:STRING=${OIDN_SANITIZER}
+ -DPython_EXECUTABLE:STRING=${Python_EXECUTABLE}
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 @@