diff --git a/CMakeLists.txt b/CMakeLists.txt index 327c2a42..c23fe75f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -410,6 +410,7 @@ endif() set(LIBXML_MINOR_COMPAT 14) math(EXPR LIBXML_SOVERSION "${LIBXML_MAJOR_VERSION} + ${LIBXML_MINOR_COMPAT}") +math(EXPR LIBXML_AGE "${LIBXML_MINOR_VERSION} - ${LIBXML_MINOR_COMPAT}") set_target_properties( LibXml2 PROPERTIES @@ -417,7 +418,7 @@ set_target_properties( OUTPUT_NAME xml2 POSITION_INDEPENDENT_CODE ON PREFIX lib - VERSION ${PROJECT_VERSION} + VERSION "${LIBXML_SOVERSION}.${LIBXML_AGE}.${LIBXML_MICRO_VERSION}" SOVERSION ${LIBXML_SOVERSION} ) diff --git a/meson.build b/meson.build index 988d7ecb..f09c204a 100644 --- a/meson.build +++ b/meson.build @@ -478,6 +478,8 @@ foreach file : xml_opt_src endforeach v_min_compat = 14 +so_version = v_maj + v_min_compat +age = v_min - v_min_compat xml_lib = library( 'xml2', files(xml_src), @@ -485,8 +487,8 @@ xml_lib = library( dependencies: xml_deps, include_directories: config_dir, install: true, - version: meson.project_version(), - soversion: v_maj + v_min_compat, + version: f'@so_version@.@age@.@v_mic@', + soversion: so_version, ) dep_inc = include_directories('include')