Build: fix the build options (#22)
This fixes an issue on newer versions of meson where 'debug' is a
reserved word, which causes the build to fail. It also implements
the options in meson.build where they were supposed to pass flags
to the compiler but did not until now.
Stephen Collins authored 5 years ago
Clement Lefebvre committed 5 years ago
35 | 35 | '-DGMENU_I_KNOW_THIS_IS_UNSTABLE', |
36 | 36 | ] |
37 | 37 | |
38 | if get_option('enable_debug') | |
39 | c_args += '-DG_ENABLE_DEBUG' | |
40 | else | |
41 | c_args += '-DG_DISABLE_ASSERT' | |
42 | c_args += '-DG_DISABLE_CHECKS' | |
43 | c_args += '-DG_DISABLE_CAST_CHECKS' | |
44 | endif | |
45 | ||
46 | if not get_option('deprecated_warnings') | |
47 | c_args += '-Wno-deprecated-declarations' | |
48 | c_args += '-Wno-deprecated' | |
49 | c_args += '-Wno-declaration-after-statement' | |
50 | endif | |
51 | ||
38 | 52 | add_global_arguments(c_args, language: 'c') |
39 | 53 | |
40 | 54 | gio = dependency('gio-unix-2.0', version: '>= 2.29.15') |