1if(CONFIG_ZCBOR)
2  zephyr_include_directories(
3    ${ZEPHYR_ZCBOR_MODULE_DIR}/include
4  )
5
6  zephyr_library()
7  zephyr_library_sources(
8    ${ZEPHYR_ZCBOR_MODULE_DIR}/src/zcbor_common.c
9    ${ZEPHYR_ZCBOR_MODULE_DIR}/src/zcbor_decode.c
10    ${ZEPHYR_ZCBOR_MODULE_DIR}/src/zcbor_encode.c
11  )
12
13  zephyr_library_compile_definitions(_POSIX_C_SOURCE=200809L)
14
15  zephyr_compile_definitions_ifdef(CONFIG_ZCBOR_CANONICAL ZCBOR_CANONICAL)
16  zephyr_compile_definitions_ifdef(CONFIG_ZCBOR_STOP_ON_ERROR ZCBOR_STOP_ON_ERROR)
17  zephyr_compile_definitions_ifdef(CONFIG_ZCBOR_VERBOSE ZCBOR_VERBOSE)
18  zephyr_compile_definitions_ifdef(CONFIG_ZCBOR_ASSERT ZCBOR_ASSERTS)
19  zephyr_compile_definitions_ifdef(CONFIG_ZCBOR_BIG_ENDIAN ZCBOR_BIG_ENDIAN)
20endif()
21