The open source OpenXR runtime

cmake: Run cmake-format.sh

authored by

Moses Turner and committed by
Jakob Bornecrantz
d2e2c3a9 196bf242

+106 -141
+3 -1
src/external/CMakeLists.txt
··· 133 133 134 134 # tinyceres 135 135 add_library(xrt-external-tinyceres INTERFACE) 136 - target_include_directories(xrt-external-tinyceres SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/tinyceres/include) 136 + target_include_directories( 137 + xrt-external-tinyceres SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/tinyceres/include 138 + )
+4 -2
src/xrt/auxiliary/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 4 # Common includes 6 5 add_library(aux-includes INTERFACE) 7 6 target_include_directories( ··· 40 39 add_subdirectory(util) 41 40 42 41 # Vive helper library. 43 - if(XRT_BUILD_DRIVER_VIVE OR XRT_BUILD_DRIVER_SURVIVE OR XRT_BUILD_DRIVER_REMOTE) 42 + if(XRT_BUILD_DRIVER_VIVE 43 + OR XRT_BUILD_DRIVER_SURVIVE 44 + OR XRT_BUILD_DRIVER_REMOTE 45 + ) 44 46 add_subdirectory(vive) 45 47 endif() 46 48
+1 -4
src/xrt/auxiliary/android/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 4 add_library( 6 5 android_app_glue STATIC 7 6 ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c 8 7 ) 9 - target_include_directories( 10 - android_app_glue PUBLIC ${ANDROID_NDK}/sources/android/native_app_glue 11 - ) 8 + target_include_directories(android_app_glue PUBLIC ${ANDROID_NDK}/sources/android/native_app_glue) 12 9 # disable these warnings in external code 13 10 target_compile_options(android_app_glue PRIVATE -Wno-format-pedantic) 14 11
-1
src/xrt/auxiliary/gstreamer/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 4 add_library( 6 5 aux_gstreamer STATIC 7 6 gst_internal.h
-1
src/xrt/auxiliary/math/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 4 add_library( 6 5 aux_math STATIC 7 6 m_api.h
-1
src/xrt/auxiliary/os/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 4 add_library( 6 5 aux_os STATIC 7 6 os_ble.h
-1
src/xrt/auxiliary/tracking/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 4 add_library( 6 5 aux_tracking STATIC 7 6 t_data_utils.c
+1 -7
src/xrt/auxiliary/vive/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 - add_library(aux_vive STATIC 6 - vive_config.h 7 - vive_config.c 8 - vive_bindings.c 9 - vive_bindings.h 10 - ) 4 + add_library(aux_vive STATIC vive_config.h vive_config.c vive_bindings.c vive_bindings.h) 11 5 target_link_libraries( 12 6 aux_vive 13 7 PRIVATE
+13 -15
src/xrt/compositor/CMakeLists.txt
··· 118 118 119 119 if(XRT_HAVE_VULKAN) 120 120 set(SHADERS 121 - shaders/clear.comp 122 - shaders/distortion.comp 123 - shaders/mesh.frag 124 - shaders/mesh.vert 125 - shaders/layer.frag 126 - shaders/layer.vert 127 - shaders/equirect1.vert 128 - shaders/equirect1.frag 129 - shaders/equirect2.vert 130 - shaders/equirect2.frag 121 + shaders/clear.comp 122 + shaders/distortion.comp 123 + shaders/mesh.frag 124 + shaders/mesh.vert 125 + shaders/layer.frag 126 + shaders/layer.vert 127 + shaders/equirect1.vert 128 + shaders/equirect1.frag 129 + shaders/equirect2.vert 130 + shaders/equirect2.frag 131 131 ) 132 132 if(XRT_FEATURE_OPENXR_LAYER_CUBE) 133 - list(APPEND SHADERS 134 - shaders/cube.vert 135 - shaders/cube.frag 136 - ) 133 + list(APPEND SHADERS shaders/cube.vert shaders/cube.frag) 137 134 endif() 138 135 139 136 spirv_shaders( 140 137 SHADER_HEADERS 141 138 SPIRV_VERSION 142 139 1.0 # Currently targeting Vulkan 1.0 143 - SOURCES ${SHADERS} 140 + SOURCES 141 + ${SHADERS} 144 142 ) 145 143 146 144 add_library(
+10 -1
src/xrt/compositor/null/CMakeLists.txt
··· 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 4 add_library(comp_null STATIC null_compositor.c null_compositor.h) 5 - target_link_libraries(comp_null PUBLIC xrt-interfaces PRIVATE aux_util aux_os aux_vk comp_util comp_multi) 5 + target_link_libraries( 6 + comp_null 7 + PUBLIC xrt-interfaces 8 + PRIVATE 9 + aux_util 10 + aux_os 11 + aux_vk 12 + comp_util 13 + comp_multi 14 + ) 6 15 target_include_directories(comp_null PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
+29 -21
src/xrt/drivers/CMakeLists.txt
··· 27 27 endif() 28 28 29 29 if(XRT_BUILD_DRIVER_DEPTHAI) 30 - add_library(drv_depthai STATIC depthai/depthai_driver.cpp depthai/depthai_tracked_device.c depthai/depthai_interface.h) 30 + add_library( 31 + drv_depthai STATIC depthai/depthai_driver.cpp depthai/depthai_tracked_device.c 32 + depthai/depthai_interface.h 33 + ) 31 34 target_link_libraries( 32 35 drv_depthai 33 36 PRIVATE ··· 43 46 endif() 44 47 45 48 if(XRT_BUILD_DRIVER_SIMULATED) 46 - add_library(drv_simulated STATIC simulated/simulated_hmd.c simulated/simulated_interface.h simulated/simulated_prober.c) 49 + add_library( 50 + drv_simulated STATIC simulated/simulated_hmd.c simulated/simulated_interface.h 51 + simulated/simulated_prober.c 52 + ) 47 53 target_link_libraries(drv_simulated PRIVATE xrt-interfaces aux_util) 48 54 list(APPEND ENABLED_HEADSET_DRIVERS simulated) 49 55 endif() ··· 115 121 116 122 if(XRT_BUILD_DRIVER_OPENGLOVES) 117 123 add_library( 118 - drv_opengloves STATIC 119 - opengloves/opengloves_interface.h opengloves/opengloves_device.c opengloves/opengloves_prober.c opengloves/opengloves_device.h opengloves/communication/serial/opengloves_serial.h opengloves/communication/serial/opengloves_serial.c opengloves/encoding/alpha_encoding.h opengloves/encoding/alpha_encoding.cpp opengloves/encoding/encoding.h opengloves/communication/bluetooth/opengloves_bt_serial.h opengloves/communication/bluetooth/opengloves_bt_serial.c opengloves/communication/opengloves_communication.h opengloves/communication/serial/opengloves_prober_serial.h opengloves/communication/serial/opengloves_prober_serial.c opengloves/communication/bluetooth/opengloves_prober_bt.h opengloves/communication/bluetooth/opengloves_prober_bt.c) 120 - target_link_libraries(drv_opengloves 121 - PRIVATE 122 - xrt-interfaces 123 - aux_util 124 - aux_os 125 - bluetooth 126 - ) 124 + drv_opengloves STATIC 125 + opengloves/opengloves_interface.h 126 + opengloves/opengloves_device.c 127 + opengloves/opengloves_prober.c 128 + opengloves/opengloves_device.h 129 + opengloves/communication/serial/opengloves_serial.h 130 + opengloves/communication/serial/opengloves_serial.c 131 + opengloves/encoding/alpha_encoding.h 132 + opengloves/encoding/alpha_encoding.cpp 133 + opengloves/encoding/encoding.h 134 + opengloves/communication/bluetooth/opengloves_bt_serial.h 135 + opengloves/communication/bluetooth/opengloves_bt_serial.c 136 + opengloves/communication/opengloves_communication.h 137 + opengloves/communication/serial/opengloves_prober_serial.h 138 + opengloves/communication/serial/opengloves_prober_serial.c 139 + opengloves/communication/bluetooth/opengloves_prober_bt.h 140 + opengloves/communication/bluetooth/opengloves_prober_bt.c 141 + ) 142 + target_link_libraries(drv_opengloves PRIVATE xrt-interfaces aux_util aux_os bluetooth) 127 143 list(APPEND ENABLED_DRIVERS opengloves) 128 144 129 145 endif() ··· 256 272 endif() 257 273 258 274 if(XRT_BUILD_DRIVER_SURVIVE) 259 - add_library( 260 - drv_survive STATIC survive/survive_driver.c 261 - survive/survive_interface.h 262 - ) 275 + add_library(drv_survive STATIC survive/survive_driver.c survive/survive_interface.h) 263 276 target_link_libraries( 264 277 drv_survive 265 278 PRIVATE ··· 374 387 endif() 375 388 376 389 if(XRT_BUILD_DRIVER_SIMULAVR) 377 - add_library( 378 - drv_svr STATIC 379 - simula/svr_hmd.c 380 - simula/svr_interface.h 381 - ) 390 + add_library(drv_svr STATIC simula/svr_hmd.c simula/svr_interface.h) 382 391 target_link_libraries(drv_svr PRIVATE xrt-interfaces aux_math xrt-external-cjson) 383 392 list(APPEND ENABLED_HEADSET_DRIVERS svr) 384 393 endif() 385 - 386 394 387 395 if(XRT_BUILD_SAMPLES) 388 396 # We build the sample driver to make sure it stays valid,
+4 -1
src/xrt/targets/CMakeLists.txt
··· 33 33 add_subdirectory(steamvr_drv) 34 34 endif() 35 35 36 - if(XRT_FEATURE_SERVICE AND XRT_HAVE_SDL2 AND XRT_HAVE_VULKAN) 36 + if(XRT_FEATURE_SERVICE 37 + AND XRT_HAVE_SDL2 38 + AND XRT_HAVE_VULKAN 39 + ) 37 40 add_subdirectory(sdl_test) 38 41 endif()
+3 -5
src/xrt/targets/common/CMakeLists.txt
··· 5 5 # Lists 6 6 # 7 7 8 - add_library(target_lists STATIC 9 - target_builder_interface.h 10 - target_builder_legacy.c 11 - target_lists.c 12 - target_lists.h 8 + add_library( 9 + target_lists STATIC target_builder_interface.h target_builder_legacy.c target_lists.c 10 + target_lists.h 13 11 ) 14 12 target_link_libraries( 15 13 target_lists
+2 -7
src/xrt/targets/service/CMakeLists.txt
··· 99 99 endif() 100 100 101 101 if(XRT_HAVE_SDL2) 102 - target_link_libraries( 103 - monado-service PRIVATE st_gui xrt-external-imgui-sdl2 aux_ogl 104 - ) 102 + target_link_libraries(monado-service PRIVATE st_gui xrt-external-imgui-sdl2 aux_ogl) 105 103 106 104 if(XRT_BUILD_DRIVER_QWERTY) 107 - target_link_libraries( 108 - monado-service PRIVATE drv_qwerty_includes 109 - ) 105 + target_link_libraries(monado-service PRIVATE drv_qwerty_includes) 110 106 endif() 111 107 endif() 112 -
+12 -34
src/xrt/tracking/hand/mercury/CMakeLists.txt
··· 1 1 # Copyright 2019-2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - 5 4 # Mercury hand tracking library! 6 5 7 6 add_subdirectory(kine_lm) 8 7 add_subdirectory(kine_ccdik) 9 8 10 - add_library( 11 - t_ht_mercury_model STATIC 12 - hg_model.cpp 13 - ) 9 + add_library(t_ht_mercury_model STATIC hg_model.cpp) 14 10 11 + target_link_libraries(t_ht_mercury_model PRIVATE aux_math aux_tracking aux_os aux_util) 15 12 16 - target_link_libraries( 17 - t_ht_mercury_model 18 - PRIVATE 19 - aux_math 20 - aux_tracking 21 - aux_os 22 - aux_util 23 - ) 24 - 25 - target_include_directories(t_ht_mercury_model 26 - SYSTEM PRIVATE 27 - ${OpenCV_INCLUDE_DIRS} 28 - ${EIGEN3_INCLUDE_DIR} 13 + target_include_directories( 14 + t_ht_mercury_model SYSTEM PRIVATE ${OpenCV_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} 29 15 ) 30 16 31 17 target_link_libraries( 32 - t_ht_mercury_model 18 + t_ht_mercury_model 33 19 PRIVATE 34 20 aux_math 35 21 aux_tracking 36 22 aux_os 37 - aux_util 23 + aux_util 38 24 ${OpenCV_LIBRARIES} 39 25 ONNXRuntime::ONNXRuntime 40 26 ) 41 27 42 - add_library( 43 - t_ht_mercury STATIC 44 - hg_sync.cpp 45 - hg_sync.hpp 46 - hg_interface.h 47 - kine_common.hpp 48 - ) 49 - 28 + add_library(t_ht_mercury STATIC hg_sync.cpp hg_sync.hpp hg_interface.h kine_common.hpp) 50 29 51 30 target_link_libraries( 52 31 t_ht_mercury ··· 65 44 ) 66 45 67 46 if(XRT_HAVE_OPENCV) 68 - target_include_directories(t_ht_mercury SYSTEM PRIVATE ${OpenCV_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR}) 47 + target_include_directories( 48 + t_ht_mercury SYSTEM PRIVATE ${OpenCV_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} 49 + ) 69 50 target_link_libraries(t_ht_mercury PUBLIC ${OpenCV_LIBRARIES}) 70 51 endif() 71 52 72 - 73 53 # Below is entirely just so that tests can find us. 74 - add_library( 75 - t_ht_mercury_includes INTERFACE 76 - ) 54 + add_library(t_ht_mercury_includes INTERFACE) 77 55 78 56 target_include_directories( 79 57 t_ht_mercury_includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} 80 - ) 58 + )
+2 -14
src/xrt/tracking/hand/mercury/kine_ccdik/CMakeLists.txt
··· 1 1 # Copyright 2022, Collabora, Ltd. 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 - add_library( 5 - t_ht_mercury_kine_ccdik STATIC 6 - ccdik_interface.hpp 7 - ccdik_main.cpp 8 - ) 9 - 4 + add_library(t_ht_mercury_kine_ccdik STATIC ccdik_interface.hpp ccdik_main.cpp) 10 5 11 - target_link_libraries( 12 - t_ht_mercury_kine_ccdik 13 - PRIVATE 14 - aux_math 15 - aux_tracking 16 - aux_os 17 - aux_util 18 - ) 6 + target_link_libraries(t_ht_mercury_kine_ccdik PRIVATE aux_math aux_tracking aux_os aux_util) 19 7 20 8 target_include_directories(t_ht_mercury_kine_ccdik SYSTEM PRIVATE ${EIGEN3_INCLUDE_DIR})
+6 -8
src/xrt/tracking/hand/mercury/kine_lm/CMakeLists.txt
··· 4 4 add_library(t_ht_mercury_kine_lm STATIC lm_interface.hpp lm_main.cpp) 5 5 6 6 target_link_libraries( 7 - t_ht_mercury_kine_lm 7 + t_ht_mercury_kine_lm 8 8 PRIVATE 9 9 aux_math 10 10 aux_tracking 11 11 aux_os 12 12 aux_util 13 13 xrt-external-tinyceres 14 - ) 14 + ) 15 15 16 16 target_include_directories(t_ht_mercury_kine_lm SYSTEM PRIVATE ${EIGEN3_INCLUDE_DIR}) 17 17 ··· 19 19 target_compile_options(t_ht_mercury_kine_lm PRIVATE -ftemplate-backtrace-limit=20) 20 20 endif() 21 21 22 - 23 22 # Below is entirely just so that tests can find us. 24 - add_library( 25 - t_ht_mercury_kine_lm_includes INTERFACE 26 - ) 23 + add_library(t_ht_mercury_kine_lm_includes INTERFACE) 27 24 28 25 target_include_directories( 29 - t_ht_mercury_kine_lm_includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} 30 - ) 26 + t_ht_mercury_kine_lm_includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} 27 + ${CMAKE_CURRENT_BINARY_DIR} 28 + )
+16 -17
tests/CMakeLists.txt
··· 10 10 endif() 11 11 12 12 set(tests 13 - tests_cxx_wrappers 14 - tests_deque 15 - tests_generic_callbacks 16 - tests_history_buf 17 - tests_id_ringbuffer 18 - tests_input_transform 19 - tests_json 20 - tests_lowpass_float 21 - tests_lowpass_integer 22 - tests_pacing 23 - tests_quatexpmap 24 - tests_quat_change_of_basis 25 - tests_rational 26 - tests_vector 27 - tests_worker 28 - tests_pose 13 + tests_cxx_wrappers 14 + tests_deque 15 + tests_generic_callbacks 16 + tests_history_buf 17 + tests_id_ringbuffer 18 + tests_input_transform 19 + tests_json 20 + tests_lowpass_float 21 + tests_lowpass_integer 22 + tests_pacing 23 + tests_quatexpmap 24 + tests_quat_change_of_basis 25 + tests_rational 26 + tests_vector 27 + tests_worker 28 + tests_pose 29 29 ) 30 30 if(XRT_HAVE_D3D11) 31 31 list(APPEND tests tests_aux_d3d_d3d11 tests_comp_client_d3d11) ··· 68 68 target_link_libraries(tests_quat_change_of_basis PRIVATE aux_math) 69 69 70 70 target_include_directories(tests_quat_change_of_basis SYSTEM PRIVATE ${EIGEN3_INCLUDE_DIR}) 71 - 72 71 73 72 if(XRT_BUILD_DRIVER_HANDTRACKING) 74 73 target_link_libraries(