MantisBT - CMake
View Issue Details
0012599CMakeModulespublic2011-11-29 10:492012-04-02 10:10
Marcus T 
Clinton Stimpson 
urgentblockalways
closedfixed 
All platformsAllAll
CMake 2.8.6 
 
0012599: UseQt4.cmake fails at including module dependencies
UseQt4.cmake fails at including proper dependencies. When Having QT_USE_QTDECLARATIVE enabled, based on the QT_QTDECLARATIVE_MODULE_DEPENDS it should include QT_QTOPENGL as well.

But since the FOREACH ( UseQt4.cmake Line 81 ) loops over QTOPENGL before QTDECLARATIVE, the first project does not link to QtOpengl.

( This bug just cost me a day of work )
In you CMakeLists.txt use:

find_package(Qt4 4.7.2 REQUIRED QtDeclarative)
message(STATUS "Libs: " ${QT_LIBRARIES}) # Will not print "libQtOpengl..."
add_subdirectory(./test)

In ./test/CMakeLists.txt do:

find_package(Qt4 4.7.2 REQUIRED QtDeclarative)
message(STATUS "Libs: " ${QT_LIBRARIES}) # WILL print "libQtOpengl..."


In my opinion the whole dependency mechanism should be removed completely ( thats what I did for myself now ).

Its a) Error prone b) Incorrect ( declarative does not need OpenGL ) c) unncessary. Finding out which QtLibs you need is so easy.
No tags attached.
Issue History
2011-11-29 10:49Marcus TNew Issue
2011-11-29 11:08Clinton StimpsonNote Added: 0027869
2011-11-29 11:08Clinton StimpsonStatusnew => resolved
2011-11-29 11:08Clinton StimpsonResolutionopen => fixed
2011-11-29 11:08Clinton StimpsonAssigned To => Clinton Stimpson
2012-04-02 10:10David ColeNote Added: 0029053
2012-04-02 10:10David ColeStatusresolved => closed

Notes
(0027869)
Clinton Stimpson   
2011-11-29 11:08   
Thanks for reporting. Its now fixed in the repository.
3cd08ce Qt4: Fix dependencies of QtDeclartive.
(0029053)
David Cole   
2012-04-02 10:10   
Closing resolved issues that have not been updated in more than 4 months.