aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
blob: af383fbfd78164837da3b3c2dc1895f1b55b5e6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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')

git_commit_hash = run_command(['git', 'describe', '--always', '--tags']).stdout().strip()
git_branch = run_command(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip()
version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch)

add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c')

sway_inc = include_directories('include')

subdir('common')
subdir('sway')