Skip to content

Commit d1231ef

Browse files
committed
Minor change for smooth build against upcoming Imath 3.0 (#1341)
Signed-off-by: Larry Gritz <[email protected]>
1 parent db350bd commit d1231ef

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/cmake/cuda_macros.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function ( NVCC_COMPILE cuda_src ptx_generated extra_nvcc_args )
2020
"-I${PROJECT_SOURCE_DIR}/src/include"
2121
"-I${PROJECT_SOURCE_DIR}/src/cuda_common"
2222
"-I${OPENIMAGEIO_INCLUDES}"
23-
"-I${ILMBASE_INCLUDES}"
23+
"-I${IMATH_INCLUDES}"
2424
"-I${Boost_INCLUDE_DIRS}"
2525
"-DFMT_DEPRECATED=\"\""
2626
${LLVM_COMPILE_FLAGS}

src/cmake/externalpackages.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ checked_find_package (OpenEXR REQUIRED
8989
"OpenEXR 2.2 is the oldest version our CI tests against, and the minimum that supports DWA compression"
9090
PRINT IMATH_INCLUDES
9191
)
92+
# Force Imath includes to be before everything else to ensure that we have
93+
# the right Imath/OpenEXR version, not some older version in the system
94+
# library. This shoudn't be necessary, except for the common case of people
95+
# building against Imath/OpenEXR 3.x when there is still a system-level
96+
# install version of 2.x.
97+
include_directories(BEFORE ${IMATH_INCLUDES})
9298
if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3)
9399
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers
94100
add_compile_options (-Wno-deprecated-register)

src/liboslexec/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ target_include_directories (${local_lib}
187187
PUBLIC
188188
${CMAKE_INSTALL_FULL_INCLUDEDIR}
189189
${OPENIMAGEIO_INCLUDES}
190-
${ILMBASE_INCLUDES}
190+
${IMATH_INCLUDES}
191191
PRIVATE
192192
"${CMAKE_SOURCE_DIR}/src/liboslcomp"
193193
)

src/liboslquery/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ target_include_directories (${local_lib}
1313
PUBLIC
1414
${CMAKE_INSTALL_FULL_INCLUDEDIR}
1515
${OPENIMAGEIO_INCLUDES}
16-
${ILMBASE_INCLUDES}
16+
${IMATH_INCLUDES}
1717
PRIVATE
1818
../liboslexec)
1919
target_link_libraries (${local_lib}
2020
PUBLIC
21-
${OPENIMAGEIO_LIBRARIES} ${ILMBASE_LIBRARIES}
21+
${OPENIMAGEIO_LIBRARIES} ${IMATH_LIBRARIES}
2222
PRIVATE
2323
${Boost_LIBRARIES}
2424
)

0 commit comments

Comments
 (0)