1
1
project (
2
- ' dunst' ,
3
- ' c' ,
4
- version : ' 1.9.2' ,
5
- license : ' MIT' ,
6
- meson_version : ' >=0.60.0' ,
7
- default_options : [
8
- ' c_std=gnu11' ,
9
- ' warning_level=1' ,
10
- ' b_ndebug=if-release' ,
11
- ],
2
+ ' dunst' ,
3
+ ' c' ,
4
+ version : ' 1.9.2' ,
5
+ license : ' MIT' ,
6
+ meson_version : ' >=0.60.0' ,
7
+ default_options : [
8
+ ' c_std=gnu11' ,
9
+ ' warning_level=1' ,
10
+ ' b_ndebug=if-release' ,
11
+ ],
12
12
)
13
13
14
14
if get_option (' debug' )
15
- add_project_arguments (' -DDEBUG_BUILD' , language : ' c' )
15
+ add_project_arguments (' -DDEBUG_BUILD' , language : ' c' )
16
16
endif
17
17
18
18
cc = meson .get_compiler(' c' )
@@ -35,35 +35,45 @@ wayland_client = dependency('wayland-client', required: get_option('wayland'))
35
35
wayland_protos = dependency (' wayland-protocols' , version : ' >=1.12' , required : get_option (' wayland' ))
36
36
wayland_cursor = dependency (' wayland-cursor' , required : get_option (' wayland' ))
37
37
38
- dunst_depends = [ cairo, glib, gio, gdk_pixbuf, pangocairo, systemd, libnotify, realtime, math ]
38
+ dunst_depends = [
39
+ cairo,
40
+ glib,
41
+ gio,
42
+ gdk_pixbuf,
43
+ pangocairo,
44
+ systemd,
45
+ libnotify,
46
+ realtime,
47
+ math,
48
+ ]
39
49
40
50
x11_support = x11.found() and xinerama.found() and xext.found() and xrandr.found() and xscrnsaver.found()
41
51
wayland_support = wayland_client.found() and wayland_cursor.found() and wayland_protos.found()
42
52
43
53
if not x11_support and not wayland_support
44
- error (' either wayland or x11 support is required' )
54
+ error (' either wayland or x11 support is required' )
45
55
endif
46
56
47
57
if wayland_support and not x11_support
48
- add_project_arguments (' -DWAYLAND_ONLY' , language : ' c' )
58
+ add_project_arguments (' -DWAYLAND_ONLY' , language : ' c' )
49
59
endif
50
60
51
61
if x11_support
52
- dunst_depends += [ x11, xinerama, xext, xrandr, xscrnsaver ]
53
- add_project_arguments (' -DENABLE_X11' , language : ' c' )
62
+ dunst_depends += [x11, xinerama, xext, xrandr, xscrnsaver]
63
+ add_project_arguments (' -DENABLE_X11' , language : ' c' )
54
64
endif
55
65
56
66
if wayland_support
57
- dunst_depends += [ wayland_client, wayland_cursor ]
58
- add_project_arguments (' -DENABLE_WAYLAND' , language : ' c' )
67
+ dunst_depends += [wayland_client, wayland_cursor]
68
+ add_project_arguments (' -DENABLE_WAYLAND' , language : ' c' )
59
69
endif
60
70
61
71
c_version_arg = ' -DVERSION="@0@"' .format(meson .project_version())
62
72
sysconfdir = get_option (' sysconfdir' ) / ' xdg'
63
73
64
74
add_project_arguments (
65
- ' -DSYSCONFDIR="@0@"' .format(get_option (' prefix' ) / sysconfdir),
66
- language : ' c'
75
+ ' -DSYSCONFDIR="@0@"' .format(get_option (' prefix' ) / sysconfdir),
76
+ language : ' c' ,
67
77
)
68
78
69
79
subdir (' src' )
@@ -76,42 +86,45 @@ conf_data.set('bindir', get_option('bindir'))
76
86
conf_data.set(' sysconfdir' , sysconfdir)
77
87
78
88
configure_file (
79
- input : ' org.knopwob.dunst.service.in' ,
80
- output : ' dunst.service' ,
81
- configuration : conf_data,
82
- install_dir : get_option (' datadir' ) / ' dbus-1/services' ,
89
+ input : ' org.knopwob.dunst.service.in' ,
90
+ output : ' dunst.service' ,
91
+ configuration : conf_data,
92
+ install_dir : get_option (' datadir' ) / ' dbus-1/services' ,
83
93
)
84
94
85
95
if systemd.found()
86
- user_units_dir = systemd.get_variable (pkgconfig : ' systemduserunitdir' )
87
- configure_file (
88
- configuration : conf_data,
89
- input : ' dunst.systemd.service.in' ,
90
- output : ' @BASENAME@' ,
91
- install_dir : user_units_dir,
92
- )
96
+ user_units_dir = systemd.get_variable (pkgconfig : ' systemduserunitdir' )
97
+ configure_file (
98
+ configuration : conf_data,
99
+ input : ' dunst.systemd.service.in' ,
100
+ output : ' @BASENAME@' ,
101
+ install_dir : user_units_dir,
102
+ )
93
103
endif
94
104
95
105
if libnotify.found()
96
- executable (
97
- ' dunstify' ,
98
- ' dunstify.c' ,
99
- dependencies : [ glib, libnotify, gdk_pixbuf ],
100
- install : true ,
101
- )
106
+ executable (
107
+ ' dunstify' ,
108
+ ' dunstify.c' ,
109
+ dependencies : [glib, libnotify, gdk_pixbuf],
110
+ install : true ,
111
+ )
102
112
endif
103
113
104
114
subdir (' test' )
105
115
106
116
pod2man = find_program (' pod2man' , native : true , required : get_option (' docs' ))
107
117
if pod2man.found()
108
- subdir (' docs' )
118
+ subdir (' docs' )
109
119
endif
110
120
111
- summary ({
112
- ' X11 support' : x11_support,
113
- ' Wayland support' : wayland_support,
114
- ' Man pages' : pod2man.found(),
115
- ' Dunstify' : libnotify.found(),
116
- ' Install systemd service units' : systemd.found(),
117
- }, bool_yn : true )
121
+ summary (
122
+ {
123
+ ' X11 support' : x11_support,
124
+ ' Wayland support' : wayland_support,
125
+ ' Man pages' : pod2man.found(),
126
+ ' Dunstify' : libnotify.found(),
127
+ ' Install systemd service units' : systemd.found(),
128
+ },
129
+ bool_yn : true ,
130
+ )
0 commit comments