cmake: Introduce XRT_HAVE_HIDAPI to make HIDAPI controllable

This commit is contained in:
Jakob Bornecrantz 2022-03-27 16:19:41 +01:00 committed by Jakob Bornecrantz
parent 5d50be0164
commit b4f2bc88c8
2 changed files with 4 additions and 1 deletions

View file

@ -232,6 +232,7 @@ else()
endif()
cmake_dependent_option(XRT_HAVE_LIBUSB "Enable libusb (used for most drivers)" ON "LIBUSB1_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_HIDAPI "Enable libhidapi (used for PSVR)" ON "HIDAPI_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_JPEG "Enable jpeg code (used for some video drivers)" ON "JPEG_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_OPENCV "Enable OpenCV backend" ON "OpenCV_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_LIBUVC "Enable libuvc video driver" ON "LIBUVC_FOUND AND XRT_HAVE_LIBUSB" OFF)
@ -244,7 +245,7 @@ cmake_dependent_option(XRT_HAVE_ONNXRUNTIME "Enable ONNX runtime support" ON "ON
cmake_dependent_option(XRT_HAVE_KIMERA_SLAM "Enable Kimera support" ON "kimera_vio_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_BASALT_SLAM "Enable Basalt support" ON "basalt_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_SLAM "Enable SLAM tracking support" ON "SLAM;XRT_HAVE_OPENCV" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_PSVR "Enable PSVR HMD driver" ON "HIDAPI_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_PSVR "Enable PSVR HMD driver" ON "XRT_HAVE_HIDAPI" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_REALSENSE "Enable RealSense device driver" ON "XRT_HAVE_REALSENSE" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_VIVE "Enable driver for HTC Vive, Vive Pro, Valve Index, and their controllers" ON "ZLIB_FOUND AND XRT_HAVE_LINUX" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_OHMD "Enable OpenHMD driver" ON "OPENHMD_FOUND" OFF)
@ -411,6 +412,7 @@ message(STATUS "# DBUS: ${XRT_HAVE_DBUS}")
message(STATUS "# LIBBSD: ${XRT_HAVE_LIBBSD}")
message(STATUS "# SYSTEMD: ${XRT_HAVE_SYSTEMD}")
message(STATUS "# LIBUSB: ${XRT_HAVE_LIBUSB}")
message(STATUS "# HIDAPI: ${XRT_HAVE_HIDAPI}")
message(STATUS "# JPEG: ${XRT_HAVE_JPEG}")
message(STATUS "# OPENCV: ${XRT_HAVE_OPENCV}")
message(STATUS "# LIBUVC: ${XRT_HAVE_LIBUVC}")

View file

@ -17,6 +17,7 @@
#cmakedefine XRT_HAVE_JPEG
#cmakedefine XRT_HAVE_LIBUDEV
#cmakedefine XRT_HAVE_LIBUSB
#cmakedefine XRT_HAVE_HIDAPI
#cmakedefine XRT_HAVE_LIBUVC
#cmakedefine XRT_HAVE_OPENCV
#cmakedefine XRT_HAVE_OPENGL