[CMake] Qt4 module too restrictive about uic requirement

Eric Noulard eric.noulard at gmail.com
Fri Jan 14 05:27:37 EST 2011


2011/1/14 Thomas Petazzoni <thomas.petazzoni at free-electrons.com>:
> Hello,
>
> On Fri, 14 Jan 2011 11:06:04 +0100
> Eric Noulard <eric.noulard at gmail.com> wrote:
>
>> Clinton Stimpson is the maintainer of the QT4 module
>> http://www.cmake.org/Wiki/CMake:Module_Maintainers
>>
>> He is usually responsive so I bet he will be stepping in soon.
>
> Ok, thanks.
>
>> Concerning your issue did you try the workaround:
>>
>> find_package(Qt4 COMPONENTS QtCore)
>>
>> and then
>> if (QT_QTCORE_FOUND)
>>   message("OK QtCore found.")
>>   include(${QT_USE_FILE})
>> else(QT_QTCORE_FOUND)
>>   message(FATAL_ERROR "QtCore not found.")
>> endif(QT_QTCORE_FOUND)
>>
>> I think this "should" work for your case.
>> However I'm not a Qt user so I may be plain wrong and Clinton will
>> "fix me" soon.
>
> I don't see how this can fix the issue I'm pointing to.
>
> I'm compiling a software that *needs* QtCore, QtNetwork and QtXml, but
> not QtGui. However, CMake insists on checking that uic is available
> even if the QT_GUI component has not be requested.

Yes this I understand that but ...
find_package(Qt4 COMPONENTS QtCore QtNetwork QtXml)

WITHOUT "REQUIRED"
should say "QT Not Found" but this will not be a fatal error.
and you may have found your required modules.

>> By the way you did not tell us which version of CMake / FindQT4 you are using?
>
> Tried both 2.8.0 and 2.8.3.

There is 2.8.4-rc1 just out:
http://www.cmake.org/files/v2.8/?C=M;O=D
which includes some fix/evolution w.r.t.  FindQt but none of them since to
handle your case.

Trying with the most up-to-date rc would be nice and ease patching.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list