Modified from a test case provided by @benwaffle on https://github.com/mesonbuild/meson/issues/815pull/827/head
parent
207cdf2876
commit
f42d0f5063
6 changed files with 22 additions and 0 deletions
@ -0,0 +1 @@ |
||||
usr/bin/generatedtest |
@ -0,0 +1,7 @@ |
||||
project('mytest', 'vala', 'c') |
||||
|
||||
cd = configuration_data() |
||||
cd.set('x', 'y') |
||||
|
||||
subdir('src') |
||||
subdir('tools') |
@ -0,0 +1,3 @@ |
||||
namespace Config { |
||||
public static const string x = "@x@"; |
||||
} |
@ -0,0 +1,5 @@ |
||||
config = configure_file(input: 'config.vala.in', |
||||
output: 'config.vala', |
||||
configuration: cd) |
||||
|
||||
src = files('test.vala') |
@ -0,0 +1,3 @@ |
||||
void main() { |
||||
print (Config.x); |
||||
} |
@ -0,0 +1,3 @@ |
||||
executable('generatedtest', [src, config], |
||||
install : true, |
||||
dependencies: [dependency('glib-2.0'), dependency('gobject-2.0')]) |
Loading…
Reference in new issue