From 556da26875d16e62ce4c3e34f1c8438820552d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 22 Sep 2022 08:36:47 +0200 Subject: [PATCH] Describe why we user VCPKG_ROOT environment variable --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce7ae5b309a..4cdd2305ad1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,9 @@ if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() +# Note: ENV{VCPKG_ROOT} is the default location for the vcpkg cli tool which is +# later adjusted by CMAKE_TOOLCHAIN_FILE. We use it here as a workaround to find the +# overlay folders in manifest mode https://github.com/microsoft/vcpkg/issues/12289. if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED VCPKG_ROOT) if(EXISTS "$ENV{VCPKG_ROOT}/overlay/ports" OR NOT EXISTS "$ENV{VCPKG_ROOT}/ports") # We assume ENV{VCPKG_ROOT} points to our vcpkg environment