Make CMake files machine agnostic

This commit is contained in:
Jack Christensen 2024-08-12 16:05:20 -04:00
parent dc89084bf3
commit 34b641a58d
2 changed files with 8 additions and 5 deletions

View File

@ -7,7 +7,12 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Define output directories for different configurations
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
include(C:/users/jmchr/vcpkg/scripts/buildsystems/vcpkg.cmake)
#include(C:/users/jmchr/vcpkg/scripts/buildsystems/vcpkg.cmake)
# Use the environment variable if it is set
if(DEFINED ENV{VCPKG_TOOLCHAIN})
include("$ENV{VCPKG_TOOLCHAIN}")
endif()
# Find packages using vcpkg
find_package(GLEW CONFIG REQUIRED)

View File

@ -10,8 +10,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_TOOLCHAIN_FILE": "C:/users/jmchr/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows"
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_TOOLCHAIN}"
}
},
{
@ -22,8 +21,7 @@
"binaryDir": "${sourceDir}/build/release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_TOOLCHAIN_FILE": "C:/users/jmchr/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows"
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_TOOLCHAIN}"
}
}
]