[cmake-developers] Should a module attempt to find its own dependencies?

Stephen Kelly steveire at gmail.com
Sun Jan 8 12:24:57 EST 2012


Hi,

I don't think I've ever seen a direct answer to this question. Is it 
something to be decided on a case by case basis? If so, then why is there no 
general case? 

I can see a possible reason that it is not solvable in the general case 
because sometimes the behaviour of find_package can be changed by setting 
variables (eg, one might use QT_USE_QTXMLPATTERNS before finding Qt4).

Specifically this comes up for me because I need to know whether Qt5 modules 
should find their own dependencies. That is, should 

find_package(Qt5Gui)

cause 

find_package(Qt5Core REQUIRED) 

to be called or not? Should that be the responsibility of the caller?

Thanks,

Steve.





More information about the cmake-developers mailing list