Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,36 +228,21 @@ elseif(OTIO_FIND_IMATH)
message(STATUS "Found Imath 3 at ${Imath_CONFIG}")
set(USE_DEPS_IMATH OFF)
else()
find_package(IlmBase QUIET)
if (IlmBase_FOUND)
message(STATUS "Imath 3 not found, found Imath 2 at ${IlmBase_CONFIG}")
message(STATUS "You may need to point to the Imath headers by setting IMATH_INCLUDES")
set(USE_DEPS_IMATH_OFF)
set(OTIO_RESOLVED_IMATH_LIBRARIES "${IlmBase_LIBRARIES")
else()
message(STATUS "Imath 3 and 2 were not found, using src/deps/Imath")
set(USE_DEPS_IMATH ON)
endif()
message(STATUS "Imath 3 was not found, using src/deps/Imath")
set(USE_DEPS_IMATH ON)
endif()
else()
message(STATUS "Using src/deps/Imath by default")
set(USE_DEPS_IMATH ON)
endif()

if(USE_DEPS_IMATH)
include_directories("${PROJECT_SOURCE_DIR}/src/deps/Imath/src")
endif()

# set up the internally hosted dependencies
add_subdirectory(src/deps)

set (OTIO_IMATH_TARGETS
# For OpenEXR/Imath 3.x:
$<TARGET_NAME_IF_EXISTS:Imath::Imath>
$<TARGET_NAME_IF_EXISTS:Imath::Half>
# For OpenEXR >= 2.4/2.5 with reliable exported targets
$<TARGET_NAME_IF_EXISTS:IlmBase::Imath>
$<TARGET_NAME_IF_EXISTS:IlmBase::Half>
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex>
# For OpenEXR <= 2.3:
${ILMBASE_LIBRARIES})

add_subdirectory(src/opentime)
add_subdirectory(src/opentimelineio)

Expand All @@ -272,4 +257,3 @@ endif()
if(OTIO_CXX_EXAMPLES)
add_subdirectory(examples)
endif()

9 changes: 4 additions & 5 deletions src/opentimelineio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@ add_library(opentimelineio ${OTIO_SHARED_OR_STATIC_LIB}
add_library(OTIO::opentimelineio ALIAS opentimelineio)

target_include_directories(opentimelineio
PRIVATE "${IMATH_INCLUDES}"
"${PROJECT_SOURCE_DIR}/src"
PRIVATE "${PROJECT_SOURCE_DIR}/src"
"${PROJECT_SOURCE_DIR}/src/deps"
"${PROJECT_SOURCE_DIR}/src/deps/rapidjson/include"
"${IMATH_INCLUDES}")
"${PROJECT_SOURCE_DIR}/src/deps/rapidjson/include")


target_link_libraries(opentimelineio
PUBLIC opentime ${OTIO_IMATH_TARGETS})
PUBLIC opentime Imath::Imath)

set_target_properties(opentimelineio PROPERTIES
DEBUG_POSTFIX "${OTIO_DEBUG_POSTFIX}"
Expand Down
1 change: 1 addition & 0 deletions src/opentimelineio/OpenTimelineIOConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

include(CMakeFindDependencyMacro)
find_dependency(OpenTime)
find_dependency(Imath)

include("${CMAKE_CURRENT_LIST_DIR}/OpenTimelineIOTargets.cmake")
2 changes: 1 addition & 1 deletion src/opentimelineio/composable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "opentimelineio/serializableObjectWithMetadata.h"
#include "opentimelineio/version.h"

#include <ImathBox.h>
#include <Imath/ImathBox.h>

namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {

Expand Down
2 changes: 1 addition & 1 deletion src/opentimelineio/mediaReference.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "opentimelineio/serializableObjectWithMetadata.h"
#include "opentimelineio/version.h"

#include <ImathBox.h>
#include <Imath/ImathBox.h>

namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {

Expand Down
2 changes: 1 addition & 1 deletion src/opentimelineio/serializableObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "opentimelineio/typeRegistry.h"
#include "opentimelineio/version.h"

#include "ImathBox.h"
#include "Imath/ImathBox.h"
#include "serialization.h"

#include <list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "opentimelineio/typeRegistry.h"
#include "opentimelineio/stackAlgorithm.h"

#include <ImathBox.h>
#include <Imath/ImathBox.h>

namespace py = pybind11;
using namespace pybind11::literals;
Expand Down
4 changes: 2 additions & 2 deletions src/py-opentimelineio/opentimelineio-bindings/otio_imath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "otio_utils.h"

#include "ImathBox.h"
#include "ImathVec.h"
#include "Imath/ImathBox.h"
#include "Imath/ImathVec.h"

namespace py = pybind11;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "otio_utils.h"
#include "otio_anyDictionary.h"

#include "ImathBox.h"
#include "Imath/ImathBox.h"

namespace py = pybind11;
using namespace pybind11::literals;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "opentimelineio/safely_typed_any.h"
#include "opentimelineio/stringUtils.h"

#include <ImathBox.h>
#include <Imath/ImathBox.h>

#include <map>
#include <cstring>
Expand Down
3 changes: 0 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ foreach(test ${tests_opentimelineio})
add_executable(${test} utils.h utils.cpp ${test}.cpp)

target_link_libraries(${test} opentimelineio)
if (NOT "${IMATH_INCLUDES}" STREQUAL "")
target_include_directories(${test} "${IMATH_INCLUDES}")
endif()
set_target_properties(${test} PROPERTIES FOLDER tests)
add_test(NAME ${test}
COMMAND ${test}
Expand Down
Loading