add code for starting instances
[project/procd.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 PROJECT(procd C)
4 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations)
5
6 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
7
8 IF(APPLE)
9   INCLUDE_DIRECTORIES(/opt/local/include)
10   LINK_DIRECTORIES(/opt/local/lib)
11 ENDIF()
12
13 SET(SOURCES main.c ubus.c service.c instance.c utils.c)
14
15 SET(LIBS ubox ubus)
16
17 IF(DEBUG)
18   ADD_DEFINITIONS(-DDEBUG -g3)
19 ENDIF()
20
21 ADD_EXECUTABLE(procd ${SOURCES})
22
23 TARGET_LINK_LIBRARIES(procd ${LIBS})
24
25 INSTALL(TARGETS procd
26         RUNTIME DESTINATION sbin
27 )