Skip to content

Commit 1fabbe9

Browse files
committed
Add SOVERSION for the C++ libraries
Signed-off-by: Darby Johnston <[email protected]>
1 parent 47d7779 commit 1fabbe9

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ set(OTIO_VERSION_MINOR "18")
1111
set(OTIO_VERSION_PATCH "0")
1212
set(OTIO_VERSION ${OTIO_VERSION_MAJOR}.${OTIO_VERSION_MINOR}.${OTIO_VERSION_PATCH})
1313

14+
# Set the SOVERSION. This version should be incremented anytime the ABI
15+
# changes. OTIO is currently using the minor version number for breaking
16+
# changes, e.g. v0.15, v0.16.0, v0.17.0, so the SOVERSION should be incremented
17+
# to match. If the next OTIO version is 0.19.0 and has ABI changes, the
18+
# SOVERSION should be incremented to 0.19. When OTIO reaches 1.x.x the
19+
# SOVERSION can be changed to match the major version which is a more
20+
# common convention.
21+
set(OTIO_SOVERSION 0.18)
22+
1423
set(OTIO_AUTHOR "Contributors to the OpenTimelineIO project")
1524
set(OTIO_AUTHOR_EMAIL "[email protected]")
1625
set(OTIO_LICENSE "Modified Apache 2.0 License")

src/opentime/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ set_target_properties(opentime PROPERTIES
2424
POSITION_INDEPENDENT_CODE TRUE
2525
WINDOWS_EXPORT_ALL_SYMBOLS true)
2626

27+
if(BUILD_SHARED_LIBS)
28+
set_target_properties(opentime PROPERTIES
29+
SOVERSION ${OTIO_SOVERSION}
30+
VERSION ${OTIO_VERSION})
31+
endif()
32+
2733
if(APPLE)
2834
set_target_properties(opentime PROPERTIES
2935
INSTALL_NAME_DIR "@loader_path"

src/opentimelineio/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ set_target_properties(opentimelineio PROPERTIES
9292
POSITION_INDEPENDENT_CODE TRUE
9393
WINDOWS_EXPORT_ALL_SYMBOLS true)
9494

95+
if(BUILD_SHARED_LIBS)
96+
set_target_properties(opentimelineio PROPERTIES
97+
SOVERSION ${OTIO_SOVERSION}
98+
VERSION ${OTIO_VERSION})
99+
endif()
100+
95101
if(APPLE)
96102
set_target_properties(opentimelineio PROPERTIES
97103
INSTALL_NAME_DIR "@loader_path"

0 commit comments

Comments
 (0)