Skip to content

Commit 9c386b4

Browse files
author
Bart Roossien
committed
Updating build instructions for VCPKG (#43)
1 parent ec974a4 commit 9c386b4

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

SourceCode/Builds/build_with_msvc22.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ For build using solutions and more advanced build configurations, see below.
1616
1. **Visual Studio 2022**
1717

1818
- Ensure that the necessary C++ development components, **including MFC**, are installed.
19+
- For _vcpkg_ builds, you also must have **vcpkg** installed, which you can find under individual components.
1920

2021
>[!NOTE]
2122
> You must have the MFC components installed to compile the source code. You can find it in Visual Studio Installer.
@@ -39,10 +40,14 @@ For build using solutions and more advanced build configurations, see below.
3940
### 2. Build the Project
4041

4142
- Select the appropriate build configuration:
42-
- `Build Windows build` for a release build.
43-
- `Build Windows Debug build` for a debug build.
44-
- `Build Windows Internal build` for an internal build.
45-
- `Build Windows Profile build` for a profile build.
43+
- `Build Windows 32bit build` for a release build.
44+
- `Build Windows 32bit Debug build` for a debug build.
45+
- `Build Windows 32bit Internal build` for an internal build.
46+
- `Build Windows 32bit Profile build` for a profile build.
47+
- `Build Windows 32bit VCPKG build` for a release build with the VCPKG package manager.
48+
- `Build Windows 32bit VCPKG Debug build` for a debug build with the VCPKG package manager.
49+
- `Build Windows 32bit VCPKG Internal build` for an internal build with the VCPKG package manager.
50+
- `Build Windows 32bit VCPKG Profile build` for a profile build with the VCPKG package manager.
4651

4752
![image](https://github.com/user-attachments/assets/2bc0aa26-3342-4aac-ae5b-6cf91db21214)
4853

@@ -126,6 +131,36 @@ For more CMake options, see the [CMake Guide](cmake_guide).
126131

127132
---
128133

134+
## Build with VCPKG
135+
136+
To build configurations that make use of VCPKG you must set the environment variable `VCPKG_ROOT` to the location
137+
where the VCPKG is found. If you have installed Visual Studio 2022 with the VCPKG component, you will most likely
138+
find it in one of these paths:
139+
140+
- `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg`
141+
- `C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\vcpkg`
142+
- `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg`
143+
144+
If you use the stand-alone version of VCPKG, you need to use the folder you installed it in.
145+
146+
### Set environment variable in command prompt
147+
148+
You can set the environment variable in the command prompt. You will have to set it again if you (re)open the prompt:
149+
150+
- `set VCPKG_ROOT=<path_to_vcpkg>`
151+
152+
### Set environment variable in Windows
153+
154+
You can also permanently set the environment variable in Windows
155+
156+
- Search for `edit the system environment variables` in Windows Search or Control Panel
157+
- Choose `Environment Variables`
158+
- Add a new user variable
159+
- Set the variable name to `VCPKG_ROOT`
160+
- Set the variable value to the VCPKG path.
161+
162+
---
163+
129164
## Troubleshooting
130165

131166
- **Missing DLLs?** Ensure that all required dependencies are installed.

0 commit comments

Comments
 (0)