esp-idf/components/cbor/CMakeLists.txt

21 lines
1.0 KiB
CMake
Raw Normal View History

2019-08-12 10:07:47 -04:00
idf_component_register(SRCS "tinycbor/src/cborencoder_close_container_checked.c"
"tinycbor/src/cborencoder.c"
"tinycbor/src/cborerrorstrings.c"
"tinycbor/src/cborparser_dup_string.c"
"tinycbor/src/cborparser.c"
"tinycbor/src/cborpretty_stdio.c"
"tinycbor/src/cborpretty.c"
"tinycbor/src/cbortojson.c"
"tinycbor/src/cborvalidation.c"
"tinycbor/src/open_memstream.c"
INCLUDE_DIRS "port/include"
PRIV_INCLUDE_DIRS "tinycbor/src")
# for open_memstream.c
2020-06-22 07:48:40 -04:00
set_source_files_properties(tinycbor/src/open_memstream.c PROPERTIES COMPILE_DEFINITIONS "__linux__")
# workaround for the fact that we are passing -ffreestanding to Clang
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
target_compile_options(${COMPONENT_LIB} PRIVATE "-U __STDC_HOSTED__")
endif()