mirror of
https://github.com/reactos/CMake.git
synced 2025-02-12 06:51:00 +00:00
Merge branch 'vs2017-fallback-sdk' into release
This commit is contained in:
commit
e9e8a5dc08
@ -109,6 +109,18 @@ void cmGlobalVisualStudio15Generator::WriteSLNHeader(std::ostream& fout)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmGlobalVisualStudio15Generator::InitializeWindows(cmMakefile* mf)
|
||||||
|
{
|
||||||
|
// If the Win 8.1 SDK is installed then we can select a SDK matching
|
||||||
|
// the target Windows version.
|
||||||
|
if (this->IsWin81SDKInstalled()) {
|
||||||
|
return cmGlobalVisualStudio14Generator::InitializeWindows(mf);
|
||||||
|
}
|
||||||
|
// Otherwise we must choose a Win 10 SDK even if we are not targeting
|
||||||
|
// Windows 10.
|
||||||
|
return this->SelectWindows10SDK(mf, false);
|
||||||
|
}
|
||||||
|
|
||||||
bool cmGlobalVisualStudio15Generator::SelectWindowsStoreToolset(
|
bool cmGlobalVisualStudio15Generator::SelectWindowsStoreToolset(
|
||||||
std::string& toolset) const
|
std::string& toolset) const
|
||||||
{
|
{
|
||||||
@ -135,6 +147,28 @@ bool cmGlobalVisualStudio15Generator::IsWindowsStoreToolsetInstalled() const
|
|||||||
return vsSetupAPIHelper.IsWin10SDKInstalled();
|
return vsSetupAPIHelper.IsWin10SDKInstalled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmGlobalVisualStudio15Generator::IsWin81SDKInstalled() const
|
||||||
|
{
|
||||||
|
// Does the VS installer tool know about one?
|
||||||
|
if (vsSetupAPIHelper.IsWin81SDKInstalled()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Does the registry know about one (e.g. from VS 2015)?
|
||||||
|
std::string win81Root;
|
||||||
|
if (cmSystemTools::ReadRegistryValue(
|
||||||
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
|
||||||
|
"Windows Kits\\Installed Roots;KitsRoot81",
|
||||||
|
win81Root, cmSystemTools::KeyWOW64_32) ||
|
||||||
|
cmSystemTools::ReadRegistryValue(
|
||||||
|
"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\"
|
||||||
|
"Windows Kits\\Installed Roots;KitsRoot81",
|
||||||
|
win81Root, cmSystemTools::KeyWOW64_32)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::string cmGlobalVisualStudio15Generator::FindMSBuildCommand()
|
std::string cmGlobalVisualStudio15Generator::FindMSBuildCommand()
|
||||||
{
|
{
|
||||||
std::string msbuild;
|
std::string msbuild;
|
||||||
|
@ -28,6 +28,7 @@ public:
|
|||||||
|
|
||||||
virtual const char* GetToolsVersion() { return "15.0"; }
|
virtual const char* GetToolsVersion() { return "15.0"; }
|
||||||
protected:
|
protected:
|
||||||
|
bool InitializeWindows(cmMakefile* mf) CM_OVERRIDE;
|
||||||
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
|
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
|
||||||
|
|
||||||
virtual const char* GetIDEVersion() { return "15.0"; }
|
virtual const char* GetIDEVersion() { return "15.0"; }
|
||||||
@ -40,6 +41,9 @@ protected:
|
|||||||
// of the toolset is installed
|
// of the toolset is installed
|
||||||
bool IsWindowsStoreToolsetInstalled() const;
|
bool IsWindowsStoreToolsetInstalled() const;
|
||||||
|
|
||||||
|
// Check for a Win 8 SDK known to the registry or VS installer tool.
|
||||||
|
bool IsWin81SDKInstalled() const;
|
||||||
|
|
||||||
std::string FindMSBuildCommand() CM_OVERRIDE;
|
std::string FindMSBuildCommand() CM_OVERRIDE;
|
||||||
std::string FindDevEnvCommand() CM_OVERRIDE;
|
std::string FindDevEnvCommand() CM_OVERRIDE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user