Skip to content

Commit

Permalink
updated to use CMakePresets
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacey committed Sep 15, 2023
1 parent 143cdf4 commit 7814b6a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
10 changes: 1 addition & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -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"
}

]
}

0 comments on commit 7814b6a

Please sign in to comment.