summaryrefslogtreecommitdiffhomepage
path: root/libs/rpcd-mod-luci/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-10-31 14:01:38 +0100
committerJo-Philipp Wich <jo@mein.io>2019-11-01 12:03:28 +0100
commitb292c1d5fa1773c76162fd35fe5324c774a9cf87 (patch)
tree6d55112cd7fb9cdc5e8e9f99a03276ddf5b4fd95 /libs/rpcd-mod-luci/src/CMakeLists.txt
parent4798b3f062ae19e0563665874e27d62d921cb641 (diff)
libs: add rpcd-mod-luci
Add rpcd-mod-luci, a fast rpcd C plugin for speeding up common backend ubus operations. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'libs/rpcd-mod-luci/src/CMakeLists.txt')
-rw-r--r--libs/rpcd-mod-luci/src/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/rpcd-mod-luci/src/CMakeLists.txt b/libs/rpcd-mod-luci/src/CMakeLists.txt
new file mode 100644
index 0000000000..91569b92f7
--- /dev/null
+++ b/libs/rpcd-mod-luci/src/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(rpcd-mod-luci C)
+
+ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
+
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+
+IF(APPLE)
+ INCLUDE_DIRECTORIES(/opt/local/include)
+ LINK_DIRECTORIES(/opt/local/lib)
+ENDIF()
+
+IF (NOT DEFINED LIBNL_LIBS)
+ FIND_LIBRARY(libnl NAMES libnl-3 libnl nl-3 nl)
+ SET(LIBNL_LIBS ${libnl})
+ENDIF()
+
+ADD_LIBRARY(rpcd-mod-luci MODULE luci.c)
+TARGET_LINK_LIBRARIES(rpcd-mod-luci ubox ubus uci dl ${LIBNL_LIBS})
+SET_TARGET_PROPERTIES(rpcd-mod-luci PROPERTIES OUTPUT_NAME luci PREFIX "")
+
+INSTALL(TARGETS rpcd-mod-luci LIBRARY DESTINATION lib)