blobmsg_json: prefer to link against libjson-c over libjson (the new library name in git versions of json-c)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
95fde87029
commit
9a3519536b
1 changed files with 3 additions and 3 deletions
|
@ -35,13 +35,13 @@ INSTALL(TARGETS ubox
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(lua)
|
ADD_SUBDIRECTORY(lua)
|
||||||
|
|
||||||
find_library(json json)
|
find_library(json NAMES json-c json)
|
||||||
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})
|
||||||
|
|
||||||
ADD_EXECUTABLE(jshn jshn.c)
|
ADD_EXECUTABLE(jshn jshn.c)
|
||||||
TARGET_LINK_LIBRARIES(jshn json)
|
TARGET_LINK_LIBRARIES(jshn ${json})
|
||||||
|
|
||||||
INSTALL(TARGETS blobmsg_json jshn
|
INSTALL(TARGETS blobmsg_json jshn
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
|
|
Loading…
Reference in a new issue