veilid/veilid-flutter/linux/rust.cmake
John Smith 98799b4d3a sync
2022-03-03 20:45:39 -05:00

23 lines
741 B
CMake

# 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 CRATES veilid-flutter)
# Flutter-specific
set(CRATE_NAME "veilid-flutter")
target_link_libraries(${PLUGIN_NAME} PUBLIC ${CRATE_NAME})