diff options
author | Keith Packard <keithp@keithp.com> | 2018-03-01 15:32:21 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2018-03-01 15:32:21 -0800 |
commit | fae00e3d86afb3872e3c5e12e02d0b6ef939f5f5 (patch) | |
tree | 88b3a5db077f63bd17b5823040567e027c40ecab /meson.build | |
parent | a81c7027dcd3cd4225b267815fa7711128eda360 (diff) |
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..ca7e1b7 --- /dev/null +++ b/meson.build @@ -0,0 +1,64 @@ +project('xlease', 'c', + default_options: [ + 'buildtype=debugoptimized', + 'c_std=gnu99', + ], + version: '0.99.901', + meson_version: '>= 0.42.0', +) +cc = meson.get_compiler('c') +if cc.get_id() == 'gcc' or cc.get_id() == 'clang' + test_wflags = [ + '-Wall', + '-Wpointer-arith', + '-Wmissing-declarations', + '-Wformat=2', + '-Wstrict-prototypes', + '-Wmissing-prototypes', + '-Wnested-externs', + '-Wbad-function-cast', + '-Wold-style-definition', + '-Wunused', + '-Wuninitialized', + '-Wshadow', + '-Wmissing-noreturn', + '-Wmissing-format-attribute', + '-Wredundant-decls', + '-Werror=implicit', + '-Werror=nonnull', + '-Werror=init-self', + '-Werror=main', + '-Werror=missing-braces', + '-Werror=sequence-point', + '-Werror=return-type', + '-Werror=trigraphs', + '-Werror=array-bounds', + '-Werror=write-strings', + '-Werror=address', + '-Werror=int-to-pointer-cast', + '-Werror=pointer-to-int-cast', + ] +else + test_wflags = [] +endif + +common_wflags = [] +foreach wflag: test_wflags + if cc.has_argument(wflag) + common_wflags += [ wflag ] + endif +endforeach + +add_global_arguments(common_wflags, language : 'c') + +xcb_xrandr_dep = [ + dependency('xcb', version : '>= 1.12'), + dependency('xcb-randr', version : '>= 1.12') + ] + +e = executable( + 'xlease', + 'xlease.c', + dependencies: xcb_xrandr_dep, + install: true, +) |