Skip to content

Commit 7c9304f

Browse files
author
Matthias Geiger
committed
feat: Switch buildsystem to meson
Signed-off-by: Matthias Geiger <werdahias@debian.org>
1 parent cbbd450 commit 7c9304f

5 files changed

Lines changed: 37 additions & 61 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ For example, run this in your TTY instead of normally starting your compositor:
7575

7676
## Dependencies
7777

78-
- `CMake`
78+
- `meson`
7979
- `scdoc` (for man pages)
8080

8181
## Building
8282

83-
- Run `cmake -B build`
84-
- Run `cmake --build build`
83+
- Run `meson build`
84+
- Run `ninja -C build`
8585

8686
## Files
8787

man/CMakeLists.txt

Lines changed: 0 additions & 31 deletions
This file was deleted.

meson.build

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
project(
2+
'wl-restart',
3+
'c',
4+
version: '0.3',
5+
license: 'GPL-3',
6+
meson_version: '>=0.55.0',
7+
default_options: [
8+
'warning_level=2',
9+
],
10+
)
11+
scdoc = dependency('scdoc', required: get_option('man-pages'), version: '>= 1.9.7')
12+
13+
if scdoc.found()
14+
scdoc_prog = find_program(scdoc.get_variable(pkgconfig: 'scdoc'), native: true)
15+
mandir = get_option('mandir')
16+
17+
foreach src : ['wl-restart.1.scd']
18+
topic = src.split('.')[0]
19+
section = src.split('.')[1]
20+
output = '@0@.@1@'.format(topic, section)
21+
22+
custom_target(
23+
output,
24+
input: 'man/' + src,
25+
output: output,
26+
command: [
27+
'sh', '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.full_path(), output)
28+
],
29+
install: true,
30+
install_dir: '@0@/man@1@'.format(mandir, section)
31+
)
32+
endforeach
33+
endif

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')

0 commit comments

Comments
 (0)