forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mesh_dfu_metadata.cmake
37 lines (32 loc) · 997 Bytes
/
mesh_dfu_metadata.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
find_package(Python3 REQUIRED)
function(mesh_dfu_metadata)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/dfu_application.zip_ble_mesh_metadata.json
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_NRF_MODULE_DIR}/scripts/bluetooth/mesh/mesh_dfu_metadata.py
--bin-path ${PROJECT_BINARY_DIR}
DEPENDS
${PROJECT_BINARY_DIR}/dfu_application.zip
)
add_custom_target(
parse_mesh_metadata
ALL
DEPENDS ${PROJECT_BINARY_DIR}/dfu_application.zip_ble_mesh_metadata.json
)
add_custom_target(
# Prints already generated metadata
ble_mesh_dfu_metadata
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_NRF_MODULE_DIR}/scripts/bluetooth/mesh/mesh_dfu_metadata.py
--bin-path ${PROJECT_BINARY_DIR}
--print-metadata
COMMAND_EXPAND_LISTS
)
endfunction()