aboutsummaryrefslogtreecommitdiff
path: root/scripts/ports.cmake
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2021-01-20 12:07:41 -0800
committerGitHub <noreply@github.com>2021-01-20 12:07:41 -0800
commit4d136ef25f4fab5b744c7ae6acfa04d44f254f2b (patch)
treec6d0b0920106f03390e8d89c11bdf631cf1f28c7 /scripts/ports.cmake
parent45fc55825db2a5bcaffccff1e6afadc519d164ea (diff)
downloadvcpkg-4d136ef25f4fab5b744c7ae6acfa04d44f254f2b.tar.gz
vcpkg-4d136ef25f4fab5b744c7ae6acfa04d44f254f2b.zip
[vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (#15638)
Diffstat (limited to 'scripts/ports.cmake')
-rw-r--r--scripts/ports.cmake14
1 files changed, 3 insertions, 11 deletions
diff --git a/scripts/ports.cmake b/scripts/ports.cmake
index 723d7e1df..9e1ba6b32 100644
--- a/scripts/ports.cmake
+++ b/scripts/ports.cmake
@@ -13,21 +13,13 @@ else()
set(_VCPKG_BACKCOMPAT_MESSAGE_LEVEL "WARNING")
endif()
-if((NOT DEFINED VCPKG_ROOT_DIR)
- OR (NOT DEFINED DOWNLOADS)
- OR (NOT DEFINED _VCPKG_INSTALLED_DIR)
- OR (NOT DEFINED PACKAGES_DIR)
- OR (NOT DEFINED BUILDTREES_DIR))
- message(FATAL_ERROR [[
- Your vcpkg executable is outdated and is not compatible with the current CMake scripts.
- Please re-build vcpkg by running bootstrap-vcpkg.
- ]])
-endif()
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
+include(vcpkg_minimum_required)
+vcpkg_minimum_required(VERSION 2021-01-13)
file(TO_CMAKE_PATH ${BUILDTREES_DIR} BUILDTREES_DIR)
file(TO_CMAKE_PATH ${PACKAGES_DIR} PACKAGES_DIR)
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
set(CURRENT_INSTALLED_DIR ${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET} CACHE PATH "Location to install final packages")
set(SCRIPTS ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "Location to stored scripts")