[cmake-developers] Fwd: [Bug 894805] Re: QT_IMPORTS_DIR is not defined when no QML plugins are installed

Stephen Kelly steveire at gmail.com
Thu Feb 7 11:51:59 EST 2013


Clinton Stimpson wrote:

> This is interesting...
> 
> The intent of FindQt4.cmake is to find the Qt installation so it can be
> used. But in that bug report, the QT_IMPORTS_DIR variable is being used to
> determine the "<qt_dir>/imports" directory to install their qml plugins -
> which is into
> the Qt installation.  Its a problem for them because there is no imports
> directory to begin with.
> 
> In other words... they have something like this:
> find_package(Qt4)
> ...
> install( ... DESTINATION ${QT_IMPORTS_DIR})
> 
> 
> Is there a CMake convention for this kind of thing?
> 

Another relevant question is whether there is a Qt convention for this kind 
of thing.

>From the bug report:

   When requiring the Qt4 package in a CMakeLists.txt, among the
   available variables the one called QT_IMPORTS_DIR should point to
   where QML plugins are to be installed (its value would typically be
   "/usr/lib/qt4/imports").

This is not true. The QT_INSTALL_IMPORTS reported by qmake does not have the 
meaning "where QML plugins are to be installed". It has the meaning "where 
QML assets from Qt itself are installed".

That said, the reported problem in the bug report, that qmake reports the 
path, but cmake does not make it available, seems like something to look 
into.

Thanks,

Steve.





More information about the cmake-developers mailing list