15 lines
479 B
CMake
15 lines
479 B
CMake
# rust_app 组件的 CMake 配置
|
||
# 注意:rust_app_wrapper.c 已经在 main 组件中编译
|
||
# 这里只提供 Rust 静态库的链接
|
||
|
||
idf_component_register(
|
||
INCLUDE_DIRS "."
|
||
)
|
||
|
||
# 链接 Rust 静态库
|
||
set(RUST_LIB_PATH "${COMPONENT_DIR}/target/xtensa-esp32s3-none-elf/release-debug/librust_app.a")
|
||
message(STATUS "Rust library path: ${RUST_LIB_PATH}")
|
||
|
||
add_prebuilt_library(rust_app_lib "${RUST_LIB_PATH}")
|
||
target_link_libraries(${COMPONENT_LIB} INTERFACE rust_app_lib)
|