···11-// Copyright 2021-2023, Collabora, Ltd.
11+// Copyright 2021-2024, Collabora, Ltd.
22// SPDX-License-Identifier: BSL-1.0
33/*!
44 * @file
···4444#include <string>
4545#include <vector>
46464747+//! @todo Get preferred system from systems found at build time
4848+#define PREFERRED_VIT_SYSTEM_LIBRARY "libbasalt.so"
4949+4750#define SLAM_TRACE(...) U_LOG_IFL_T(t.log_level, __VA_ARGS__)
4851#define SLAM_DEBUG(...) U_LOG_IFL_D(t.log_level, __VA_ARGS__)
4952#define SLAM_INFO(...) U_LOG_IFL_I(t.log_level, __VA_ARGS__)
···71747275//! @see t_slam_tracker_config
7376DEBUG_GET_ONCE_LOG_OPTION(slam_log, "SLAM_LOG", U_LOGGING_INFO)
7474-DEBUG_GET_ONCE_OPTION(vit_system_library_path, "VIT_SYSTEM_LIBRARY_PATH", NULL)
7777+DEBUG_GET_ONCE_OPTION(vit_system_library_path, "VIT_SYSTEM_LIBRARY_PATH", PREFERRED_VIT_SYSTEM_LIBRARY)
7578DEBUG_GET_ONCE_OPTION(slam_config, "SLAM_CONFIG", nullptr)
7679DEBUG_GET_ONCE_BOOL_OPTION(slam_ui, "SLAM_UI", false)
7780DEBUG_GET_ONCE_BOOL_OPTION(slam_submit_from_start, "SLAM_SUBMIT_FROM_START", false)
···1494149714951498 t.log_level = log_level;
1496149914971497- if (config->vit_system_library_path == NULL) {
14981498- SLAM_WARN("No VIT system library set, use VIT_SYSTEM_LIBRARY_PATH to set a tracker");
14991499- SLAM_WARN("Attempting to load 'libbasalt.so' from system");
15001500- config->vit_system_library_path = "libbasalt.so";
15011501- }
15021502-15031503- SLAM_INFO("Loading VIT system library from '%s'", config->vit_system_library_path);
15001500+ SLAM_INFO("Loading VIT system library from VIT_SYSTEM_LIBRARY_PATH='%s'", config->vit_system_library_path);
1504150115051502 if (!t_vit_bundle_load(&t.vit, config->vit_system_library_path)) {
15061503 SLAM_ERROR("Failed to load VIT system library from '%s'", config->vit_system_library_path);