cmake: Remove _SLAM suffixes on KIMERA and BASALT have defines

This commit is contained in:
Jakob Bornecrantz 2023-04-23 00:11:50 +01:00
parent 99c1742c82
commit 9d8668a0a6
9 changed files with 24 additions and 23 deletions

View file

@ -250,8 +250,8 @@ option_with_deps(XRT_HAVE_SYSTEM_CJSON "Enable cJSON from system, instead of bun
# SLAM backends and deps (sorted)
option_with_deps(XRT_HAVE_OPENCV "Enable OpenCV backend" DEPENDS OpenCV_FOUND)
option_with_deps(XRT_HAVE_BASALT_SLAM "Enable Basalt support" DEPENDS basalt_FOUND)
option_with_deps(XRT_HAVE_KIMERA_SLAM "Enable Kimera support" DEPENDS kimera_vio_FOUND)
option_with_deps(XRT_HAVE_BASALT "Enable Basalt support" DEPENDS basalt_FOUND)
option_with_deps(XRT_HAVE_KIMERA "Enable Kimera support" DEPENDS kimera_vio_FOUND)
# Hand tracking deps
option_with_deps(XRT_HAVE_ONNXRUNTIME "Enable ONNX runtime support" DEPENDS ONNXRUNTIME_FOUND)
@ -277,7 +277,7 @@ set(XRT_FEATURE_OPENXR_DEBUG_UTILS OFF) # Has never been enabled
option_with_deps(XRT_FEATURE_RENDERDOC "Enable RenderDoc API" DEPENDS "RT_LIBRARY OR WIN32")
option_with_deps(XRT_FEATURE_SERVICE "Enable separate service module for OpenXR runtime" DEPENDS XRT_MODULE_IPC XRT_FEATURE_OPENXR)
option_with_deps(XRT_FEATURE_SERVICE_SYSTEMD "Enable systemd socket activation of the service" DEPENDS XRT_HAVE_SYSTEMD XRT_FEATURE_SERVICE)
option_with_deps(XRT_FEATURE_SLAM "Enable SLAM tracking support" DEPENDS XRT_HAVE_OPENCV "XRT_HAVE_BASALT_SLAM OR XRT_HAVE_KIMERA_SLAM")
option_with_deps(XRT_FEATURE_SLAM "Enable SLAM tracking support" DEPENDS XRT_HAVE_OPENCV "XRT_HAVE_BASALT OR XRT_HAVE_KIMERA")
option(XRT_FEATURE_SSE2 "Build using SSE2 instructions, if building for 32-bit x86" ON)
option_with_deps(XRT_FEATURE_STEAMVR_PLUGIN "Build SteamVR plugin" DEPENDS "NOT ANDROID")
option_with_deps(XRT_FEATURE_TRACING "Enable debug tracing on supported platforms" DEFAULT OFF DEPENDS "XRT_HAVE_PERCETTO OR XRT_HAVE_TRACY")
@ -498,7 +498,7 @@ endif()
message(STATUS "#####----- Config -----#####")
message(STATUS "# GIT_DESC: ${GIT_DESC}")
message(STATUS "#")
message(STATUS "# BASALT: ${XRT_HAVE_BASALT_SLAM}")
message(STATUS "# BASALT: ${XRT_HAVE_BASALT}")
message(STATUS "# BLUETOOTH: ${XRT_HAVE_BLUETOOTH}")
message(STATUS "# D3D11: ${XRT_HAVE_D3D11}")
message(STATUS "# D3D12: ${XRT_HAVE_D3D12}")
@ -508,7 +508,7 @@ message(STATUS "# FFMPEG: ${XRT_HAVE_FFMPEG}")
message(STATUS "# GST (GStreamer): ${XRT_HAVE_GST}")
message(STATUS "# HIDAPI: ${XRT_HAVE_HIDAPI}")
message(STATUS "# JPEG: ${XRT_HAVE_JPEG}")
message(STATUS "# KIMERA: ${XRT_HAVE_KIMERA_SLAM}")
message(STATUS "# KIMERA: ${XRT_HAVE_KIMERA}")
message(STATUS "# LIBBSD: ${XRT_HAVE_LIBBSD}")
message(STATUS "# LIBUSB: ${XRT_HAVE_LIBUSB}")
message(STATUS "# LIBUVC: ${XRT_HAVE_LIBUVC}")

View file

@ -1,4 +1,4 @@
// Copyright 2021, Collabora, Ltd.
// Copyright 2021-2023, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -106,7 +106,7 @@ using cv::UMatUsageFlags;
#define USING_OPENCV_3_3_1 (CV_VERSION_MAJOR == 3 && CV_VERSION_MINOR == 3 && CV_VERSION_REVISION == 1)
#if defined(XRT_HAVE_KIMERA_SLAM) && !USING_OPENCV_3_3_1
#if defined(XRT_HAVE_KIMERA) && !USING_OPENCV_3_3_1
#pragma message "Kimera-VIO uses OpenCV 3.3.1, use that to prevent conflicts"
#endif

View file

@ -1,4 +1,4 @@
// Copyright 2021, Collabora, Ltd.
// Copyright 2021-2023, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -140,9 +140,9 @@ euroc_device_get_tracked_pose(struct xrt_device *xdev,
int pose_bits = XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT;
bool pose_tracked = out_relation->relation_flags & pose_bits;
if (pose_tracked) {
#if defined(XRT_HAVE_KIMERA_SLAM)
#if defined(XRT_HAVE_KIMERA)
ed->pose = euroc_device_correct_pose_from_kimera(out_relation->pose);
#elif defined(XRT_HAVE_BASALT_SLAM)
#elif defined(XRT_HAVE_BASALT)
ed->pose = euroc_device_correct_pose_from_basalt(out_relation->pose);
#else
ed->pose = out_relation->pose;

View file

@ -1,4 +1,4 @@
// Copyright 2021-2022, Collabora, Ltd.
// Copyright 2021-2023, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -294,9 +294,9 @@ rs_hdev_get_tracked_pose(struct xrt_device *xdev,
bool pose_tracked = out_relation->relation_flags & pose_bits;
if (pose_tracked) {
#if defined(XRT_HAVE_KIMERA_SLAM)
#if defined(XRT_HAVE_KIMERA)
rh->pose = rs_hdev_correct_pose_from_kimera(out_relation->pose);
#elif defined(XRT_HAVE_BASALT_SLAM)
#elif defined(XRT_HAVE_BASALT)
rh->pose = rs_hdev_correct_pose_from_basalt(out_relation->pose);
#else
rh->pose = out_relation->pose;

View file

@ -3,6 +3,7 @@
* Copyright 2013, Jakob Bornecrantz.
* Copyright 2016 Philipp Zabel
* Copyright 2019-2022 Jan Schmidt
* Copyright 2023, Collabora, Ltd.
* SPDX-License-Identifier: BSL-1.0
*
*/
@ -635,7 +636,7 @@ rift_s_tracker_get_tracked_pose(struct rift_s_tracker *t,
// Get the IMU pose from the SLAM tracker
xrt_tracked_slam_get_tracked_pose(t->tracking.slam, at_timestamp_ns, &imu_relation);
#if defined(XRT_HAVE_BASALT_SLAM)
#if defined(XRT_HAVE_BASALT)
rift_s_tracker_correct_pose_from_basalt(&imu_relation.pose);
#endif

View file

@ -1,4 +1,4 @@
// Copyright 2022, Collabora, Ltd.
// Copyright 2022-2023, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -177,7 +177,7 @@ twrap_slam_create_device(struct xrt_frame_context *xfctx,
snprintf(dx->base.serial, XRT_DEVICE_NAME_LEN, "Generic Inside-Out Head Tracker");
#ifdef XRT_FEATURE_SLAM
#ifdef XRT_HAVE_BASALT_SLAM
#ifdef XRT_HAVE_BASALT
// Arrived at mostly by trial and error; seeminly does a 90-degree rotation about the X axis.
dx->pre_rotate_x = (struct xrt_vec3){1.0f, 0.0f, 0.0f};
dx->pre_rotate_z = (struct xrt_vec3){0.0f, 1.0f, 0.0f};

View file

@ -1,5 +1,5 @@
// Copyright 2016-2019, Philipp Zabel
// Copyright 2019-2021, Collabora, Ltd.
// Copyright 2019-2023, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -152,7 +152,7 @@ vive_device_get_slam_tracked_pose(struct xrt_device *xdev,
bool pose_tracked = out_relation->relation_flags & pose_bits;
if (pose_tracked) {
#if defined(XRT_HAVE_BASALT_SLAM)
#if defined(XRT_HAVE_BASALT)
d->pose = vive_device_correct_pose_from_basalt(out_relation->pose);
#else
d->pose = out_relation->pose;

View file

@ -1,6 +1,6 @@
// Copyright 2018, Philipp Zabel.
// Copyright 2020-2021, N Madsen.
// Copyright 2020-2022, Collabora, Ltd.
// Copyright 2020-2023, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -1065,7 +1065,7 @@ wmr_hmd_get_slam_tracked_pose(struct xrt_device *xdev,
bool pose_tracked = out_relation->relation_flags & pose_bits;
if (pose_tracked) {
#if defined(XRT_HAVE_BASALT_SLAM)
#if defined(XRT_HAVE_BASALT)
wh->pose = wmr_hmd_correct_pose_from_basalt(out_relation->pose);
#else
wh->pose = out_relation->pose;

View file

@ -1,4 +1,4 @@
// Copyright 2019-2022, Collabora, Ltd.
// Copyright 2019-2023, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -11,7 +11,7 @@
/* keep sorted */
#cmakedefine XRT_HAVE_BASALT_SLAM
#cmakedefine XRT_HAVE_BASALT
#cmakedefine XRT_HAVE_BLUETOOTH
#cmakedefine XRT_HAVE_D3D11
#cmakedefine XRT_HAVE_D3D12
@ -22,7 +22,7 @@
#cmakedefine XRT_HAVE_GST
#cmakedefine XRT_HAVE_HIDAPI
#cmakedefine XRT_HAVE_JPEG
#cmakedefine XRT_HAVE_KIMERA_SLAM
#cmakedefine XRT_HAVE_KIMERA
#cmakedefine XRT_HAVE_LIBBSD
#cmakedefine XRT_HAVE_LIBUDEV
#cmakedefine XRT_HAVE_LIBUSB