summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-06-01 09:50:29 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-06-01 09:50:29 +0200
commitca808f5c335a873c87359ce024e1a14ebae706b9 (patch)
treebf6ca050eedf2b3f71d8698d370786174bf17cca /CMakeLists.txt
downloadunitd-ca808f5c335a873c87359ce024e1a14ebae706b9.tar
unitd-ca808f5c335a873c87359ce024e1a14ebae706b9.zip
initial import: starts and connects to ubus
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..b696b32
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(procd C)
+ADD_DEFINITIONS(-Os -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()
+
+SET(SOURCES main.c ubus.c)
+
+SET(LIBS ubox ubus)
+
+IF(DEBUG)
+ ADD_DEFINITIONS(-DDEBUG -g3)
+ENDIF()
+
+ADD_EXECUTABLE(procd ${SOURCES})
+
+TARGET_LINK_LIBRARIES(procd ${LIBS})
+
+INSTALL(TARGETS procd
+ RUNTIME DESTINATION sbin
+)