mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00: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:
parent
606310a381
commit
c3731347c4
@ -403,6 +403,8 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(LIBXML_MINOR_COMPAT 0)
|
||||||
|
math(EXPR LIBXML_SOVERSION "${LIBXML_MAJOR_VERSION} + ${LIBXML_MINOR_COMPAT}")
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
LibXml2
|
LibXml2
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
@ -411,7 +413,7 @@ set_target_properties(
|
|||||||
POSITION_INDEPENDENT_CODE ON
|
POSITION_INDEPENDENT_CODE ON
|
||||||
PREFIX lib
|
PREFIX lib
|
||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
SOVERSION ${LIBXML_MAJOR_VERSION}
|
SOVERSION ${LIBXML_SOVERSION}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
@ -16,7 +16,12 @@ LIBXML_MINOR_VERSION=MINOR_VERSION
|
|||||||
LIBXML_MICRO_VERSION=MICRO_VERSION
|
LIBXML_MICRO_VERSION=MICRO_VERSION
|
||||||
LIBXML_MICRO_VERSION_SUFFIX=
|
LIBXML_MICRO_VERSION_SUFFIX=
|
||||||
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_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`
|
LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
|
||||||
|
|
||||||
|
@ -466,6 +466,7 @@ foreach file : xml_opt_src
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
v_min_compat = 0
|
||||||
xml_lib = library(
|
xml_lib = library(
|
||||||
'xml2',
|
'xml2',
|
||||||
files(xml_src),
|
files(xml_src),
|
||||||
@ -474,7 +475,7 @@ xml_lib = library(
|
|||||||
include_directories: config_dir,
|
include_directories: config_dir,
|
||||||
install: true,
|
install: true,
|
||||||
version: meson.project_version(),
|
version: meson.project_version(),
|
||||||
soversion: v_maj,
|
soversion: v_maj + v_min_compat,
|
||||||
)
|
)
|
||||||
|
|
||||||
dep_inc = include_directories('include')
|
dep_inc = include_directories('include')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user