https://github.com/michaeltryby/vcpkg-boost-example
Use vcpkg to mange boost dependencies
https://github.com/michaeltryby/vcpkg-boost-example
boost example vcpkg
Last synced: 2 months ago
JSON representation
Use vcpkg to mange boost dependencies
- Host: GitHub
- URL: https://github.com/michaeltryby/vcpkg-boost-example
- Owner: michaeltryby
- Created: 2022-08-19T19:49:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T13:41:49.000Z (9 months ago)
- Last Synced: 2024-12-25T18:12:15.701Z (4 months ago)
- Topics: boost, example, vcpkg
- Language: Batchfile
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vcpkg boost example
Minimal example that uses vcpkg to manage boost dependencies.
## Manifest Mode
1. Install and bootstrap vcpkg
```
\> cd first-test
\> git clone https://github.com/Microsoft/vcpkg.git
\> .\vcpkg\bootstrap-vcpkg.bat
```2. Build and run project
```
\> cd build
\> cmake .. -DCMAKE_TOOLCHAIN_FILE=\vcpkg\scripts\buildsystems\vcpkg.cmake
\> cmake --build .
\> test\Debug\first_test.exe
```## Classic Mode
1. Install and bootstrap vcpkg
```
\> cd first-test
\> erase vcpkg.json
\> git clone https://github.com/Microsoft/vcpkg.git
\> .\vcpkg\bootstrap-vcpkg.bat
```2. Install dependencies
```
\> cd vcpkg
\> vcpkg install boost-test:x64-windows
```3. Build and run project
```
\> cd ..\build
\> cmake .. -DCMAKE_TOOLCHAIN_FILE=\vcpkg\scripts\buildsystems\vcpkg.cmake
\> cmake --build .
\> test\Debug\first_test.exe
```## Binary Caching
0. vcpkg and boost-test installed (classic mode)
1. Export dependencies to package
```
\> vcpkg export boost-test:x64-windows --nuget
```2. Setup local package store
```
\> vcpkg fetch nuget
\> nuget add ..nuget -Source \local-store
```3. Install dependencies from package
```
\> nuget install -Source \local-store
```4. Build and run project (Note change in toolchain path)
```
\> cd ..\build
\> cmake .. -DCMAKE_TOOLCHAIN_FILE=\vcpkg\\scripts\buildsystems\vcpkg.cmake
\> cmake --build .
\> test\Debug\first_test.exe
```## GitHub Packages
see Actions workflow