新增静态库及配置
This commit is contained in:
19
components/lib/CMakeLists.txt
Normal file
19
components/lib/CMakeLists.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
list(APPEND incs ".")
|
||||
list(APPEND incs "../system/include")
|
||||
list(APPEND incs "../system/source")
|
||||
list(APPEND incs "../../app")
|
||||
|
||||
list(APPEND srcs "lib_shell.c")
|
||||
|
||||
idf_component_register(
|
||||
INCLUDE_DIRS ${incs}
|
||||
SRCS ${srcs}
|
||||
)
|
||||
|
||||
if(CONFIG_IDF_TARGET_ESP32S3)
|
||||
target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_s3.a")
|
||||
elseif(CONFIG_IDF_TARGET_ESP32C2)
|
||||
target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_c2.a")
|
||||
else(CONFIG_IDF_TARGET_ESP32C3)
|
||||
target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_c3.a")
|
||||
endif()
|
||||
Reference in New Issue
Block a user