mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 04:38:55 +00:00
meson: Clean up unused variables
This commit is contained in:
parent
54d9b7dc5b
commit
9959be81fd
@ -1,6 +1,6 @@
|
|||||||
if with_manpage
|
if get_option('manpage')
|
||||||
subdir('man')
|
subdir('man')
|
||||||
endif
|
endif
|
||||||
if with_gtkdoc
|
if get_option('gtk_doc')
|
||||||
subdir('reference/libsecret')
|
subdir('reference/libsecret')
|
||||||
endif
|
endif
|
||||||
|
@ -8,7 +8,7 @@ libegg_deps = [
|
|||||||
glib_deps,
|
glib_deps,
|
||||||
]
|
]
|
||||||
|
|
||||||
if with_gcrypt
|
if get_option('gcrypt')
|
||||||
libegg_sources += [
|
libegg_sources += [
|
||||||
'egg-dh.c',
|
'egg-dh.c',
|
||||||
'egg-hkdf.c',
|
'egg-hkdf.c',
|
||||||
|
@ -36,7 +36,7 @@ libsecret_headers = [
|
|||||||
'secret-value.h',
|
'secret-value.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
if with_gcrypt
|
if get_option('gcrypt')
|
||||||
libsecret_sources += [
|
libsecret_sources += [
|
||||||
'secret-file-backend.c',
|
'secret-file-backend.c',
|
||||||
'secret-file-collection.c',
|
'secret-file-collection.c',
|
||||||
@ -69,14 +69,14 @@ _enums_generated = gnome.mkenums('secret-enum-types',
|
|||||||
c_template: 'secret-enum-types.c.template',
|
c_template: 'secret-enum-types.c.template',
|
||||||
h_template: 'secret-enum-types.h.template',
|
h_template: 'secret-enum-types.h.template',
|
||||||
install_header: true,
|
install_header: true,
|
||||||
install_dir: libsecret_prefix / includedir / installed_headers_subdir,
|
install_dir: get_option('includedir') / installed_headers_subdir,
|
||||||
)
|
)
|
||||||
|
|
||||||
libsecret_dependencies = [
|
libsecret_dependencies = [
|
||||||
glib_deps,
|
glib_deps,
|
||||||
]
|
]
|
||||||
|
|
||||||
if with_gcrypt
|
if get_option('gcrypt')
|
||||||
libsecret_dependencies += gcrypt_dep
|
libsecret_dependencies += gcrypt_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ libsecret_dep = declare_dependency(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# GObject Introspection
|
# GObject Introspection
|
||||||
if with_gir
|
if get_option('introspection')
|
||||||
libsecret_gir_sources = [
|
libsecret_gir_sources = [
|
||||||
'secret-attributes.c',
|
'secret-attributes.c',
|
||||||
'secret-attributes.h',
|
'secret-attributes.h',
|
||||||
@ -146,16 +146,16 @@ if with_gir
|
|||||||
extra_args: [ '-D SECRET_COMPILATION'],
|
extra_args: [ '-D SECRET_COMPILATION'],
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
endif
|
|
||||||
|
|
||||||
# Vapi
|
# Vapi
|
||||||
if with_vapi and with_gir
|
if get_option('vapi')
|
||||||
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
|
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
|
||||||
sources: libsecret_gir[0],
|
sources: libsecret_gir[0],
|
||||||
metadata_dirs: meson.source_root() / 'libsecret',
|
metadata_dirs: meson.source_root() / 'libsecret',
|
||||||
packages: [ 'gobject-2.0', 'gio-2.0' ],
|
packages: [ 'gobject-2.0', 'gio-2.0' ],
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# pkg-config
|
# pkg-config
|
||||||
@ -205,7 +205,7 @@ test_names = [
|
|||||||
'test-collection',
|
'test-collection',
|
||||||
]
|
]
|
||||||
|
|
||||||
if with_gcrypt
|
if get_option('gcrypt')
|
||||||
test_names += [
|
test_names += [
|
||||||
'test-file-collection',
|
'test-file-collection',
|
||||||
]
|
]
|
||||||
|
33
meson.build
33
meson.build
@ -16,27 +16,10 @@ api_version_micro = api_version.split('.')[2]
|
|||||||
|
|
||||||
libtool_version = '0.0.0'
|
libtool_version = '0.0.0'
|
||||||
|
|
||||||
# Options
|
|
||||||
with_manpage = get_option('manpage')
|
|
||||||
with_gcrypt = get_option('gcrypt')
|
|
||||||
enable_debug = get_option('debugging')
|
|
||||||
with_vapi = get_option('vapi')
|
|
||||||
with_gtkdoc = get_option('gtk_doc')
|
|
||||||
with_gir = get_option('introspection')
|
|
||||||
|
|
||||||
# Some variables
|
# Some variables
|
||||||
config_h_dir = include_directories('.')
|
config_h_dir = include_directories('.')
|
||||||
build_dir = include_directories('build')
|
build_dir = include_directories('build')
|
||||||
libsecret_prefix = get_option('prefix')
|
libsecret_prefix = get_option('prefix')
|
||||||
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'
|
po_dir = meson.source_root() / 'po'
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
@ -48,8 +31,10 @@ glib_deps = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
min_libgcrypt_version = '1.2.2'
|
min_libgcrypt_version = '1.2.2'
|
||||||
gcrypt_dep = dependency('libgcrypt', version: '>=' + min_libgcrypt_version,
|
gcrypt_dep = dependency('libgcrypt',
|
||||||
required: with_gcrypt)
|
version: '>=' + min_libgcrypt_version,
|
||||||
|
required: get_option('gcrypt'),
|
||||||
|
)
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
math = meson.get_compiler('c').find_library('m')
|
math = meson.get_compiler('c').find_library('m')
|
||||||
@ -58,16 +43,16 @@ math = meson.get_compiler('c').find_library('m')
|
|||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||||
conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
|
conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
|
||||||
conf.set_quoted('LOCALEDIR', libsecret_prefix / locale_dir)
|
conf.set_quoted('LOCALEDIR', libsecret_prefix / get_option('localedir'))
|
||||||
conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||||
conf.set_quoted('PACKAGE_STRING', meson.project_name())
|
conf.set_quoted('PACKAGE_STRING', meson.project_name())
|
||||||
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
conf.set('WITH_GCRYPT', with_gcrypt)
|
conf.set('WITH_GCRYPT', get_option('gcrypt'))
|
||||||
if with_gcrypt
|
if get_option('gcrypt')
|
||||||
conf.set_quoted('LIBGCRYPT_VERSION', min_libgcrypt_version)
|
conf.set_quoted('LIBGCRYPT_VERSION', min_libgcrypt_version)
|
||||||
endif
|
endif
|
||||||
conf.set('WITH_DEBUG', enable_debug)
|
conf.set('WITH_DEBUG', get_option('debugging'))
|
||||||
conf.set('_DEBUG', enable_debug)
|
conf.set('_DEBUG', get_option('debugging'))
|
||||||
conf.set('HAVE_MLOCK', meson.get_compiler('c').has_function('mlock'))
|
conf.set('HAVE_MLOCK', meson.get_compiler('c').has_function('mlock'))
|
||||||
configure_file(output: 'config.h', configuration: conf)
|
configure_file(output: 'config.h', configuration: conf)
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ secret_tool = executable('secret-tool',
|
|||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_gcrypt and host_machine.system() != 'windows'
|
if get_option('gcrypt') and host_machine.system() != 'windows'
|
||||||
test('test-secret-tool.sh',
|
test('test-secret-tool.sh',
|
||||||
find_program('test-secret-tool.sh'),
|
find_program('test-secret-tool.sh'),
|
||||||
env: test_env)
|
env: test_env)
|
||||||
|
Loading…
Reference in New Issue
Block a user