<br><br>On Sunday, January 8, 2012, Alexander Neundorf <<a href="mailto:neundorf@kde.org">neundorf@kde.org</a>> wrote:<br>> On Sunday 08 January 2012, Stephen Kelly wrote:<br>>> Alexander Neundorf wrote:<br>
>> > On Sunday 08 January 2012, Stephen Kelly wrote:<br>>> >> Hi,<br>>> >><br>>> >> I don't think I've ever seen a direct answer to this question.<br>>> ><br>>> > AFAIK, yes, they should.<br>
>> > FindKDE4Internal.cmake finds Qt, FindPNG.cmake finds zlib.<br>>> ><br>>> >> Is it something to be decided on a case by case basis? If so, then why<br>>> >> is there no general case?<br>
>> >><br>>> >> I can see a possible reason that it is not solvable in the general case<br>>> >> because sometimes the behaviour of find_package can be changed by<br>>> >> setting variables (eg, one might use QT_USE_QTXMLPATTERNS before<br>
>> >> finding Qt4).<br>>> >><br>>> >> Specifically this comes up for me because I need to know whether Qt5<br>>> >> modules should find their own dependencies. That is, should<br>
>> >><br>>> >> find_package(Qt5Gui)<br>>> >><br>>> >> cause<br>>> >><br>>> >> find_package(Qt5Core REQUIRED)<br>>> >><br>>> >> to be called or not?<br>
>> ><br>>> > I'd say yes.<br>>> > Otherwise the imported targets in Qt5Gui will depend on not yet defined<br>>> > targets from Qt5Core.<br>>> ><br>>> > The same way cmake takes care of adding the required additional libraries<br>
>> > to the link line (like adding zlib when linking libpng), it should also<br>>> > take care of this, IMO.<br>>> ><br>>> > You should just have to state<br>>> > find_package(Foo)<br>
>> > and this will get you Foo.<br>>><br>>> That implies that<br>>><br>>> * Qt5Gui_INCLUDE_DIRS should also contain Qt5Core_INCLUDE_DIRS<br>>><br>>> * Qt5Gui_DEFINITIONS should contain Qt5Core_DEFINITIONS<br>
>><br>>> * Qt5Gui_COMPILE_DEFINITIONS should contain Qt5Core_COMPILE_DEFINITIONS<br>>><br>>> Right?<br>><br>><br>> Yes, I'd say so.<br>> But let's wait also for some opinions from others.<br>
><br>> Alex<br>> --<br>><br>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers">http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers</a><br>
><br><br>I'd say so too. Waiting for a dissenting opinion... ;-)<br>