[CMake] Qt4 module too restrictive about uic requirement
Clinton Stimpson
clinton at elemtech.com
Fri Jan 14 23:33:09 EST 2011
On Jan 14, 2011, at 3:27 AM, Eric Noulard wrote:
> 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.
>
Sorry it took a while to get in this thread.
I've pushed a fix for the issues brought up in this thread to next by changing FindQt4.cmake to use FPHSA.
uic is conditionally checked along with other components.
http://cmake.org/gitweb?p=cmake.git;a=commit;h=43cb9b8276a70d153d56a69d5c61daaf2bc51b78
Thanks,
Clint
More information about the CMake
mailing list