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 "")
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)
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})