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 )