[Development] Qt's generated cmake files

Sascha Cunz sascha-ml at babbelbox.org
Mon Feb 18 03:27:32 CET 2013


Hi Stephen,

after the merge from [stable] to [dev] branch, my jenkins server noticed that
there is a problem with compiling my stacks against Qt5.

After looking over all the changes, I found out that there is an issue with the
gerrit change 47230 [1] and am trying to find a way to solve or at least work
around it.

I am using FIND_PACKAGE and QT_USE_MODULES in each subdirectory of
my cmake source tree like shown in [2]. This is required, because I have a
generic stub that encapsules the differences from Qt4/5 and use that in
several different projects. So i actually don't know in advance what git
submodules are in use and what Qt modules they depend on.

Since the above mentioned change, my QT_PREPARE macro keeps resetting
Qt5Core_INCLUDE_DIRS and does not add the $qtprefix/include anymore
(which is done in Qt5CoreConfigExtra.cmake).

The builds then fail in Qt internal includes, like:
In file included from /var/lib/jenkins/qt5/include/QtCore/QAtomicInt:1:0,
                 from /var/lib/jenkins/home/w/MacGitver_Qt5_GCC/src/libGitWrap/libGitWrap/BasicObject.hpp:20,
                 from /var/lib/jenkins/home/w/MacGitver_Qt5_GCC/src/libGitWrap/libGitWrap/BasicObject.cpp:17:
/var/lib/jenkins/qt5/include/QtCore/qatomic.h:42:28: fatal error: QtCore/qglobal.h: No such file or directory
compilation terminated.

Can you think of an easy way to solve this?

Sascha

[1] https://codereview.qt-project.org/#change,47230
[2] https://github.com/macgitver/MacGitver/blob/development/cmake/Qt5.cmake#L131-L163



More information about the Development mailing list