mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-10 15:58:06 +00:00
aux: generate b_generated_bindings.{c,h} instead of xrt_generated_bindings.{c,h}
Follow up to 543804e53cafa83c52b61f70894696bc4d95fa7c
This commit is contained in:
parent
844d2c9d58
commit
07218c9878
src/xrt
auxiliary
state_trackers
|
@ -16,11 +16,11 @@ function(bindings_gen output custom_target)
|
|||
add_custom_target(${custom_target} DEPENDS ${output})
|
||||
endfunction(bindings_gen)
|
||||
|
||||
bindings_gen(${CMAKE_CURRENT_BINARY_DIR}/xrt_generated_bindings.h generated_bindings_h)
|
||||
bindings_gen(${CMAKE_CURRENT_BINARY_DIR}/xrt_generated_bindings.c generated_bindings_c)
|
||||
bindings_gen(${CMAKE_CURRENT_BINARY_DIR}/b_generated_bindings.h generated_bindings_h)
|
||||
bindings_gen(${CMAKE_CURRENT_BINARY_DIR}/b_generated_bindings.c generated_bindings_c)
|
||||
|
||||
# Bindings library.
|
||||
add_library(aux_generated_bindings STATIC ${CMAKE_CURRENT_BINARY_DIR}/xrt_generated_bindings.c)
|
||||
add_library(aux_generated_bindings STATIC ${CMAKE_CURRENT_BINARY_DIR}/b_generated_bindings.c)
|
||||
add_dependencies(aux_generated_bindings generated_bindings_h)
|
||||
|
||||
# needed globally for steamvr input profile generation in steamvr target
|
||||
|
|
|
@ -177,7 +177,7 @@ def generate_bindings_c(file, p):
|
|||
f = open(file, "w")
|
||||
f.write(header.format(brief='Generated bindings data', group='oxr_main'))
|
||||
f.write('''
|
||||
#include "xrt_generated_bindings.h"
|
||||
#include "b_generated_bindings.h"
|
||||
#include <string.h>
|
||||
|
||||
// clang-format off
|
||||
|
@ -316,9 +316,9 @@ def main():
|
|||
p = Bindings.load_and_parse(args.bindings)
|
||||
|
||||
for output in args.output:
|
||||
if output.endswith("xrt_generated_bindings.c"):
|
||||
if output.endswith("generated_bindings.c"):
|
||||
generate_bindings_c(output, p)
|
||||
if output.endswith("xrt_generated_bindings.h"):
|
||||
if output.endswith("generated_bindings.h"):
|
||||
generate_bindings_h(output, p)
|
||||
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ generated_bindings = custom_target('bindings code',
|
|||
command: [prog_python, '@INPUT@', '@OUTPUT@'],
|
||||
input: ['bindings/bindings.py', 'bindings/bindings.json'],
|
||||
output: [
|
||||
'xrt_generated_bindings.h',
|
||||
'xrt_generated_bindings.c',
|
||||
'b_generated_bindings.h',
|
||||
'b_generated_bindings.c',
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "xrt_generated_bindings.h"
|
||||
#include "b_generated_bindings.h"
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "util/u_misc.h"
|
||||
|
||||
#include "xrt/xrt_compiler.h"
|
||||
#include "xrt_generated_bindings.h"
|
||||
#include "b_generated_bindings.h"
|
||||
|
||||
#include "oxr_objects.h"
|
||||
#include "oxr_logger.h"
|
||||
|
|
|
@ -29,7 +29,7 @@ extern "C" {
|
|||
#include "xrt/xrt_device.h"
|
||||
#include "xrt/xrt_instance.h"
|
||||
|
||||
#include "xrt_generated_bindings.h"
|
||||
#include "b_generated_bindings.h"
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
|
|
Loading…
Reference in a new issue