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

◆ find_dep_library()

std::string MayaFlux::Platform::SystemConfig::find_dep_library ( const std::string & library_name,
const std::string & prefix = "" )
inlinestatic

The absolute path of a shared library, or empty.

A non-empty prefix is searched first, under its lib, lib64 and bin. Then the system library directories are searched directly. An empty prefix means no prefix, never the working directory. Names must be plain file names.

Definition at line 289 of file Toolchain.hpp.

290{
291 if (!prefix.empty()) {
292 if (const auto found = acquire_library(LibraryFromPrefix { .prefix = prefix, .base_name = library_name })) {
293 return found->path.string();
294 }
295 }
296
297 std::vector<fs::path> directories;
298 for (const auto& directory : get_system_libraries()) {
299 directories.emplace_back(directory);
300 }
301
302 if (const auto found = acquire_library(LibraryFromDirectories { .directories = std::move(directories), .base_name = library_name })) {
303 return found->path.string();
304 }
305
306 return {};
307}
static std::vector< std::string > get_system_libraries()
The existing system library directories, in search order.
Acquired< LibraryLocation > acquire_library(const LibrarySource &source)
Resolve a library request to a location the loader can open.

References MayaFlux::Platform::acquire_library(), and get_system_libraries().

Referenced by Lila::ClangInterpreter::initialize().

Here is the call graph for this function:
Here is the caller graph for this function: