diff options
Diffstat (limited to 'build_files/cmake/Modules')
-rw-r--r-- | build_files/cmake/Modules/FindOpenEXR.cmake | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake index 9ea0f6c9efd..8fc2d572b62 100644 --- a/build_files/cmake/Modules/FindOpenEXR.cmake +++ b/build_files/cmake/Modules/FindOpenEXR.cmake @@ -34,13 +34,27 @@ 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 -) +if (NOT OPENEXR_VERSION) + SET(OPENEXR_VERSION "2.0.1") +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 () SET(_openexr_SEARCH_DIRS ${OPENEXR_ROOT_DIR} |