From b1c2fbdb198f64f27a9712798b185f90fd9b8c1f Mon Sep 17 00:00:00 2001 From: Myaamori Date: Wed, 28 Oct 2020 04:15:02 +0000 Subject: [PATCH] meson: add nasm wrap for Windows --- meson.build | 8 ++++++++ subprojects/nasm.wrap | 6 ++++++ subprojects/packagefiles/nasm/meson.build | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 subprojects/nasm.wrap create mode 100644 subprojects/packagefiles/nasm/meson.build diff --git a/meson.build b/meson.build index 695cbfd81..ce0a24e35 100644 --- a/meson.build +++ b/meson.build @@ -6,6 +6,14 @@ project('Aegisub', ['c', 'cpp'], cmake = import('cmake') +if host_machine.system() == 'windows' + sys_nasm = find_program('nasm', required: false) + if not sys_nasm.found() + nasm = subproject('nasm').get_variable('nasm') + meson.override_find_program('nasm', nasm) + endif +endif + if host_machine.system() == 'windows' version_sh = find_program('tools/version.ps1') else diff --git a/subprojects/nasm.wrap b/subprojects/nasm.wrap new file mode 100644 index 000000000..6f1ad8dab --- /dev/null +++ b/subprojects/nasm.wrap @@ -0,0 +1,6 @@ +[wrap-file] +directory = nasm-2.15.05 +source_url = https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip +source_filename = nasm-2.15.05-win64.zip +source_hash = f5c93c146f52b4f1664fa3ce6579f961a910e869ab0dae431bd871bdd2584ef2 +patch_directory = nasm diff --git a/subprojects/packagefiles/nasm/meson.build b/subprojects/packagefiles/nasm/meson.build new file mode 100644 index 000000000..0f2b11986 --- /dev/null +++ b/subprojects/packagefiles/nasm/meson.build @@ -0,0 +1,3 @@ +project('nasm', version: '2.15.05') + +nasm = find_program('nasm.exe', dirs: meson.current_source_dir())