[Development] Installing Qt5Config.cmake from the Qt repo?
Stephen Kelly
stephen.kelly at kdab.com
Thu Nov 3 11:48:24 CET 2011
On Thursday, November 03, 2011 09:46:38 Thiago Macieira wrote:
> Uh... "exactly" would usually mean that you're telling me that my
> explanation matches exactly what you were thinking, but I don't think it
> matches what you had said above: essentials and addons are a platform
> definition; mandatory and optional are per project being compiled.
By "exactly" I was confirming that a platform could have a partial set of
modules - it doesn't relate to essentials vs addons. Also, what you consider
optional doesn't have any meaning in the Config files, so there's nothing I can
do in the Config files about what is optional to you.
>
> I'd like that, but as I said before, I don't mind having to list the
> optional modules listed in the find_package line. That way, the list of
> modules to be searched is always present and not behind any "if" statement.
> They are either in the find_package or in unconditional qt5_add_module
> calls.
No problem. If I understand you correctly, that's already the plan.
# Network and DBus are optional
find_package(Qt5 COMPONENTS Network DBus)
if(Qt5Network_FOUND)
# ...
endif()
if(Qt5DBus_FOUND)
# ...
endif()
# QtWebkit is not optional
qt5_add_module(mylib Webkit)
>
> Is it searching for QtLocations as well? How about QtPim?
If they install Config.cmake modules yes. And I intend for them to do that.
> I also want it to
> be usable for the module someone might add tomorrow or next month.
>
Yes, the above is future proof. If QtWhizzBang is created in 2014 and it
installs a Qt5WhizzBangConfig.cmake, then both
find_package(Qt5 COMPONENTS WhizzBang)
and
qt5_add_module(mylib WhizzBang)
will successfully find it.
Thanks,
--
Stephen Kelly <stephen at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111103/ebe19c4a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111103/ebe19c4a/attachment.sig>
More information about the Development
mailing list