This repository has been archived by the owner on Mar 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
71 lines (60 loc) · 1.94 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
project(
'pikiss-gui',
'vala', 'c',
version: '0.1.0',
meson_version: '>=0.57.0'
)
PROJECT_NAME = 'pikiss-gui'
prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
datadir = join_paths(prefix, get_option('datadir'))
VAPI_DIR = join_paths(meson.project_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)
conf.set_quoted('pikiss_script', get_option('pikissdir') + '/piKiss.sh')
conf.set_quoted('pikissdir', get_option('pikissdir'))
config_h = configure_file(
output: 'config.h',
configuration: conf
)
config_dep = declare_dependency(
dependencies: vala.find_library('config', dirs: VAPI_DIR),
sources: config_h
)
ValaArgs = [
'--pkg=config',
'--vapidir=' + VAPI_DIR,
'--target-glib=2.38',
]
config_inc_dir = include_directories('.')
executable(
meson.project_name(),
'src/Application.vala',
dependencies: [
dependency('gio-unix-2.0', version: '>=2.56.0'),
dependency('glib-2.0', version: '>=2.56.0'),
dependency('gtk+-3.0', version: '>=3.22'),
dependency('gdk-3.0', version: '>=3.22.0'),
dependency('cairo', version: '>=1.15.0'),
dependency('pango', version: '>=1.40.0'),
dependency('gee-0.8', version: '>=0.20.0'),
dependency('libgnome-menu-3.0', version: '>=3.13.0'),
# Similar to add options "-X -lm" in cmake to use Math.pow()
meson.get_compiler('c').find_library('m', required: false)
],
c_args: [
'-DGMENU_I_KNOW_THIS_IS_UNSTABLE',
],
vala_args: ValaArgs,
include_directories: config_inc_dir,
install: true
)
# Install app icon
install_data(
join_paths('data', 'pikiss-gui.png'),
install_dir: join_paths(datadir, 'icons')
)
run_target('postinst', command: ['post_install.sh'], env: {'MESON_INSTALL_PREFIX': prefix})