mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 04:24:45 +08:00
引入 Rust \\TODO 使用 rust 实现的下载器
This commit is contained in:
@ -56,7 +56,7 @@ add_subdirectory("runner")
|
||||
# Generated plugin build rules, which manage building the plugins and adding
|
||||
# them to the application.
|
||||
include(flutter/generated_plugins.cmake)
|
||||
|
||||
include(./rust.cmake)
|
||||
|
||||
# === Installation ===
|
||||
# Support files are copied into place next to the executable, so that it can
|
||||
|
21
windows/rust.cmake
Normal file
21
windows/rust.cmake
Normal file
@ -0,0 +1,21 @@
|
||||
# We include Corrosion inline here, but ideally in a project with
|
||||
# many dependencies we would need to install Corrosion on the system.
|
||||
# See instructions on https://github.com/AndrewGaspar/corrosion#cmake-install
|
||||
# Once done, uncomment this line:
|
||||
# find_package(Corrosion REQUIRED)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
Corrosion
|
||||
GIT_REPOSITORY https://github.com/AndrewGaspar/corrosion.git
|
||||
GIT_TAG origin/master # Optionally specify a version tag or branch here
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(Corrosion)
|
||||
|
||||
corrosion_import_crate(MANIFEST_PATH ../rust/Cargo.toml IMPORTED_CRATES imported_crates)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE ${imported_crates})
|
||||
foreach(imported_crate ${imported_crates})
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${imported_crate}-shared>)
|
||||
endforeach()
|
Reference in New Issue
Block a user