mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2025-01-03 02:28:53 +00:00
Merge branch 'wip/dueno/meson' into 'master'
meson: Minor cleanup See merge request GNOME/libsecret!35
This commit is contained in:
commit
e9f811ea41
@ -14,5 +14,5 @@ secret_tool_man = custom_target('secret-tool.1',
|
||||
],
|
||||
build_by_default: true,
|
||||
install: true,
|
||||
install_dir: join_paths(libsecret_prefix, get_option('mandir'), 'man1'),
|
||||
install_dir: libsecret_prefix / get_option('mandir') / 'man1',
|
||||
)
|
||||
|
@ -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',
|
||||
|
@ -1,4 +1,4 @@
|
||||
installed_headers_subdir = join_paths('libsecret-@0@'.format(api_version_major), 'libsecret')
|
||||
installed_headers_subdir = 'libsecret-@0@'.format(api_version_major) / 'libsecret'
|
||||
|
||||
libsecret_sources = [
|
||||
'secret-attributes.c',
|
||||
@ -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
|
||||
|
||||
@ -57,7 +58,7 @@ _enums_generated = gnome.mkenums('secret-enum-types',
|
||||
c_template: 'secret-enum-types.c.template',
|
||||
h_template: 'secret-enum-types.h.template',
|
||||
install_header: true,
|
||||
install_dir: join_paths(includedir, installed_headers_subdir),
|
||||
install_dir: libsecret_prefix / includedir / installed_headers_subdir,
|
||||
)
|
||||
|
||||
libsecret_dependencies = [
|
||||
@ -136,37 +137,38 @@ libsecret_gir = gnome.generate_gir(libsecret,
|
||||
if with_vapi
|
||||
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
|
||||
sources: libsecret_gir[0],
|
||||
metadata_dirs: join_paths(meson.source_root(), 'libsecret'),
|
||||
metadata_dirs: meson.source_root() / 'libsecret',
|
||||
packages: [ 'gobject-2.0', 'gio-2.0' ],
|
||||
install: true,
|
||||
)
|
||||
endif
|
||||
|
||||
# pkg-config
|
||||
pc_conf = configuration_data()
|
||||
pc_conf.set('prefix', libsecret_prefix)
|
||||
pc_conf.set('exec_prefix', '${prefix}')
|
||||
pc_conf.set('libdir', join_paths('${prefix}', get_option('libdir')))
|
||||
pc_conf.set('includedir', join_paths('${prefix}', get_option('includedir')))
|
||||
pc_conf.set('datarootdir', join_paths('${prefix}', get_option('datadir')))
|
||||
pc_conf.set('datadir', '${datarootdir}')
|
||||
pc_conf.set('sysconfdir', join_paths('${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',
|
||||
output: 'libsecret-@0@.pc'.format(api_version_major),
|
||||
configuration: pc_conf,
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'pkgconfig'),
|
||||
install_dir: libsecret_prefix / libdir / 'pkgconfig',
|
||||
)
|
||||
configure_file(
|
||||
input: 'libsecret-unstable.pc.in',
|
||||
output: 'libsecret-unstable.pc',
|
||||
output: '@BASENAME@',
|
||||
configuration: pc_conf,
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'pkgconfig'),
|
||||
install_dir: libsecret_prefix / libdir / 'pkgconfig',
|
||||
)
|
||||
|
||||
# Tests
|
||||
|
24
meson.build
24
meson.build
@ -1,7 +1,7 @@
|
||||
project('libsecret', 'c',
|
||||
version: '0.18.8',
|
||||
license: 'GPL2+',
|
||||
meson_version: '>= 0.48',
|
||||
meson_version: '>= 0.50',
|
||||
)
|
||||
|
||||
gnome = import('gnome')
|
||||
@ -25,16 +25,16 @@ with_gtkdoc = get_option('gtk_doc')
|
||||
# Some variables
|
||||
config_h_dir = include_directories('.')
|
||||
libsecret_prefix = get_option('prefix')
|
||||
datadir = join_paths(libsecret_prefix, get_option('datadir'))
|
||||
includedir = join_paths(libsecret_prefix, get_option('includedir'))
|
||||
bindir = join_paths(libsecret_prefix, get_option('bindir'))
|
||||
libdir = join_paths(libsecret_prefix, get_option('libdir'))
|
||||
libexecdir = join_paths(libsecret_prefix, get_option('libexecdir'))
|
||||
locale_dir = join_paths(libsecret_prefix, get_option('localedir'))
|
||||
pkgdatadir = join_paths(datadir, meson.project_name())
|
||||
pkglibdir = join_paths(libdir, meson.project_name())
|
||||
sysconfdir = join_paths(libsecret_prefix, get_option('sysconfdir'))
|
||||
po_dir = join_paths(meson.source_root(), 'po')
|
||||
datadir = get_option('datadir')
|
||||
includedir = get_option('includedir')
|
||||
bindir = get_option('bindir')
|
||||
libdir = get_option('libdir')
|
||||
libexecdir = get_option('libexecdir')
|
||||
locale_dir = get_option('localedir')
|
||||
pkgdatadir = datadir / meson.project_name()
|
||||
pkglibdir = libdir / meson.project_name()
|
||||
sysconfdir = get_option('sysconfdir')
|
||||
po_dir = meson.source_root() / 'po'
|
||||
|
||||
# Dependencies
|
||||
min_glib_version = '2.44'
|
||||
@ -68,7 +68,7 @@ math = meson.get_compiler('c').find_library('m')
|
||||
conf = configuration_data()
|
||||
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||
conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
|
||||
conf.set_quoted('LOCALEDIR', locale_dir)
|
||||
conf.set_quoted('LOCALEDIR', libsecret_prefix / locale_dir)
|
||||
conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||
conf.set_quoted('PACKAGE_STRING', meson.project_name())
|
||||
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
|
Loading…
Reference in New Issue
Block a user