summaryrefslogtreecommitdiffhomepage
path: root/libs/rpcd-mod-rrdns/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-07-10 18:38:03 +0200
committerJo-Philipp Wich <jo@mein.io>2017-07-11 14:05:31 +0200
commit74affdf6f515073a881c0278fdb6cc5e15d97a6b (patch)
treef0ef2937fa65e8c3ad8c625a057a848fc5591597 /libs/rpcd-mod-rrdns/src/CMakeLists.txt
parent366707a681459a4d520dc97024ea0a4b3c24a326 (diff)
rpcd-mod-rrdns: add new rpcd plugin for rapid reverse DNS lookups
The plugin provides a new ubus procedure "network.rrdns.lookup" which allows looking up the names of a large chunk of IP addresses at once, within a fixed global timeout. This is useful to have a guaranteed maximum query time even if the local DNS setup is broken or timing out. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'libs/rpcd-mod-rrdns/src/CMakeLists.txt')
-rw-r--r--libs/rpcd-mod-rrdns/src/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/libs/rpcd-mod-rrdns/src/CMakeLists.txt b/libs/rpcd-mod-rrdns/src/CMakeLists.txt
new file mode 100644
index 0000000000..ace6ac8664
--- /dev/null
+++ b/libs/rpcd-mod-rrdns/src/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(rpcd-mod-rrdns 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()
+
+FIND_LIBRARY(resolv NAMES resolv)
+IF(resolv STREQUAL "LIBS-NOTFOUND")
+ SET(resolv "")
+ENDIF()
+
+ADD_LIBRARY(rpcd-mod-rrdns MODULE rrdns.c)
+TARGET_LINK_LIBRARIES(rpcd-mod-rrdns ubox ubus ${resolv})
+SET_TARGET_PROPERTIES(rpcd-mod-rrdns PROPERTIES OUTPUT_NAME rrdns PREFIX "")
+
+INSTALL(TARGETS rpcd-mod-rrdns LIBRARY DESTINATION lib)