veilid/veilid-flutter/windows/rust.cmake

23 lines
828 B
CMake
Raw Normal View History

2022-01-29 18:53:55 +00:00
# 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
2022-07-03 00:40:34 +00:00
GIT_TAG v0.2.1 # Optionally specify a version tag or branch here
2022-01-29 18:53:55 +00:00
)
FetchContent_MakeAvailable(Corrosion)
2022-07-03 00:40:34 +00:00
corrosion_import_crate(MANIFEST_PATH ${CMAKE_SOURCE_DIR}/../../rust/Cargo.toml CRATES veilid-flutter FEATURES rt-tokio )
2022-01-29 18:53:55 +00:00
# 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>)