Skip to content
/ cmake-vcpkg-starter Public template

A template project for C++ projects with dependencies managed with vcpkg.

License

Notifications You must be signed in to change notification settings

rbento/cmake-vcpkg-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmake-vcpkg

A template project for C++ projects with dependencies managed with vcpkg.

Usage


  1. Install vcpkg
git clone https://github.com/microsoft/vcpkg.git

cd vcpkg

bootstrap-vcpkg.bat

  1. Integrate with Visual Studio
vcpkg integrate install
  1. Install dependencies
vcpkg install opengl glew glfw3 glm freetype eastl --triplet=x64-windows-static
  1. Clone this project
cd ..

git clone https://github.com/rbento/cmake-vcpkg.git

cd cmake-vcpkg
  1. Configure vcpkg home

Set the path to the vcpkg home directory in init.bat.

cmake -DCMAKE_TOOLCHAIN_FILE=<VCPKG HOME PATH HERE>/vcpkg/scripts/buildsystems/vcpkg.cmake
  1. Configure the Visual Studio solution and project name

Set the project value in CMakeLists.txt.

project("<SOLUTION NAME HERE>")
  1. Generate the Visual Studio project
init.bat
  1. Done

Now open the generated project solution on Visual Studio.

About

A template project for C++ projects with dependencies managed with vcpkg.

Topics

Resources

License

Stars

Watchers

Forks