The open source OpenXR runtime
0
fork

Configure Feed

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

cmake: Make compilation of the sample driver optional.

+11 -6
+2
CMakeLists.txt
··· 229 229 cmake_dependent_option(XRT_BUILD_DRIVER_REMOTE "Enable remote debugging driver" ON "XRT_HAVE_LINUX OR ANDROID" OFF) 230 230 option(XRT_BUILD_DRIVER_WMR "Enable Windows Mixed Reality driver" ON) 231 231 232 + option(XRT_BUILD_SAMPLES "Enable compiling sample code implementations that will not be linked into any final targets" ON) 233 + 232 234 # These all use the Monado internal hid wrapper. 233 235 cmake_dependent_option(XRT_BUILD_DRIVER_HDK "Enable HDK driver" ON "XRT_HAVE_INTERNAL_HID" OFF) 234 236 cmake_dependent_option(XRT_BUILD_DRIVER_PSMV "Enable Playstation Move driver" ON "XRT_HAVE_INTERNAL_HID" OFF)
+9 -6
src/xrt/drivers/CMakeLists.txt
··· 296 296 list(APPEND ENABLED_DRIVERS euroc) 297 297 endif() 298 298 299 - # We always build the sample driver, to make sure it stays valid, but it never gets linked 300 - add_library(drv_sample STATIC 301 - sample/sample_hmd.c 302 - sample/sample_interface.h 303 - sample/sample_prober.c) 304 - target_link_libraries(drv_sample PRIVATE xrt-interfaces aux_util) 299 + if(XRT_BUILD_SAMPLES) 300 + # We build the sample driver to make sure it stays valid, 301 + # but it never gets linked into a final target. 302 + add_library(drv_sample STATIC 303 + sample/sample_hmd.c 304 + sample/sample_interface.h 305 + sample/sample_prober.c) 306 + target_link_libraries(drv_sample PRIVATE xrt-interfaces aux_util) 307 + endif() 305 308 306 309 if(ENABLED_HEADSET_DRIVERS) 307 310 set(ENABLED_DRIVERS ${ENABLED_HEADSET_DRIVERS} ${ENABLED_DRIVERS})