-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
83 lines (72 loc) · 1.57 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
78
79
80
81
82
83
project (
'billig-sweeper',
'c',
version: '1.3',
default_options: [
'warning_level=3',
'c_std=gnu11',
]
)
cc = meson.get_compiler('c')
prefix = get_option ('prefix')
datadir = get_option ('datadir')
icondir = datadir / 'icons' / 'hicolor' / '256x256' / 'apps'
# Create a 'config.h' file.
conf = configuration_data ()
conf.set_quoted ('MSW_VERSION', meson.project_version ())
conf.set_quoted ('MSW_GRAPHICS_PNG', datadir / meson.project_name () / 'graphics.png')
conf.set_quoted ('MSW_ICON', icondir / 'xyz.stuerz.BilligSweeper.png')
configure_file (
input: 'config.h.in',
output: 'config.h',
configuration: conf,
)
# Search for necessary dependencies.
depends = [
cc.find_library('m', required: false),
dependency ('sdl2'),
dependency ('SDL2_image'),
]
includes = [
'include',
'tomlc99',
]
sources = [
'src/main.c',
'src/menu.c',
'src/tile.c',
'src/util.c',
'src/video.c',
'src/input.c',
'src/config.c',
'src/dialog.c',
'tomlc99/toml.c',
]
# Define an executable.
executable (
'billig-sweeper',
sources,
include_directories: includes,
dependencies: depends,
install: true,
)
# Install the graphics sprite.
install_data (
'data/graphics.png',
install_dir: prefix / datadir / meson.project_name (),
)
# Install icon.
install_data (
'data/xyz.stuerz.BilligSweeper.png',
install_dir: icondir
)
# Install .desktop file.
install_data (
'data/xyz.stuerz.BilligSweeper.desktop',
install_dir: prefix / datadir / 'applications'
)
# Install metainfo file.
install_data (
'data/xyz.stuerz.BilligSweeper.metainfo.xml',
install_dir: prefix / datadir / 'metainfo'
)