[fix] solve ble lib requirement

This commit is contained in:
jzlv 2021-06-07 19:10:17 +08:00
parent 21c888024a
commit 3e01bbe058
4 changed files with 7 additions and 8 deletions

View file

@ -143,13 +143,16 @@ list(APPEND ADD_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/ble_stack/sbc/enc")
endif()
add_library(blecontroller STATIC IMPORTED)
set_target_properties(blecontroller PROPERTIES
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/components/ble/blecontroller/lib/libblecontroller.a"
INTERFACE_LINK_LIBRARIES ${CHIP}_driver)
# aux_source_directory(src ADD_SRCS)
#######################################################
########### Add required/dependent components #########
list(APPEND ADD_REQUIREMENTS freertos ${CHIP}_driver)
list(APPEND ADD_REQUIREMENTS freertos blecontroller)
#######################################################
############ Add static libs ##########################

View file

@ -1,6 +1,6 @@
set(BSP_COMMON_DIR ${CMAKE_SOURCE_DIR}/bsp/bsp_common)
set(TARGET_REQUIRED_SRCS ${CMAKE_CURRENT_LIST_DIR}/ble_central_tp_client.c)
set(TARGET_REQUIRED_LIBS ble "${CMAKE_SOURCE_DIR}/components/ble/blecontroller/lib/libblecontroller.a")
set(TARGET_REQUIRED_LIBS ble)
set(mains main.c)
set(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/examples/ble/bl702_flash_ble.ld)
generate_bin()

View file

@ -1,6 +1,6 @@
set(BSP_COMMON_DIR ${CMAKE_SOURCE_DIR}/bsp/bsp_common)
set(TARGET_REQUIRED_SRCS ${CMAKE_CURRENT_LIST_DIR}/ble_peripheral_tp_server.c)
set(TARGET_REQUIRED_LIBS ble "${CMAKE_SOURCE_DIR}/components/ble/blecontroller/lib/libblecontroller.a")
set(TARGET_REQUIRED_LIBS ble)
set(mains main.c)
set(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/examples/ble/bl702_flash_ble.ld)
generate_bin()

View file

@ -1,7 +1,3 @@
list(APPEND ADD_INCLUDE
"${CMAKE_CURRENT_SOURCE_DIR}"
)
set(TARGET_REQUIRED_LIBS xz)
list(APPEND TARGET_REQUIRED_SRCS blsp_common.c blsp_media_boot.c )