libusb: depend on all .gatt files

This commit is contained in:
Matthias Ringwald 2024-09-28 16:20:26 +02:00
parent b795dcd07c
commit e2cd77349c

View File

@ -174,6 +174,9 @@ list(REMOVE_ITEM EXAMPLES_C ${EXAMPLES_OFF})
# workaround: add lwip sources only to lwip_examples
set (LWIP_EXAMPLES pan_lwip_http_server)
# .gatt files in src
file(GLOB GATT_FILES "../../src/*/gatt-service/*.gatt")
# create targets
foreach(EXAMPLE_FILE ${EXAMPLES_C})
get_filename_component(EXAMPLE ${EXAMPLE_FILE} NAME_WE)
@ -191,7 +194,7 @@ foreach(EXAMPLE_FILE ${EXAMPLES_C})
message("example ${EXAMPLE} -- with GATT DB")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h
DEPENDS ${BTSTACK_ROOT}/example/${EXAMPLE}.gatt
DEPENDS ${BTSTACK_ROOT}/example/${EXAMPLE}.gatt ${GATT_FILES}
COMMAND ${Python_EXECUTABLE}
ARGS ${BTSTACK_ROOT}/tool/compile_gatt.py ${BTSTACK_ROOT}/example/${EXAMPLE}.gatt ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h
)