meson.build: make spa-json-dump available for subprojects

Add override that provides host binary for subprojects to use.

Also fix cross-compilation to use the host binary.
This commit is contained in:
Pauli Virtanen 2025-07-23 13:59:05 +03:00 committed by Wim Taymans
parent 0b0912cc5b
commit 5fa137cc0d
2 changed files with 15 additions and 2 deletions

View file

@ -18,6 +18,13 @@ spa_dep = declare_dependency(
},
)
spa_inc_dep = declare_dependency(
include_directories : [
include_directories('include'),
include_directories('include-private'),
],
)
meson.override_dependency('lib@0@'.format(spa_name), spa_dep)
pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),

View file

@ -6,6 +6,12 @@ executable('spa-monitor', 'spa-monitor.c',
dependencies : [ spa_dep, dl_lib ],
install : true)
spa_json_dump_exe = executable('spa-json-dump', 'spa-json-dump.c',
dependencies : [ spa_dep, dl_lib, ],
spa_json_dump = executable('spa-json-dump', 'spa-json-dump.c',
dependencies : [ spa_dep ],
install : true)
spa_json_dump_exe = executable('spa-json-dump-native', 'spa-json-dump.c',
dependencies : [ spa_inc_dep ],
native : true)
meson.override_find_program('spa-json-dump', spa_json_dump_exe)