Skip to content

Commit

Permalink
Minor change for smooth build against upcoming Imath 3.0 (#1341)
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Mar 2, 2021
1 parent db350bd commit d1231ef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cmake/cuda_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function ( NVCC_COMPILE cuda_src ptx_generated extra_nvcc_args )
"-I${PROJECT_SOURCE_DIR}/src/include"
"-I${PROJECT_SOURCE_DIR}/src/cuda_common"
"-I${OPENIMAGEIO_INCLUDES}"
"-I${ILMBASE_INCLUDES}"
"-I${IMATH_INCLUDES}"
"-I${Boost_INCLUDE_DIRS}"
"-DFMT_DEPRECATED=\"\""
${LLVM_COMPILE_FLAGS}
Expand Down
6 changes: 6 additions & 0 deletions src/cmake/externalpackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ checked_find_package (OpenEXR REQUIRED
"OpenEXR 2.2 is the oldest version our CI tests against, and the minimum that supports DWA compression"
PRINT IMATH_INCLUDES
)
# Force Imath includes to be before everything else to ensure that we have
# the right Imath/OpenEXR version, not some older version in the system
# library. This shoudn't be necessary, except for the common case of people
# building against Imath/OpenEXR 3.x when there is still a system-level
# install version of 2.x.
include_directories(BEFORE ${IMATH_INCLUDES})
if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3)
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers
add_compile_options (-Wno-deprecated-register)
Expand Down
2 changes: 1 addition & 1 deletion src/liboslexec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ target_include_directories (${local_lib}
PUBLIC
${CMAKE_INSTALL_FULL_INCLUDEDIR}
${OPENIMAGEIO_INCLUDES}
${ILMBASE_INCLUDES}
${IMATH_INCLUDES}
PRIVATE
"${CMAKE_SOURCE_DIR}/src/liboslcomp"
)
Expand Down
4 changes: 2 additions & 2 deletions src/liboslquery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ target_include_directories (${local_lib}
PUBLIC
${CMAKE_INSTALL_FULL_INCLUDEDIR}
${OPENIMAGEIO_INCLUDES}
${ILMBASE_INCLUDES}
${IMATH_INCLUDES}
PRIVATE
../liboslexec)
target_link_libraries (${local_lib}
PUBLIC
${OPENIMAGEIO_LIBRARIES} ${ILMBASE_LIBRARIES}
${OPENIMAGEIO_LIBRARIES} ${IMATH_LIBRARIES}
PRIVATE
${Boost_LIBRARIES}
)
Expand Down

0 comments on commit d1231ef

Please sign in to comment.