| 1 |
args = [] |
| 2 |
# https://github.com/mesonbuild/meson/issues/1969 |
| 3 |
if get_option('unity') == 'on' |
| 4 |
vala_args = ['-H', 'mylib.h'] |
| 5 |
endif |
| 6 |
|
| 7 |
l = shared_library('valalib', 'mylib.vala', |
| 8 |
vala_args : args, |
| 9 |
dependencies : valadeps) |
| 10 |
|
| 11 |
shared_library('installed_vala_lib', 'mylib.vala', |
| 12 |
dependencies : valadeps, |
| 13 |
install : true) |
| 14 |
|
| 15 |
shared_library('installed_vala_all', 'mylib.vala', |
| 16 |
dependencies : valadeps, |
| 17 |
install : true, |
| 18 |
install_dir : [true, true, true]) |
| 19 |
|
| 20 |
shared_library('installed_vala_custom', 'mylib.vala', |
| 21 |
dependencies : valadeps, |
| 22 |
install : true, |
| 23 |
install_dir : get_option('prefix') / 'custom', |
| 24 |
) |
| 25 |
|
| 26 |
shared_library('installed_vala_all_nolib', 'mylib.vala', |
| 27 |
dependencies : valadeps, |
| 28 |
install : true, |
| 29 |
install_dir : [false, |
| 30 |
join_paths(get_option('includedir'), 'valah'), |
| 31 |
join_paths(get_option('datadir'), 'vala-1.0', 'vapi')]) |
| 32 |
|
| 33 |
shared_library('installed_vala_onlyh', 'mylib.vala', |
| 34 |
dependencies : valadeps, |
| 35 |
install : true, |
| 36 |
install_vala_header : get_option('includedir'), |
| 37 |
install_vala_vapi : false, |
| 38 |
install_dir : [false]) |
| 39 |
|
| 40 |
shared_library('installed_vala_onlyvapi', 'mylib.vala', |
| 41 |
dependencies : valadeps, |
| 42 |
install : true, |
| 43 |
install_dir : [false, false, join_paths(get_option('datadir'), 'vala', 'vapi')]) |
| 44 |
|
| 45 |
# Regression test: Vala libraries were broken when also installing python modules. |
| 46 |
# https://gitlab.gnome.org/GNOME/gitg/-/issues/412 |
| 47 |
python = import('python').find_installation() |
| 48 |
python.install_sources('source.py') |