[CMake] QT_IMPORTS_DIR when dit does not exist yet

Andreas Pakulat apaku at gmx.de
Wed Jan 18 12:17:43 EST 2012


On 18.01.12 16:06:28, Jonathan Riddell wrote:
> Some Ubuntu developers are having an issue where QT_IMPORTS_DIR is not defined when that directory does not yet exist.
> 
> https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/894805
> 
> I have worked around it with http://paste.kde.org/188366/ but I
> suspect I'm not understanding what that code does and it's not a
> proper fix.  Any thoughts on a better way?

Do you expect the imports directory to exist before being able to
install something there? If not then this is not fixable since its not
possible anymore to decide wether the cross-compile stuff applies or the
qmake-variable should be taken (see the foreach right below your patched
line). If imports is supposed to at least exist, then one could simply
iterate manually over all possible locations and take the first one for
which file(EXISTS) returns true.

That being said, one could argue that a Qt installation without at least
Qt/widgets is broken wrt. QML, so maybe the packages containing the
standard Qt qml files should actually be a required dependency for the
declarative module.

Andreas



More information about the CMake mailing list