Add "optional static plugins" target to app description to make olsrd2 compile withou...
[oonf.git] / src-plugins / generic / nl80211_listener / CMakeLists.txt
1 # find libnl
2
3 INCLUDE(FindPkgConfig)
4
5 pkg_check_modules(LIBNL3 libnl-tiny)
6 if (NOT LIBNL3_FOUND)
7     pkg_check_modules(LIBNL3_GENL libnl-genl-3.0)
8     pkg_check_modules(LIBNL3 libnl-3.0)
9     if (NOT LIBNL3_GENL_FOUND)
10         set (LIBNL3_FOUND false)
11     endif (NOT LIBNL3_GENL_FOUND)
12 endif(NOT LIBNL3_FOUND)
13
14 if (LIBNL3_FOUND)
15     include_directories(${LIBNL3_INCLUDE_DIRS})
16     link_directories(${LIBNL3_LIBRARY_DIRS})
17
18     # set library name
19     SET (source nl80211_listener.c 
20                 nl80211_get_interface.c
21                 nl80211_get_wiphy.c
22                 nl80211_get_survey.c
23                 nl80211_get_mpp.c
24                 nl80211_get_station_dump.c
25                 genl_get_family.c)
26
27     SET (include nl80211_listener.h)
28
29     message(STATUS "Using '${LIBNL3_LIBRARIES}' for nl80211 access")
30
31     # use generic plugin maker
32     oonf_create_plugin("nl80211_listener" "${source}" "${include}" "${LIBNL3_LIBRARIES}")
33 ENDIF (LIBNL3_FOUND)