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.
1 parent 4d36456 commit 403567cCopy full SHA for 403567c
example/c/CMakeLists.txt
@@ -1,10 +1,15 @@
1
+FIND_PACKAGE (cJSON)
2
+
3
LIST (APPEND exec_PROGRAMS
4
lib_buffer_unpack.c
5
simple_c.c
6
speed_test_uint32_array.c
7
speed_test_uint64_array.c
8
user_buffer_unpack.c
9
)
10
+IF (cJSON_FOUND)
11
+ LIST (APPEND exec_PROGRAMS jsonconv.c)
12
+ENDIF ()
13
14
FOREACH (source_file ${exec_PROGRAMS})
15
GET_FILENAME_COMPONENT (source_file_we ${source_file} NAME_WE)
@@ -31,3 +36,8 @@ FOREACH (source_file ${exec_PROGRAMS})
31
36
ENDIF ()
32
37
33
38
ENDFOREACH ()
39
40
41
+ TARGET_LINK_LIBRARIES (jsonconv ${CJSON_LIBRARIES})
42
+ TARGET_INCLUDE_DIRECTORIES(jsonconv PRIVATE ${CJSON_INCLUDE_DIRS})
43
0 commit comments