Description
In windows/CMakeLists.txt, the variable name flutter_embedding_bundled_libraries is used instead of the correct flutter_embedder_bundled_libraries.
Flutter's build system expects the variable to match ${plugin_name}_bundled_libraries (i.e. flutter_embedder_bundled_libraries), so the native library is never bundled into the Windows build output.
Steps to Reproduce
- Add
flutter_embedder as a dependency
- Run
flutter build windows
- The resulting executable crashes because the DLL is missing from the bundle
Expected Behavior
The ONNX Runtime DLL should be automatically bundled via CMake.
Current Workaround
Manually editing the file in .plugin_symlinks/flutter_embedder/windows/CMakeLists.txt, but this gets overwritten on flutter clean.
Fix
-set(flutter_embedding_bundled_libraries
+set(flutter_embedder_bundled_libraries
Line 18 of windows/CMakeLists.txt.
Description
In
windows/CMakeLists.txt, the variable nameflutter_embedding_bundled_librariesis used instead of the correctflutter_embedder_bundled_libraries.Flutter's build system expects the variable to match
${plugin_name}_bundled_libraries(i.e.flutter_embedder_bundled_libraries), so the native library is never bundled into the Windows build output.Steps to Reproduce
flutter_embedderas a dependencyflutter build windowsExpected Behavior
The ONNX Runtime DLL should be automatically bundled via CMake.
Current Workaround
Manually editing the file in
.plugin_symlinks/flutter_embedder/windows/CMakeLists.txt, but this gets overwritten onflutter clean.Fix
Line 18 of
windows/CMakeLists.txt.