2019-02-26 18:43:56 +01:00
|
|
|
|
project('malcontent', 'c',
|
2019-06-17 12:57:35 +02:00
|
|
|
|
version : '0.4.0',
|
2018-09-24 16:36:41 +02:00
|
|
|
|
meson_version : '>= 0.47.0',
|
|
|
|
|
license: 'LGPLv2.1+',
|
|
|
|
|
default_options : [
|
|
|
|
|
'buildtype=debugoptimized',
|
|
|
|
|
'warning_level=2',
|
|
|
|
|
'c_std=gnu11',
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
2018-10-02 16:57:04 +02:00
|
|
|
|
gnome = import('gnome')
|
2018-09-24 16:41:10 +02:00
|
|
|
|
i18n = import('i18n')
|
2018-09-24 16:36:41 +02:00
|
|
|
|
pkgconfig = import('pkgconfig')
|
|
|
|
|
|
2019-12-02 15:33:59 +01:00
|
|
|
|
meson_make_symlink = join_paths(meson.source_root(), 'tools', 'meson-make-symlink.py')
|
2018-09-24 16:41:10 +02:00
|
|
|
|
po_dir = join_paths(meson.source_root(), 'po')
|
2018-09-24 16:36:41 +02:00
|
|
|
|
|
|
|
|
|
prefix = get_option('prefix')
|
2018-10-02 18:03:33 +02:00
|
|
|
|
bindir = join_paths(prefix, get_option('bindir'))
|
2018-09-24 16:36:41 +02:00
|
|
|
|
datadir = join_paths(prefix, get_option('datadir'))
|
2018-10-06 01:47:45 +02:00
|
|
|
|
libexecdir = join_paths(prefix, get_option('libexecdir'))
|
2018-09-24 16:36:41 +02:00
|
|
|
|
|
|
|
|
|
# FIXME: This isn’t exposed in accountsservice.pc
|
2018-10-02 16:56:39 +02:00
|
|
|
|
# See https://gitlab.freedesktop.org/accountsservice/accountsservice/merge_requests/16
|
2018-09-24 16:36:41 +02:00
|
|
|
|
accountsserviceinterfacesdir = join_paths(datadir, 'accountsservice', 'interfaces')
|
|
|
|
|
|
|
|
|
|
dbus = dependency('dbus-1')
|
|
|
|
|
dbusinterfacesdir = dbus.get_pkgconfig_variable('interfaces_dir',
|
|
|
|
|
define_variable: ['datadir', datadir])
|
|
|
|
|
|
|
|
|
|
polkit_gobject = dependency('polkit-gobject-1')
|
|
|
|
|
polkitpolicydir = polkit_gobject.get_pkgconfig_variable('policydir',
|
|
|
|
|
define_variable: ['prefix', prefix])
|
|
|
|
|
|
2018-12-10 16:09:51 +01:00
|
|
|
|
libglib_testing = subproject('libglib-testing')
|
2018-12-20 18:44:45 +01:00
|
|
|
|
libglib_testing_dep = dependency(
|
|
|
|
|
'libglib-testing',
|
|
|
|
|
fallback: ['libglib-testing', 'libglib_testing_dep'],
|
|
|
|
|
)
|
2018-12-10 16:09:51 +01:00
|
|
|
|
|
2018-09-28 10:11:11 +02:00
|
|
|
|
config_h = configuration_data()
|
|
|
|
|
config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
|
|
|
|
configure_file(
|
|
|
|
|
output: 'config.h',
|
|
|
|
|
configuration: config_h,
|
|
|
|
|
)
|
|
|
|
|
root_inc = include_directories('.')
|
|
|
|
|
|
|
|
|
|
# Enable warning flags
|
|
|
|
|
test_c_args = [
|
|
|
|
|
'-fno-strict-aliasing',
|
|
|
|
|
'-fstack-protector-strong',
|
|
|
|
|
'-Waggregate-return',
|
|
|
|
|
'-Wall',
|
|
|
|
|
'-Wunused',
|
|
|
|
|
'-Warray-bounds',
|
|
|
|
|
'-Wcast-align',
|
|
|
|
|
'-Wclobbered',
|
|
|
|
|
'-Wno-declaration-after-statement',
|
2018-12-14 14:32:46 +01:00
|
|
|
|
'-Wdiscarded-qualifiers',
|
2018-09-28 10:11:11 +02:00
|
|
|
|
'-Wduplicated-branches',
|
|
|
|
|
'-Wduplicated-cond',
|
|
|
|
|
'-Wempty-body',
|
|
|
|
|
'-Wformat=2',
|
|
|
|
|
'-Wformat-nonliteral',
|
|
|
|
|
'-Wformat-security',
|
|
|
|
|
'-Wformat-signedness',
|
|
|
|
|
'-Wignored-qualifiers',
|
|
|
|
|
'-Wimplicit-function-declaration',
|
|
|
|
|
'-Wincompatible-pointer-types',
|
|
|
|
|
'-Wincompatible-pointer-types-discards-qualifiers',
|
|
|
|
|
'-Winit-self',
|
|
|
|
|
'-Wint-conversion',
|
|
|
|
|
'-Wlogical-op',
|
|
|
|
|
'-Wmisleading-indentation',
|
|
|
|
|
'-Wmissing-declarations',
|
|
|
|
|
'-Wmissing-format-attribute',
|
|
|
|
|
'-Wmissing-include-dirs',
|
|
|
|
|
'-Wmissing-noreturn',
|
|
|
|
|
'-Wmissing-parameter-type',
|
|
|
|
|
'-Wmissing-prototypes',
|
|
|
|
|
'-Wnested-externs',
|
|
|
|
|
'-Wno-error=cpp',
|
2019-05-15 15:31:44 +02:00
|
|
|
|
'-Wmissing-field-initializers',
|
2018-09-28 10:11:11 +02:00
|
|
|
|
'-Wno-suggest-attribute=format',
|
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
|
'-Wnull-dereference',
|
|
|
|
|
'-Wold-style-definition',
|
|
|
|
|
'-Woverflow',
|
|
|
|
|
'-Woverride-init',
|
|
|
|
|
'-Wparentheses',
|
|
|
|
|
'-Wpointer-arith',
|
|
|
|
|
'-Wredundant-decls',
|
|
|
|
|
'-Wreturn-type',
|
|
|
|
|
'-Wshadow',
|
|
|
|
|
'-Wsign-compare',
|
|
|
|
|
'-Wstrict-aliasing=2',
|
|
|
|
|
'-Wstrict-prototypes',
|
|
|
|
|
'-Wswitch-default',
|
|
|
|
|
'-Wswitch-enum',
|
|
|
|
|
'-Wtype-limits',
|
|
|
|
|
'-Wundef',
|
|
|
|
|
'-Wuninitialized',
|
|
|
|
|
'-Wunused-but-set-variable',
|
|
|
|
|
'-Wunused-result',
|
|
|
|
|
'-Wunused-variable',
|
|
|
|
|
'-Wwrite-strings'
|
|
|
|
|
]
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
|
|
|
|
|
|
2018-10-06 01:47:45 +02:00
|
|
|
|
enable_installed_tests = get_option('installed_tests')
|
|
|
|
|
test_template = files('template.test.in')
|
|
|
|
|
test_env = [
|
|
|
|
|
'G_DEBUG=gc-friendly,fatal-warnings',
|
|
|
|
|
'MALLOC_CHECK_=2',
|
|
|
|
|
'LC_ALL=C.UTF-8',
|
|
|
|
|
]
|
|
|
|
|
|
2018-09-28 10:11:11 +02:00
|
|
|
|
subdir('accounts-service')
|
2019-02-26 18:43:56 +01:00
|
|
|
|
subdir('malcontent-client')
|
|
|
|
|
subdir('libmalcontent')
|