mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 04:38:55 +00:00
build: Simplify file substitution
Since meson 0.50, configuration_data() can take a dictionary.
This commit is contained in:
parent
a4ea97d6e6
commit
c06c9d2e26
@ -15,12 +15,10 @@ reference_ignore_headers = [
|
||||
'secret-private.h',
|
||||
]
|
||||
|
||||
version_conf = configuration_data()
|
||||
version_conf.set('VERSION', meson.project_version())
|
||||
configure_file(
|
||||
input: 'version.xml.in',
|
||||
output: 'version.xml',
|
||||
configuration: version_conf,
|
||||
output: '@BASENAME@',
|
||||
configuration: {'VERSION': meson.project_version()},
|
||||
)
|
||||
|
||||
gnome.gtkdoc('libsecret',
|
||||
|
@ -37,12 +37,13 @@ version_numbers = meson.project_version().split('.')
|
||||
version_major = version_numbers[0].to_int()
|
||||
version_minor = version_numbers[1].to_int()
|
||||
version_micro = version_numbers[2].to_int()
|
||||
version_h_conf = configuration_data()
|
||||
version_h_conf.set('SECRET_MAJOR_VERSION', version_major)
|
||||
version_h_conf.set('SECRET_MINOR_VERSION', version_minor)
|
||||
version_h_conf.set('SECRET_MICRO_VERSION', version_micro)
|
||||
version_h_conf = configuration_data({
|
||||
'SECRET_MAJOR_VERSION': version_major,
|
||||
'SECRET_MINOR_VERSION': version_minor,
|
||||
'SECRET_MICRO_VERSION': version_micro,
|
||||
})
|
||||
version_h = configure_file(input: 'secret-version.h.in',
|
||||
output: 'secret-version.h',
|
||||
output: '@BASENAME@',
|
||||
configuration: version_h_conf)
|
||||
libsecret_headers += version_h
|
||||
|
||||
@ -143,16 +144,17 @@ if with_vapi
|
||||
endif
|
||||
|
||||
# pkg-config
|
||||
pc_conf = configuration_data()
|
||||
pc_conf.set('prefix', libsecret_prefix)
|
||||
pc_conf.set('exec_prefix', '${prefix}')
|
||||
pc_conf.set('libdir', '${prefix}' / get_option('libdir'))
|
||||
pc_conf.set('includedir', '${prefix}' / get_option('includedir'))
|
||||
pc_conf.set('datarootdir', '${prefix}' / get_option('datadir'))
|
||||
pc_conf.set('datadir', '${datarootdir}')
|
||||
pc_conf.set('sysconfdir', '${prefix}' / get_option('sysconfdir'))
|
||||
pc_conf.set('SECRET_MAJOR', api_version_major)
|
||||
pc_conf.set('VERSION', meson.project_version())
|
||||
pc_conf = configuration_data({
|
||||
'prefix': libsecret_prefix,
|
||||
'exec_prefix': '${prefix}',
|
||||
'libdir': '${prefix}' / get_option('libdir'),
|
||||
'includedir': '${prefix}' / get_option('includedir'),
|
||||
'datarootdir': '${prefix}' / get_option('datadir'),
|
||||
'datadir': '${datarootdir}',
|
||||
'sysconfdir': '${prefix}' / get_option('sysconfdir'),
|
||||
'SECRET_MAJOR': api_version_major,
|
||||
'VERSION': meson.project_version(),
|
||||
})
|
||||
|
||||
configure_file(
|
||||
input: 'libsecret.pc.in',
|
||||
@ -163,7 +165,7 @@ configure_file(
|
||||
)
|
||||
configure_file(
|
||||
input: 'libsecret-unstable.pc.in',
|
||||
output: 'libsecret-unstable.pc',
|
||||
output: '@BASENAME@',
|
||||
configuration: pc_conf,
|
||||
install: true,
|
||||
install_dir: libsecret_prefix / libdir / 'pkgconfig',
|
||||
|
Loading…
Reference in New Issue
Block a user