Skip to content

Commit

Permalink
convert between msgpack and json
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed May 15, 2020
1 parent 4d36456 commit e78713a
Show file tree
Hide file tree
Showing 3 changed files with 453 additions and 1 deletion.
10 changes: 10 additions & 0 deletions example/c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
FIND_PACKAGE (cJSON)

LIST (APPEND exec_PROGRAMS
lib_buffer_unpack.c
simple_c.c
speed_test_uint32_array.c
speed_test_uint64_array.c
user_buffer_unpack.c
)
IF (cJSON_FOUND)
LIST (APPEND exec_PROGRAMS jsonconv.c)
ENDIF ()

FOREACH (source_file ${exec_PROGRAMS})
GET_FILENAME_COMPONENT (source_file_we ${source_file} NAME_WE)
Expand All @@ -31,3 +36,8 @@ FOREACH (source_file ${exec_PROGRAMS})
ENDIF ()
ENDIF ()
ENDFOREACH ()

IF (cJSON_FOUND)
TARGET_LINK_LIBRARIES (jsonconv ${CJSON_LIBRARIES})
TARGET_INCLUDE_DIRECTORIES(jsonconv PRIVATE ${CJSON_INCLUDE_DIRS})
ENDIF ()
Loading

0 comments on commit e78713a

Please sign in to comment.