We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f3fe1b8 + 403567c commit 766afb9Copy full SHA for 766afb9
example/c/CMakeLists.txt
@@ -1,3 +1,5 @@
1
+FIND_PACKAGE (cJSON)
2
+
3
LIST (APPEND exec_PROGRAMS
4
boundary.c
5
lib_buffer_unpack.c
@@ -6,6 +8,9 @@ LIST (APPEND exec_PROGRAMS
6
8
speed_test_uint64_array.c
7
9
user_buffer_unpack.c
10
)
11
+IF (cJSON_FOUND)
12
+ LIST (APPEND exec_PROGRAMS jsonconv.c)
13
+ENDIF ()
14
15
FOREACH (source_file ${exec_PROGRAMS})
16
GET_FILENAME_COMPONENT (source_file_we ${source_file} NAME_WE)
@@ -32,3 +37,8 @@ FOREACH (source_file ${exec_PROGRAMS})
32
37
ENDIF ()
33
38
34
39
ENDFOREACH ()
40
41
42
+ TARGET_LINK_LIBRARIES (jsonconv ${CJSON_LIBRARIES})
43
+ TARGET_INCLUDE_DIRECTORIES(jsonconv PRIVATE ${CJSON_INCLUDE_DIRS})
44
0 commit comments