From 1ffcb516954add31a225d38675adad1df8fa5d21 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Sun, 3 Mar 2024 12:55:11 +0100 Subject: Add meson as alternative build system Add a note to the readme file to clarify that the default build system is still automake. Signed-off-by: Tim Wiederhake --- meson.build | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 meson.build (limited to 'meson.build') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..b560add --- /dev/null +++ b/meson.build @@ -0,0 +1,46 @@ +project( + 'twm', + 'c', + default_options: [ + 'warning_level=3', + 'werror=true', + ], + version: '1.0.12', +) + +add_project_arguments( + '-DAPP_VERSION="@0@"'.format(meson.project_version()), + language: 'c', +) + +add_project_arguments( + '-DDATA_DIR="@0@"'.format(get_option('datadir')), + language: 'c', +) + +if meson.get_compiler('c').has_function('mkstemp') + add_project_arguments( + '-DHAVE_MKSTEMP=1', + language: 'c', + ) +endif + +twm_dependencies = [ + dependency('x11'), + dependency('xext'), + dependency('xt'), + dependency('xmu'), + dependency('ice'), + dependency('sm'), + dependency('xproto', version:'>=7.0.17'), +] + +xrandr = dependency('xrandr', required: false) +if xrandr.found() + twm_dependencies += xrandr + + add_project_arguments('-DHAVE_XRANDR', language: 'c') +endif + +subdir('src') +subdir('man') -- cgit v1.2.3