Add a vala test for generated sources in subdirs

Modified from a test case provided by @benwaffle on
https://github.com/mesonbuild/meson/issues/815
This commit is contained in:
Nirbheek Chauhan 2016-09-27 01:08:35 +05:30
parent 207cdf2876
commit f42d0f5063
6 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1 @@
usr/bin/generatedtest

View File

@ -0,0 +1,7 @@
project('mytest', 'vala', 'c')
cd = configuration_data()
cd.set('x', 'y')
subdir('src')
subdir('tools')

View File

@ -0,0 +1,3 @@
namespace Config {
public static const string x = "@x@";
}

View File

@ -0,0 +1,5 @@
config = configure_file(input: 'config.vala.in',
output: 'config.vala',
configuration: cd)
src = files('test.vala')

View File

@ -0,0 +1,3 @@
void main() {
print (Config.x);
}

View File

@ -0,0 +1,3 @@
executable('generatedtest', [src, config],
install : true,
dependencies: [dependency('glib-2.0'), dependency('gobject-2.0')])