summaryrefslogtreecommitdiffstats
path: root/Source/cmQTWrapUICommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmQTWrapUICommand.cxx')
-rw-r--r--Source/cmQTWrapUICommand.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx
index 6a6d902..8ef8c18 100644
--- a/Source/cmQTWrapUICommand.cxx
+++ b/Source/cmQTWrapUICommand.cxx
@@ -81,7 +81,22 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn)
moc_file.SetName(moc_source_name.c_str(),
m_Makefile->GetCurrentOutputDirectory(),
"cxx",false);
- std::string origname = cdir + "/" + *j;
+ std::string origname;
+ if ( (*j)[0] == '/' )
+ {
+ origname = *j;
+ }
+ else
+ {
+ if ( curr && curr->GetPropertyAsBool("GENERATED") )
+ {
+ origname = std::string( m_Makefile->GetCurrentOutputDirectory() ) + "/" + *j;
+ }
+ else
+ {
+ origname = cdir + "/" + *j;
+ }
+ }
std::string hname = header_file.GetFullPath();
m_WrapUserInterface.push_back(origname);
// add starting depends
rted target \"" << tgt << "\"."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } void cmTargetCompileDefinitionsCommand ::HandleMissingTarget(const std::string &name) { cmOStringStream e; e << "Cannot specify compile definitions for target \"" << name << "\" " "which is not built by this project."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } //---------------------------------------------------------------------------- std::string cmTargetCompileDefinitionsCommand ::Join(const std::vector<std::string> &content) { std::string defs; std::string sep; for(std::vector<std::string>::const_iterator it = content.begin(); it != content.end(); ++it) { if (cmHasLiteralPrefix(it->c_str(), "-D")) { defs += sep + it->substr(2); } else { defs += sep + *it; } sep = ";"; } return defs; } //---------------------------------------------------------------------------- bool cmTargetCompileDefinitionsCommand ::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content, bool, bool) { tgt->AppendProperty("COMPILE_DEFINITIONS", this->Join(content).c_str()); return true; }