X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=blobdiff_plain;f=CMakeLists.txt;h=b6aa2de001d39557293defb497589aebccd31629;hp=a6002e5fe9e0b2a390d59d38ce75b8cffeaa8122;hb=bb2239de848e7289856068ba0952bb4492c395d8;hpb=ed224f0b1f9cfb3f8c5766cba3a60343c0eda586 diff --git a/CMakeLists.txt b/CMakeLists.txt index a6002e5..b6aa2de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ ADD_LIBRARY(fstools SHARED libfstools/mtd.c libfstools/mount.c libfstools/ubi.c + libfstools/rootdisk.c libfstools/find.c) TARGET_LINK_LIBRARIES(fstools ubox) INSTALL(TARGETS fstools LIBRARY DESTINATION lib) @@ -38,6 +39,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 +54,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)