SenseApiMgr: Add doxygen comment explaining the lib search priorities

This commit is contained in:
2025-01-14 14:11:40 -04:00
parent aaae3dcbb2
commit cfdeb17639
+14
View File
@@ -13,6 +13,20 @@ namespace fs = std::filesystem;
namespace hk {
namespace sense_api {
/**
* @brief Searches for a library in predefined locations
* @param libraryPath The name or path of the library to find
* @return Optional containing the full path if found in search paths, nullopt
* if not
*
* Searches for the library in the following locations in order:
* 1. Custom path specified by --sense-api-lib-path option (if provided)
* 2. Current working directory
* 3. Directory containing the executable
*
* If the library is not found in any of these locations, returns nullopt and
* falls back to system default library search paths (LD_LIBRARY_PATH, etc.)
*/
static std::optional<std::string> findLibraryPath(
const std::string& libraryPath)
{