summaryrefslogtreecommitdiffstats
path: root/Source/cmQTWrapUICommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-07-30 17:27:41 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-07-30 17:27:41 (GMT)
commit804efd91e4ebe483ac7517aabb76baacc66b625a (patch)
tree7d0526c6f1db973d21dca1fab4cbf15bd47e778c /Source/cmQTWrapUICommand.cxx
parentde16c3b9269810922abf296eb71d912c85502a6b (diff)
downloadCMake-804efd91e4ebe483ac7517aabb76baacc66b625a.zip
CMake-804efd91e4ebe483ac7517aabb76baacc66b625a.tar.gz
CMake-804efd91e4ebe483ac7517aabb76baacc66b625a.tar.bz2
ENH: Allow qt ui files being it the binary dir. Bug #110 - QT_WRAP_UI problem on out-of-source builds
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