Skip to content

Commit

Permalink
Add DEPENDENCIES Imath::Imath for OpenEXRCore (#1523)
Browse files Browse the repository at this point in the history
This frees exrinfo and any other external application from any special
settings to pick up the necessary Imath #includes.

Signed-off-by: Cary Phillips <cary@ilm.com>
  • Loading branch information
cary-ilm committed Aug 28, 2023
1 parent 22b9905 commit acdbda9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
6 changes: 0 additions & 6 deletions src/bin/exrinfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ set_target_properties(exrinfo PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)

# when building with an internal imath, this isn't generated until
# install time, so use the private header only include path
if (NOT TARGET Imath::ImathConfig)
target_include_directories(exrinfo PRIVATE ${IMATH_HEADER_ONLY_INCLUDE_DIRS})
endif()

if(OPENEXR_INSTALL_TOOLS)
install(TARGETS exrinfo DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
Expand Down
14 changes: 3 additions & 11 deletions src/lib/OpenEXRCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,10 @@ openexr_define_library(OpenEXRCore

PRIVATE_DEPS
${OPENEXR_EXTRA_MATH_LIB}
)

target_link_libraries(OpenEXRCore PUBLIC Imath::Imath)

# when building with an internal imath, this isn't generated until
# install time, so need to use private header only include path (we
# aren't linking to imath or anything c++)
if (TARGET Imath::ImathConfig)
target_link_libraries(OpenEXRCore PRIVATE Imath::ImathConfig)
else()
target_include_directories(OpenEXRCore PRIVATE ${IMATH_HEADER_ONLY_INCLUDE_DIRS})
endif()
DEPENDENCIES
Imath::Imath
)

if (DEFINED EXR_DEFLATE_LIB)
if (BUILD_SHARED_LIBS)
Expand Down

0 comments on commit acdbda9

Please sign in to comment.