From ab2da01631f63397a0304141f0b4031897524d66 Mon Sep 17 00:00:00 2001 From: Mateo de Mayo Date: Sat, 16 Oct 2021 17:02:27 -0300 Subject: [PATCH] build: Add Basalt as an external SLAM system --- CMakeLists.txt | 4 +++- meson.build | 2 +- src/xrt/include/xrt/meson.build | 1 + src/xrt/include/xrt/xrt_config_have.h.cmake_in | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a6ec17b0..cff5612da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,7 @@ if(ANDROID) endif() # Find a external SLAM implementation -set(EXTERNAL_SLAM_SYSTEMS kimera_vio) +set(EXTERNAL_SLAM_SYSTEMS kimera_vio basalt) foreach(slam_system IN LISTS EXTERNAL_SLAM_SYSTEMS) if(PKGCONFIG_FOUND) pkg_check_modules(${slam_system} ${slam_system}) @@ -212,6 +212,7 @@ cmake_dependent_option(XRT_HAVE_SYSTEM_CJSON "Enable cJSON from system, instead cmake_dependent_option(XRT_HAVE_GST "Enable gstreamer" ON "GST_FOUND" OFF) cmake_dependent_option(XRT_HAVE_ONNXRUNTIME "Enable ONNX runtime support" ON "ONNXRUNTIME_FOUND" OFF) 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_RS "Enable RealSense device driver" ON "realsense2_FOUND" OFF) @@ -389,6 +390,7 @@ message(STATUS "# PERCETTO: ${XRT_HAVE_PERCETTO}") message(STATUS "# ONNXRUNTIME: ${XRT_HAVE_ONNXRUNTIME}") message(STATUS "# SYSTEM_CJSON: ${XRT_HAVE_SYSTEM_CJSON}") message(STATUS "# KIMERA: ${XRT_HAVE_KIMERA_SLAM}") +message(STATUS "# BASALT: ${XRT_HAVE_BASALT_SLAM}") message(STATUS "# SLAM: ${XRT_HAVE_SLAM}") message(STATUS "#") message(STATUS "# FEATURE_COMPOSITOR_MAIN: ${XRT_FEATURE_COMPOSITOR_MAIN}") diff --git a/meson.build b/meson.build index c1d34a64e..f700476cf 100644 --- a/meson.build +++ b/meson.build @@ -93,7 +93,7 @@ if not opencv.found() endif # Find an external SLAM implementation -external_slam_systems = ['kimera_vio'] +external_slam_systems = ['kimera_vio', 'basalt'] foreach slam_system : external_slam_systems slam = dependency(slam_system, required: false) if slam.found() diff --git a/src/xrt/include/xrt/meson.build b/src/xrt/include/xrt/meson.build index fdaa03180..6df4f816a 100644 --- a/src/xrt/include/xrt/meson.build +++ b/src/xrt/include/xrt/meson.build @@ -107,6 +107,7 @@ endif if slam.found() and build_tracking have_conf.set('XRT_HAVE_SLAM', true) have_conf.set('XRT_HAVE_KIMERA_SLAM', slam.name() == 'kimera_vio') + have_conf.set('XRT_HAVE_BASALT_SLAM', slam.name() == 'basalt') endif if build_wayland diff --git a/src/xrt/include/xrt/xrt_config_have.h.cmake_in b/src/xrt/include/xrt/xrt_config_have.h.cmake_in index 06b7cd521..058bfdb96 100644 --- a/src/xrt/include/xrt/xrt_config_have.h.cmake_in +++ b/src/xrt/include/xrt/xrt_config_have.h.cmake_in @@ -27,6 +27,7 @@ #cmakedefine XRT_HAVE_VULKAN #cmakedefine XRT_HAVE_PERCETTO #cmakedefine XRT_HAVE_KIMERA_SLAM +#cmakedefine XRT_HAVE_BASALT_SLAM #cmakedefine XRT_HAVE_SLAM #cmakedefine XRT_HAVE_WAYLAND #cmakedefine XRT_HAVE_WAYLAND_DIRECT