summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2024-05-05 10:59:11 +0200
committerMatthieu Herrb <matthieu@herrb.eu>2024-05-05 10:59:11 +0200
commited85f3d22352c8e469ed1e386af3926b4d63efcd (patch)
tree2162ff552f17fdd9f6c6eba479fa1f2498f99d19 /meson.build
parent1e866201f1ccf8fa3bb22c6f5fa723b26c86dbe1 (diff)
parent79b0987e63daff97ce9ee1dce883df13668a80c6 (diff)
Merge remote-tracking branch 'origin/master' into obsd
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build46
1 files changed, 46 insertions, 0 deletions
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')