cmake, meson: Change library filename to libxml2.so.16.0.0

We have to follow Autotools here.

Fixes #882.
This commit is contained in:
Nick Wellnhofer 2025-03-27 22:57:19 +01:00
parent 81c09e3336
commit 2dd514078e
2 changed files with 6 additions and 3 deletions

View File

@ -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}
)

View File

@ -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')