diff --git a/components/ble/CMakeLists.txt b/components/ble/CMakeLists.txt index a48dc30f..44f9dc25 100644 --- a/components/ble/CMakeLists.txt +++ b/components/ble/CMakeLists.txt @@ -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 ########################## diff --git a/examples/ble/ble_central/CMakeLists.txt b/examples/ble/ble_central/CMakeLists.txt index bc71269d..656db63c 100644 --- a/examples/ble/ble_central/CMakeLists.txt +++ b/examples/ble/ble_central/CMakeLists.txt @@ -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() diff --git a/examples/ble/ble_peripheral/CMakeLists.txt b/examples/ble/ble_peripheral/CMakeLists.txt index 1838ecb2..3a350921 100644 --- a/examples/ble/ble_peripheral/CMakeLists.txt +++ b/examples/ble/ble_peripheral/CMakeLists.txt @@ -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() diff --git a/examples/boot2_iap/CMakeLists.txt b/examples/boot2_iap/CMakeLists.txt index 6b727ee2..ec71b12b 100644 --- a/examples/boot2_iap/CMakeLists.txt +++ b/examples/boot2_iap/CMakeLists.txt @@ -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 )