1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-25 23:21:26 +03:00

build: Introduce LIBXML_MINOR_COMPAT

This is set to 0 for now but could be used to avoid ABI stability
issues.
This commit is contained in:
Nick Wellnhofer 2024-07-03 18:20:17 +02:00
parent 606310a381
commit c3731347c4
3 changed files with 11 additions and 3 deletions

View File

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

View File

@ -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`

View File

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