examples: fix linking with json-c

Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
Luka Perkov 2014-07-03 12:28:22 +02:00 committed by Felix Fietkau
parent b10cd1c0f6
commit fd3a33b7ed

View file

@ -11,8 +11,10 @@ ENDIF()
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
FIND_LIBRARY(json NAMES json-c json)
ADD_EXECUTABLE(blobmsg-example blobmsg-example.c) ADD_EXECUTABLE(blobmsg-example blobmsg-example.c)
TARGET_LINK_LIBRARIES(blobmsg-example ubox blobmsg_json json) TARGET_LINK_LIBRARIES(blobmsg-example ubox blobmsg_json ${json})
ADD_EXECUTABLE(ustream-example ustream-example.c) ADD_EXECUTABLE(ustream-example ustream-example.c)
TARGET_LINK_LIBRARIES(ustream-example ubox) TARGET_LINK_LIBRARIES(ustream-example ubox)