From 9f52d1769b76239a1dd64b0d1e9e6aa7b18eed10 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Wed, 29 May 2013 12:53:17 +0200
Subject: [PATCH] cli: use the new json-c library name

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22027ec..e3b150b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,9 +23,10 @@ TARGET_LINK_LIBRARIES(ubus ubox)
 ADD_EXECUTABLE(ubusd ubusd.c ubusd_id.c ubusd_obj.c ubusd_proto.c ubusd_event.c)
 TARGET_LINK_LIBRARIES(ubusd ubox)
 
+find_library(json NAMES json-c json)
 ADD_EXECUTABLE(cli cli.c)
 SET_TARGET_PROPERTIES(cli PROPERTIES OUTPUT_NAME ubus)
-TARGET_LINK_LIBRARIES(cli ubus ubox blobmsg_json json)
+TARGET_LINK_LIBRARIES(cli ubus ubox blobmsg_json ${json})
 
 ADD_SUBDIRECTORY(lua)
 ADD_SUBDIRECTORY(examples)
-- 
2.25.1