findStaticLibraryFile function

Future<String> findStaticLibraryFile(
  1. String libName,
  2. String searchDir
)

Implementation

Future<String> findStaticLibraryFile(String libName, String searchDir) async {
  final libPath = p.join(searchDir, libName);
  if (await File(libPath).exists()) return libPath;
  throw FileSystemException(
    'No matching static library found for $libName. '
    'Ensure xmake installs the static archive.',
    libPath,
  );
}