This commit is contained in:
Robert Schumacher 2017-11-30 22:20:06 -08:00
commit c8c332c893
5 changed files with 67 additions and 24 deletions

View File

@ -37,18 +37,21 @@ file(INSTALL
DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium
)
file(INSTALL
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(INSTALL
${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
)
file(INSTALL
${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
endif()
file(INSTALL
${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
file(INSTALL
${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib

View File

@ -46,7 +46,7 @@ try
& $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj
if ($LASTEXITCODE -ne 0)
{
Write-Error "Building vcpkg.exe failed. Please ensure you have installed the Desktop C++ workload and the Windows SDK for Desktop C++."
Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++."
return
}

View File

@ -8,6 +8,11 @@ $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
$VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1
if ($VisualStudioInstallationInstances -eq $null)
{
throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed."
}
Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))"
foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances)
{

View File

@ -202,6 +202,7 @@ namespace vcpkg::System
env_cstr.append(Strings::to_utf16(NEW_PATH));
env_cstr.push_back(L'\0');
env_cstr.append(L"VSLANG=1033\0");
STARTUPINFOW startup_info;
memset(&startup_info, 0, sizeof(STARTUPINFOW));

View File

@ -280,7 +280,6 @@ namespace vcpkg
const std::vector<std::string>& VcpkgPaths::get_available_triplets() const
{
return this->available_triplets.get_lazy([this]() -> std::vector<std::string> {
std::vector<std::string> output;
for (auto&& path : this->get_filesystem().get_files_non_recursive(this->triplets))
{
@ -384,6 +383,7 @@ namespace vcpkg
std::vector<fs::path> paths_examined;
std::vector<Toolset> found_toolsets;
std::vector<Toolset> excluded_toolsets;
const std::vector<VisualStudioInstance> vs_instances = get_visual_studio_instances(paths);
const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) {
@ -440,17 +440,28 @@ namespace vcpkg
paths_examined.push_back(dumpbin_path);
if (fs.exists(dumpbin_path))
{
found_toolsets.push_back(Toolset{
vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures});
const Toolset v141toolset = Toolset{
vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures};
auto english_language_pack = dumpbin_path.parent_path() / "1033";
if (!fs.exists(english_language_pack))
{
excluded_toolsets.push_back(v141toolset);
break;
}
found_toolsets.push_back(v141toolset);
if (v140_is_available)
{
found_toolsets.push_back(Toolset{vs_instance.root_path,
const Toolset v140toolset = Toolset{vs_instance.root_path,
dumpbin_path,
vcvarsall_bat,
{"-vcvars_ver=14.0"},
V_140,
supported_architectures});
supported_architectures};
found_toolsets.push_back(v140toolset);
}
break;
@ -487,17 +498,39 @@ namespace vcpkg
if (fs.exists(vs_dumpbin_exe))
{
found_toolsets.push_back({vs_instance.root_path,
const Toolset toolset = {vs_instance.root_path,
vs_dumpbin_exe,
vcvarsall_bat,
{},
major_version == "14" ? V_140 : V_120,
supported_architectures});
supported_architectures};
auto english_language_pack = vs_dumpbin_exe.parent_path() / "1033";
if (!fs.exists(english_language_pack))
{
excluded_toolsets.push_back(toolset);
break;
}
found_toolsets.push_back(toolset);
}
}
}
}
if (!excluded_toolsets.empty())
{
System::println(
System::Color::warning,
"Warning: The following VS instances are exluded because the English language pack is unavailable.");
for (const Toolset& toolset : excluded_toolsets)
{
System::println(" %s", toolset.visual_studio_root_path.u8string());
}
System::println(System::Color::warning, "Please install the English language pack.");
}
if (found_toolsets.empty())
{
System::println(System::Color::error, "Could not locate a complete toolset.");
@ -575,6 +608,7 @@ namespace vcpkg
vs_root_path.generic_string());
}
Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "No suitable Visual Studio instances were found");
return *candidates.front();
}