X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=blobdiff_plain;f=CMakeLists.txt;h=7db28c0ab2ad10e40c527d8d098063a577dcf75c;hp=a6002e5fe9e0b2a390d59d38ce75b8cffeaa8122;hb=e7e1a1b0ab05454ed63e09ccf29d24ed187d7220;hpb=ed224f0b1f9cfb3f8c5766cba3a60343c0eda586 diff --git a/CMakeLists.txt b/CMakeLists.txt index a6002e5..7db28c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,9 @@ ADD_LIBRARY(ubi-utils STATIC libubi/ubiutils-common.c) INSTALL(TARGETS ubi-utils ARCHIVE DESTINATION lib) +FIND_PATH(ubox_include_dir libubox/ulog.h) +INCLUDE_DIRECTORIES(${ubox_include_dir}) + SET_TARGET_PROPERTIES(ubi-utils PROPERTIES COMPILE_FLAGS "-ffunction-sections -fdata-sections") @@ -50,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)