From 804efd91e4ebe483ac7517aabb76baacc66b625a Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 30 Jul 2003 13:27:41 -0400 Subject: [PATCH] ENH: Allow qt ui files being it the binary dir. Bug #110 - QT_WRAP_UI problem on out-of-source builds --- Source/cmQTWrapUICommand.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index 6a6d902a2..8ef8c18f1 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -81,7 +81,22 @@ bool cmQTWrapUICommand::InitialPass(std::vector 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