The open source OpenXR runtime

t/slam: Make default of VIT_SYSTEM_LIBRARY_PATH consistent with other envvar defaults

authored by

Mateo de Mayo and committed by
Simon Zeni
db40cc2e 65531043

+6 -9
+6 -9
src/xrt/auxiliary/tracking/t_tracker_slam.cpp
··· 1 - // Copyright 2021-2023, Collabora, Ltd. 1 + // Copyright 2021-2024, Collabora, Ltd. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file ··· 44 44 #include <string> 45 45 #include <vector> 46 46 47 + //! @todo Get preferred system from systems found at build time 48 + #define PREFERRED_VIT_SYSTEM_LIBRARY "libbasalt.so" 49 + 47 50 #define SLAM_TRACE(...) U_LOG_IFL_T(t.log_level, __VA_ARGS__) 48 51 #define SLAM_DEBUG(...) U_LOG_IFL_D(t.log_level, __VA_ARGS__) 49 52 #define SLAM_INFO(...) U_LOG_IFL_I(t.log_level, __VA_ARGS__) ··· 71 74 72 75 //! @see t_slam_tracker_config 73 76 DEBUG_GET_ONCE_LOG_OPTION(slam_log, "SLAM_LOG", U_LOGGING_INFO) 74 - DEBUG_GET_ONCE_OPTION(vit_system_library_path, "VIT_SYSTEM_LIBRARY_PATH", NULL) 77 + DEBUG_GET_ONCE_OPTION(vit_system_library_path, "VIT_SYSTEM_LIBRARY_PATH", PREFERRED_VIT_SYSTEM_LIBRARY) 75 78 DEBUG_GET_ONCE_OPTION(slam_config, "SLAM_CONFIG", nullptr) 76 79 DEBUG_GET_ONCE_BOOL_OPTION(slam_ui, "SLAM_UI", false) 77 80 DEBUG_GET_ONCE_BOOL_OPTION(slam_submit_from_start, "SLAM_SUBMIT_FROM_START", false) ··· 1494 1497 1495 1498 t.log_level = log_level; 1496 1499 1497 - if (config->vit_system_library_path == NULL) { 1498 - SLAM_WARN("No VIT system library set, use VIT_SYSTEM_LIBRARY_PATH to set a tracker"); 1499 - SLAM_WARN("Attempting to load 'libbasalt.so' from system"); 1500 - config->vit_system_library_path = "libbasalt.so"; 1501 - } 1502 - 1503 - SLAM_INFO("Loading VIT system library from '%s'", config->vit_system_library_path); 1500 + SLAM_INFO("Loading VIT system library from VIT_SYSTEM_LIBRARY_PATH='%s'", config->vit_system_library_path); 1504 1501 1505 1502 if (!t_vit_bundle_load(&t.vit, config->vit_system_library_path)) { 1506 1503 SLAM_ERROR("Failed to load VIT system library from '%s'", config->vit_system_library_path);