summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx3
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx16
2 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 6c3c1ed..328a3da 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -123,7 +123,8 @@ std::string cmGlobalVisualStudio10Generator
cmSystemTools::LowerCase(lowerCaseCommand);
// If makeProgram is devenv, parent class knows how to generate command:
- if (lowerCaseCommand.find("devenv") != std::string::npos)
+ if (lowerCaseCommand.find("devenv") != std::string::npos ||
+ lowerCaseCommand.find("VCExpress") != std::string::npos)
{
return cmGlobalVisualStudio7Generator::GenerateBuildCommand(makeProgram,
projectName, additionalOptions, targetName, config, ignoreErrors, fast);
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 2a4ff92..d710405 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -378,7 +378,11 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
static_cast<cmGlobalVisualStudio7Generator *>
(this->GlobalGenerator)->GetConfigurations();
this->WriteString("<CustomBuild Include=\"", 2);
- std::string path = sourcePath;
+ // custom command have to use relative paths or they do not
+ // show up in the GUI
+ std::string path = cmSystemTools::RelativePath(
+ this->Makefile->GetCurrentOutputDirectory(),
+ sourcePath.c_str());
this->ConvertToWindowsSlash(path);
(*this->BuildFileStream ) << path << "\">\n";
for(std::vector<std::string>::iterator i = configs->begin();
@@ -619,6 +623,14 @@ WriteGroupSources(const char* name,
const char* filter = sourceGroup.GetFullName();
this->WriteString("<", 2);
std::string path = source;
+ // custom command sources must use relative paths or they will
+ // not show up in the GUI.
+ if(sf->GetCustomCommand())
+ {
+ path = cmSystemTools::RelativePath(
+ this->Makefile->GetCurrentOutputDirectory(),
+ source.c_str());
+ }
this->ConvertToWindowsSlash(path);
(*this->BuildFileStream) << name << " Include=\""
<< path;
@@ -706,6 +718,8 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
bool rc = lang && (strcmp(lang, "RC") == 0);
bool idl = ext == "idl";
std::string sourceFile = (*source)->GetFullPath();
+ // do not use a relative path here because it means that you
+ // can not use as long a path to the file.
this->ConvertToWindowsSlash(sourceFile);
// output the source file
if(header)