Merge pull request #1818 from dibdot/lxc_fix
[project/luci.git] / libs / rpcd-mod-rrdns / src / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 PROJECT(rpcd-mod-rrdns C)
4
5 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
6
7 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
8
9 IF(APPLE)
10   INCLUDE_DIRECTORIES(/opt/local/include)
11   LINK_DIRECTORIES(/opt/local/lib)
12 ENDIF()
13
14 FIND_LIBRARY(resolv NAMES resolv)
15 IF(resolv STREQUAL "LIBS-NOTFOUND")
16   SET(resolv "")
17 ENDIF()
18
19 ADD_LIBRARY(rpcd-mod-rrdns MODULE rrdns.c)
20 TARGET_LINK_LIBRARIES(rpcd-mod-rrdns ubox ubus ${resolv})
21 SET_TARGET_PROPERTIES(rpcd-mod-rrdns PROPERTIES OUTPUT_NAME rrdns PREFIX "")
22
23 INSTALL(TARGETS rpcd-mod-rrdns LIBRARY DESTINATION lib)