From 52d4b4226ecafdeb4ea4d2f8a7a564dacc3912b6 Mon Sep 17 00:00:00 2001 From: SoLongAndThanksForAllThePizza <103753680+SoLongAndThanksForAllThePizza@users.noreply.github.com> Date: Wed, 25 May 2022 20:26:46 +0800 Subject: [PATCH] fix flutter compile on windows --- flutter/windows/runner/CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/flutter/windows/runner/CMakeLists.txt b/flutter/windows/runner/CMakeLists.txt index b9e550fba..bcaa06d73 100644 --- a/flutter/windows/runner/CMakeLists.txt +++ b/flutter/windows/runner/CMakeLists.txt @@ -16,6 +16,25 @@ add_executable(${BINARY_NAME} WIN32 "runner.exe.manifest" ) +# flutter_rust_bridge with Corrosion +find_package(Corrosion REQUIRED) + +corrosion_import_crate(MANIFEST_PATH ../../../Cargo.toml + # Equivalent to --all-features passed to cargo build +# [ALL_FEATURES] + # Equivalent to --no-default-features passed to cargo build +# [NO_DEFAULT_FEATURES] + # Disable linking of standard libraries (required for no_std crates). +# [NO_STD] + # Specify cargo build profile (e.g. release or a custom profile) +# [PROFILE ] + # Only import the specified crates from a workspace +# [CRATES ... ] + # Enable the specified features +# [FEATURES ... ] +) +target_link_libraries(${BINARY_NAME} PRIVATE librustdesk) + # Apply the standard set of build settings. This can be removed for applications # that need different build settings. apply_standard_settings(${BINARY_NAME})