mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 06:40:48 -06:00
Merge topic 'support_ewdk_install'
071c0e3ce4 cmVSSetupHelper: Support Enterprise WDK build enviornment
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2658
This commit is contained in:
@@ -267,6 +267,19 @@ bool cmVSSetupAPIHelper::GetVCToolsetVersion(std::string& vsToolsetVersion)
|
||||
return isInstalled && !vsToolsetVersion.empty();
|
||||
}
|
||||
|
||||
bool cmVSSetupAPIHelper::IsEWDKEnabled()
|
||||
{
|
||||
std::string envEnterpriseWDK, envDisableRegistryUse;
|
||||
cmSystemTools::GetEnv("EnterpriseWDK", envEnterpriseWDK);
|
||||
cmSystemTools::GetEnv("DisableRegistryUse", envDisableRegistryUse);
|
||||
if (!cmSystemTools::Strucmp(envEnterpriseWDK.c_str(), "True") &&
|
||||
!cmSystemTools::Strucmp(envDisableRegistryUse.c_str(), "True")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
|
||||
{
|
||||
bool isVSInstanceExists = false;
|
||||
@@ -274,6 +287,26 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this->IsEWDKEnabled()) {
|
||||
std::string envWindowsSdkDir81, envVSVersion, envVsInstallDir;
|
||||
|
||||
cmSystemTools::GetEnv("WindowsSdkDir_81", envWindowsSdkDir81);
|
||||
cmSystemTools::GetEnv("VisualStudioVersion", envVSVersion);
|
||||
cmSystemTools::GetEnv("VSINSTALLDIR", envVsInstallDir);
|
||||
if (envVSVersion.empty() || envVsInstallDir.empty())
|
||||
return false;
|
||||
|
||||
chosenInstanceInfo.VSInstallLocation =
|
||||
std::wstring(envVsInstallDir.begin(), envVsInstallDir.end());
|
||||
chosenInstanceInfo.Version =
|
||||
std::wstring(envVSVersion.begin(), envVSVersion.end());
|
||||
chosenInstanceInfo.VCToolsetVersion = envVSVersion;
|
||||
chosenInstanceInfo.ullVersion = std::stoi(envVSVersion);
|
||||
chosenInstanceInfo.IsWin10SDKInstalled = true;
|
||||
chosenInstanceInfo.IsWin81SDKInstalled = !envWindowsSdkDir81.empty();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (initializationFailure || setupConfig == NULL || setupConfig2 == NULL ||
|
||||
setupHelper == NULL)
|
||||
return false;
|
||||
|
||||
@@ -150,6 +150,7 @@ private:
|
||||
HRESULT comInitialized;
|
||||
// current best instance of VS selected
|
||||
VSInstanceInfo chosenInstanceInfo;
|
||||
bool IsEWDKEnabled();
|
||||
|
||||
std::string SpecifiedVSInstallLocation;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user