-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
61 lines (53 loc) · 1.43 KB
/
meson.build
File metadata and controls
61 lines (53 loc) · 1.43 KB
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
project(
'peel',
version: '0.1.0',
license: 'MIT',
)
pkg = import('pkgconfig')
py = import('python').find_installation()
subdir('include')
subdir('peel_gen')
subdir('tests')
subdir('cmake')
peel_dep = declare_dependency(include_directories: inc)
if get_option('build_examples')
subdir('examples')
endif
# The unary join_paths() is to force forward slashes even on Windows.
if meson.is_subproject()
conf = {
'module_path': join_paths(meson.current_source_dir()),
'api_tweaks_path': meson.current_source_dir() / 'api-tweaks.txt',
'peel_version': meson.project_version(),
}
else
conf = {
'module_path': join_paths(py.get_install_dir()),
'api_tweaks_path': get_option('prefix') / get_option('datadir') / 'peel' / 'api-tweaks.txt',
'peel_version': meson.project_version(),
}
endif
peel_gen = configure_file(
input: 'peel-gen.py',
output: 'peel-gen',
install: not meson.is_subproject(),
install_dir: get_option('bindir'),
configuration: conf,
)
if meson.is_subproject()
meson.override_dependency('peel', peel_dep)
meson.override_find_program('peel-gen', peel_gen)
else
py.install_sources(peel_gen_files, subdir: 'peel_gen')
install_data('api-tweaks.txt')
endif
pkg.generate(
name: 'peel',
description: 'C++ bindings for GObject-based libraries',
filebase: 'peel',
requires: 'gobject-2.0',
url: 'https://gitlab.gnome.org/bugaevc/peel',
variables: [
'peel_gen=${bindir}/peel-gen',
],
)