1# 2# Copyright (c) 2020 Nordic Semiconductor ASA 3# 4# SPDX-License-Identifier: Apache-2.0 5# 6 7cmake_minimum_required(VERSION 3.13.1) 8 9find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 10project(test1_suit_old_formats) 11include(../../cmake/test_template.cmake) 12 13set(py_command3 14 zcbor 15 code 16 -c ${CMAKE_CURRENT_LIST_DIR}/../../cases/manifest-moran3.cddl 17 --no-prelude # manifest-moran3.cddl contains types that collide with types in prelude.cddl. 18 --default-max-qty MY_DEFAULT_MAX_QTY 19 --output-cmake ${PROJECT_BINARY_DIR}/manifest-moran3.cmake 20 -t OuterWrapper 21 --decode 22 ${bit_arg} 23 ) 24 25set(py_command4 26 zcbor 27 code 28 -c ${CMAKE_CURRENT_LIST_DIR}/../../cases/manifest-moran4.cddl 29 --no-prelude 30 --default-max-qty MY_DEFAULT_MAX_QTY 31 --output-cmake ${PROJECT_BINARY_DIR}/manifest-moran4.cmake 32 -t SUIT_Outer_Wrapper 33 --decode 34 ${bit_arg} 35 ) 36 37execute_process( 38 COMMAND 39 ${py_command3} 40 COMMAND 41 ${py_command4} 42 COMMAND_ERROR_IS_FATAL ANY 43) 44 45include(${PROJECT_BINARY_DIR}/manifest-moran3.cmake) 46include(${PROJECT_BINARY_DIR}/manifest-moran4.cmake) 47 48target_link_libraries(manifest-moran3 PRIVATE zephyr_interface) 49target_link_libraries(manifest-moran4 PRIVATE zephyr_interface) 50target_link_libraries(app PRIVATE manifest-moran3 manifest-moran4) 51 52zephyr_compile_definitions(MY_DEFAULT_MAX_QTY=6) 53