fix: macos compilation

This commit is contained in:
SoLongAndThanksForAllThePizza
2022-06-02 16:13:34 +08:00
Unverified
parent aefc968246
commit d756551791
15 changed files with 1344 additions and 236 deletions

View File

@@ -71,6 +71,8 @@ fn gen_flutter_rust_bridge() {
rust_input: "src/flutter_ffi.rs".to_string(),
// Path of output generated Dart code
dart_output: "flutter/lib/generated_bridge.dart".to_string(),
// Path of output generated C header
c_output: Some(vec!["flutter/macos/Runner/bridge_generated.h".to_string()]),
// for other options lets use default
..Default::default()
};
@@ -84,7 +86,7 @@ fn main() {
// there is problem with cfg(target_os) in build.rs, so use our workaround
// let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
// if target_os == "android" || target_os == "ios" {
gen_flutter_rust_bridge();
gen_flutter_rust_bridge();
// return;
// }
#[cfg(all(windows, feature = "inline"))]