Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Mar 31, 2024
1 parent f97672f commit 83ebef8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/cmake/build_OpenColorIO.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@ CPMAddPackage (NAME OpenColorIO

set (OpenColorIO_VERSION ${OpenColorIO_LOCAL_BUILD_VERSION})

if(NOT TARGET OpenColorIO::OpenColorIO)
get_target_property(ocioincinc OpenColorIO INTERFACE_INCLUDE_DIRECTORIES)
# list(APPEND imathinc ${imathconfinc})
# set(IMATH_HEADER_ONLY_INCLUDE_DIRS ${imathinc})
message(STATUS "OCIO interface dirs ${ocioinc}")
endif()


set (OPENIMAGEIO_OPENCOLORIO_INCLUDES "${OpenColorIO_SOURCE_DIR}/include"
"${OpenColorIO_BINARY_DIR}/include"
"${OpenColorIO_BINARY_DIR}/include/OpenColorIO")
proj_include_directories_prepend ("${OpenColorIO_SOURCE_DIR}/include"
"${OpenColorIO_BINARY_DIR}/include")
message ("After build_OpenColorIO, now ${PROJECT_NAME}_include_directories = ${${PROJECT_NAME}_include_directories}}")
"${OpenColorIO_BINARY_DIR}/include"
"${OpenColorIO_BINARY_DIR}/include/OpenColorIO")
message (STATUS "After build_OpenColorIO, now ${PROJECT_NAME}_include_directories = ${${PROJECT_NAME}_include_directories}}")

if (TARGET OpenColorIO::OpenColorIO)
message (STATUS "OpenColorIO::OpenColorIO target exists")
endif ()
if (TARGET OpenColorIO)
message (STATUS "OpenColorIO (only) target exists")
endif ()
2 changes: 2 additions & 0 deletions src/libOpenImageIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ target_include_directories (OpenImageIO
${OPENEXR_INCLUDES}
PRIVATE
${ROBINMAP_INCLUDES}
${OPENIMAGEIO_OPENCOLORIO_INCLUDES}
)
target_include_directories (OpenImageIO SYSTEM PUBLIC ${OpenCV_INCLUDES})

Expand All @@ -163,6 +164,7 @@ target_link_libraries (OpenImageIO
${format_plugin_libs} # Add all the target link libraries from the plugins
$<TARGET_NAME_IF_EXISTS:OpenColorIO::OpenColorIO>
$<TARGET_NAME_IF_EXISTS:OpenColorIO::OpenColorIOHeaders>
$<TARGET_NAME_IF_EXISTS:OpenColorIO>
$<TARGET_NAME_IF_EXISTS:pugixml::pugixml>
$<TARGET_NAME_IF_EXISTS:TBB::tbb>
$<TARGET_NAME_IF_EXISTS:Freetype::Freetype>
Expand Down

0 comments on commit 83ebef8

Please sign in to comment.