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

This page was automatically generated by LXR 0.3.1.  •  OpenWrt