diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-07-01 14:57:44 -0700 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-07-01 15:12:28 +0200 |
commit | 053be7df871e05478284235732f8b0608089512f (patch) | |
tree | 72c037e692e446d986e7f5e14a296d651de667d6 /examples/CMakeLists.txt | |
parent | 2f09fd7181dcfdad7f5ea2937c61783122710172 (diff) | |
download | ubus-053be7df871e05478284235732f8b0608089512f.tar.gz |
cmake: Fix find_library for ubusd and examples/server
Both ubusd and cli TARGET_LINK_LIBRARIES reference ${json} which is
obtained via find_library(), but since the find_library() is searched
after the TARGET_LINK_LIBRARIES for ubusd, ubusd always gets an empty
${json} variable.
examples/server also links against libjson-c, but we were not setting
TARGET_LINK_LIBRARIES accordingly, so do that too with ${json} appended.
This was causing linking errors for ubusd and then examples/server using
an external toolchain (stbgcc-4.8-1.x).
Fixes: 9f52d1769b762 ("cli: use the new json-c library name")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r-- | examples/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 006dac4..81f9997 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -5,7 +5,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) IF (BUILD_EXAMPLES) ADD_EXECUTABLE(server server.c count.c) - TARGET_LINK_LIBRARIES(server ubus ${ubox_library} ${blob_library}) + TARGET_LINK_LIBRARIES(server ubus ${ubox_library} ${blob_library} ${json}) ADD_EXECUTABLE(client client.c count.c) TARGET_LINK_LIBRARIES(client ubus ${ubox_library}) |