MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ find_library()

const std::string & MayaFlux::Platform::SystemConfig::find_library ( const std::string &  library_name)
static

Definition at line 106 of file HostEnvironment.cpp.

107{
108 static std::unordered_map<std::string, std::string> cache;
109
110 auto it = cache.find(library_name);
111 if (it != cache.end()) {
112 return it->second;
113 }
114
115 std::string& result = cache[library_name];
116
117 auto lib_paths = get_system_libraries();
118 std::string search_name = format_library_name(library_name);
119
120 for (const auto& lib_path : lib_paths) {
121 fs::path full_path = fs::path(lib_path) / search_name;
122 if (fs::exists(full_path)) {
123 result = full_path.string();
124 break;
125 }
126 }
127
128 return result;
129}
static const std::vector< std::string > & get_system_libraries()
static std::string format_library_name(const std::string &library_name)

References format_library_name(), and get_system_libraries().

+ Here is the call graph for this function: