summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 1431323..3c6db2d 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1399,8 +1399,11 @@ bool cmQtAutoGenerators::GenerateQrcFiles()
{
std::string basename = cmsys::SystemTools::
GetFilenameWithoutLastExtension(*si);
- std::string qrcOutputFile = "CMakeFiles/" + this->OriginTargetName
- + ".dir/qrc_" + basename + ".cpp";
+ std::string qrcOutputFile = this->TargetBuildSubDir
+ + this->SourceRelativePath ( *si )
+ + "qrc_" + basename + ".cpp";
+ //std::string qrcOutputFile = "CMakeFiles/" + this->OriginTargetName
+ // + ".dir/qrc_" + basename + ".cpp";
qrcGenMap[*si] = qrcOutputFile;
}
}
@@ -1438,8 +1441,10 @@ bool cmQtAutoGenerators::GenerateQrc (
const std::string& qrcInputFile,
const std::string& qrcOutputFile )
{
- const std::string basename = cmsys::SystemTools::
- GetFilenameWithoutLastExtension(qrcInputFile);
+ std::string relName = this->SourceRelativePath ( qrcInputFile );
+ cmSystemTools::ReplaceString(relName, "/", "_");
+ relName += cmsys::SystemTools::GetFilenameWithoutLastExtension(qrcInputFile);
+
const ::std::string qrcBuildFile = this->Builddir + qrcOutputFile;
int sourceNewerThanQrc = 0;
@@ -1469,7 +1474,7 @@ bool cmQtAutoGenerators::GenerateQrc (
}
command.push_back("-name");
- command.push_back(basename);
+ command.push_back(relName);
command.push_back("-o");
command.push_back(qrcBuildFile);
command.push_back(qrcInputFile);