aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2020-08-05 20:21:42 +0200
committerGitHub <noreply@github.com>2020-08-05 11:21:42 -0700
commit4fb846bd44e375a5d59f80fa820aa1e7f2f1dcce (patch)
treeee1ddffdef70d89cb32a6251b2bc69d3eca53869 /toolsrc/src
parentc72091e7f6e15e8e667794b1c7063260f3a6c820 (diff)
downloadvcpkg-4fb846bd44e375a5d59f80fa820aa1e7f2f1dcce.tar.gz
vcpkg-4fb846bd44e375a5d59f80fa820aa1e7f2f1dcce.zip
[vcpkg] add environment variable VCPKG_OVERLAY_PORTS (#12640)
* [vcpkg] add environment variable VCPKG_OVERLAY_PORTS * add documentation for VCPKG_OVERLAY_PORTS * append env overlay instead of prepending to give explicitly listed overlays priority * fix formating (manually) * manually fixing formating * improve help text Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com> Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg/vcpkgcmdarguments.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
index 40782cc61..e1cc3e741 100644
--- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
+++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
@@ -612,6 +612,7 @@ namespace vcpkg
table.format(opt(TRIPLET_ARG, " ", "<t>"), "Specify the target architecture triplet. See 'vcpkg help triplet'");
table.format("", "(default: " + format_environment_variable("VCPKG_DEFAULT_TRIPLET") + ')');
table.format(opt(OVERLAY_PORTS_ARG, "=", "<path>"), "Specify directories to be used when searching for ports");
+ table.format("", "(also: " + format_environment_variable("VCPKG_OVERLAY_PORTS") + ')');
table.format(opt(OVERLAY_TRIPLETS_ARG, "=", "<path>"), "Specify directories containing triplets files");
table.format(opt(BINARY_SOURCES_ARG, "=", "<path>"),
"Add sources for binary caching. See 'vcpkg help binarycaching'");
@@ -646,6 +647,19 @@ namespace vcpkg
}
}
+ {
+ const auto vcpkg_overlay_ports_env = System::get_environment_variable(OVERLAY_PORTS_ENV);
+ if (const auto unpacked = vcpkg_overlay_ports_env.get())
+ {
+#ifdef WIN32
+ auto overlays = Strings::split(*unpacked, ';');
+#else
+ auto overlays = Strings::split(*unpacked, ':');
+#endif
+ overlay_ports.insert(std::end(overlay_ports), std::begin(overlays), std::end(overlays));
+ }
+ }
+
if (!vcpkg_root_dir)
{
const auto vcpkg_root_env = System::get_environment_variable(VCPKG_ROOT_DIR_ENV);