0% found this document useful (0 votes)
97 views1 page

Install VCPKG: Step 1: Clone The VCPKG Repo

Installing vcpkg involves cloning the vcpkg git repo, running the bootstrap script to generate the vcpkg binary, and then installing libraries with the vcpkg command. The vcpkg toolchain file can be used with CMake to integrate vcpkg and find installed libraries. Refer to the vcpkg documentation for more details on different workflows.

Uploaded by

marciohbc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views1 page

Install VCPKG: Step 1: Clone The VCPKG Repo

Installing vcpkg involves cloning the vcpkg git repo, running the bootstrap script to generate the vcpkg binary, and then installing libraries with the vcpkg command. The vcpkg toolchain file can be used with CMake to integrate vcpkg and find installed libraries. Refer to the vcpkg documentation for more details on different workflows.

Uploaded by

marciohbc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Install vcpkg

Installing vcpkg is a two-step process: first, clone the repo, then run the bootstrapping script to produce the vcpkg binary. The repo can be cloned anywhere,
and will include the vcpkg binary after bootstrapping as well as any libraries that are installed from the command line. It is recommended to clone vcpkg as
a submodule to an existing project if possible for greater flexibility.

Step 1: Clone the vcpkg repo

git clone https://github.com/Microsoft/vcpkg.git

Make sure you are in the directory you want the tool installed to before doing this.

Step 2: Run the bootstrap script to build vcpkg

./vcpkg/bootstrap-vcpkg.sh

Install libraries for your project


vcpkg install [packages to install]

Using vcpkg with CMake


In order to use vcpkg with CMake outside of an IDE, you can use the toolchain file:

cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake

Then build with:

cmake --build [build directory]

With CMake, you will need to  find_package()  to reference the libraries in your Cmakelists.txt files.

Browse the vcpkg documentation to learn more about how to enable different workflows.

You might also like