win-nasm: Error out if accidentally called on non-Windows
[platform/upstream/gstreamer.git] / subprojects / win-nasm / meson.build
1 project('win-nasm', version : '2.14.02')
2
3 py3 = import('python3').find_python()
4
5 if host_machine.system() != 'windows'
6   error('Can only download nasm for Windows, sorry')
7 endif
8
9 message('Downloading and extracting nasm binaries for Windows...')
10
11 arch = host_machine.cpu_family()
12 if arch == 'x86_64'
13   zip_hash = '18918ac906e29417b936466e7a2517068206c8db8c04b9762a5befa18bfea5f0'
14 else
15   zip_hash = '250f9b5eeb2111e8c7b494a977490985b8604fe7518a6f5041cde37cc727a067'
16 endif
17
18 ret = run_command(py3, files('download-binary.py'), meson.project_version(), arch, zip_hash)
19 if ret.returncode() != 0
20   message(ret.stdout())
21   error(ret.stderr())
22 endif
23
24 meson.override_find_program('nasm', find_program(join_paths('nasm-@0@'.format(meson.project_version()), 'nasm')))