Skip to content

Commit f72630e

Browse files
committed
Refactoring
Signed-off-by: Darby Johnston <[email protected]>
1 parent 0565975 commit f72630e

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ option(OTIO_INSTALL_PYTHON_MODULES "Install OTIO pure Python modules/files" O
3333
option(OTIO_INSTALL_COMMANDLINE_TOOLS "Install the OTIO command line tools" ON)
3434
option(OTIO_FIND_IMATH "Find Imath using find_package" OFF)
3535
option(OTIO_FIND_RAPIDJSON "Find RapidJSON using find_package" OFF)
36-
option(OTIO_FIND_ZLIB "Find zlib using find_package" OFF)
36+
option(OTIO_FIND_BUNDLE_LIBS "Find minizip and zlib using find_package" OFF)
37+
set(OTIO_BUNDLE_LIBS
38+
MINIZIP::minizipstatic ZLIB::ZLIBSTATIC
39+
CACHE STRING "Bundle libraries to link against (minizip and zlib)")
3740
set(OTIO_PYTHON_INSTALL_DIR "" CACHE STRING "Python installation dir (such as the site-packages dir)")
3841

3942
# Build options
@@ -264,8 +267,8 @@ else()
264267
message(STATUS "Using src/deps/rapidjson by default")
265268
endif()
266269

267-
#----- zlib and minizip
268-
if(OTIO_FIND_ZLIB)
270+
#----- minizip and zlib
271+
if(OTIO_FIND_BUNDLE_LIBS)
269272
find_package(ZLIB CONFIG REQUIRED)
270273
find_package(minizip CONFIG REQUIRED)
271274
if (ZLIB_FOUND)

src/deps/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(DEPS_SUBMODULES pybind11)
99
if(NOT OTIO_FIND_RAPIDJSON)
1010
set(DEPS_SUBMODULES ${DEPS_SUBMODULES} rapidjson)
1111
endif()
12-
if(NOT OTIO_FIND_ZLIB)
12+
if(NOT OTIO_FIND_BUNDLE_LIBS)
1313
set(DEPS_SUBMODULES ${DEPS_SUBMODULES} zlib)
1414
endif()
1515

@@ -41,7 +41,7 @@ if(NOT OTIO_FIND_IMATH)
4141
endif()
4242
endif()
4343

44-
if(NOT OTIO_FIND_ZLIB)
44+
if(NOT OTIO_FIND_BUNDLE_LIBS)
4545
set(BUILD_SHARED_LIBS OFF)
4646
set(BUILD_TESTING OFF)
4747
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

src/opentimelineio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ endif()
107107

108108
target_link_libraries(opentimelineio
109109
PUBLIC opentime Imath::Imath
110-
PRIVATE MINIZIP::minizipstatic ZLIB::ZLIBSTATIC)
110+
PRIVATE ${OTIO_BUNDLE_LIBS})
111111

112112
set_target_properties(opentimelineio PROPERTIES
113113
DEBUG_POSTFIX "${OTIO_DEBUG_POSTFIX}"

0 commit comments

Comments
 (0)