Add CmakeList support for the block tool
authorJohn Crispin <blogic@openwrt.org>
Wed, 19 Jun 2013 19:15:42 +0000 (21:15 +0200)
committerJohn Crispin <blogic@openwrt.org>
Wed, 19 Jun 2013 19:15:42 +0000 (21:15 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
CMakeLists.txt

index 847ce08515423db2a660df7a48913bdaf27315d4..54434d15c1e5f82afed423722bdef78280906616 100644 (file)
@@ -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})