libubox: drop legacy json-c support

The cmake logic is wrong (E.G. PKG_CHECK_FOR_MODULES fails unless all
modules are found), and the legacy libjson.so name is also used by the other
libjson (http://sourceforge.net/projects/libjson/) which provides an
incompatible API, so just drop it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou 2014-11-12 21:59:14 +08:00 committed by Felix Fietkau
parent f09ae76445
commit cbf80de7f4

View file

@ -13,7 +13,7 @@ IF(APPLE)
ENDIF() ENDIF()
INCLUDE(FindPkgConfig) INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(JSONC json-c json) PKG_CHECK_MODULES(JSONC json-c)
IF(JSONC_FOUND) IF(JSONC_FOUND)
ADD_DEFINITIONS(-DJSONC) ADD_DEFINITIONS(-DJSONC)
INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})
@ -45,7 +45,7 @@ INSTALL(TARGETS ubox ubox-static
ADD_SUBDIRECTORY(lua) ADD_SUBDIRECTORY(lua)
find_library(json NAMES json-c json) find_library(json NAMES json-c)
IF(EXISTS ${json}) IF(EXISTS ${json})
ADD_LIBRARY(blobmsg_json SHARED blobmsg_json.c) ADD_LIBRARY(blobmsg_json SHARED blobmsg_json.c)
TARGET_LINK_LIBRARIES(blobmsg_json ubox ${json}) TARGET_LINK_LIBRARIES(blobmsg_json ubox ${json})