mirror of
https://gitlab.cvh-server.de/skrause/flashcards.git
synced 2025-12-12 06:41:38 +01:00
replace deprecated classes, update code, fix errors, add missing stuff
This commit is contained in:
102
meson.build
102
meson.build
@@ -1,19 +1,107 @@
|
||||
project('flashcards', 'c', version : '1.0')
|
||||
project('flashcards', 'c',
|
||||
version: '1.0.0',
|
||||
meson_version: '>= 1.0.0',
|
||||
default_options: [ 'warning_level=2', 'werror=false', 'c_std=gnu11', ],
|
||||
)
|
||||
|
||||
gtk_dep = dependency('gtk4')
|
||||
libadwaita_dep = dependency('libadwaita-1', version: '>=1.2')
|
||||
sqlite_dep = dependency('sqlite3')
|
||||
flashcards_deps = [
|
||||
dependency('gtk4'),
|
||||
dependency('libadwaita-1', version: '>= 1.6'),
|
||||
dependency('sqlite3'),
|
||||
]
|
||||
|
||||
gnome = import('gnome')
|
||||
i18n = import('i18n')
|
||||
|
||||
subdir('po')
|
||||
subdir('src')
|
||||
subdir('resources')
|
||||
subdir('po')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
config_h = configuration_data()
|
||||
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
config_h.set_quoted('GETTEXT_PACKAGE', 'flashcards')
|
||||
config_h.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
||||
configure_file(output: 'config.h', configuration: config_h)
|
||||
add_project_arguments(['-I' + meson.project_build_root()], language: 'c')
|
||||
|
||||
project_c_args = []
|
||||
test_c_args = [
|
||||
'-Wcast-align',
|
||||
'-Wdeclaration-after-statement',
|
||||
'-Werror=address',
|
||||
'-Werror=array-bounds',
|
||||
'-Werror=empty-body',
|
||||
'-Werror=implicit',
|
||||
'-Werror=implicit-function-declaration',
|
||||
'-Werror=incompatible-pointer-types',
|
||||
'-Werror=init-self',
|
||||
'-Werror=int-conversion',
|
||||
'-Werror=int-to-pointer-cast',
|
||||
'-Werror=main',
|
||||
'-Werror=misleading-indentation',
|
||||
'-Werror=missing-braces',
|
||||
'-Werror=missing-include-dirs',
|
||||
'-Werror=nonnull',
|
||||
'-Werror=overflow',
|
||||
'-Werror=parenthesis',
|
||||
'-Werror=pointer-arith',
|
||||
'-Werror=pointer-to-int-cast',
|
||||
'-Werror=redundant-decls',
|
||||
'-Werror=return-type',
|
||||
'-Werror=sequence-point',
|
||||
'-Werror=shadow',
|
||||
'-Werror=strict-prototypes',
|
||||
'-Werror=trigraphs',
|
||||
'-Werror=undef',
|
||||
'-Werror=write-strings',
|
||||
'-Wformat-nonliteral',
|
||||
'-Wignored-qualifiers',
|
||||
'-Wimplicit-function-declaration',
|
||||
'-Wlogical-op',
|
||||
'-Wmissing-declarations',
|
||||
'-Wmissing-format-attribute',
|
||||
'-Wmissing-include-dirs',
|
||||
'-Wmissing-noreturn',
|
||||
'-Wnested-externs',
|
||||
'-Wno-cast-function-type',
|
||||
'-Wno-dangling-pointer',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-sign-compare',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wold-style-definition',
|
||||
'-Wpointer-arith',
|
||||
'-Wredundant-decls',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wswitch-default',
|
||||
'-Wswitch-enum',
|
||||
'-Wundef',
|
||||
'-Wuninitialized',
|
||||
'-Wunused',
|
||||
'-fno-strict-aliasing',
|
||||
['-Werror=format-security', '-Werror=format=2'],
|
||||
]
|
||||
if get_option('buildtype') != 'plain'
|
||||
test_c_args += '-fstack-protector-strong'
|
||||
endif
|
||||
foreach arg: test_c_args
|
||||
if cc.has_multi_arguments(arg)
|
||||
project_c_args += arg
|
||||
endif
|
||||
endforeach
|
||||
# add_project_arguments(project_c_args, language: 'c')
|
||||
|
||||
executable('flashcards',
|
||||
sourcefiles,
|
||||
resources,
|
||||
schemas,
|
||||
dependencies: [gtk_dep, libadwaita_dep, sqlite_dep],
|
||||
#schemas,
|
||||
dependencies: flashcards_deps,
|
||||
install: true
|
||||
)
|
||||
|
||||
gnome.post_install(
|
||||
glib_compile_schemas: true,
|
||||
gtk_update_icon_cache: true,
|
||||
update_desktop_database: true,
|
||||
)
|
||||
Reference in New Issue
Block a user