diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-09-19 11:20:37 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-09-21 20:46:45 +0200 |
commit | bb358d90d3a7de139516e3682843640754a5228a (patch) | |
tree | 9345c2ca715d681dbe94246e019f20c22b3d1e7c /CMakeLists.txt | |
parent | 914f54cc61e6b16005cceb9562289be0c80e401b (diff) |
lib: introduce Linux 802.11 netlink binding
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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) |