xref: /freebsd/contrib/libcbor/examples/CMakeLists.txt (revision abd872540f24cfc7dbd1ea29b6918c7082a22108)
110ff414cSEd Masteadd_executable(readfile readfile.c)
210ff414cSEd Mastetarget_link_libraries(readfile cbor)
310ff414cSEd Maste
410ff414cSEd Masteadd_executable(create_items create_items.c)
510ff414cSEd Mastetarget_link_libraries(create_items cbor)
610ff414cSEd Maste
710ff414cSEd Masteadd_executable(streaming_parser streaming_parser.c)
810ff414cSEd Mastetarget_link_libraries(streaming_parser cbor)
910ff414cSEd Maste
105d3e7166SEd Masteadd_executable(streaming_array streaming_array.c)
115d3e7166SEd Mastetarget_link_libraries(streaming_array cbor)
125d3e7166SEd Maste
1310ff414cSEd Masteadd_executable(sort sort.c)
1410ff414cSEd Mastetarget_link_libraries(sort cbor)
1510ff414cSEd Maste
1610ff414cSEd Masteadd_executable(hello hello.c)
1710ff414cSEd Mastetarget_link_libraries(hello cbor)
1810ff414cSEd Maste
1910ff414cSEd Mastefind_package(CJSON)
2010ff414cSEd Maste
2110ff414cSEd Masteif(CJSON_FOUND)
2210ff414cSEd Maste    add_executable(cjson2cbor cjson2cbor.c)
2310ff414cSEd Maste    target_include_directories(cjson2cbor PUBLIC ${CJSON_INCLUDE_DIRS})
2410ff414cSEd Maste    target_link_libraries(cjson2cbor cbor ${CJSON_LIBRARY})
25*abd87254SEd Maste
26*abd87254SEd Maste    add_executable(cbor2cjson cbor2cjson.c)
27*abd87254SEd Maste    target_include_directories(cbor2cjson PUBLIC ${CJSON_INCLUDE_DIRS})
28*abd87254SEd Maste    target_link_libraries(cbor2cjson cbor ${CJSON_LIBRARY})
2910ff414cSEd Masteendif()
3010ff414cSEd Maste
3110ff414cSEd Mastefile(COPY data DESTINATION .)
3210ff414cSEd Maste
33