File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ project(OpenTimelineIO VERSION ${OTIO_VERSION} LANGUAGES C CXX)
2828# Installation options
2929option (OTIO_CXX_INSTALL "Install the C++ bindings" ON )
3030option (OTIO_PYTHON_INSTALL "Install the Python bindings" OFF )
31+ option (OTIO_DEPENDENCIES_INSTALL "Install OTIO's C++ header dependencies (Imath)" ON )
3132option (OTIO_INSTALL_PYTHON_MODULES "Install OTIO pure Python modules/files" ON )
3233option (OTIO_INSTALL_COMMANDLINE_TOOLS "Install the OTIO command line tools" ON )
3334option (OTIO_FIND_IMATH "Find Imath using find_package" OFF )
@@ -148,6 +149,12 @@ set(OTIO_RESOLVED_CXX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
148149if (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 ()
151158else ()
152159 message (STATUS "Install C++ bindings: OFF" )
153160endif ()
Original file line number Diff line number Diff line change @@ -29,8 +29,16 @@ if(OTIO_PYTHON_INSTALL)
2929endif ()
3030
3131if (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 ()
3442endif ()
3543
3644if (NOT OTIO_FIND_ZLIB)
Original file line number Diff line number Diff line change 33include (CMakeFindDependencyMacro)
44find_dependency(OpenTime)
55find_dependency(Imath)
6- find_dependency(minizip )
6+ find_dependency(zlib )
77
88include ("${CMAKE_CURRENT_LIST_DIR} /OpenTimelineIOTargets.cmake" )
You can’t perform that action at this time.
0 commit comments