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}) 25 26 add_executable(cbor2cjson cbor2cjson.c) 27 target_include_directories(cbor2cjson PUBLIC ${CJSON_INCLUDE_DIRS}) 28 target_link_libraries(cbor2cjson cbor ${CJSON_LIBRARY}) 29endif() 30 31file(COPY data DESTINATION .) 32 33