Browse Source

meson: add nasm support

pull/175/head
Steve Lhomme 2 years ago
parent
commit
65a7f01720
  1. 3
      config.h.meson
  2. 3
      doc/standalone/buildsystem.md
  3. 19
      meson.build
  4. 2
      modules/meson.build

3
config.h.meson

@ -473,6 +473,9 @@
/* Define to 1 if you have the `writev' function. */
#mesondefine HAVE_WRITEV
/* Use external asm on x86. */
#mesondefine HAVE_X86ASM
/* Define to 1 if you have the <xlocale.h> header file. */
#mesondefine HAVE_XLOCALE_H

3
doc/standalone/buildsystem.md

@ -120,6 +120,9 @@ Currently the modules dict accepts the following keys:
@param objc_args
Additional flags to pass to the Objective-C compiler.
@param nasm_args
Additional flags to pass to the NASM compiler.
@param link_args
Additional flags to pass to the dynamic linker. Do _not_ use this to specify
additional libraries to link with, use the `dependencies` instead.

19
meson.build

@ -102,6 +102,25 @@ if host_system == 'darwin'
add_languages('objc', native: false)
endif
if host_machine.cpu_family().startswith('x86')
if add_languages('nasm', native: false, required: false)
vlc_nasm_args = []
if host_machine.cpu_family() == 'x86'
vlc_nasm_args += ['-DARCH_X86_64=0']
if host_system in ['darwin', 'windows']
vlc_nasm_args += ['-DPREFIX']
endif
else
vlc_nasm_args += ['-DARCH_X86_64=1']
if host_system == 'darwin'
vlc_nasm_args += ['-DPREFIX']
endif
endif
add_project_arguments(vlc_nasm_args, language: ['nasm'])
cdata.set('HAVE_X86ASM', 1)
endif
endif
# Rust build system
cargo_bin = find_program('cargo', required: get_option('rust'))

2
modules/meson.build

@ -377,6 +377,7 @@ foreach module : vlc_modules
'c_args',
'cpp_args',
'objc_args',
'nasm_args',
'extra_files',
'enabled',
]
@ -413,6 +414,7 @@ foreach module : vlc_modules
c_args: [module.get('c_args', []), common_args],
cpp_args: [module.get('cpp_args', []), common_args],
objc_args: [module.get('objc_args', []), common_args],
nasm_args: [module.get('nasm_args', []), []],
extra_files: module.get('extra_files', []),
build_by_default: true,
install: true,

Loading…
Cancel
Save