MantisBT - CMake
View Issue Details
0011301CMakeCMakepublic2010-10-07 15:132011-01-11 18:05
Marco Martin 
Clinton Stimpson 
normalminoralways
closedfixed 
CMake-2-8 
 
0011301: FindQt4.cmake: ability to use a new default dir in Qt 4.7: qml imports
Since Qt 4.7.0 Qt has a new standard directory, is called "imports" and contains plugins for the QML declarative language.
So should be possible to install files in it.
since FindQt4.cmake is shared between KDE and upstrea cmake i'm reporting the issue also there.

a proposed patch is at
http://svn.reviewboard.kde.org/r/5541/ [^]
No tags attached.
diff FindQt4.diff (1,560) 2010-10-07 16:25
https://public.kitware.com/Bug/file/3440/FindQt4.diff
Issue History
2010-10-07 15:13Marco MartinNew Issue
2010-10-07 15:22Alex NeundorfStatusnew => assigned
2010-10-07 15:22Alex NeundorfAssigned To => Clinton Stimpson
2010-10-07 15:25Clinton StimpsonNote Added: 0022443
2010-10-07 15:28Alex NeundorfNote Added: 0022444
2010-10-07 15:37Marco MartinNote Added: 0022445
2010-10-07 15:42Clinton StimpsonNote Added: 0022446
2010-10-07 16:25Marco MartinFile Added: FindQt4.diff
2010-10-07 16:28Marco MartinNote Added: 0022448
2010-10-08 23:02Clinton StimpsonNote Added: 0022459
2010-10-08 23:02Clinton StimpsonStatusassigned => resolved
2010-10-08 23:02Clinton StimpsonResolutionopen => fixed
2011-01-11 18:05David ColeNote Added: 0024600
2011-01-11 18:05David ColeStatusresolved => closed

Notes
(0022443)
Clinton Stimpson   
2010-10-07 15:25   
Thanks for the patch.
But...
Can we call it QT_IMPORTS_DIR instead of QT_QML_IMPORTS_DIR?
With a description of 'Path to "imports" of Qt4'
(0022444)
Alex Neundorf   
2010-10-07 15:28   
I am the one who suggested to call it QT_QML_IMPORTS_DIR instead of QT_IMPORTS_DIR.
Reason: when seeing ${QT_IMPORTS_DIR} in some CMakeLists.txt I wouldn't know what this is about, with something like QT_QML_IMPORTS_DIR or QT_QTDECLARATIVE_IMPORTS_DIR I get a clue what this is about.

Alex
(0022445)
Marco Martin   
2010-10-07 15:37   
to me either way is ok..
let's say QT_IMPORTS_DIR is more coherent with the other already present names, while QT_QML_IMPORTS_DIR is more instantly clear what it's about
(0022446)
Clinton Stimpson   
2010-10-07 15:42   
I see... but my issue with that is I don't know if Nokia has other plans for the imports directory. Their configure script, qmake, etc... simply use the term "imports" so I don't want to over-interpret that term.

Also, the patch doesn't look correct for the FindQt4.cmake currently in git.
It does look OK for cmake 2.8.2 and older.
(0022448)
Marco Martin   
2010-10-07 16:28   
it's done against the version in the KDE svn right now.
i tried the patch against http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindQt4.cmake;hb=HEAD [^]
seems work even if there is quite a mismatch in rows (attached patch)

as for the name yeah, if they will start do do other things around qt declarative, like the possible QtComponents is possible in that directory all sort of stuff could be thrown in.
right now is very qml specific since the qml directive is "import" hence its dir is called imports, but one never knows
(0022459)
Clinton Stimpson   
2010-10-08 23:02   
I've changed the patch to work with the current FindQt4.cmake, and committed it.
I had to modify it since it couldn't depend on QT_QTDECLARATIVE_FOUND because Qt modules are found later in the cmake file. The return value from qmake -query is enough to say whether an imports dir would exist. I also modified it to work with a cross compiling situation.
(0024600)
David Cole   
2011-01-11 18:05   
Closing resolved issues that have not been updated in more than 3 months.