[LEDE-DEV] [PATCH usbmode 2/2] cmake: Search for libjson-c

Florian Fainelli f.fainelli at gmail.com
Mon Jul 11 15:34:37 PDT 2016


Since we use libblobmsg_json which uses libjson-c internally, make sure we find
this library.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 CMakeLists.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 95d757f..28394e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,8 +14,9 @@ find_package(PkgConfig)
 pkg_check_modules(LIBUSB1 REQUIRED libusb-1.0)
 ADD_DEFINITIONS(${LIBUSB1_CFLAGS})
 FIND_LIBRARY(libusb NAMES usb-1.0 HINTS ${LIBUSB1_LIBDIR})
+FIND_LIBRARY(json NAMES json-c json)
 
-SET(LIBS ubox blobmsg_json ${libusb})
+SET(LIBS ubox blobmsg_json ${libusb} ${json})
 
 IF(DEBUG)
   ADD_DEFINITIONS(-DDEBUG -g3)
-- 
1.7.1




More information about the Lede-dev mailing list