Skip to content

Commit

Permalink
Describe why we user VCPKG_ROOT environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Sep 22, 2022
1 parent 6723940 commit 556da26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 556da26

Please sign in to comment.