diff options
author | João Valverde <j@v6e.pt> | 2023-01-31 20:44:36 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-02-06 15:04:46 +0000 |
commit | ab0d1904501e0f2daf50371ecba49a2e6e9a7d5f (patch) | |
tree | f6195b4f15f326e5e106670737bd457028fc07cf /capture | |
parent | d70e174ca065a1adbc126cedc60165123f7151eb (diff) |
CMake: Fix libnl unused link dependencies
Diffstat (limited to 'capture')
-rw-r--r-- | capture/CMakeLists.txt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/capture/CMakeLists.txt b/capture/CMakeLists.txt index fa3b56f272..65b91f8fcf 100644 --- a/capture/CMakeLists.txt +++ b/capture/CMakeLists.txt @@ -24,8 +24,6 @@ endif() set(CAPUTILS_SRC ${PLATFORM_CAPUTILS_SRC} capture-pcap-util.c - iface_monitor.c - ws80211_utils.c ) if (AIRPCAP_FOUND) @@ -51,18 +49,12 @@ target_link_libraries(caputils $<$<BOOL:${PCAP_FOUND}>:pcap::pcap> PRIVATE wsutil - ${NL_LIBRARIES} ${WIN_IPHLPAPI_LIBRARY} ) if(WIN32) target_link_libraries(caputils PRIVATE ${GMODULE2_LIBRARIES}) endif() -target_include_directories(caputils SYSTEM - PRIVATE - ${NL_INCLUDE_DIRS} -) - set_target_properties(caputils PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}" FOLDER "Libs") @@ -100,6 +92,21 @@ if(MSVC) set_target_properties(capchild PROPERTIES LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}") endif() +add_library(iface_monitor STATIC + iface_monitor.c + ws80211_utils.c +) + +target_link_libraries(iface_monitor + PRIVATE + ${NL_LIBRARIES} +) + +target_include_directories(iface_monitor SYSTEM + PRIVATE + ${NL_INCLUDE_DIRS} +) + CHECKAPI( NAME caputils-base |