summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-04-23 20:52:03 +0200
committerJohn Crispin <blogic@openwrt.org>2013-04-25 11:11:26 +0200
commitfa4c1e81dae3ffb7711be38c64eacf8ac3856e42 (patch)
tree611fab5aab39e80c6df3a7e236de9e5d9609baec /CMakeLists.txt
downloadubox-fa4c1e81dae3ffb7711be38c64eacf8ac3856e42.tar.gz
initial import of uboox utilities
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..847ce08
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,46 @@
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(procd C)
+ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
+
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+
+IF(APPLE)
+ INCLUDE_DIRECTORIES(/opt/local/include)
+ LINK_DIRECTORIES(/opt/local/lib)
+ENDIF()
+
+find_library(json NAMES json-c json)
+SET(LIBS ubox ubus ${json} blobmsg_json)
+
+IF(DEBUG)
+ ADD_DEFINITIONS(-DDEBUG -g3)
+ENDIF()
+
+ADD_EXECUTABLE(mount_root mount_root.c)
+TARGET_LINK_LIBRARIES(mount_root ${LIBS})
+
+INSTALL(TARGETS mount_root
+ RUNTIME DESTINATION sbin
+)
+
+ADD_EXECUTABLE(kmodloader kmodloader.c)
+TARGET_LINK_LIBRARIES(kmodloader ${LIBS})
+
+INSTALL(TARGETS kmodloader
+ RUNTIME DESTINATION sbin
+)
+
+ADD_EXECUTABLE(board board.c)
+TARGET_LINK_LIBRARIES(board ${LIBS})
+
+INSTALL(TARGETS board
+ RUNTIME DESTINATION sbin
+)
+
+ADD_EXECUTABLE(lsbloader lsbloader.c)
+TARGET_LINK_LIBRARIES(lsbloader ${LIBS})
+
+INSTALL(TARGETS lsbloader
+ RUNTIME DESTINATION sbin
+)