The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

t/common: Do not compile for builders when no driver is enabled

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
03a6f079 3c1512e8

+21 -6
+10 -2
src/xrt/targets/common/CMakeLists.txt
··· 8 8 add_library(target_lists STATIC 9 9 target_builder_interface.h 10 10 target_builder_legacy.c 11 - target_builder_remote.c 12 - target_builder_rgb_tracking.c 13 11 target_lists.c 14 12 target_lists.h 15 13 ) ··· 22 20 ) 23 21 target_include_directories(target_lists PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 24 22 23 + # Builders 24 + if(XRT_BUILD_DRIVER_REMOTE) 25 + target_sources(target_lists PRIVATE target_builder_remote.c) 26 + endif() 27 + 28 + if(XRT_BUILD_DRIVER_PSVR OR XRT_BUILD_DRIVER_PSMV) 29 + target_sources(target_lists PRIVATE target_builder_rgb_tracking.c) 30 + endif() 31 + 32 + # Drivers 25 33 if(XRT_BUILD_DRIVER_ARDUINO) 26 34 target_link_libraries(target_lists PRIVATE drv_arduino) 27 35 endif()
+6 -4
src/xrt/targets/common/target_builder_remote.c
··· 16 16 17 17 #include "target_builder_interface.h" 18 18 19 - #ifdef XRT_BUILD_DRIVER_REMOTE 20 19 #include "remote/r_interface.h" 21 - #endif 22 20 23 21 #include <assert.h> 22 + 23 + 24 + #ifndef XRT_BUILD_DRIVER_REMOTE 25 + #error "Must only be built with XRT_BUILD_DRIVER_REMOTE set" 26 + #endif 24 27 25 28 26 29 /* ··· 83 86 84 87 struct xrt_device *head = NULL, *left = NULL, *right = NULL; 85 88 86 - #ifdef XRT_BUILD_DRIVER_REMOTE 87 89 r_create_devices(port, &head, &left, &right); 88 - #endif 90 + 89 91 if (head == NULL) { 90 92 u_system_devices_destroy(&usysd); 91 93 xrt_device_destroy(&left);
+5
src/xrt/targets/common/target_builder_rgb_tracking.c
··· 41 41 #include <assert.h> 42 42 43 43 44 + #if !defined(XRT_BUILD_DRIVER_PSVR) && !defined(XRT_BUILD_DRIVER_PSMV) 45 + #error "Must only be built with either XRT_BUILD_DRIVER_PSVR or XRT_BUILD_DRIVER_PSMV set" 46 + #endif 47 + 48 + 44 49 /* 45 50 * 46 51 * Helper functions.