Skip to content

Commit bc7d9ce

Browse files
Fix some header dependencies in bluetooth (hathach#1294)
If you just want to link to pico_btstack_flash_bank_headers to include the header file you also have to link to pico_btstack_base_headers. ENABLE_CLASSIC and ENABLE_BLE are used in header files so should be added by the headers library Fixes hathach#1271
1 parent 18479e0 commit bc7d9ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rp2_common/pico_btstack/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ if (EXISTS ${PICO_BTSTACK_PATH}/${BTSTACK_TEST_PATH})
9494
pico_mirrored_target_link_libraries(pico_btstack_ble INTERFACE
9595
pico_btstack_base
9696
)
97-
target_compile_definitions(pico_btstack_ble INTERFACE
97+
target_compile_definitions(pico_btstack_ble_headers INTERFACE
9898
ENABLE_BLE=1
9999
)
100100

@@ -147,7 +147,7 @@ if (EXISTS ${PICO_BTSTACK_PATH}/${BTSTACK_TEST_PATH})
147147
pico_mirrored_target_link_libraries(pico_btstack_classic INTERFACE
148148
pico_btstack_base
149149
)
150-
target_compile_definitions(pico_btstack_classic INTERFACE
150+
target_compile_definitions(pico_btstack_classic_headers INTERFACE
151151
ENABLE_CLASSIC=1
152152
)
153153

@@ -156,6 +156,7 @@ if (EXISTS ${PICO_BTSTACK_PATH}/${BTSTACK_TEST_PATH})
156156
${CMAKE_CURRENT_LIST_DIR}/btstack_flash_bank.c
157157
)
158158
target_include_directories(pico_btstack_flash_bank_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
159+
pico_mirrored_target_link_libraries(pico_btstack_flash_bank INTERFACE pico_btstack_base)
159160

160161
pico_add_library(pico_btstack_run_loop_async_context NOFLAG)
161162
target_sources(pico_btstack_run_loop_async_context INTERFACE

0 commit comments

Comments
 (0)