Skip to content

Commit 6385ff8

Browse files
committed
Fix cmake
1 parent 5b54022 commit 6385ff8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/inputs/pcap/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ message(STATUS "Input Module: Pcap")
22

33
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
44

5+
if (WIN32)
6+
find_package(npcap REQUIRED CONFIG)
7+
set(ADDITIONAL_LIBS npcap::npcap)
8+
else()
9+
find_package(libpcap REQUIRED CONFIG)
10+
set(ADDITIONAL_LIBS libpcap::libpcap)
11+
endif()
12+
513
corrade_add_static_plugin(VisorInputPcap ${CMAKE_CURRENT_BINARY_DIR}
614
PcapInput.conf
715
PcapInputModulePlugin.cpp
@@ -19,6 +27,7 @@ target_link_libraries(VisorInputPcap
1927
PUBLIC
2028
Visor::Core
2129
Visor::Lib::Utils
30+
${ADDITIONAL_LIBS}
2231
)
2332

2433
set(VISOR_STATIC_PLUGINS ${VISOR_STATIC_PLUGINS} Visor::Input::Pcap PARENT_SCOPE)

0 commit comments

Comments
 (0)