mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-05-02 14:46:12 -04:00
linux flutter example with bridge to rust and build system
This commit is contained in:
parent
cbffc381c1
commit
0c6aa6d439
14 changed files with 370 additions and 71 deletions
23
veilid-flutter/linux/rust.cmake
Normal file
23
veilid-flutter/linux/rust.cmake
Normal file
|
@ -0,0 +1,23 @@
|
|||
# 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 ${CMAKE_SOURCE_DIR}/../../rust/Cargo.toml)
|
||||
|
||||
# Flutter-specific
|
||||
|
||||
set(CRATE_NAME "veilid-flutter")
|
||||
target_link_libraries(${PLUGIN_NAME} PUBLIC ${CRATE_NAME})
|
||||
# list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${CRATE_NAME}-shared>)
|
Loading…
Add table
Add a link
Reference in a new issue