Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/Modules/FindOpenEXR.cmake')
-rw-r--r--build_files/cmake/Modules/FindOpenEXR.cmake31
1 files changed, 12 insertions, 19 deletions
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
index 166ef052076..79997cf63e2 100644
--- a/build_files/cmake/Modules/FindOpenEXR.cmake
+++ b/build_files/cmake/Modules/FindOpenEXR.cmake
@@ -34,6 +34,14 @@ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
ENDIF()
+SET(_openexr_FIND_COMPONENTS
+ Half
+ Iex
+ IlmImf
+ IlmThread
+ Imath
+)
+
SET(_openexr_SEARCH_DIRS
${OPENEXR_ROOT_DIR}
/usr/local
@@ -87,24 +95,7 @@ IF(OPENEXR_INCLUDE_DIR)
ENDIF()
ENDIF()
-IF(${OPENEXR_VERSION} VERSION_LESS "2.1")
- SET(_openexr_FIND_COMPONENTS
- Half
- Iex
- IlmImf
- IlmThread
- Imath
- )
-ELSE()
- STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
- SET(_openexr_FIND_COMPONENTS
- Half
- Iex-${_openexr_libs_ver}
- IlmImf-${_openexr_libs_ver}
- IlmThread-${_openexr_libs_ver}
- Imath-${_openexr_libs_ver}
- )
-ENDIF()
+STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
SET(_openexr_LIBRARIES)
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
@@ -112,7 +103,7 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
NAMES
- ${COMPONENT}
+ ${COMPONENT} ${COMPONENT}-${_openexr_libs_ver}
HINTS
${_openexr_SEARCH_DIRS}
PATH_SUFFIXES
@@ -121,6 +112,8 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
+UNSET(_openexr_libs_ver)
+
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)