Skip to content

Commit dee1933

Browse files
committed
Introduce soname to indicate ABI version of shared library
Having a "soname" that stays constant allows compiled executables that link against liblsl to continue to work whithout recompilation when liblsl is updated as long as the soname of liblsl stays the same. Each time the ABI of liblsl changes in future, the setting LSL_ABI_VERSION in CMakeLists.txt should be incremented by one to change the soname. Closes #140.
1 parent 65ccfca commit dee1933

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ project (liblsl
66
HOMEPAGE_URL "https://github.com/sccn/liblsl"
77
)
88

9+
# API version, to be incremented on backwards-incompatible ABI changes
10+
set(LSL_ABI_VERSION 2)
11+
912
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
1013
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
1114
if(NOT MSVC_VERSION VERSION_LESS 1700)
@@ -239,6 +242,7 @@ target_include_directories(lsl INTERFACE
239242
)
240243
set_target_properties(lsl PROPERTIES
241244
VERSION ${liblsl_VERSION_MAJOR}.${liblsl_VERSION_MINOR}.${liblsl_VERSION_PATCH}
245+
SOVERSION ${LSL_ABI_VERSION}
242246
)
243247

244248
# enable some additional expensive compiler optimizations

0 commit comments

Comments
 (0)