-
vcpkg Official Site
-
Overview at https://learn.microsoft.com/en-us/vcpkg/get_started/overview
-
Instructions on how to use vcpkg packages from within Visual Studio.
- Clone the repository
- Use the following command:
- git clone https://github.com/microsoft/vcpkg.git
- Use the following command:
- Run the bootstrap script.
- Use the following command:
- cd vcpkg && bootstrap-vcpkg.bat
- NOTE: The bootstrap script performs prerequisite checks and downloads the vcpkg executable.
- Use the following command:
- The vcpkg executable is now set up and ready to use.
- Use the following Commands:
- vcpkg install libflac
- vcpkg install libogg
- vcpkg install libvorbis
- vcpkg install wavpack
- Set the user-wide instance of vcpkg so that MSBuild will be able to find it.
- Use the following Command:
- vcpkg integrate install
- Use the following Command:
- Environment Variable Command:
- set VCPKG_ROOT="C:\vcpkg"
- PATH Command:
- set PATH=%VCPKG_ROOT%;%PATH%
- NOTE: The existing Projects have already had this step completed for each of them, therefore this step can be skipped.
-
Open the Developer Command Prompt from within each Solution/Project and run the vcpkg new command.
- The vcpkg new command adds a vcpkg.json file and a vcpkg-configuration.json file in the Project's directory.
- Use following the command:
- vcpkg new --application
- Use following the command:
- The vcpkg new command adds a vcpkg.json file and a vcpkg-configuration.json file in the Project's directory.
-
Add package dependency to vcpkg.json (Manually add a vcpkg package dependency)
- Use following the command:
- vcpkg add port
- Example:
- vcpkg add port libflac
- vcpkg add port libogg
- vcpkg add port libvorbis
- vcpkg add port wavpack
- Example:
- vcpkg add port
- Use following the command:
-
Afterwards, right-click the Project that had the vcpkg.json file and the vcpkg-configuration.json file previously added to it.
- Navigate to Configuration Properties-->vcpkg-->General-->Use Vcpkg Manifest
- Set 'Use Vcpkg Manifest' to 'Yes'.
- If MSBuild detects a vcpkg.json file and manifests are enabled in your project, MSBuild installs the manifest's dependencies as a pre-build step. Dependencies are installed in a vcpkg_installed directory in the project's build output directory.