Skip to content

Commit d1600cc

Browse files
authored
[ESP32]: fix compile error for c6 bt lib path (#36332)
* esp32: fix compile error for c6 bt lib path * Add warning message if no libble_app.a is found.
1 parent 1ba5de6 commit d1600cc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

config/esp32/components/chip/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,13 @@ if(CONFIG_BT_ENABLED)
430430
if((target_name STREQUAL "esp32h2") OR (target_name STREQUAL "esp32c2") OR (target_name STREQUAL "esp32c6"))
431431
idf_component_get_property(bt_dir bt COMPONENT_DIR)
432432
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}>)
433-
list(APPEND chip_libraries "${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a")
433+
if (EXISTS ${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a)
434+
list(APPEND chip_libraries "${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a")
435+
elseif(EXISTS ${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/${target_name}/libble_app.a)
436+
list(APPEND chip_libraries "${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/${target_name}/libble_app.a")
437+
else()
438+
message(WARNING "There is no libble_app.a in the given path")
439+
endif()
434440
elseif(target_name STREQUAL "esp32p4")
435441
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}>)
436442
else()

0 commit comments

Comments
 (0)