···107107option(BUILD_WITH_PSMV "Enable Playstation Move driver" ON)
108108option(BUILD_WITH_HYDRA "Enable Hydra driver" ON)
109109option(BUILD_WITH_NS "Enable North Star driver" ON)
110110+option(BUILD_WITH_LIBSURVIVE "Enable libsurvive driver" OFF)
110111111112# You can set this from a superproject to add a driver
112113list(APPEND AVAILABLE_DRIVERS ARDUINO DUMMY HDK HYDRA NS OHMD PSMV PSVR RS V4L2 VIVE DAYDREAM)
···180181181182if(BUILD_WITH_NS)
182183 set(BUILD_DRIVER_NS TRUE)
184184+endif()
185185+186186+if (BUILD_WITH_LIBSURVIVE)
187187+ find_package(PkgConfig REQUIRED)
188188+ pkg_check_modules(SURVIVE REQUIRED IMPORTED_TARGET survive)
189189+ add_definitions(-DXRT_BUILD_DRIVER_SURVIVE)
190190+ set(BUILD_DRIVER_SURVIVE TRUE)
183191endif()
184192185193if(BUILD_WITH_PSVR)
+26
README.md
···178178xrandr --prop
179179```
180180181181+## Using libsurvive
182182+183183+To enable the libsurvive driver, libsurvive has to be installed as a library with a pkgconfig file
184184+(https://github.com/cntools/libsurvive/pull/187).
185185+186186+When starting any libsrvive or OpenXR application, libsurvive will run calibration and save
187187+configuration and calibration data in the current working directory.
188188+189189+Make sure the HMD can see both basestations and is not moved during calibration.
190190+191191+To remove libsurvive's calibration data (e.g. to force recalibration) delete the following
192192+files/directories:
193193+194194+ rm -r *config.json calinfo
195195+196196+Though working and somewhat usable, support for the libsurvive driver is **experimental**.
197197+Therefore with both meson and cmake, the survive driver has to be explicitly enabled with
198198+199199+```
200200+#cmake
201201+-DBUILD_WITH_LIBSURVIVE=On
202202+203203+#meson
204204+-Ddrivers=auto,survive
205205+```
206206+181207## Coding style and formatting
182208183209[clang-format][] is used,
+7
meson.build
···6565libuvc = dependency('libuvc', required: false)
6666vulkan = dependency('vulkan', required: true)
6767zlib = dependency('zlib', required: false)
6868+survive = dependency('survive', required: false)
68696970opencv = dependency('opencv4', required: false)
7071if not opencv.found()
···181182 if 'v4l2' not in drivers
182183 drivers += ['v4l2']
183184 endif
185185+endif
186186+187187+if survive.found() and ('survive' in drivers)
188188+ if 'survive' not in drivers
189189+ drivers += ['survive']
190190+ endif
184191endif
185192186193if drivers.length() == 0 or drivers == ['auto']