diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-19 17:59:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-07-19 18:01:51 +0400 |
commit | 21f15e2c458e277137f1791f9e60629e1e46f036 (patch) | |
tree | 0c1b9bfd2a2256f5e01444c7b8758c41d73002a2 /build_files/cmake | |
parent | 1161b00c76d71f277f7d6bb774d4dc663a4d5a53 (diff) |
CMake FindOpenEXR.cmake was using OPENEXR_VERSION unset
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/Modules/FindOpenEXR.cmake | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake index 7190cfc5a88..1c59ef49e59 100644 --- a/build_files/cmake/Modules/FindOpenEXR.cmake +++ b/build_files/cmake/Modules/FindOpenEXR.cmake @@ -34,6 +34,9 @@ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "") SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR}) ENDIF() +# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though. +SET(_openexr_libs_ver_init "2.0") + SET(_openexr_FIND_COMPONENTS Half Iex @@ -82,12 +85,9 @@ IF(OPENEXR_INCLUDE_DIR) IF(OPENEXR_BUILD_SPECIFICATION) MESSAGE(STATUS "${OPENEXR_BUILD_SPECIFICATION}") STRING(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*" - "\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION}) - SET("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib") + "\\1" _openexr_libs_ver_init ${OPENEXR_BUILD_SPECIFICATION}) ELSE() - # Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though. - MESSAGE(WARNING "Could not determine ILMBase library version, assuming 2.0.") - SET("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib") + MESSAGE(WARNING "Could not determine ILMBase library version, assuming ${_openexr_libs_ver_init}.") ENDIF() UNSET(_openexr_CONFIG CACHE) @@ -95,6 +95,9 @@ IF(OPENEXR_INCLUDE_DIR) ENDIF() ENDIF() +SET("OPENEXR_VERSION" ${_openexr_libs_ver_init} CACHE STRING "Version of OpenEXR lib") +UNSET(_openexr_libs_ver_init) + STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION}) SET(_openexr_LIBRARIES) |