diff --git a/CMakeLists.txt b/CMakeLists.txt index 29230ad0..ce9779f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,20 +3,12 @@ # ------------------------------------------------------------------------------------------- cmake_minimum_required(VERSION 3.12) -# ------------------------------------------------------------------------------------------- -# I'm going to use vcpk in most cases for our install of 3rd party libs -# this is going to check the environment variable for CMAKE_TOOLCHAIN_FILE and this must point to where -# vcpkg.cmake is in the University this is set in your .bash_profile to -# export CMAKE_TOOLCHAIN_FILE=/public/devel/2020/vcpkg/scripts/buildsystems/vcpkg.cmake -# ------------------------------------------------------------------------------------------- -if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{CMAKE_TOOLCHAIN_FILE}) - set(CMAKE_TOOLCHAIN_FILE $ENV{CMAKE_TOOLCHAIN_FILE}) -endif() # ------------------------------------------------------------------------------------------- # Setup the project and languages required. Note version number is NGL version # ------------------------------------------------------------------------------------------- project(AllNGL VERSION 8.0 LANGUAGES CXX C) +# These all assume we are using vcpkg for the install. find_package(glm CONFIG REQUIRED) find_package(fmt CONFIG REQUIRED) find_package(gl3w CONFIG REQUIRED) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..cff3fbba --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,14 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "debug", + "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + }, + { + "name": "release", + "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + } + + ] +} \ No newline at end of file