vcpkg: Set VCPKG_ROOT environment variable for Qt Creator process

This way CMakeProjectManager's auto-setup.cmake would pick it up and
find vcpkg.exe

Change-Id: Iafa84f13e0f50321ce771fc687ecc9e2df148de7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-10-17 18:43:57 +02:00
parent df9808562f
commit 70e9c2685f
4 changed files with 14 additions and 1 deletions

View File

@@ -165,7 +165,7 @@ macro(qtc_auto_setup_vcpkg)
if (EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json" AND NOT QT_CREATOR_SKIP_VCPKG_SETUP)
option(QT_CREATOR_SKIP_VCPKG_SETUP "Skip Qt Creator's vcpkg package manager auto-setup" OFF)
find_program(vcpkg_program vcpkg ${CMAKE_SOURCE_DIR}/vcpkg)
find_program(vcpkg_program vcpkg $ENV{VCPKG_ROOT} ${CMAKE_SOURCE_DIR}/vcpkg)
if (NOT vcpkg_program)
message(WARNING "Qt Creator: vcpkg executable not found. "
"Package manager auto-setup will be skipped. "