-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
69 lines (59 loc) · 1.69 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
project(
'onboarding',
'vala', 'c',
version: '0.0.1',
meson_version: '>=0.45.0'
)
PROJECT_NAME = 'onboarding'
prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
datadir = join_paths(prefix, get_option('datadir'))
VAPI_DIR = join_paths(meson.source_root(), 'vapi')
vala = meson.get_compiler('vala')
conf = configuration_data()
conf.set_quoted('PROJECT_NAME', PROJECT_NAME)
conf.set_quoted('PACKAGE_LIBDIR', libdir)
conf.set_quoted('PACKAGE_SHAREDIR', datadir)
config_h = configure_file(
output: 'config.h',
configuration: conf
)
config_dep = declare_dependency(
dependencies: vala.find_library('config', dirs: VAPI_DIR),
sources: config_h
)
config_inc_dir = include_directories('.')
OnBoardingValaArgs = [
'--pkg=config',
'--vapidir=' + VAPI_DIR,
'--target-glib=2.38',
]
# Create a new executable, list the files we want to compile, list the dependencies we need, and install
executable(
meson.project_name(),
'src/Application.vala',
'src/Page/Welcome.vala',
'src/Page/RpiConfig.vala',
'src/Page/Update.vala',
'src/Page/ReadyToGo.vala',
dependencies: [
dependency('gtk+-3.0', version: '>=3.22'),
dependency('cairo', version: '>=1.15.0'),
meson.get_compiler('c').find_library('m', required: false)
],
c_args: [
'-DGMENU_I_KNOW_THIS_IS_UNSTABLE',
],
vala_args: OnBoardingValaArgs,
include_directories: config_inc_dir,
install: true
)
# Install CSS file
install_data(
join_paths('data', 'onboarding.css'),
install_dir: join_paths(datadir, PROJECT_NAME)
)
install_data(
join_paths('data', 'onboarding_dark.css'),
install_dir: join_paths(datadir, PROJECT_NAME)
)