summaryrefslogtreecommitdiffstats
path: root/Source/cmQTWrapCPPCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-09-24 21:50:39 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-09-24 21:50:39 (GMT)
commitc968abd2c1796e85bd935fe0149489c52abb06e7 (patch)
tree854ea3d6c725a6438cf4413fb912195a39ab8179 /Source/cmQTWrapCPPCommand.cxx
parentc0564155936cb8f1f314aaab724573153b997ef4 (diff)
downloadCMake-c968abd2c1796e85bd935fe0149489c52abb06e7.zip
CMake-c968abd2c1796e85bd935fe0149489c52abb06e7.tar.gz
CMake-c968abd2c1796e85bd935fe0149489c52abb06e7.tar.bz2
BUG: Fix Bug #186 - QT_WRAP_UI uses the path twice
Diffstat (limited to 'Source/cmQTWrapCPPCommand.cxx')
-rw-r--r--Source/cmQTWrapCPPCommand.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx
index e358e2d..6800a54 100644
--- a/Source/cmQTWrapCPPCommand.cxx
+++ b/Source/cmQTWrapCPPCommand.cxx
@@ -76,7 +76,22 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn)
std::string newName = "moc_" + srcName;
file.SetName(newName.c_str(), m_Makefile->GetCurrentOutputDirectory(),
"cxx",false);
- std::string hname = cdir + "/" + *j;
+ std::string hname;
+ if ( (*j)[0] == '/' || (*j)[1] == ':' )
+ {
+ hname = *j;
+ }
+ else
+ {
+ if ( curr && curr->GetPropertyAsBool("GENERATED") )
+ {
+ hname = std::string( m_Makefile->GetCurrentOutputDirectory() ) + "/" + *j;
+ }
+ else
+ {
+ hname = cdir + "/" + *j;
+ }
+ }
m_WrapHeaders.push_back(hname);
// add starting depends
file.GetDepends().push_back(hname);