diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ff7ce6..54558f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,13 @@ cmake_minimum_required(VERSION 3.14) + +if(DEFINED ENV{VCPKG_ROOT}) + set(VCPKG_TARGET_TRIPLET "x64-windows") + if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) + set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + CACHE STRING "") + endif() +endif() + project(tests_opengl) set(CMAKE_CXX_STANDARD 14) diff --git a/README.md b/README.md index 0115826..fcd438c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,12 @@ As this project evolves I am thinking more and more about making it a "complete" - [ ] Detect key press' edges ? - [ ] Switch from GLUT to GLFW -## Dependencies +## Building +The windows build supports only supports the `vcpkg` package manager. You can either import the project directly in Visual Studio or use another IDE. +In order to use another IDE with vcpkg, make sure of the following: + - `VCPKG_ROOT` is an environment variable and correctly points at the root of your vcpkg install. + +### Dependencies The following libraries must be installed and findable by CMake: - OpenGL