[CMake] FindQt3.cmake bug - does not recognize uic

Anka Kochanowska anka at bic.mni.mcgill.ca
Tue Nov 27 12:52:55 EST 2007


Thanks for answering.
Our application is built on different systems. Some of them have Qt3 and 
Qt4, some have not been properly installed, so having the condition 
would be helpful to diagnose the problem.
FindQt3.cmake fails on Ubuntu, Debian and Mandrake. So we comment out 
the condition, but ...
Also, there is no problem with moc and it is treated pretty much the 
same way as uic.
What is your system?

Anka


clinton at elemtech.com wrote:

>On Tuesday 27 November 2007 8:21:38 am Anka Kochanowska wrote:
>  
>
>>Hi!
>>I am using Qt3 (3.3.3)
>>In my CMakeList.txt I have conditionals:
>>
>>IF(QT_WRAP_UI)
>>  QT_WRAP_UI( Basic IGNS_BASIC_HDR IGNS_BASIC_SRC ${IGNS_BASIC_GUI_SRC} )
>>ENDIF(QT_WRAP_UI)
>>
>>This used to work still in CMake 2.4 patch 3. Since themn, the
>>FindQt3.cmake  has been changed and it does not
>>recognize uic.
>>
>>
>>There is a problem with the following code:
>>
>>EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE
>>QTVERSION_UI)
>>
>>in my case  QTVERSION_UI  is:    User Interface Compiler for Qt version
>>3.3.3
>>
>>The following test:
>>SET(_QT_UIC_VERSION_3 FALSE)
>>IF("${QTVERSION_UIC}" MATCHES ".* 3..*")
>>  SET(_QT_UIC_VERSION_3 TRUE)
>>ENDIF("${QTVERSION_UIC}" MATCHES ".* 3..*")
>>
>>sets QT_UIC_VERSION_3 to FALSE
>>
>>which causes the
>>SET(QT_WRAP_UI FALSE)
>>IF (QT_UIC_EXECUTABLE)
>>  IF(_QT_UIC_VERSION_3)
>>    SET ( QT_WRAP_UI TRUE)
>>  ENDIF(_QT_UIC_VERSION_3)
>>ENDIF (QT_UIC_EXECUTABLE)
>>
>>returning QT_WRAP_UI as FALSE
>>
>>I do not know how to set the regex in order to find 3 in  the version
>>return by uic. I tried differnt things and miserably failed.
>>
>>Could anyone help, please?
>>
>>I have seen quite few postings about QT_WRAP_UI failure and the
>>suggestions were either to drop the condition or to manually run uic!!!!
>>    
>>
>
>I'm unable to reproduce this.  Do you have a simple CMakeLists.txt file that 
>you can reproduce this with?
>
>I'm also curious why you conditionally run uic.  Wouldn't your project fail to 
>build without that?  Do you really want IF(QT_FOUND) instead?
>
>Clint
>
>  
>


More information about the CMake mailing list