-
Notifications
You must be signed in to change notification settings - Fork 27
/
meson.build
45 lines (38 loc) · 1.3 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
project('valabind', 'c', 'vala',
version: run_command('./configure', '-qV').stdout().strip())
add_project_arguments([
'--vapidir', join_paths(meson.current_source_dir(), 'vapi')],
language: 'vala')
files = [
'config.vala',
'ctypeswriter.vala',
'cxxwriter.vala',
'dlangwriter.vala',
'vlangwriter.vala',
'girwriter.vala',
'gowriter.vala',
'nodeffiwriter.vala',
'swigwriter.vala',
'utils.vala',
'valabindwriter.vala',
'main.vala',
]
cc = meson.get_compiler('c')
valac = meson.get_compiler('vala')
libvala_version = run_command(valac.cmd_array()[0], '--api-version').stdout().strip()
libvala_dep = dependency('libvala-@0@'.format(libvala_version))
glib_dep = dependency('glib-2.0')
gobject_dep = dependency('gobject-2.0')
valaccodegen_dep = cc.find_library('valaccodegen', dirs : [libvala_dep.get_pkgconfig_variable('pkglibdir')])
executable(
'valabind',
files,
dependencies: [glib_dep, gobject_dep, libvala_dep, valaccodegen_dep],
vala_args: ['--pkg', 'posix', '--pkg', 'codegen',
'--vapidir', meson.current_source_dir() / 'private'],
include_directories: include_directories('private'),
install: true,
install_rpath: libvala_dep.get_pkgconfig_variable('pkglibdir')
)
install_data('valabind-cc', install_dir: get_option('bindir'))
install_man('valabind.1', 'valabind-cc.1')