Merge topic 'vs14-win8-store-phone'

4b8b9168 VS: Find Desktop SDK for current VS version (#15662)
This commit is contained in:
Brad King 2015-09-09 11:30:41 -04:00 committed by CMake Topic Stage
commit 36fb1e2302
4 changed files with 26 additions and 2 deletions

View File

@ -34,9 +34,12 @@ protected:
virtual bool SelectWindowsPhoneToolset(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
// of the toolset is installed
bool IsWindowsDesktopToolsetInstalled() const;
bool IsWindowsPhoneToolsetInstalled() const;
bool IsWindowsStoreToolsetInstalled() const;

View File

@ -38,9 +38,12 @@ protected:
virtual bool SelectWindowsPhoneToolset(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
// of the toolset is installed
bool IsWindowsDesktopToolsetInstalled() const;
bool IsWindowsPhoneToolsetInstalled() const;
bool IsWindowsStoreToolsetInstalled() const;
virtual const char* GetIDEVersion() { return "12.0"; }

View File

@ -124,3 +124,16 @@ void cmGlobalVisualStudio14Generator::WriteSLNHeader(std::ostream& fout)
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);
}

View File

@ -31,6 +31,11 @@ public:
virtual const char* GetToolsVersion() { return "14.0"; }
protected:
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:
class Factory;
};