[CMake] Qt4 module too restrictive about uic requirement
Eric Noulard
eric.noulard at gmail.com
Fri Jan 14 05:06:04 EST 2011
2011/1/14 Thomas Petazzoni <thomas.petazzoni at free-electrons.com>:
> On Mon, 10 Jan 2011 18:34:16 +0100
> Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:
>
>> The FindQt4 module requires the uic executable to be present, otherwise
>> it declares the Qt installation as invalid and bails out.
>>
>> However, Qt can be compiled without the GUI (which is interesting on
>> embedded systems), and in this case, uic is not installed and not
>> necessary. Therefore, the requirement of uic to be part of the standard
>> Qt installation by CMake is a bit too restrictive. It should only
>> require it when the QT_GUI component is used.
>>
>> I have worked around the problem using the following patch, but it
>> isn't correct as it completely removes the check for uic.
>> Unfortunately, my CMake-fu is still very limited, so I don't really
>> know what's the proper way of checking this.
>
> Ping ?
Hi Thomas,
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.
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.
Since your request seems reasonable may be you can file a feature
request on the bug tracker
and send back here the ref to the bug tracker entry.
By the way you did not tell us which version of CMake / FindQT4 you are using?
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list