Files
JoyD/ESP32/my_usb_project/rust_app/CMakeLists.txt
2026-04-09 08:55:43 +08:00

15 lines
479 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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)