[CMake] Code and API review request for Qt5 CMake files

Stephen Kelly steveire at gmail.com
Sun Mar 4 19:35:40 EST 2012


Michael Hertling wrote:

> Suppose the Qt folks decide that Qt5's core module doesn't need to
> be explicitly requested because it is prerequisite for everything
> else.

Just to disseminate information here, this is already the case.

You can currently do this:

find_package(Qt5Declarative)
include_directories(${Qt5Declarative_INCLUDE_DIRS})
add_definitions(${Qt5Declarative_DEFINITONS})
target_link_libraries(foo ${Qt5Declarative_LIBRARIES})

Each find_package finds its dependencies and adds its dependencies values to 
its own variables. So already, the core module (and in the above example, 
the gui module) don't need to be explicitly mentioned.

This is one of the things I'd like feedback on, and on of the reasons I'm 
asking people to try this out, or to read the generated Config files.

Can anyone say they've read the generated files? Has anyone confirm they 
have run this or something like it? :

git clone git://gitorious.org/qt/qtbase.git
cd qtbase
./configure
ls lib/cmake

To see the input files for the generated config files see:

https://qt.gitorious.org/qt/qtbase/blobs/master/mkspecs/cmake/Qt5BasicConfig.cmake.in

Thanks,

Steve.




More information about the CMake mailing list