From e2cd77349c8fffa03552ea95089f342041d5f3a9 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sat, 28 Sep 2024 16:20:26 +0200 Subject: [PATCH] libusb: depend on all .gatt files --- port/libusb/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/port/libusb/CMakeLists.txt b/port/libusb/CMakeLists.txt index b31f74230..33dbe0bf6 100644 --- a/port/libusb/CMakeLists.txt +++ b/port/libusb/CMakeLists.txt @@ -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 )