diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-07-01 16:06:42 -0700 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-07-01 15:25:47 +0200 |
commit | 35aa20c51995e80257244790d4f058e15f29569f (patch) | |
tree | e7904a5a0996725cb423b67004273626ff874e91 | |
parent | eaaaf75a225fcdebb8914d5b4a046c88d2b3a105 (diff) | |
download | fstools-35aa20c51995e80257244790d4f058e15f29569f.tar.gz |
cmake: Link against libjson-c
block uses libblob_msgjson which requires us to link against libjson-c.
Some external toolchains would be failing to find that library unless
specified explicitly.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a5a583..7db28c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,12 +53,14 @@ ADD_EXECUTABLE(mount_root mount_root.c) TARGET_LINK_LIBRARIES(mount_root fstools) INSTALL(TARGETS mount_root RUNTIME DESTINATION sbin) +find_library(json NAMES json-c json) + ADD_EXECUTABLE(block block.c) IF(DEFINED CMAKE_UBIFS_EXTROOT) ADD_DEFINITIONS(-DUBIFS_EXTROOT) - TARGET_LINK_LIBRARIES(block blkid-tiny uci ubox blobmsg_json ubi-utils) + TARGET_LINK_LIBRARIES(block blkid-tiny uci ubox blobmsg_json ubi-utils ${json}) ELSE(DEFINED CMAKE_UBIFS_EXTROOT) - TARGET_LINK_LIBRARIES(block blkid-tiny uci ubox blobmsg_json) + TARGET_LINK_LIBRARIES(block blkid-tiny uci ubox blobmsg_json ${json}) ENDIF(DEFINED CMAKE_UBIFS_EXTROOT) INSTALL(TARGETS block RUNTIME DESTINATION sbin) |