Skip to content

Commit

Permalink
Build wpcap.dll with /guard:cf
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Aug 19, 2022
1 parent 7340e24 commit ca7a2c0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions wpcap/wpcap-cmake.bat
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
set CMAKE="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"
set GENERATOR=Visual Studio 16 2019
set NPCAP_SDK=..\..\npcap-sdk-1.13
set NPCAP_SDK=..\..\npcap-sdk-1.14
set AIRPCAP_SDK=..\..\Airpcap_Devpack
set CFG_FLAGS=/guard:cf

mkdir build-win32
cd build-win32
%CMAKE% -A Win32 -DPacket_ROOT=..\%NPCAP_SDK% -DLIBRARY_NAME=wpcap -DAirPcap_ROOT=..\%AIRPCAP_SDK% -G "%GENERATOR%" ..\libpcap\
%CMAKE% -A Win32 -DCMAKE_C_FLAGS_INIT=%CFG_FLAGS% -DCMAKE_SHARED_LINKER_FLAGS_INIT=%CFG_FLAGS% -DPacket_ROOT=..\%NPCAP_SDK% -DLIBRARY_NAME=wpcap -DAirPcap_ROOT=..\%AIRPCAP_SDK% -G "%GENERATOR%" ..\libpcap\
cd ..

mkdir build-x64
cd build-x64
%CMAKE% -A x64 -DPacket_ROOT=..\%NPCAP_SDK% -DLIBRARY_NAME=wpcap -DAirPcap_ROOT=..\%AIRPCAP_SDK% -G "%GENERATOR%" ..\libpcap\
%CMAKE% -A x64 -DCMAKE_C_FLAGS_INIT=%CFG_FLAGS% -DCMAKE_SHARED_LINKER_FLAGS_INIT=%CFG_FLAGS% -DPacket_ROOT=..\%NPCAP_SDK% -DLIBRARY_NAME=wpcap -DAirPcap_ROOT=..\%AIRPCAP_SDK% -G "%GENERATOR%" ..\libpcap\
cd ..

rem AirPcap does not have ARM64 libs
mkdir build-ARM64
cd build-ARM64
%CMAKE% -A ARM64 -DPacket_ROOT=..\%NPCAP_SDK% -DLIBRARY_NAME=wpcap -G "%GENERATOR%" ..\libpcap\
%CMAKE% -A ARM64 -DCMAKE_C_FLAGS_INIT=%CFG_FLAGS% -DCMAKE_SHARED_LINKER_FLAGS_INIT=%CFG_FLAGS% -DPacket_ROOT=..\%NPCAP_SDK% -DLIBRARY_NAME=wpcap -G "%GENERATOR%" ..\libpcap\
cd ..

0 comments on commit ca7a2c0

Please sign in to comment.