xref: /freebsd/contrib/libcbor/examples/CMakeLists.txt (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
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(sort sort.c)
11target_link_libraries(sort cbor)
12
13add_executable(hello hello.c)
14target_link_libraries(hello cbor)
15
16find_package(CJSON)
17
18if(CJSON_FOUND)
19    add_executable(cjson2cbor cjson2cbor.c)
20    target_include_directories(cjson2cbor PUBLIC ${CJSON_INCLUDE_DIRS})
21    target_link_libraries(cjson2cbor cbor ${CJSON_LIBRARY})
22endif()
23
24file(COPY data DESTINATION .)
25
26