-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
77 lines (61 loc) · 1.85 KB
/
meson.build
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
project('wofi', 'c', version : 'hg', default_options : ['c_std=c99', 'buildtype=release', 'warning_level=2'])
cc = meson.get_compiler('c')
pkgcfg = import('pkgconfig')
inc = include_directories('inc')
gtk = dependency('gtk+-3.0')
wayland = dependency('wayland-client')
threads = dependency('threads')
dl = cc.find_library('dl')
hg = find_program('hg', native : true, required : false)
version = meson.project_version()
if hg.found()
version = run_command(hg, 'identify', check : true).stdout().strip()
endif
add_project_arguments('-D_GNU_SOURCE', '-DVERSION="' + version + '"', language : 'c')
add_project_link_arguments('-rdynamic', language : 'c')
sources = ['src/config.c',
'src/main.c',
'src/map.c',
'src/match.c',
'src/property_box.c',
'src/utils_g.c',
'src/utils.c',
'src/widget_builder.c',
'src/wofi.c',
'proto/wlr-layer-shell-unstable-v1-protocol.c',
'proto/xdg-output-unstable-v1-protocol.c',
'proto/xdg-shell-protocol.c']
deps = [gtk, wayland, dl, threads]
if get_option('enable_run')
sources += 'modes/run.c'
endif
if get_option('enable_drun')
sources += 'modes/drun.c'
deps += dependency('gio-unix-2.0')
endif
if get_option('enable_dmenu')
sources += 'modes/dmenu.c'
endif
install_man('man/wofi.1',
'man/wofi.3',
'man/wofi.5',
'man/wofi.7',
'man/wofi-api.3',
'man/wofi-config.3',
'man/wofi-keys.7',
'man/wofi-map.3',
'man/wofi-utils.3',
'man/wofi-widget-builder.3')
subdir = 'wofi-1'
install_headers('inc/config.h',
'inc/map.h',
'inc/utils_g.h',
'inc/utils.h',
'inc/widget_builder_api.h',
'inc/wofi_api.h',
subdir : subdir)
pkgcfg.generate(name : meson.project_name(),
description : 'Wofi API for developing modes',
requires : wayland,
subdirs : subdir)
executable(meson.project_name(), sources, include_directories : inc, dependencies : deps, install : true)