diff options
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/commands_other.cpp | 2 | ||||
| -rw-r--r-- | toolsrc/src/main.cpp | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index f237d2726..f4fad6690 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -32,7 +32,7 @@ namespace vcpkg //"\n" "Options:\n" " --triplet <t> Specify the target architecture triplet.\n" - " (default: x86-windows, see 'vcpkg help triplet')\n" + " (default: %%VCPKG_DEFAULT_TRIPLET%%, see 'vcpkg help triplet')\n" "\n" " --vcpkg-root <path> Specify the vcpkg root directory\n" " (default: %%VCPKG_ROOT%%)\n" diff --git a/toolsrc/src/main.cpp b/toolsrc/src/main.cpp index e9ce4702c..65d3738ec 100644 --- a/toolsrc/src/main.cpp +++ b/toolsrc/src/main.cpp @@ -69,7 +69,16 @@ static void inner(const vcpkg_cmd_arguments& args) return command_function(args, paths); } - triplet default_target_triplet = triplet::X86_WINDOWS; + triplet default_target_triplet; + const auto vcpkg_default_triplet_env = System::wdupenv_str(L"VCPKG_DEFAULT_TRIPLET"); + if(!vcpkg_default_triplet_env.empty()) + { + default_target_triplet = {std::string(vcpkg_default_triplet_env.begin(), vcpkg_default_triplet_env.end())}; + } + else + { + default_target_triplet = triplet::X86_WINDOWS; + } if (args.target_triplet != nullptr) { |
