kopia lustrzana https://gitlab.com/Zwarf/picplanner
73 wiersze
1.7 KiB
Meson
73 wiersze
1.7 KiB
Meson
project('picplanner', 'c',
|
|
version: '0.4.1',
|
|
meson_version: '>= 0.50.0',
|
|
default_options: [ 'warning_level=2',
|
|
'c_std=gnu11',
|
|
],
|
|
)
|
|
|
|
i18n = import('i18n')
|
|
|
|
config_h = configuration_data()
|
|
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
|
|
config_h.set_quoted('GETTEXT_PACKAGE', 'picplanner')
|
|
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
|
|
configure_file(
|
|
output: 'picplanner-config.h',
|
|
configuration: config_h,
|
|
)
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
global_c_args = ['-I' + meson.build_root()]
|
|
test_c_args = [
|
|
'-Wcast-align',
|
|
'-Wdate-time',
|
|
'-Wdeclaration-after-statement',
|
|
['-Werror=format-security', '-Werror=format=2'],
|
|
'-Wendif-labels',
|
|
'-Werror=incompatible-pointer-types',
|
|
'-Werror=missing-declarations',
|
|
'-Werror=overflow',
|
|
'-Werror=return-type',
|
|
'-Werror=shift-count-overflow',
|
|
'-Werror=shift-overflow=2',
|
|
'-Wfloat-equal',
|
|
'-Wformat-nonliteral',
|
|
'-Wformat-security',
|
|
'-Winit-self',
|
|
'-Wmaybe-uninitialized',
|
|
'-Wmisleading-indentation',
|
|
'-Wmissing-include-dirs',
|
|
'-Wmissing-noreturn',
|
|
'-Wnested-externs',
|
|
'-Wold-style-definition',
|
|
'-Wshadow',
|
|
'-Wstrict-prototypes',
|
|
'-Wswitch-default',
|
|
'-Wno-switch-enum',
|
|
'-Wtype-limits',
|
|
'-Wunused-function',
|
|
'-Wunused-variable',
|
|
]
|
|
|
|
if get_option('buildtype') != 'plain'
|
|
test_c_args += '-fstack-protector-strong'
|
|
endif
|
|
|
|
foreach arg: test_c_args
|
|
if cc.has_multi_arguments(arg)
|
|
global_c_args += arg
|
|
endif
|
|
endforeach
|
|
add_project_arguments(
|
|
global_c_args,
|
|
language: 'c')
|
|
|
|
|
|
subdir('data')
|
|
subdir('src')
|
|
subdir('po')
|
|
|
|
meson.add_install_script('build-aux/meson/postinstall.py')
|