Merge pull request #19970 from antonio-rojas:master

Support building with OpenEXR 3.x

* Support OpenEXR 3.0

Try to find OpenEXR 3.0 using the upstream cmake config, and fallback to the previous algorithm if not found

* Add explicit ImfFrameBuffer.h include

This was transitively included with OpenEXR 2.x, but that's no longer the case with OpenEXR 3.x
This commit is contained in:
Antonio Rojas 2021-04-27 00:13:59 +02:00 committed by GitHub
parent 6c53af8e41
commit 971dacaf41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,14 @@
# OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR.
#
find_package(OpenEXR 3.0 CONFIG QUIET)
if(TARGET OpenEXR::OpenEXR)
SET(OPENEXR_FOUND TRUE)
SET(OPENEXR_LIBRARIES OpenEXR::OpenEXR)
SET(OPENEXR_VERSION ${OpenEXR_VERSION})
return()
endif()
SET(OPENEXR_LIBRARIES "")
SET(OPENEXR_LIBSEARCH_SUFFIXES "")
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH)

View File

@ -56,6 +56,7 @@
#include <iostream>
#include <stdexcept>
#include <ImfFrameBuffer.h>
#include <ImfHeader.h>
#include <ImfInputFile.h>
#include <ImfOutputFile.h>