diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-06-16 22:59:50 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-06-16 22:59:50 +0400 |
commit | 8e5cd99e0b9b1b19f8b24100ca0f5b886069b780 (patch) | |
tree | b0b79f7c8b81e69b3836d9e0415bb10e27e0a0f7 | |
parent | 868300614387cffbc8645a225a96b46c2740f000 (diff) |
Fix for building Blender with OSL, and no OpenEXR headers in standard paths (like /usr/include/OpenEXR).
As OSL headers mix #include <OpenEXR/foo.h> and #include <foo.h>, we need both /path/to/openexr/include and /path/to/openexr/include/OpenEXR include paths... :/
Issue investigated by doug65536 on IRC, thanks.
-rw-r--r-- | build_files/cmake/Modules/FindOpenEXR.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake index 9f1d6571ef5..9ea0f6c9efd 100644 --- a/build_files/cmake/Modules/FindOpenEXR.cmake +++ b/build_files/cmake/Modules/FindOpenEXR.cmake @@ -52,11 +52,11 @@ SET(_openexr_SEARCH_DIRS FIND_PATH(OPENEXR_INCLUDE_DIR NAMES - ImfXdr.h + OpenEXR/ImfXdr.h HINTS ${_openexr_SEARCH_DIRS} PATH_SUFFIXES - include/OpenEXR + include ) SET(_openexr_LIBRARIES) @@ -82,7 +82,8 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG IF(OPENEXR_FOUND) SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES}) - SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}) + # Both include paths are needed because of dummy OSL headers mixing #include <OpenEXR/foo.h> and #include <foo.h> :( + SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR) ENDIF() MARK_AS_ADVANCED(OPENEXR_INCLUDE_DIR) |