1if(CONFIG_MIPI_SYST_LIB)
2  zephyr_interface_library_named(mipi_syst_library)
3
4  set(SYST_CFG_VERSION_MAJOR "1" CACHE STRING
5    "Supported MIPI SyS-T major specification version.")
6  set(SYST_CFG_VERSION_MINOR "0" CACHE STRING
7    "Supported MIPI SyS-T minor specification version.")
8  set(SYST_CFG_VERSION_PATCH "0" CACHE PATH
9    "SyS-T Library patch level.")
10  set(SYST_CFG_CONFORMANCE_LEVEL "30" CACHE STRING
11    "Supported MIPI SyS-T API conformance level.
12    (10=min, 20=low overhead, 30=complete)")
13
14    configure_file(library/include/mipi_syst.h.in
15      library/include/mipi_syst.h)
16
17    zephyr_include_directories(
18      mipi_syst_library INTERFACE
19      ${CMAKE_CURRENT_BINARY_DIR}/library/include/
20      ${ZEPHYR_BASE}/subsys/logging
21      library/include/
22      include/
23      )
24
25    zephyr_library()
26
27    zephyr_library_sources(library/src/mipi_syst_api.c)
28    zephyr_library_sources(library/src/mipi_syst_compiler.c)
29    zephyr_library_sources(library/src/mipi_syst_crc32.c)
30    zephyr_library_sources(library/src/mipi_syst_init.c)
31    zephyr_library_sources(library/src/mipi_syst_inline.c)
32    zephyr_library_sources(library/src/mipi_syst_writer.c)
33
34    zephyr_library_link_libraries(mipi_syst_library)
35
36    target_link_libraries(mipi_syst_library INTERFACE zephyr_interface)
37
38    if(CONFIG_MIPI_SYST_NO_WHCAR)
39      zephyr_library_compile_definitions(NO_WCHAR)
40    endif()
41endif()
42