| 1 |
project('generated rust main', 'rust') |
| 2 |
|
| 3 |
gen = find_program('gen.py') |
| 4 |
|
| 5 |
c = custom_target( |
| 6 |
'custom_target', |
| 7 |
command : [gen, '@OUTPUT@'], |
| 8 |
output : ['main.rs'], |
| 9 |
) |
| 10 |
|
| 11 |
executable('custom_target_main', c) |
| 12 |
executable('custom_target_index_main', c[0]) |
| 13 |
|
| 14 |
gener = generator(gen, arguments : ['@OUTPUT@'], output : '@[email protected]') |
| 15 |
# Doesn't actually use gen.py as input, just a limitation of generators |
| 16 |
executable('generator_main', gener.process(['gen.py'])) |
| 17 |
|
| 18 |
subdir('sub') |
| 19 |
executable('custom_target_subdir_main', s) |
| 20 |
|
| 21 |
executable('link_with_generated_lib', 'generated_lib_main.rs', link_with : lib) |