From f8d39c48a07f23e5cb2a6b8d764ac958b39d2d4a Mon Sep 17 00:00:00 2001 From: Teo-CD Date: Fri, 1 Nov 2019 18:22:43 +0100 Subject: [PATCH] Project now buildable without Visual Studio on windows VCPKG_ROOT environment variable needs to be set. I had an issue with dumpbin not being found. I had to add it to my path as well. --- CMakeLists.txt | 9 +++++++++ README.md | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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