Skip to content

Commit

Permalink
Unified version and soversion between all supported build systems. (#565
Browse files Browse the repository at this point in the history
)

Signed-off-by: Vitaly Zaitsev <[email protected]>
  • Loading branch information
xvitaly committed Jan 13, 2021
1 parent 23f2563 commit 07f871b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions usrsctplib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion usrsctplib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 07f871b

Please sign in to comment.