@@ -82,21 +82,22 @@ downloaded from [here](https://cmake.org/download/).
82
82
When you run the installer, you should choose to add CMake to the system
83
83
` PATH ` for all users and to create the desktop icon.
84
84
85
+ Visual Studio 2017, 2019, and 2022 provide CMake, so you will not need
86
+ to install CMake if you have installed one of those versions of Visual
87
+ Studio. They include built-in support for CMake-based projects as
88
+ described
89
+ [ here] ( https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/ ) .
90
+
91
+ For Visual Studio 2017, make sure "Visual C++ tools for CMake" is
92
+ installed; for Visual Studio 2019 and 2022, make sure "C++ CMake tools
93
+ for Windows" is installed.
94
+
85
95
CMake can also be installed as the Chocolatey package ` cmake ` :
86
96
87
97
```
88
98
choco install -y cmake
89
99
```
90
100
91
- Visual Studio 2017 and later provide CMake, so you will not need to
92
- install CMake if you have installed Visual Studio 2017 or later. They
93
- include built-in support for CMake-based projects as described
94
- [ here] ( https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/ ) .
95
-
96
- For Visual Studio 2017, make sure "Visual C++ tools for CMake" is
97
- installed; for Visual Studio 2019, make sure "C++ CMake tools for
98
- Windows" is installed.
99
-
100
101
Git
101
102
---
102
103
@@ -135,7 +136,7 @@ with Control-S.
135
136
Visual Studio will then re-run CMake. If that completes without errors,
136
137
you can build with CMake > "Build All".
137
138
138
- ### Visual Studio 2019 ###
139
+ ### Visual Studio 2019 and 2022 ###
139
140
140
141
Open the folder containing the libpcap source with Open > Folder.
141
142
Visual Studio will run CMake; however, you will need to indicate where
@@ -223,6 +224,37 @@ msbuild /m /nologo /p:Configuration={configuration} tcpdump.sln
223
224
224
225
where ` {configuration} ` can be "Release", "Debug", or "RelWithDebInfo".
225
226
227
+ ### Visual Studio 2022 ###
228
+
229
+ Start the appropriate Native Tools command line prompt.
230
+
231
+ Change to the directory into which you want to build tcpdump, possibly
232
+ after creating it first. One choice is to create it as a subdirectory
233
+ of the tcpdump source directory.
234
+
235
+ Run the command
236
+
237
+ ```
238
+ cmake "-DPCAP_ROOT={path-to-sdk}" -G "Visual Studio 17 2022" {platform} {path-to-tcpdump-source}
239
+ ```
240
+
241
+ ` {path-to-sdk} ` is the path of the directory containing the Npcap or
242
+ WinPcap SDK.
243
+
244
+ ` {platform} ` is ` -A Win32 ` to build a 32-bit version of tcpdump or `-A
245
+ x64` to build a 64-bit version of tcpdump.
246
+
247
+ ` {path-to-tcpdump-source} ` is the pathname of the top-level source
248
+ directory for tcpdump.
249
+
250
+ Run the command
251
+
252
+ ```
253
+ msbuild /m /nologo /p:Configuration={configuration} tcpdump.sln
254
+ ```
255
+
256
+ where ` {configuration} ` can be "Release", "Debug", or "RelWithDebInfo".
257
+
226
258
Building with MinGW
227
259
-------------------
228
260
0 commit comments