blobmsg_json: prefer to link against libjson-c over libjson (the new library name...
authorFelix Fietkau <nbd@openwrt.org>
Sun, 10 Feb 2013 14:32:45 +0000 (15:32 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 10 Feb 2013 14:32:45 +0000 (15:32 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
CMakeLists.txt

index 6bcec18db1a2dbfed433940bf39415e824851da4..ba7ccaa9d24c5e3d4e68624536d398f92bd89baa 100644 (file)
@@ -35,13 +35,13 @@ INSTALL(TARGETS ubox
 
 ADD_SUBDIRECTORY(lua)
 
-find_library(json json)
+find_library(json NAMES json-c json)
 IF(EXISTS ${json})
        ADD_LIBRARY(blobmsg_json SHARED blobmsg_json.c)
-       TARGET_LINK_LIBRARIES(blobmsg_json ubox json)
+       TARGET_LINK_LIBRARIES(blobmsg_json ubox ${json})
 
        ADD_EXECUTABLE(jshn jshn.c)
-       TARGET_LINK_LIBRARIES(jshn json)
+       TARGET_LINK_LIBRARIES(jshn ${json})
 
        INSTALL(TARGETS blobmsg_json jshn
                LIBRARY DESTINATION lib