meson: Add nasm to PATH if meson can find it

Fixes rav1e build on Windows when built inside the monorepo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1431>
This commit is contained in:
Nirbheek Chauhan 2024-01-26 23:03:16 +05:30 committed by GStreamer Marge Bot
parent 6b79ce605d
commit 5b0733d535
2 changed files with 9 additions and 2 deletions

View file

@ -89,6 +89,9 @@ if __name__ == "__main__":
pkg_config_path.append(str(opts.root_dir / 'meson-uninstalled'))
env['PKG_CONFIG_PATH'] = os.pathsep.join(pkg_config_path)
if 'NASM' in env:
env['PATH'] = os.pathsep.join([os.path.dirname(env['NASM']), env['PATH']])
rustc_target = None
if 'RUSTC' in env:
rustc_cmdline = shlex.split(env['RUSTC'])

View file

@ -340,8 +340,12 @@ if get_option('gtk4').allowed()
endif
endif
if get_option('rav1e').allowed() and find_program('nasm', required: false).found()
features += 'gst-plugin-rav1e/asm'
if get_option('rav1e').allowed()
nasm = find_program('nasm', required: false)
if nasm.found()
features += 'gst-plugin-rav1e/asm'
extra_env += {'NASM': nasm.full_path()}
endif
endif
if get_option('default_library') == 'static'