VS: Find Desktop SDK for current VS version (#15662)
Determine the Desktop SDK for Windows Phone and Windows Store from the generator instead of the version of the targeted app. This allows to build a Windows Phone 8.1 app on VS 2015 for example.
This commit is contained in:
parent
72c11e5902
commit
4b8b91688f
@ -34,9 +34,12 @@ protected:
|
|||||||
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
|
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
|
||||||
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
|
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
|
||||||
|
|
||||||
|
// Used to verify that the Desktop toolset for the current generator is
|
||||||
|
// installed on the machine.
|
||||||
|
virtual bool IsWindowsDesktopToolsetInstalled() const;
|
||||||
|
|
||||||
// These aren't virtual because we need to check if the selected version
|
// These aren't virtual because we need to check if the selected version
|
||||||
// of the toolset is installed
|
// of the toolset is installed
|
||||||
bool IsWindowsDesktopToolsetInstalled() const;
|
|
||||||
bool IsWindowsPhoneToolsetInstalled() const;
|
bool IsWindowsPhoneToolsetInstalled() const;
|
||||||
bool IsWindowsStoreToolsetInstalled() const;
|
bool IsWindowsStoreToolsetInstalled() const;
|
||||||
|
|
||||||
|
@ -38,9 +38,12 @@ protected:
|
|||||||
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
|
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
|
||||||
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
|
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
|
||||||
|
|
||||||
|
// Used to verify that the Desktop toolset for the current generator is
|
||||||
|
// installed on the machine.
|
||||||
|
virtual bool IsWindowsDesktopToolsetInstalled() const;
|
||||||
|
|
||||||
// These aren't virtual because we need to check if the selected version
|
// These aren't virtual because we need to check if the selected version
|
||||||
// of the toolset is installed
|
// of the toolset is installed
|
||||||
bool IsWindowsDesktopToolsetInstalled() const;
|
|
||||||
bool IsWindowsPhoneToolsetInstalled() const;
|
bool IsWindowsPhoneToolsetInstalled() const;
|
||||||
bool IsWindowsStoreToolsetInstalled() const;
|
bool IsWindowsStoreToolsetInstalled() const;
|
||||||
virtual const char* GetIDEVersion() { return "12.0"; }
|
virtual const char* GetIDEVersion() { return "12.0"; }
|
||||||
|
@ -124,3 +124,16 @@ void cmGlobalVisualStudio14Generator::WriteSLNHeader(std::ostream& fout)
|
|||||||
fout << "# Visual Studio 14\n";
|
fout << "# Visual Studio 14\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool
|
||||||
|
cmGlobalVisualStudio14Generator::IsWindowsDesktopToolsetInstalled() const
|
||||||
|
{
|
||||||
|
const char desktop10Key[] =
|
||||||
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
|
||||||
|
"VisualStudio\\14.0\\VC\\Runtimes";
|
||||||
|
|
||||||
|
std::vector<std::string> vc14;
|
||||||
|
return cmSystemTools::GetRegistrySubKeys(desktop10Key,
|
||||||
|
vc14, cmSystemTools::KeyWOW64_32);
|
||||||
|
}
|
||||||
|
@ -31,6 +31,11 @@ public:
|
|||||||
virtual const char* GetToolsVersion() { return "14.0"; }
|
virtual const char* GetToolsVersion() { return "14.0"; }
|
||||||
protected:
|
protected:
|
||||||
virtual const char* GetIDEVersion() { return "14.0"; }
|
virtual const char* GetIDEVersion() { return "14.0"; }
|
||||||
|
|
||||||
|
// Used to verify that the Desktop toolset for the current generator is
|
||||||
|
// installed on the machine.
|
||||||
|
virtual bool IsWindowsDesktopToolsetInstalled() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Factory;
|
class Factory;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user