• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/fstools/CMakeLists.txt

  1 cmake_minimum_required(VERSION 2.6)
  2 
  3 PROJECT(fs-tools C)
  4 ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-format-truncation)
  5 
  6 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
  7 
  8 ADD_LIBRARY(fstools SHARED
  9                 libfstools/common.c
 10                 libfstools/snapshot.c
 11                 libfstools/extroot.c
 12                 libfstools/overlay.c
 13                 libfstools/volume.c
 14                 libfstools/mtd.c
 15                 libfstools/mount.c
 16                 libfstools/ubi.c
 17                 libfstools/rootdisk.c
 18                 libfstools/partname.c
 19                 libfstools/find.c)
 20 TARGET_LINK_LIBRARIES(fstools ubox)
 21 INSTALL(TARGETS fstools LIBRARY DESTINATION lib)
 22 
 23 ADD_LIBRARY(blkid-tiny SHARED
 24                 libblkid-tiny/encode.c
 25                 libblkid-tiny/libblkid-tiny.c
 26                 libblkid-tiny/mkdev.c
 27                 libblkid-tiny/probe.c
 28                 libblkid-tiny/ext.c
 29                 libblkid-tiny/jffs2.c
 30                 libblkid-tiny/vfat.c
 31                 libblkid-tiny/ntfs.c
 32                 libblkid-tiny/hfs.c
 33                 libblkid-tiny/swap.c
 34                 libblkid-tiny/ubi.c
 35                 libblkid-tiny/ubifs.c
 36                 libblkid-tiny/squashfs.c
 37                 libblkid-tiny/btrfs.c
 38                 libblkid-tiny/f2fs.c
 39                 )
 40 INSTALL(TARGETS blkid-tiny LIBRARY DESTINATION lib)
 41 INSTALL(FILES libblkid-tiny/libblkid-tiny.h DESTINATION include)
 42 
 43 ADD_LIBRARY(ubi-utils STATIC
 44                 libubi/libubi.c
 45                 libubi/libubi-tiny.c
 46                 libubi/ubiutils-common.c)
 47 INSTALL(TARGETS ubi-utils ARCHIVE DESTINATION lib)
 48 
 49 FIND_PATH(ubox_include_dir libubox/ulog.h)
 50 INCLUDE_DIRECTORIES(${ubox_include_dir})
 51 
 52 SET_TARGET_PROPERTIES(ubi-utils PROPERTIES COMPILE_FLAGS
 53                 "-ffunction-sections -fdata-sections")
 54 
 55 INSTALL(FILES libubi/libubi-tiny.h libubi/libubi.h libubi/ubi-media.h
 56                 libubi/ubi-user.h libubi/ubi-media.h
 57         DESTINATION include
 58 )
 59 
 60 IF(DEFINED CMAKE_OVL_MOUNT_COMPRESS_ZLIB)
 61         ADD_DEFINITIONS(-DOVL_MOUNT_COMPRESS_ZLIB)
 62 ENDIF(DEFINED CMAKE_OVL_MOUNT_COMPRESS_ZLIB)
 63 
 64 IF(DEFINED CMAKE_OVL_MOUNT_FULL_ACCESS_TIME)
 65         ADD_DEFINITIONS(-DOVL_MOUNT_FULL_ACCESS_TIME)
 66 ENDIF(DEFINED CMAKE_OVL_MOUNT_FULL_ACCESS_TIME)
 67 
 68 ADD_EXECUTABLE(mount_root mount_root.c)
 69 TARGET_LINK_LIBRARIES(mount_root fstools)
 70 INSTALL(TARGETS mount_root RUNTIME DESTINATION sbin)
 71 
 72 find_library(json NAMES json-c json)
 73 
 74 ADD_EXECUTABLE(blockd blockd.c)
 75 TARGET_LINK_LIBRARIES(blockd fstools ubus blobmsg_json ${json})
 76 INSTALL(TARGETS blockd RUNTIME DESTINATION sbin)
 77 
 78 ADD_EXECUTABLE(block block.c probe.c probe-libblkid.c)
 79 IF(DEFINED CMAKE_UBIFS_EXTROOT)
 80         ADD_DEFINITIONS(-DUBIFS_EXTROOT)
 81         TARGET_LINK_LIBRARIES(block blkid-tiny dl uci ubox ubus blobmsg_json ubi-utils ${json})
 82 ELSE(DEFINED CMAKE_UBIFS_EXTROOT)
 83         TARGET_LINK_LIBRARIES(block blkid-tiny dl uci ubox ubus blobmsg_json ${json})
 84 ENDIF(DEFINED CMAKE_UBIFS_EXTROOT)
 85 INSTALL(TARGETS block RUNTIME DESTINATION sbin)
 86 
 87 ADD_EXECUTABLE(jffs2reset jffs2reset.c)
 88 TARGET_LINK_LIBRARIES(jffs2reset fstools)
 89 INSTALL(TARGETS jffs2reset RUNTIME DESTINATION sbin)
 90 
 91 ADD_EXECUTABLE(snapshot_tool snapshot.c)
 92 TARGET_LINK_LIBRARIES(snapshot_tool fstools)
 93 INSTALL(TARGETS snapshot_tool RUNTIME DESTINATION sbin)
 94 
 95 ADD_EXECUTABLE(ubi ubi.c)
 96 TARGET_LINK_LIBRARIES(ubi ubi-utils ubox)
 97 INSTALL(TARGETS ubi RUNTIME DESTINATION sbin)

This page was automatically generated by LXR 0.3.1.  •  OpenWrt