mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-06 07:06:10 +00:00
build/meson: Generate SteamVR input profiles
This commit is contained in:
parent
672c81e809
commit
334864de7f
|
@ -13,6 +13,8 @@ u_git_tag_c = vcs_tag(
|
||||||
# Binding generation
|
# Binding generation
|
||||||
#
|
#
|
||||||
|
|
||||||
|
aux_bindings_dir = join_paths(meson.current_source_dir(), 'bindings')
|
||||||
|
|
||||||
prog_python = import('python').find_installation('python3')
|
prog_python = import('python').find_installation('python3')
|
||||||
|
|
||||||
generated_bindings = custom_target('bindings code',
|
generated_bindings = custom_target('bindings code',
|
||||||
|
|
|
@ -30,12 +30,15 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
plugin_dir = join_paths(build_root, 'steamvr-monado')
|
plugin_dir = join_paths(build_root, 'steamvr-monado')
|
||||||
|
|
||||||
|
bindings_json_path = join_paths(aux_bindings_dir, 'bindings.json')
|
||||||
resources_dir = join_paths(plugin_dir, 'resources')
|
resources_dir = join_paths(plugin_dir, 'resources')
|
||||||
|
input_profile_dir = join_paths(resources_dir, 'input')
|
||||||
driver_manifest_path = join_paths(plugin_dir, 'driver.vrdrivermanifest')
|
driver_manifest_path = join_paths(plugin_dir, 'driver.vrdrivermanifest')
|
||||||
|
|
||||||
copy_asset = find_program('copy_assets.py')
|
copy_asset = find_program('copy_assets.py')
|
||||||
copy_plugin = find_program('copy_plugin.py')
|
copy_plugin = find_program('copy_plugin.py')
|
||||||
|
generate_profiles = find_program(join_paths(aux_bindings_dir, 'steamvr_profiles.py'))
|
||||||
|
|
||||||
fake_driver_manifest = custom_target(
|
fake_driver_manifest = custom_target(
|
||||||
'driver_manifest_copy',
|
'driver_manifest_copy',
|
||||||
|
@ -49,12 +52,20 @@ fake_driver_manifest = custom_target(
|
||||||
fake_driver_resources = custom_target(
|
fake_driver_resources = custom_target(
|
||||||
'driver_resources_copy',
|
'driver_resources_copy',
|
||||||
depends : driver_monado,
|
depends : driver_monado,
|
||||||
input : 'resources',
|
input : 'resources', # https://github.com/mesonbuild/meson/issues/4717
|
||||||
output : 'fake_driver_resources',
|
output : 'fake_driver_resources',
|
||||||
command : [copy_asset, 'DIRECTORY', '@INPUT@', resources_dir],
|
command : [copy_asset, 'DIRECTORY', '@INPUT@', resources_dir],
|
||||||
build_by_default : true
|
build_by_default : true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
custom_target(
|
||||||
|
'driver_input_profiles_generate',
|
||||||
|
depends : driver_monado,
|
||||||
|
input : bindings_json_path,
|
||||||
|
output : 'fake_input_profiles_generate',
|
||||||
|
command : [generate_profiles, '@INPUT@', input_profile_dir],
|
||||||
|
build_by_default : true
|
||||||
|
)
|
||||||
|
|
||||||
plugin_archdir = ''
|
plugin_archdir = ''
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue