From 46381060595ec052cabd0d33af8a261c891771fa Mon Sep 17 00:00:00 2001 From: Jacob Date: Mon, 16 Dec 2019 09:08:16 -0500 Subject: [PATCH] Adding in CMAKE commands for linking JSON-C --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f9a23e..324334f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,2 +1,7 @@ project(HostBlocker) -add_executable(hb main.c) \ No newline at end of file +find_package(PkgConfig REQUIRED) +pkg_check_modules(JSONC REQUIRED json-c) + +add_executable(hb main.c) +target_link_libraries(hb ${JSONC_LIBS}) +target_include_directories(hb PUBLIC ${JSONC_INCLUDE_DIRS}) \ No newline at end of file