forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openimageio]Fix find correct debug/release openexr libraries. (micro…
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/src/cmake/modules/FindOpenEXR.cmake b/src/cmake/modules/FindOpenEXR.cmake | ||
index babfffd..8e79925 100644 | ||
--- a/src/cmake/modules/FindOpenEXR.cmake | ||
+++ b/src/cmake/modules/FindOpenEXR.cmake | ||
@@ -118,24 +118,25 @@ endif () | ||
# headers, we do two finds -- first for custom locations, then for default. | ||
# This is complicated because the OpenEXR libraries may or may not be | ||
# built with version numbers embedded. | ||
-set (_openexr_components IlmThread IlmImf Imath Iex Half) | ||
-foreach (COMPONENT ${_openexr_components}) | ||
- string (TOUPPER ${COMPONENT} UPPERCOMPONENT) | ||
- # First try with the version embedded | ||
- set (FULL_COMPONENT_NAME ${COMPONENT}-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}) | ||
- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME} | ||
- PATHS ${OPENEXR_LIBRARY_DIR} $ENV{OPENEXR_LIBRARY_DIR} | ||
- ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH) | ||
- # Again, with no directory restrictions | ||
- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME}) | ||
- # Try again without the version | ||
- set (FULL_COMPONENT_NAME ${COMPONENT}) | ||
- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME} | ||
- PATHS ${OPENEXR_LIBRARY_DIR} $ENV{OPENEXR_LIBRARY_DIR} | ||
- ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH) | ||
- # One more time, with no restrictions | ||
- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME}) | ||
-endforeach () | ||
+find_library(ILMTHREAD_LIBRARY_RELEASE NAMES IlmThread-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}) | ||
+find_library(ILMTHREAD_LIBRARY_DEBUG NAMES IlmThread-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d) | ||
+select_library_configurations(ILMTHREAD) | ||
+ | ||
+find_library(OPENEXR_ILMIMF_LIBRARY_RELEASE NAMES IlmImf-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}) | ||
+find_library(OPENEXR_ILMIMF_LIBRARY_DEBUG NAMES IlmImf-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d) | ||
+select_library_configurations(OPENEXR_ILMIMF) | ||
+ | ||
+find_library(OPENEXR_IMATH_LIBRARY_RELEASE NAMES Imath-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}) | ||
+find_library(OPENEXR_IMATH_LIBRARY_DEBUG NAMES Imath-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d) | ||
+select_library_configurations(OPENEXR_IMATH) | ||
+ | ||
+find_library(OPENEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}) | ||
+find_library(OPENEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d) | ||
+select_library_configurations(OPENEXR_IEX) | ||
+ | ||
+find_library(OPENEXR_HALF_LIBRARY_RELEASE NAMES Half-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}) | ||
+find_library(OPENEXR_HALF_LIBRARY_DEBUG NAMES Half-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d) | ||
+select_library_configurations(OPENEXR_HALF) | ||
|
||
# Set the FOUND, INCLUDE_DIR, and LIBRARIES variables. | ||
if (ILMBASE_INCLUDE_PATH AND OPENEXR_INCLUDE_PATH AND |
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