diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f8171d..935df68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ OPTION(FS_SUPPORT "Filesystem plugin support" ON) OPTION(MATH_SUPPORT "Math plugin support" ON) OPTION(UBUS_SUPPORT "Ubus plugin support" ON) OPTION(UCI_SUPPORT "UCI plugin support" ON) +OPTION(RTNL_SUPPORT "Route Netlink plugin support" ON) OPTION(LEGACY_SUPPORT "Support deprecated syntax features" ON) @@ -114,6 +115,16 @@ IF(UCI_SUPPORT) TARGET_LINK_LIBRARIES(uci_lib ${uci} ${ubox}) ENDIF() +IF(RTNL_SUPPORT) + FIND_LIBRARY(nl NAMES nl-tiny) + FIND_PATH(nl_include_dir NAMES netlink/msg.h PATH_SUFFIXES libnl-tiny) + INCLUDE_DIRECTORIES(${nl_include_dir}) + SET(LIBRARIES ${LIBRARIES} rtnl_lib) + ADD_LIBRARY(rtnl_lib MODULE lib/rtnl.c) + SET_TARGET_PROPERTIES(rtnl_lib PROPERTIES OUTPUT_NAME rtnl PREFIX "") + TARGET_LINK_LIBRARIES(rtnl_lib ${nl}) +ENDIF() + IF(UNIT_TESTING) ENABLE_TESTING() ADD_DEFINITIONS(-DUNIT_TESTING) |