aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-12 18:08:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-12 18:08:54 +0000
commit910c540ea912c70cba733d24264abf01cbae6019 (patch)
tree92d6d7698a1e68457308fedca1613ad179fa71ad /meson.build
initial commit: maps an XDG toplevel window
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build62
1 files changed, 62 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..b7f608b5
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,62 @@
+project('f00ter', 'c',
+ version: '0.9.0',
+ license: 'MIT',
+ default_options: [
+ 'c_std=c11',
+ 'warning_level=1',
+ 'werror=true',
+ 'b_ndebug=if-release'])
+
+is_debug_build = get_option('buildtype').startswith('debug')
+
+add_project_arguments(
+ ['-D_GNU_SOURCE',
+ #'-DF00SEL_VERSION=@0@'.format(version)] +
+ ] +
+ (is_debug_build ? ['-D_DEBUG'] : []),
+ language: 'c',
+)
+fontconfig = dependency('fontconfig')
+cairo = dependency('cairo')
+cairo_ft = dependency('cairo-ft')
+wayland_protocols = dependency('wayland-protocols')
+wayland_client = dependency('wayland-client')
+wayland_cursor = dependency('wayland-cursor')
+xkb = dependency('xkbcommon')
+
+wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
+
+wscanner = dependency('wayland-scanner', native: true)
+wscanner_prog = find_program(
+ wscanner.get_pkgconfig_variable('wayland_scanner'), native: true)
+
+wl_proto_headers = []
+wl_proto_src = []
+foreach prot : [
+ #'external/wlr-layer-shell-unstable-v1.xml',
+ wayland_protocols_datadir + '/stable/xdg-shell/xdg-shell.xml',
+ #wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml']
+ ]
+
+ wl_proto_headers += custom_target(
+ prot.underscorify() + '-client-header',
+ output: '@BASENAME@.h',
+ input: prot,
+ command: [wscanner_prog, 'client-header', '@INPUT@', '@OUTPUT@'])
+
+ wl_proto_src += custom_target(
+ prot.underscorify() + '-private-code',
+ output: '@BASENAME@.c',
+ input: prot,
+ command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
+endforeach
+
+executable(
+ 'f00ter',
+ 'log.c', 'log.h',
+ 'main.c',
+ 'shm.c', 'shm.h',
+ 'tllist.h',
+ wl_proto_src + wl_proto_headers,
+ dependencies: [cairo, cairo_ft, fontconfig, wayland_client, wayland_cursor, xkb],
+ install: true)