summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-06-19 21:15:42 +0200
committerJohn Crispin <blogic@openwrt.org>2013-06-19 21:15:42 +0200
commita0ef9a5cf7f9d598cb1b26136f7a23409a442dc5 (patch)
tree91f1063af413a6534a8c9ac83da5650999fa0d5b /CMakeLists.txt
parente80b0bc976b39e4a9a0b3dd5ebd40a66d183a92f (diff)
downloadubox-a0ef9a5cf7f9d598cb1b26136f7a23409a442dc5.tar.gz
Add CmakeList support for the block tool
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 17 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 847ce08..54434d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6)
-PROJECT(procd C)
+PROJECT(ubox C)
ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
@@ -11,7 +11,7 @@ IF(APPLE)
ENDIF()
find_library(json NAMES json-c json)
-SET(LIBS ubox ubus ${json} blobmsg_json)
+SET(LIBS ubox uci ubus ${json} blobmsg_json)
IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -g3)
@@ -24,6 +24,21 @@ INSTALL(TARGETS mount_root
RUNTIME DESTINATION sbin
)
+ADD_EXECUTABLE(block block.c
+ libblkid-tiny/libblkid-tiny.c
+ libblkid-tiny/md5.c
+ libblkid-tiny/mkdev.c
+ libblkid-tiny/ext.c
+ libblkid-tiny/jffs2.c
+ libblkid-tiny/vfat.c
+ libblkid-tiny/swap.c
+ libblkid-tiny/squashfs.c)
+TARGET_LINK_LIBRARIES(block ${LIBS} blobmsg_json)
+
+INSTALL(TARGETS block
+ RUNTIME DESTINATION sbin
+)
+
ADD_EXECUTABLE(kmodloader kmodloader.c)
TARGET_LINK_LIBRARIES(kmodloader ${LIBS})