Commit 85d3e8bd authored by Christoph Haag's avatar Christoph Haag
Browse files

build/cmake: generate steamvr input profiles

parent 334864de
......@@ -23,6 +23,8 @@ bindings_gen(${CMAKE_CURRENT_BINARY_DIR}/xrt_generated_bindings.c generated_bind
add_library(aux_generated_bindings STATIC ${CMAKE_CURRENT_BINARY_DIR}/xrt_generated_bindings.c)
add_dependencies(aux_generated_bindings generated_bindings_h)
# needed globally for steamvr input profile generation in steamvr target
set_property(GLOBAL PROPERTY AUX_BINDINGS_DIR_PROP "${CMAKE_CURRENT_SOURCE_DIR}/bindings")
target_include_directories(aux_generated_bindings PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" ".")
target_link_libraries(aux_generated_bindings INTERFACE xrt-interfaces aux_util)
......
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
get_property(AUX_BINDINGS_DIR GLOBAL PROPERTY AUX_BINDINGS_DIR_PROP)
set(INPUT_PROFILES_INPUT_DIR ${AUX_BINDINGS_DIR})
set(INPUT_PROFILES_OUTPUT_DIR "${PROJECT_BINARY_DIR}/steamvr-monado/resources/input/")
function(input_profiles_gen output custom_target)
add_custom_command(OUTPUT ${output}
COMMAND ${PYTHON_EXECUTABLE} ${INPUT_PROFILES_INPUT_DIR}/steamvr_profiles.py
${INPUT_PROFILES_INPUT_DIR}/bindings.json
${output}
DEPENDS ${INPUT_PROFILES_INPUT_DIR}/bindings.py
${INPUT_PROFILES_INPUT_DIR}/bindings.json
)
add_custom_target(${custom_target} DEPENDS ${output})
endfunction(input_profiles_gen)
input_profiles_gen(${INPUT_PROFILES_OUTPUT_DIR} generated_input_profiles)
add_library(driver_monado MODULE main.c)
add_dependencies(driver_monado generated_input_profiles)
target_link_libraries(
driver_monado PRIVATE xrt-external-openvr aux_util st_ovrd st_prober target_lists target_instance_no_comp
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment