aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-11-29 09:03:12 -0500
committerTony Crisci <tony@dubstepdish.com>2017-11-29 09:03:12 -0500
commitba6246ada199beafdc9c3585000bf9f59e4e91f8 (patch)
tree48c60502ebc0f1b251fac3209901bc9acc09e146
parent974d51058532b3076ec92b8c74e8d0630a9cdbd3 (diff)
working meson build
-rw-r--r--meson.build66
1 files changed, 66 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..06eed97f
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,66 @@
+project(
+ 'sway',
+ 'c',
+ license: 'MIT',
+ default_options: [
+ 'c_std=c11',
+ 'warning_level=2',
+ 'werror=true',
+ ],
+)
+
+cc = meson.get_compiler('c')
+
+jsonc = dependency('json-c', version: '>=0.12.1')
+pcre = dependency('libpcre')
+wlroots = dependency('wlroots')
+wayland_server = dependency('wayland-server')
+wayland_client = dependency('wayland-client')
+wayland_egl = dependency('wayland-egl')
+wayland_protos = dependency('wayland-protocols')
+xkbcommon = dependency('xkbcommon')
+pango = dependency('pango')
+pixman = dependency('pixman-1')
+libcap = dependency('libcap')
+
+math = cc.find_library('m')
+
+# TODO version
+add_project_arguments('-DSWAY_VERSION="5"', language: 'c')
+
+sway_inc = include_directories('include')
+
+sway_sources = [
+ 'sway/main.c',
+ 'sway/server.c',
+ 'sway/commands.c',
+ 'sway/commands/exit.c',
+ 'sway/ipc-json.c',
+ 'sway/ipc-server.c',
+ 'sway/desktop/output.c',
+ 'sway/desktop/xdg_shell_v6.c',
+ 'sway/tree/container.c',
+ 'sway/tree/layout.c',
+ 'sway/tree/workspace.c',
+ 'common/log.c',
+ 'common/list.c',
+ 'common/stringop.c',
+ 'common/readline.c',
+ 'common/ipc-client.c',
+]
+
+sway_deps = [
+ pixman,
+ wayland_server,
+ jsonc,
+ wlroots,
+ libcap,
+ math,
+]
+
+executable(
+ 'sway',
+ sway_sources,
+ include_directories: [sway_inc],
+ dependencies: sway_deps
+)