diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c20318..d044a0d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,6 +403,8 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU") endif() endif() +set(LIBXML_MINOR_COMPAT 0) +math(EXPR LIBXML_SOVERSION "${LIBXML_MAJOR_VERSION} + ${LIBXML_MINOR_COMPAT}") set_target_properties( LibXml2 PROPERTIES @@ -411,7 +413,7 @@ set_target_properties( POSITION_INDEPENDENT_CODE ON PREFIX lib VERSION ${PROJECT_VERSION} - SOVERSION ${LIBXML_MAJOR_VERSION} + SOVERSION ${LIBXML_SOVERSION} ) if(MSVC) diff --git a/configure.ac b/configure.ac index 7a842223..84769448 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,12 @@ LIBXML_MINOR_VERSION=MINOR_VERSION LIBXML_MICRO_VERSION=MICRO_VERSION LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX -LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION + +# The oldest minor version we are compatible with. +LIBXML_MINOR_COMPAT=0 +LIBXML_CURRENT=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION` +LIBXML_AGE=`expr $LIBXML_MINOR_VERSION - $LIBXML_MINOR_COMPAT` +LIBXML_VERSION_INFO=$LIBXML_CURRENT:$LIBXML_MICRO_VERSION:$LIBXML_AGE LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION` diff --git a/meson.build b/meson.build index 7da53951..3b7747f6 100644 --- a/meson.build +++ b/meson.build @@ -466,6 +466,7 @@ foreach file : xml_opt_src endif endforeach +v_min_compat = 0 xml_lib = library( 'xml2', files(xml_src), @@ -474,7 +475,7 @@ xml_lib = library( include_directories: config_dir, install: true, version: meson.project_version(), - soversion: v_maj, + soversion: v_maj + v_min_compat, ) dep_inc = include_directories('include')