| 1 |
project('through configure') |
| 2 |
|
| 3 |
if not add_languages('nasm', required: false) |
| 4 |
error('MESON_SKIP_TEST: nasm not found') |
| 5 |
endif |
| 6 |
|
| 7 |
if not host_machine.cpu_family().startswith('x86') |
| 8 |
assert(not add_languages('nasm', required: false)) |
| 9 |
error('MESON_SKIP_TEST: nasm only supported for x86 and x86_64') |
| 10 |
endif |
| 11 |
|
| 12 |
if meson.backend().startswith('vs') |
| 13 |
error('MESON_SKIP_TEST: VS backend does not recognise NASM yet') |
| 14 |
endif |
| 15 |
|
| 16 |
section = host_machine.system() == 'macos' ? '.rodata' : '.rdata' |
| 17 |
|
| 18 |
sources = configure_file( |
| 19 |
input: 'dummy.asm.in', |
| 20 |
output: 'dummy.asm', |
| 21 |
configuration: { |
| 22 |
'section': section |
| 23 |
} |
| 24 |
) |
| 25 |
|
| 26 |
dummy = library( |
| 27 |
'dummy', |
| 28 |
sources, |
| 29 |
vs_module_defs: 'dummy.def', |
| 30 |
) |