From 07f871bda23943c43c9e74cc54f25130459de830 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Wed, 13 Jan 2021 15:37:19 +0100 Subject: [PATCH] Unified version and soversion between all supported build systems. (#565) Signed-off-by: Vitaly Zaitsev --- configure.ac | 2 +- meson.build | 10 ++++++++-- usrsctplib/CMakeLists.txt | 9 +++++++-- usrsctplib/Makefile.am | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 643e4905b..204e7ebde 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ dnl OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF dnl SUCH DAMAGE. dnl -AC_INIT([libusrsctp], [0.9.4.0]) +AC_INIT([libusrsctp], [0.9.5.0]) AM_INIT_AUTOMAKE([foreign]) AC_PROG_CC diff --git a/meson.build b/meson.build index 29f06477d..daac925bd 100644 --- a/meson.build +++ b/meson.build @@ -1,9 +1,14 @@ # Project definition project('usrsctplib', 'c', - version: '1.0.0', + version: '0.9.5.0', default_options: ['c_std=c99'], meson_version: '>=0.49.0') +# Shared library API and ABI versions +# Notice: shared library version must be in X.Y.Z format only +soversion_full = '2.0.0' +soversion_short = '2' + # Set compiler warning flags compiler = meson.get_compiler('c') if compiler.get_argument_syntax() == 'msvc' @@ -186,7 +191,8 @@ else dependencies: dependencies, include_directories: include_dirs, install: true, - version: meson.project_version()) + version: soversion_full, + soversion: soversion_short) endif # Declare dependency diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt index dbc494dbf..aa99cf2fe 100644 --- a/usrsctplib/CMakeLists.txt +++ b/usrsctplib/CMakeLists.txt @@ -34,7 +34,12 @@ # INCLUDE MODULES AND SETTINGS ################################################# -set(VERSION "1.0.0") +set(VERSION "0.9.5.0") + +# Shared library API and ABI versions +# Notice: shared library version must be in X.Y.Z format only +set(SOVERSION_FULL "2.0.0") +set(SOVERSION_SHORT "2") include(GNUInstallDirs) set(prefix ${CMAKE_INSTALL_PREFIX}) @@ -177,7 +182,7 @@ if (WIN32) endif () set_target_properties(usrsctp PROPERTIES IMPORT_SUFFIX "_import.lib") -set_target_properties(usrsctp PROPERTIES SOVERSION 1 VERSION 1.0.0) +set_target_properties(usrsctp PROPERTIES SOVERSION ${SOVERSION_SHORT} VERSION ${SOVERSION_FULL}) ################################################# # INSTALL LIBRARY AND HEADER diff --git a/usrsctplib/Makefile.am b/usrsctplib/Makefile.am index 85240b7ce..dc07c6e17 100644 --- a/usrsctplib/Makefile.am +++ b/usrsctplib/Makefile.am @@ -76,6 +76,6 @@ libusrsctp_la_SOURCES = user_atomic.h \ netinet6/sctp6_var.h \ netinet6/sctp6_usrreq.c libusrsctp_la_CFLAGS = $(LIBCFLAGS) -libusrsctp_la_LDFLAGS = -version-info 1:0:0 +libusrsctp_la_LDFLAGS = -version-info 2:0:0 include_HEADERS = usrsctp.h