mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fixes to support the Npcap library on Windows
- Ignore conan libpcap if PCAP_ROOT_DIR is passed - Update the cmake submodule to pick up changes for finding the right paths to npcap - Add lazy-loading of npcap so the library path gets set correctly at startup
This commit is contained in:
parent
7c54d1aa1c
commit
58f4ff91d8
5 changed files with 54 additions and 5 deletions
|
@ -543,6 +543,15 @@ if (ZEEK_STANDALONE)
|
|||
${bro_SUBDIR_LIBS}
|
||||
${bro_PLUGIN_LIBS}
|
||||
)
|
||||
|
||||
# npcap/winpcap need to be loaded in delayed mode so that we can set the load path
|
||||
# correctly at runtime. See https://npcap.com/guide/npcap-devguide.html#npcap-feature-native
|
||||
# for why this is necessary.
|
||||
if ( MSVC AND HAVE_WPCAP )
|
||||
set(zeekdeps ${zeekdeps} delayimp.lib)
|
||||
set_target_properties(zeek PROPERTIES LINK_FLAGS "/DELAYLOAD:wpcap.dll")
|
||||
endif()
|
||||
|
||||
target_link_libraries(zeek ${bro_PLUGIN_LINK_LIBS} ${zeekdeps} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
|
||||
|
||||
# Export symbols from zeek executable for use by plugins
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue