Use Vcpkg by default in CMake scripts.
The dependency on VCPKG_ROOT is outdated and was no longer the intended
way to find the vcpkg directory.
cmake_minimum_required (VERSION 3.13...3.21)
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
- if(DEFINED ENV{VCPKG_ROOT})
- message(STATUS "Using Vcpkg: $ENV{VCPKG_ROOT}")
set(CMAKE_TOOLCHAIN_FILE
- "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
- CACHE STRING ""
- )
- else()
- message(STATUS "Vcpkg not being used.")
- endif()
+ "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
+ CACHE STRING "Vcpkg toolchain file")
endif()
file(STRINGS src/libtcod/version.h LIBTCOD_VERSION_LINE REGEX "TCOD_STRVERSION")
