VS: Detect VS 8 and 9 Express editions

This commit is contained in:
Brad King 2016-04-26 08:16:19 -04:00
parent 657a446175
commit 0c58d2d0fd
4 changed files with 12 additions and 4 deletions

View File

@ -56,9 +56,6 @@ public:
cmMakefile *, bool optional);
virtual void WriteSLNHeader(std::ostream& fout);
/** Is the installed VS an Express edition? */
bool IsExpressEdition() const { return this->ExpressEdition; }
/** Generating for Nsight Tegra VS plugin? */
bool IsNsightTegra() const;
std::string GetNsightTegraVersion() const;
@ -129,7 +126,6 @@ protected:
bool SystemIsWindowsCE;
bool SystemIsWindowsPhone;
bool SystemIsWindowsStore;
bool ExpressEdition;
bool UseFolderProperty();

View File

@ -103,6 +103,10 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(cmake* cm,
this->Name = name;
this->ExtraFlagTable = this->GetExtraFlagTableVS8();
this->Version = VS8;
std::string vc8Express;
this->ExpressEdition = cmSystemTools::ReadRegistryValue(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC;"
"ProductDir", vc8Express, cmSystemTools::KeyWOW64_32);
}
//----------------------------------------------------------------------------

View File

@ -66,6 +66,9 @@ public:
virtual bool TargetsWindowsCE() const {
return !this->WindowsCEVersion.empty(); }
/** Is the installed VS an Express edition? */
bool IsExpressEdition() const { return this->ExpressEdition; }
protected:
virtual void AddExtraIDETargets();
virtual const char* GetIDEVersion() { return "8.0"; }
@ -96,6 +99,7 @@ protected:
std::string Name;
std::string WindowsCEVersion;
bool ExpressEdition;
private:
class Factory;

View File

@ -104,6 +104,10 @@ cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator(cmake* cm,
: cmGlobalVisualStudio8Generator(cm, name, platformName)
{
this->Version = VS9;
std::string vc9Express;
this->ExpressEdition = cmSystemTools::ReadRegistryValue(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC;"
"ProductDir", vc9Express, cmSystemTools::KeyWOW64_32);
}
//----------------------------------------------------------------------------