mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(ble): Check if there are illegal library files in controller lib path
(cherry picked from commit 40706bf28f)
Co-authored-by: ShenWeilong <shenweilong@espressif.com>
This commit is contained in:
@@ -34,13 +34,20 @@ function(register_bt_ctrl_libs)
|
||||
set(lib_path "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/lib_${TARGET_SRC_NAME}/${TARGET_SRC_NAME}-bt-lib")
|
||||
# BLE controller library
|
||||
if(NOT CONFIG_BT_DUAL_MODE_ARCH OR CONFIG_BT_CTRL_BLE_ENABLE)
|
||||
if(EXISTS "${lib_path}/libble_app.a")
|
||||
if(NOT EXISTS "${lib_path}/${idf_target}")
|
||||
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND EXISTS "${lib_path}/libble_app_flash.a")
|
||||
add_prebuilt_library(libble_app "${lib_path}/libble_app_flash.a" REQUIRES esp_phy bt)
|
||||
else()
|
||||
add_prebuilt_library(libble_app "${lib_path}/libble_app.a" REQUIRES esp_phy bt)
|
||||
endif()
|
||||
else()
|
||||
file(GLOB ILLEGAL_LIB_FILES "${lib_path}/*.a")
|
||||
if(ILLEGAL_LIB_FILES)
|
||||
message(FATAL_ERROR
|
||||
"${lib_path} should not contain the library files!"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND EXISTS "${lib_path}/${idf_target}/libble_app_flash.a")
|
||||
add_prebuilt_library(libble_app "${lib_path}/${idf_target}/libble_app_flash.a" REQUIRES esp_phy bt)
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user