The open source OpenXR runtime

ipc: Always build the ipc-struct.txt file in the build root

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2635>

authored by Jakob Bornecrantz and committed by Marge Bot 8ed36f91 24adc0e7

Changed files
+18 -1
src
xrt
+17
src/xrt/ipc/CMakeLists.txt
··· 28 28 ) 29 29 endforeach() 30 30 31 + # Generate IPC structures list in the build root 32 + add_custom_command( 33 + OUTPUT "${CMAKE_BINARY_DIR}/ipc-structs.txt" 34 + COMMAND 35 + ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/shared/proto.py 36 + ${CMAKE_CURRENT_SOURCE_DIR}/shared/proto.json 37 + "${CMAKE_BINARY_DIR}/ipc-structs.txt" 38 + VERBATIM 39 + DEPENDS 40 + ${CMAKE_CURRENT_SOURCE_DIR}/shared/proto.py 41 + ${CMAKE_CURRENT_SOURCE_DIR}/shared/ipcproto/common.py 42 + ${CMAKE_CURRENT_SOURCE_DIR}/shared/proto.json 43 + COMMENT "Generating ipc-structs.txt from protocol JSON description" 44 + ) 45 + 46 + add_custom_target(ipc_structs_list ALL DEPENDS "${CMAKE_BINARY_DIR}/ipc-structs.txt") 47 + 31 48 set(IPC_COMMON_SOURCES 32 49 ${CMAKE_CURRENT_BINARY_DIR}/ipc_protocol_generated.h 33 50 shared/ipc_message_channel.h
+1 -1
src/xrt/ipc/shared/proto.py
··· 520 520 generate_server_c(output, p) 521 521 if output.endswith("ipc_server_generated.h"): 522 522 generate_server_header(output, p) 523 - if output.endswith("structs.txt"): 523 + if output.endswith("structs.txt") or output.endswith("ipc-structs.txt"): 524 524 generate_struct_names(output, p) 525 525 526 526