mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
meson: Use the appropriate interface and binary ages
We need to build them out of the project version, and then propagate them.
This commit is contained in:
parent
37ff4189fd
commit
065a8a488a
@ -86,7 +86,7 @@ endif
|
||||
|
||||
# FIXME: use new environment() object
|
||||
# Not entirely random of course, but at least it changes over time
|
||||
random_number = minor_version.to_int() + meson.version().split('.').get(1).to_int()
|
||||
random_number = minor_version + meson.version().split('.').get(1).to_int()
|
||||
|
||||
test_env = [
|
||||
'G_TEST_SRCDIR=' + meson.current_source_dir(),
|
||||
|
@ -20,7 +20,7 @@ gobject_tests = [
|
||||
# FIXME: use new environment() object
|
||||
# FIXME: put common bits of test environment() in one location
|
||||
# Not entirely random of course, but at least it changes over time
|
||||
random_number = minor_version.to_int() + meson.version().split('.').get(1).to_int()
|
||||
random_number = minor_version + meson.version().split('.').get(1).to_int()
|
||||
|
||||
test_env = [
|
||||
'G_TEST_SRCDIR=' + meson.current_source_dir(),
|
||||
|
15
meson.build
15
meson.build
@ -30,14 +30,17 @@ host_system = host_machine.system()
|
||||
glib_version = meson.project_version()
|
||||
glib_api_version = '2.0'
|
||||
version_arr = glib_version.split('.')
|
||||
major_version = version_arr[0]
|
||||
minor_version = version_arr[1]
|
||||
micro_version = version_arr[2]
|
||||
major_version = version_arr[0].to_int()
|
||||
minor_version = version_arr[1].to_int()
|
||||
micro_version = version_arr[2].to_int()
|
||||
|
||||
interface_age = minor_version.is_odd() ? 0 : micro_version
|
||||
binary_age = 100 * minor_version + micro_version
|
||||
|
||||
soversion = 0
|
||||
# Maintain compatibility with previous libtool versioning
|
||||
# current = minor * 100 + micro
|
||||
library_version = '@0@.@1@.@2@'.format(soversion, minor_version.to_int() * 100, micro_version.to_int())
|
||||
library_version = '@0@.@1@.@2@'.format(soversion, binary_age - interface_age, interface_age)
|
||||
|
||||
configinc = include_directories('.')
|
||||
glibinc = include_directories('glib')
|
||||
@ -68,8 +71,8 @@ glib_conf.set('GLIB_VERSION', glib_version)
|
||||
glib_conf.set('GLIB_MAJOR_VERSION', major_version)
|
||||
glib_conf.set('GLIB_MINOR_VERSION', minor_version)
|
||||
glib_conf.set('GLIB_MICRO_VERSION', micro_version)
|
||||
glib_conf.set('GLIB_INTERFACE_AGE', micro_version)
|
||||
glib_conf.set('GLIB_BINARY_AGE', 100 * minor_version.to_int() + micro_version.to_int())
|
||||
glib_conf.set('GLIB_INTERFACE_AGE', interface_age)
|
||||
glib_conf.set('GLIB_BINARY_AGE', binary_age)
|
||||
glib_conf.set_quoted('GETTEXT_PACKAGE', 'glib20')
|
||||
glib_conf.set_quoted('PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=glib')
|
||||
glib_conf.set_quoted('PACKAGE_NAME', 'glib')
|
||||
|
Loading…
Reference in New Issue
Block a user