Commit 9959be81 authored by Niels De Graef's avatar Niels De Graef

meson: Clean up unused variables

parent 54d9b7dc
if with_manpage
if get_option('manpage')
subdir('man')
endif
if with_gtkdoc
if get_option('gtk_doc')
subdir('reference/libsecret')
endif
......@@ -8,7 +8,7 @@ libegg_deps = [
glib_deps,
]
if with_gcrypt
if get_option('gcrypt')
libegg_sources += [
'egg-dh.c',
'egg-hkdf.c',
......
......@@ -36,7 +36,7 @@ libsecret_headers = [
'secret-value.h',
]
if with_gcrypt
if get_option('gcrypt')
libsecret_sources += [
'secret-file-backend.c',
'secret-file-collection.c',
......@@ -69,14 +69,14 @@ _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: libsecret_prefix / includedir / installed_headers_subdir,
install_dir: get_option('includedir') / installed_headers_subdir,
)
libsecret_dependencies = [
glib_deps,
]
if with_gcrypt
if get_option('gcrypt')
libsecret_dependencies += gcrypt_dep
endif
......@@ -104,7 +104,7 @@ libsecret_dep = declare_dependency(
)
# GObject Introspection
if with_gir
if get_option('introspection')
libsecret_gir_sources = [
'secret-attributes.c',
'secret-attributes.h',
......@@ -146,16 +146,16 @@ if with_gir
extra_args: [ '-D SECRET_COMPILATION'],
install: true,
)
endif
# Vapi
if with_vapi and with_gir
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
sources: libsecret_gir[0],
metadata_dirs: meson.source_root() / 'libsecret',
packages: [ 'gobject-2.0', 'gio-2.0' ],
install: true,
)
# Vapi
if get_option('vapi')
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
sources: libsecret_gir[0],
metadata_dirs: meson.source_root() / 'libsecret',
packages: [ 'gobject-2.0', 'gio-2.0' ],
install: true,
)
endif
endif
# pkg-config
......@@ -205,7 +205,7 @@ test_names = [
'test-collection',
]
if with_gcrypt
if get_option('gcrypt')
test_names += [
'test-file-collection',
]
......
......@@ -16,27 +16,10 @@ api_version_micro = api_version.split('.')[2]
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
config_h_dir = include_directories('.')
build_dir = include_directories('build')
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'
# Dependencies
......@@ -48,8 +31,10 @@ glib_deps = [
]
min_libgcrypt_version = '1.2.2'
gcrypt_dep = dependency('libgcrypt', version: '>=' + min_libgcrypt_version,
required: with_gcrypt)
gcrypt_dep = dependency('libgcrypt',
version: '>=' + min_libgcrypt_version,
required: get_option('gcrypt'),
)
# Libraries
math = meson.get_compiler('c').find_library('m')
......@@ -58,16 +43,16 @@ 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', 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_STRING', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set('WITH_GCRYPT', with_gcrypt)
if with_gcrypt
conf.set('WITH_GCRYPT', get_option('gcrypt'))
if get_option('gcrypt')
conf.set_quoted('LIBGCRYPT_VERSION', min_libgcrypt_version)
endif
conf.set('WITH_DEBUG', enable_debug)
conf.set('_DEBUG', enable_debug)
conf.set('WITH_DEBUG', get_option('debugging'))
conf.set('_DEBUG', get_option('debugging'))
conf.set('HAVE_MLOCK', meson.get_compiler('c').has_function('mlock'))
configure_file(output: 'config.h', configuration: conf)
......
......@@ -10,7 +10,7 @@ secret_tool = executable('secret-tool',
install: true,
)
if with_gcrypt and host_machine.system() != 'windows'
if get_option('gcrypt') and host_machine.system() != 'windows'
test('test-secret-tool.sh',
find_program('test-secret-tool.sh'),
env: test_env)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment