libusb: recreate gatt .h file if .gatt is changed in CMake build

This commit is contained in:
Matthias Ringwald 2021-04-29 20:49:58 +02:00
parent 50c79195c5
commit 7daf1469d8

View File

@ -178,6 +178,7 @@ foreach(EXAMPLE_FILE ${EXAMPLES_C})
message("example ${EXAMPLE} -- with GATT DB")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h
DEPENDS ${CMAKE_SOURCE_DIR}/${EXAMPLE}.gatt
COMMAND ${CMAKE_SOURCE_DIR}/../../tool/compile_gatt.py
ARGS ${CMAKE_SOURCE_DIR}/../../example/${EXAMPLE}.gatt ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.h
)