luci2: convert to plugin library
[project/rpcd.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 PROJECT(luci-rpcd C)
4 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -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 ADD_EXECUTABLE(luci-rpcd main.c exec.c session.c file.c uci.c iwinfo.c luci2.c plugin.c)
14
15 FIND_LIBRARY(json NAMES json-c json)
16
17 TARGET_LINK_LIBRARIES(luci-rpcd ubox ubus uci iwinfo blobmsg_json ${json})
18
19 SET(CMAKE_INSTALL_PREFIX /usr)
20
21 INSTALL(TARGETS luci-rpcd
22         RUNTIME DESTINATION sbin
23 )