OpenImageDenoise 2.0 version check
Only use OpenImageDenoise if found and version >= 2.0
This commit is contained in:
committed by
Matteo De Carlo
parent
79cd98c390
commit
9671bec439
@@ -1,3 +1,5 @@
|
||||
set(MIN_OpenImageDenoise_VERSION "2.0")
|
||||
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(GNUInstallDirs)
|
||||
@@ -18,12 +20,12 @@ if (WIN32)
|
||||
else ()
|
||||
set(TARGET_NAME WickedEngine_Linux)
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(OpenImageDenoise QUIET)
|
||||
find_package(OpenImageDenoise "${MIN_OpenImageDenoise_VERSION}" QUIET)
|
||||
find_package(Threads REQUIRED)
|
||||
if(NOT ${OpenImageDenoise_FOUND})
|
||||
message("OpenImageDenoise not found, it will be disabled.")
|
||||
message("OpenImageDenoise>=${MIN_OpenImageDenoise_VERSION} not found, it will be disabled.")
|
||||
else()
|
||||
message("OpenImageDenoise Found.")
|
||||
message("OpenImageDenoise ${OpenImageDenoise_VERSION} Found.")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET SDL2::SDL2)
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
#include "wiGraphicsDevice_Vulkan.h"
|
||||
|
||||
#if __has_include("OpenImageDenoise/oidn.hpp")
|
||||
#define OPEN_IMAGE_DENOISE
|
||||
#include "OpenImageDenoise/oidn.hpp"
|
||||
#if OIDN_VERSION_MAJOR >= 2
|
||||
#define OPEN_IMAGE_DENOISE
|
||||
#pragma comment(lib,"OpenImageDenoise.lib")
|
||||
// Also provide the required DLL files from OpenImageDenoise release near the exe!
|
||||
#endif // OIDN_VERSION_MAJOR >= 2
|
||||
#endif // __has_include("OpenImageDenoise/oidn.hpp")
|
||||
|
||||
using namespace wi::graphics;
|
||||
|
||||
@@ -13,10 +13,12 @@
|
||||
#include "wiLua.h"
|
||||
|
||||
#if __has_include("OpenImageDenoise/oidn.hpp")
|
||||
#define OPEN_IMAGE_DENOISE
|
||||
#include "OpenImageDenoise/oidn.hpp"
|
||||
#if OIDN_VERSION_MAJOR >= 2
|
||||
#define OPEN_IMAGE_DENOISE
|
||||
#pragma comment(lib,"OpenImageDenoise.lib")
|
||||
// Also provide the required DLL files from OpenImageDenoise release near the exe!
|
||||
#endif // OIDN_VERSION_MAJOR >= 2
|
||||
#endif // __has_include("OpenImageDenoise/oidn.hpp")
|
||||
|
||||
using namespace wi::ecs;
|
||||
|
||||
Reference in New Issue
Block a user