mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 04:13:33 +02:00
build: Set default CFLAGS using meson's c_args
Meson supports checking for default arguments natively without having to do this for each one, so just use this feature. Not doing this will become a warning as per meson 0.52.0 [1]. [1] https://github.com/mesonbuild/meson/pull/5627
This commit is contained in:
46
meson.build
46
meson.build
@ -5,28 +5,7 @@ project('fprintd', 'c',
|
|||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
'warning_level=1',
|
'warning_level=1',
|
||||||
'c_std=gnu99',
|
'c_std=gnu99',
|
||||||
],
|
'c_args=' + ' '.join([
|
||||||
meson_version: '>= 0.50.0')
|
|
||||||
|
|
||||||
gnome = import('gnome')
|
|
||||||
i18n = import('i18n')
|
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
|
||||||
host_system = host_machine.system()
|
|
||||||
glib_min_version = '2.56'
|
|
||||||
libfprint_min_version = '1.90.0'
|
|
||||||
|
|
||||||
fprintd_installdir = get_option('prefix') / get_option('libexecdir')
|
|
||||||
fprintd_plugindir = get_option('prefix') / get_option('libdir') / meson.project_name() / 'modules'
|
|
||||||
storage_path = get_option('prefix') / get_option('localstatedir') / 'lib/fprint'
|
|
||||||
localedir = get_option('prefix') / get_option('localedir')
|
|
||||||
datadir = get_option('prefix') / get_option('datadir')
|
|
||||||
sysconfdir = get_option('sysconfdir')
|
|
||||||
if get_option('prefix') != '/usr'
|
|
||||||
sysconfdir = get_option('prefix') / sysconfdir
|
|
||||||
endif
|
|
||||||
|
|
||||||
common_cflags = cc.get_supported_arguments([
|
|
||||||
'-fno-strict-aliasing',
|
'-fno-strict-aliasing',
|
||||||
'-Wall',
|
'-Wall',
|
||||||
'-Wcast-align',
|
'-Wcast-align',
|
||||||
@ -64,8 +43,27 @@ common_cflags = cc.get_supported_arguments([
|
|||||||
'-Wtype-limits',
|
'-Wtype-limits',
|
||||||
'-Wundef',
|
'-Wundef',
|
||||||
'-Wunused',
|
'-Wunused',
|
||||||
])
|
]),
|
||||||
add_project_arguments(common_cflags, language: 'c')
|
],
|
||||||
|
meson_version: '>= 0.50.0')
|
||||||
|
|
||||||
|
gnome = import('gnome')
|
||||||
|
i18n = import('i18n')
|
||||||
|
|
||||||
|
cc = meson.get_compiler('c')
|
||||||
|
host_system = host_machine.system()
|
||||||
|
glib_min_version = '2.56'
|
||||||
|
libfprint_min_version = '1.90.0'
|
||||||
|
|
||||||
|
fprintd_installdir = get_option('prefix') / get_option('libexecdir')
|
||||||
|
fprintd_plugindir = get_option('prefix') / get_option('libdir') / meson.project_name() / 'modules'
|
||||||
|
storage_path = get_option('prefix') / get_option('localstatedir') / 'lib/fprint'
|
||||||
|
localedir = get_option('prefix') / get_option('localedir')
|
||||||
|
datadir = get_option('prefix') / get_option('datadir')
|
||||||
|
sysconfdir = get_option('sysconfdir')
|
||||||
|
if get_option('prefix') != '/usr'
|
||||||
|
sysconfdir = get_option('prefix') / sysconfdir
|
||||||
|
endif
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
|
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
|
||||||
|
|||||||
Reference in New Issue
Block a user