Skip to content

Commit d244c7c

Browse files
committed
Try VCPKG_INSTALLATION_ROOT for GitHub Actions
1 parent a415d0c commit d244c7c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,15 @@ if ("${VCPKG_TARGET_TRIPLET}" MATCHES "-static$")
5555
add_link_options("${COMMON_LINK_OPTIONS}")
5656
endif()
5757

58+
if ("$ENV{VCPKG_ROOT}")
59+
set(VCPKG_ROOT "$ENV{VCPKG_ROOT}")
60+
else()
61+
set(VCPKG_ROOT "$ENV{VCPKG_INSTALLATION_ROOT}")
62+
endif()
63+
5864
set(
5965
CMAKE_TOOLCHAIN_FILE
60-
"$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
66+
"${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
6167
CACHE STRING "Vcpkg toolchain file"
6268
)
6369

0 commit comments

Comments
 (0)