Skip to content

Commit d2b7f7f

Browse files
committed
Restore CMake functionality
Signed-off-by: Darby Johnston <[email protected]>
1 parent 1fa2335 commit d2b7f7f

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ project(OpenTimelineIO VERSION ${OTIO_VERSION} LANGUAGES C CXX)
2828
# Installation options
2929
option(OTIO_CXX_INSTALL "Install the C++ bindings" ON)
3030
option(OTIO_PYTHON_INSTALL "Install the Python bindings" OFF)
31+
option(OTIO_DEPENDENCIES_INSTALL "Install OTIO's C++ header dependencies (Imath)" ON)
3132
option(OTIO_INSTALL_PYTHON_MODULES "Install OTIO pure Python modules/files" ON)
3233
option(OTIO_INSTALL_COMMANDLINE_TOOLS "Install the OTIO command line tools" ON)
3334
option(OTIO_FIND_IMATH "Find Imath using find_package" OFF)
@@ -148,6 +149,12 @@ set(OTIO_RESOLVED_CXX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
148149
if(OTIO_CXX_INSTALL)
149150
message(STATUS "Installing C++ bindings to: ${OTIO_RESOLVED_CXX_INSTALL_DIR}")
150151
message(STATUS "Installing C++ dynamic libraries to: ${OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR}")
152+
153+
if(OTIO_DEPENDENCIES_INSTALL)
154+
message(STATUS " Installing header dependencies for C++ (OTIO_DEPENDENCIES_INSTALL=ON)")
155+
else()
156+
message(STATUS " Not installing header dependencies for C++ (OTIO_DEPENDENCIES_INSTALL=OFF)")
157+
endif()
151158
else()
152159
message(STATUS "Install C++ bindings: OFF")
153160
endif()

src/deps/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ if(OTIO_PYTHON_INSTALL)
2929
endif()
3030

3131
if(NOT OTIO_FIND_IMATH)
32+
# preserve BUILD_SHARED_LIBS options for this project, but set it off for Imath
33+
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
3234
set(BUILD_SHARED_LIBS OFF)
33-
add_subdirectory(Imath)
35+
36+
# If we do not want Imath to install headers and CMake files use the EXCLUDE_FROM_ALL option
37+
if(OTIO_CXX_INSTALL AND OTIO_DEPENDENCIES_INSTALL)
38+
add_subdirectory(Imath)
39+
else()
40+
add_subdirectory(Imath EXCLUDE_FROM_ALL)
41+
endif()
3442
endif()
3543

3644
if(NOT OTIO_FIND_ZLIB)

src/opentimelineio/OpenTimelineIOConfig.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
include(CMakeFindDependencyMacro)
44
find_dependency(OpenTime)
55
find_dependency(Imath)
6-
find_dependency(minizip)
6+
find_dependency(zlib)
77

88
include("${CMAKE_CURRENT_LIST_DIR}/OpenTimelineIOTargets.cmake")

0 commit comments

Comments
 (0)