xref: /freebsd/contrib/libcbor/examples/CMakeLists.txt (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1add_executable(readfile readfile.c)
2target_link_libraries(readfile cbor)
3
4add_executable(create_items create_items.c)
5target_link_libraries(create_items cbor)
6
7add_executable(streaming_parser streaming_parser.c)
8target_link_libraries(streaming_parser cbor)
9
10add_executable(streaming_array streaming_array.c)
11target_link_libraries(streaming_array cbor)
12
13add_executable(sort sort.c)
14target_link_libraries(sort cbor)
15
16add_executable(hello hello.c)
17target_link_libraries(hello cbor)
18
19find_package(CJSON)
20
21if(CJSON_FOUND)
22    add_executable(cjson2cbor cjson2cbor.c)
23    target_include_directories(cjson2cbor PUBLIC ${CJSON_INCLUDE_DIRS})
24    target_link_libraries(cjson2cbor cbor ${CJSON_LIBRARY})
25endif()
26
27file(COPY data DESTINATION .)
28
29