summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-03-12 14:37:35 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-03-12 14:37:40 +0100
commitc9e849b50162fadb1ebaaedba7a743040c9f299f (patch)
tree4bb2e2bb248a7e6c489ff5719da289421f259df0 /CMakeLists.txt
parentbd273366d92472c9af07bf227c3c2bbd530b25f6 (diff)
detect the right library name for json-c
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd22fc7..ec45c52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,8 @@ IF(UBUS_SUPPORT)
SET(PLUGINS ${PLUGINS} uhttpd_ubus)
ADD_DEFINITIONS(-DHAVE_UBUS)
ADD_LIBRARY(uhttpd_ubus MODULE ubus.c)
- TARGET_LINK_LIBRARIES(uhttpd_ubus ubus ubox blobmsg_json json)
+ FIND_LIBRARY(libjson NAMES json-c json)
+ TARGET_LINK_LIBRARIES(uhttpd_ubus ubus ubox blobmsg_json ${libjson})
ENDIF()
IF(PLUGINS)