CMakeLists.txt 1.0 KB

1234567891011121314151617181920
  1. idf_component_register(SRCS "tinycbor/src/cborencoder_close_container_checked.c"
  2. "tinycbor/src/cborencoder.c"
  3. "tinycbor/src/cborerrorstrings.c"
  4. "tinycbor/src/cborparser_dup_string.c"
  5. "tinycbor/src/cborparser.c"
  6. "tinycbor/src/cborpretty_stdio.c"
  7. "tinycbor/src/cborpretty.c"
  8. "tinycbor/src/cbortojson.c"
  9. "tinycbor/src/cborvalidation.c"
  10. "tinycbor/src/open_memstream.c"
  11. INCLUDE_DIRS "port/include"
  12. PRIV_INCLUDE_DIRS "tinycbor/src")
  13. # for open_memstream.c
  14. set_source_files_properties(tinycbor/src/open_memstream.c PROPERTIES COMPILE_DEFINITIONS "__linux__")
  15. # workaround for the fact that we are passing -ffreestanding to Clang
  16. if(CMAKE_C_COMPILER_ID MATCHES "Clang")
  17. target_compile_options(${COMPONENT_LIB} PRIVATE "-U __STDC_HOSTED__")
  18. endif()