forked from ROMEO/obsw
13 lines
478 B
CMake
13 lines
478 B
CMake
#TODO can we get CMake to configure cmake --build --clean to run cargo clean?
|
|
|
|
add_custom_target(
|
|
mission_rust_internal
|
|
COMMAND cargo build $<$<CONFIG:Release>:--release>
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
|
|
add_library(mission_rust INTERFACE)
|
|
|
|
add_dependencies(mission_rust mission_rust_internal)
|
|
|
|
target_link_libraries(mission_rust INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/target/armv7a-none-eabihf/$<IF:$<CONFIG:Release>,release,debug>/libmission_rust.a) |