-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
robust discovery & link to openexr in opencv 3.x
- Loading branch information
Showing
4 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- a/cmake/OpenCVFindOpenEXR.cmake | ||
+++ b/cmake/OpenCVFindOpenEXR.cmake | ||
@@ -8,6 +8,15 @@ | ||
# OPENEXR_INCLUDE_PATHS = OpenEXR include directories. | ||
# OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR. | ||
# | ||
+find_package(OpenEXR REQUIRED) | ||
+if(TARGET OpenEXR::OpenEXR) | ||
+ set(OPENEXR_LIBRARIES OpenEXR::OpenEXR) | ||
+else() | ||
+ set(OPENEXR_LIBRARIES openexr::openexr) | ||
+endif() | ||
+set(OPENEXR_FOUND TRUE) | ||
+set(OPENEXR_VERSION ${OpenEXR_VERSION}) | ||
+return() | ||
|
||
SET(OPENEXR_LIBRARIES "") | ||
SET(OPENEXR_LIBSEARCH_SUFFIXES "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- a/cmake/OpenCVFindOpenEXR.cmake | ||
+++ b/cmake/OpenCVFindOpenEXR.cmake | ||
@@ -8,6 +8,15 @@ | ||
# OPENEXR_INCLUDE_PATHS = OpenEXR include directories. | ||
# OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR. | ||
# | ||
+find_package(OpenEXR REQUIRED) | ||
+if(TARGET OpenEXR::OpenEXR) | ||
+ set(OPENEXR_LIBRARIES OpenEXR::OpenEXR) | ||
+else() | ||
+ set(OPENEXR_LIBRARIES openexr::openexr) | ||
+endif() | ||
+set(OPENEXR_FOUND TRUE) | ||
+set(OPENEXR_VERSION ${OpenEXR_VERSION}) | ||
+return() | ||
|
||
if(NOT HAVE_CXX11) | ||
message(STATUS "OpenEXR: enable C++11 to use external OpenEXR") |