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 935df68..f993019 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ 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(NL80211_SUPPORT "Wireless Netlink plugin support" ON) OPTION(LEGACY_SUPPORT "Support deprecated syntax features" ON) @@ -125,6 +126,16 @@ IF(RTNL_SUPPORT) TARGET_LINK_LIBRARIES(rtnl_lib ${nl}) ENDIF() +IF(NL80211_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} nl80211_lib) + ADD_LIBRARY(nl80211_lib MODULE lib/nl80211.c) + SET_TARGET_PROPERTIES(nl80211_lib PROPERTIES OUTPUT_NAME nl80211 PREFIX "") + TARGET_LINK_LIBRARIES(nl80211_lib ${nl}) +ENDIF() + IF(UNIT_TESTING) ENABLE_TESTING() ADD_DEFINITIONS(-DUNIT_TESTING) |