Merge lp:~ballogy/bamf-qt/fix-imports-dir-location into lp:bamf-qt
| Status: | Merged |
|---|---|
| Approved by: | Didier Roche on 2011-11-29 |
| Approved revision: | 392 |
| Merged at revision: | 390 |
| Proposed branch: | lp:~ballogy/bamf-qt/fix-imports-dir-location |
| Merge into: | lp:bamf-qt |
| Diff against target: |
15 lines (+4/-1) 1 file modified
CMakeLists.txt (+4/-1) |
| To merge this branch: | bzr merge lp:~ballogy/bamf-qt/fix-imports-dir-location |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Didier Roche | Approve on 2011-11-29 | ||
| Olivier Tilloy | 2011-11-24 | Approve on 2011-11-29 | |
|
Review via email:
|
|||
Description of the Change
This change replace the hard-coded imports dir location with QT_IMPORTS_DIR variable. I need it for Arch Linux, because it uses /usr/lib/qt/imports instead of /usr/lib/
| Olivier Tilloy (osomon) wrote : | # |
| Balló György (ballogy) wrote : | # |
OK, I added a fallback to lib/qt4/
| Balló György (ballogy) wrote : | # |
I found that FindQt4.cmake checks if 'Qt' directory exists in '/usr/lib/
- libqt4-
- libqt4-
- libqt4-
- libqt4-
What do you think about query qmake directly? It should works even if no QML plugins installed:
_qt4_query_
set(IMPORT_
| Olivier Tilloy (osomon) wrote : | # |
Thanks for the investigation György! I have updated the bug report with your findings.
Your proposal to query qmake directly sounds perfect to me, please go ahead and do this!
| Olivier Tilloy (osomon) wrote : | # |
Note that I’d add a comment explaining why we don’t refer to QT_IMPORTS_DIR and we query qmake instead, with a link to the bug report.
| Balló György (ballogy) wrote : | # |
Now I applied this change.
| Olivier Tilloy (osomon) wrote : | # |
Thanks György.
There’s a couple more issues with that change though:
- IMPORT_INSTALL_DIR should be a relative path, just like INCLUDE_
- debian/
I understand that your interests lie in making a package for ArchLinux, so I can take care of the second point later on, but the first point needs to be addressed. Thanks!
| Balló György (ballogy) wrote : | # |
I don't know how to truncate the path, but it's really required to be relative? I think that it's a Qt plugin, and therefore it should be installed into the same place where Qt installed. E.g. appmenu-qt uses the similar QT_PLUGINS_DIR variable, which is also an absolute patch and cannot be prefixed:
http://
| Olivier Tilloy (osomon) wrote : | # |
> I don't know how to truncate the path, but it's really required to be
> relative? I think that it's a Qt plugin, and therefore it should be installed
> into the same place where Qt installed. E.g. appmenu-qt uses the similar
> QT_PLUGINS_DIR variable, which is also an absolute patch and cannot be
> prefixed:
> http://
> qt/trunk/
You have a point here!
I guess in this situation having an absolute path is fine. Let’s merge it as is then!
| Unity Merger (unity-merger) wrote : | # |
The Jenkins job https:/
Not merging it.
| Didier Roche (didrocks) wrote : | # |
sorry Olivier, I was debugging bamf ain the chroot and so, didn't notice this merge. Ignore it :)

The change looks sound. DIR-NOTFOUND" ) fallback on the hardcoded value /usr/lib/ qt4/imports. What do you think?
However I tested it on Ubuntu and it appears that cmake has a bug whereby QT_IMPORTS_DIR is not correctly defined (I reported it as bug #894805).
Therefore it cannot be merged as is. A possible solution would be to check for the value of ${QT_IMPORTS_DIR} and if it’s invalid (e.g. "QT_IMPORTS_