Skip to content

Commit 3bf84eb

Browse files
authored
Merge pull request #5 from CaptainHorse/master
Handling of manually defined VCPKG_ROOT variable
2 parents 2844642 + 0529acb commit 3bf84eb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

automate-vcpkg.cmake

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,12 @@ if (WIN32)
8181
endif()
8282
endif()
8383

84-
if(NOT DEFINED ENV{VCPKG_ROOT})
85-
if(WIN32)
86-
set(VCPKG_ROOT ${VCPKG_FALLBACK_ROOT})
84+
if(NOT DEFINED VCPKG_ROOT)
85+
if(NOT DEFINED ENV{VCPKG_ROOT})
86+
set(VCPKG_ROOT ${VCPKG_FALLBACK_ROOT})
8787
else()
88-
set(VCPKG_ROOT ${VCPKG_FALLBACK_ROOT})
88+
set(VCPKG_ROOT $ENV{VCPKG_ROOT})
8989
endif()
90-
else()
91-
set(VCPKG_ROOT $ENV{VCPKG_ROOT})
9290
endif()
9391

9492
# Installs a new copy of Vcpkg or updates an existing one

0 commit comments

Comments
 (0)