]> The Tcpdump Group git mirrors - tcpdump/commitdiff
README.windows.md: Add VS 2022. [skip ci]
authorGuy Harris <[email protected]>
Tue, 8 Oct 2024 00:39:55 +0000 (17:39 -0700)
committerGuy Harris <[email protected]>
Tue, 8 Oct 2024 00:39:55 +0000 (17:39 -0700)
Also, put the "here's how to install CMake from Visual Studio" stuff
ahead of the "oh, and you can install it with Chocolatey" stuff.

doc/README.windows.md

index ea95eac3f7ee942b9bbd8908d6e7c7a0623bdf79..eb2b4a1bd51685af13279de86847ea40d899cd2d 100644 (file)
@@ -82,21 +82,22 @@ downloaded from [here](https://cmake.org/download/).
 When you run the installer, you should choose to add CMake to the system
 `PATH` for all users and to create the desktop icon.
 
+Visual Studio 2017, 2019, and 2022 provide CMake, so you will not need
+to install CMake if you have installed one of those versions of Visual
+Studio.  They include built-in support for CMake-based projects as
+described
+[here](https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/).
+
+For Visual Studio 2017, make sure "Visual C++ tools for CMake" is
+installed; for Visual Studio 2019 and 2022, make sure "C++ CMake tools
+for Windows" is installed.
+
 CMake can also be installed as the Chocolatey package `cmake`:
 
 ```
 choco install -y cmake
 ```
 
-Visual Studio 2017 and later provide CMake, so you will not need to
-install CMake if you have installed Visual Studio 2017 or later.  They
-include built-in support for CMake-based projects as described
-[here](https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/).
-
-For Visual Studio 2017, make sure "Visual C++ tools for CMake" is
-installed; for Visual Studio 2019, make sure "C++ CMake tools for
-Windows" is installed.
-
 Git
 ---
 
@@ -135,7 +136,7 @@ with Control-S.
 Visual Studio will then re-run CMake.  If that completes without errors,
 you can build with CMake > "Build All".
 
-### Visual Studio 2019 ###
+### Visual Studio 2019 and 2022 ###
 
 Open the folder containing the libpcap source with Open > Folder.
 Visual Studio will run CMake; however, you will need to indicate where
@@ -223,6 +224,37 @@ msbuild /m /nologo /p:Configuration={configuration} tcpdump.sln
 
 where `{configuration}` can be "Release", "Debug", or "RelWithDebInfo".
 
+### Visual Studio 2022 ###
+
+Start the appropriate Native Tools command line prompt.
+
+Change to the directory into which you want to build tcpdump, possibly
+after creating it first.  One choice is to create it as a subdirectory
+of the tcpdump source directory.
+
+Run the command
+
+```
+cmake "-DPCAP_ROOT={path-to-sdk}" -G "Visual Studio 17 2022" {platform} {path-to-tcpdump-source}
+```
+
+`{path-to-sdk}` is the path of the directory containing the Npcap or
+WinPcap SDK.
+
+`{platform}` is `-A Win32` to build a 32-bit version of tcpdump or `-A
+x64` to build a 64-bit version of tcpdump.
+
+`{path-to-tcpdump-source}` is the pathname of the top-level source
+directory for tcpdump.
+
+Run the command
+
+```
+msbuild /m /nologo /p:Configuration={configuration} tcpdump.sln
+```
+
+where `{configuration}` can be "Release", "Debug", or "RelWithDebInfo".
+
 Building with MinGW
 -------------------