MantisBT - CMake
View Issue Details
0000110CMakepublic2003-07-29 11:212003-08-02 10:20
David Thompson 
System Admin 
normalminoralways
closedfixed 
 
 
0000110: QT_WRAP_UI problem on out-of-source builds
I have a QT ui file, blah.ui, that I've created using CONFIGURE_FILE so that some example text gets set to the CMAKE_INSTALL_PREFIX path. Because the file is generated and placed in my out-of-source build project_BINARY_DIR, the Makefile complains that there is no rule to make ${project_SOURCE_DIR}/blah.ui. If I try to specify the full path, ${project_BINARY_DIR}/blah.ui, to QT_WRAP_UI the Makefile looks for ${project_SOURCE_DIR}/${project_BINARY_DIR}/blah.ui

Here's a patch to fix the problem
Index: Source/cmQTWrapUICommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmQTWrapUICommand.cxx,v
retrieving revision 1.12
diff -r1.12 cmQTWrapUICommand.cxx
84c84,99
< std::string origname = cdir + "/" + *j;
---
> std::string origname;
> if ( (*j)[0] == '/' )
> {
> origname = *j;
> }
> else
> {
> if ( curr->GetPropertyAsBool("GENERATED") )
> {
> origname = std::string( m_Makefile->GetCurrentOutputDirectory() ) + "/" + *j;
> }
> else
> {
> origname = cdir + "/" + *j;
> }
> }
No tags attached.
Issue History

Notes
(0000040)
System Admin   
2003-07-30 13:29   
Ok, this is fixed. I also added test that reproduce this. Now we need a test for the GENERATED part.