prefer to link against libjson-c over libjson (the new library name in git versions...
authorFelix Fietkau <nbd@openwrt.org>
Mon, 11 Feb 2013 21:10:03 +0000 (22:10 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 11 Feb 2013 21:10:03 +0000 (22:10 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
CMakeLists.txt

index 74cb080..2076fc9 100644 (file)
@@ -18,8 +18,9 @@ SET(SOURCES
        ubus.c)
 
 
        ubus.c)
 
 
+find_library(json NAMES json-c json)
 SET(LIBS
 SET(LIBS
-       ubox ubus uci json blobmsg_json)
+       ubox ubus uci ${json} blobmsg_json)
 
 IF (NOT DEFINED LIBNL_LIBS)
   SET(LIBNL_LIBS -lnl)
 
 IF (NOT DEFINED LIBNL_LIBS)
   SET(LIBNL_LIBS -lnl)