diff --git a/scripts/generate.dart b/scripts/generate.dart index 0b0cf7c..c381230 100644 --- a/scripts/generate.dart +++ b/scripts/generate.dart @@ -24,7 +24,18 @@ void main(List args) async { ).generate( libclangDylib: libclangPath == null ? null - : Uri.file(join(libclangPath, "libclang.so")), + : Uri.file( + join( + libclangPath, + "libclang.${(Platform.isLinux || Platform.isAndroid) + ? "so" + : Platform.isMacOS + ? "dylib" + : Platform.isWindows + ? "dll" + : throw UnsupportedError("Unsupported Platform")}", + ), + ), ); print("Done!"); }