summaryrefslogtreecommitdiff
path: root/manualPorts/vigra/vigra-openexr3.patch
blob: f87e5521861e9f405a1bc9f7cc34470f6ed8619a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/config/FindOpenEXR.cmake b/config/FindOpenEXR.cmake
index ef36cdbf..0423e247 100644
--- a/config/FindOpenEXR.cmake
+++ b/config/FindOpenEXR.cmake
@@ -23,6 +23,16 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+find_package(OpenEXR 3.0 CONFIG QUIET)
+if(TARGET OpenEXR::OpenEXR)
+    find_package(Threads)
+    SET(OPENEXR_FOUND TRUE)
+    SET(OPENEXR_INCLUDE_DIR OpenEXR::OpenEXR)
+    SET(OPENEXR_LIBRARIES OpenEXR::OpenEXR)
+    SET(OPENEXR_VERSION ${OpenEXR_VERSION})
+    return()
+endif()
+
 FIND_PATH(OPENEXR_INCLUDE_DIR ImfRgbaFile.h PATH_SUFFIXES OpenEXR)
 
 FOREACH(V "" -2_2 -2_1 -2_0 -1_7)