Merge lp:~fboucault/webbrowser-app/cmake_no_depend_on_qmake into lp:webbrowser-app/staging

Proposed by Florian Boucault
Status: Merged
Merged at revision: 1626
Proposed branch: lp:~fboucault/webbrowser-app/cmake_no_depend_on_qmake
Merge into: lp:webbrowser-app/staging
Diff against target: 52 lines (+1/-22)
3 files modified
debian/control (+0/-1)
snap/snapcraft.yaml (+0/-1)
src/Ubuntu/CMakeLists.txt (+1/-20)
To merge this branch: bzr merge lp:~fboucault/webbrowser-app/cmake_no_depend_on_qmake
Reviewer Review Type Date Requested Status
Olivier Tilloy Approve
Review via email: mp+318917@code.launchpad.net

Commit message

Do not rely on qmake as webbrowser is CMake based.

Description of the change

Do not rely on qmake as webbrowser is CMake based.

To post a comment you must log in.
Revision history for this message
Olivier Tilloy (osomon) wrote :

Please remove qt5-qmake from the build deps in debian/control and from the build-packages in snap/snapcraft.yaml.

review: Needs Fixing
1625. By Florian Boucault

Removed qmake from the build dependencies for both debian and snap

1626. By Florian Boucault

Unified setting QT_INSTALL_QML in case of native and cross compilation

Revision history for this message
Olivier Tilloy (osomon) wrote :

When building locally (natively, not cross-compiling), i.e. running:
   cmake .
   make install DESTDIR=/tmp/bleh

I’m seeing the public QML modules being installed in $DESTDIR/usr/local/lib/qt5/qml/, whereas without your changes they are installed in $DESTDIR/usr/lib/x86_64-linux-gnu/qt5/qml/.

This doesn’t look right, QML is not going to search for modules in /usr/local/lib/qt5/qml by default.

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

set(QT_INSTALL_QML "${CMAKE_INSTALL_LIBDIR}/qt5/qml") given the default value of CMAKE_INSTALL_LIBDIR ('lib') and the default value of CMAKE_INSTALL_PREFIX ('/usr/local') will indeed result in what you said.

"make DESTDIR=/home/john install

will install the concerned software using the installation prefix, e.g. “/usr/local” prepended with the DESTDIR value which finally gives “/home/john/usr/local”." [1]

However, be it $DESTDIR/usr/lib/x86_64-linux-gnu/qt5/qml/ like before or $DESTDIR/usr/local/lib/qt5/qml/ like with that patch, QML will not be looking in _either_ of these directories anyway.

[1] https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html

> When building locally (natively, not cross-compiling), i.e. running:
> cmake .
> make install DESTDIR=/tmp/bleh
>
> I’m seeing the public QML modules being installed in
> $DESTDIR/usr/local/lib/qt5/qml/, whereas without your changes they are
> installed in $DESTDIR/usr/lib/x86_64-linux-gnu/qt5/qml/.
>
> This doesn’t look right, QML is not going to search for modules in
> /usr/local/lib/qt5/qml by default.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Right, but my point was not about DESTDIR, really. My point was that with an empty DESTDIR (the default), running `make install` locally will install the QML modules in a place where the QML engine will be able to locate them. With your change, it won’t work any longer.

1627. By Florian Boucault

More robust QT_INSTALL_QML: 'make install' will install in a directory that QML will be looking for imports in

Revision history for this message
Olivier Tilloy (osomon) wrote :

LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2017-02-13 12:49:07 +0000
3+++ debian/control 2017-03-07 12:34:48 +0000
4@@ -23,7 +23,6 @@
5 qml-module-qtsysteminfo,
6 qml-module-qttest,
7 qt5-default,
8- qt5-qmake,
9 qtbase5-dev (>= 5.4),
10 qtbase5-dev-tools,
11 qtbase5-private-dev,
12
13=== modified file 'snap/snapcraft.yaml'
14--- snap/snapcraft.yaml 2017-03-02 21:29:04 +0000
15+++ snap/snapcraft.yaml 2017-03-07 12:34:48 +0000
16@@ -41,7 +41,6 @@
17 - lsb-release
18 - pkg-config
19 - qt5-default
20- - qt5-qmake
21 - qtbase5-dev
22 - qtbase5-dev-tools
23 - qtbase5-private-dev
24
25=== modified file 'src/Ubuntu/CMakeLists.txt'
26--- src/Ubuntu/CMakeLists.txt 2016-08-24 18:17:55 +0000
27+++ src/Ubuntu/CMakeLists.txt 2017-03-07 12:34:48 +0000
28@@ -1,23 +1,4 @@
29-if(NOT CMAKE_CROSSCOMPILING)
30- find_program(QMAKE_EXECUTABLE qmake)
31- if(QMAKE_EXECUTABLE STREQUAL "QMAKE_EXECUTABLE-NOTFOUND")
32- message(FATAL_ERROR "qmake not found")
33- endif()
34- execute_process(
35- COMMAND ${QMAKE_EXECUTABLE} -query QT_INSTALL_QML
36- RESULT_VARIABLE RESULT
37- OUTPUT_VARIABLE QT_INSTALL_QML
38- OUTPUT_STRIP_TRAILING_WHITESPACE
39- )
40- if(NOT RESULT EQUAL 0)
41- message(FATAL_ERROR "Failed to determine QT_INSTALL_QML from qmake")
42- endif()
43-else()
44- # qmake isn't multi-arch aware as it installs arch-specific mkspec files
45- # in to /usr/share, so we can't use it here (we'd need a qmake binary
46- # for the host arch using data for the target arch)
47- set(QT_INSTALL_QML "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml")
48-endif()
49+set(QT_INSTALL_QML "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml")
50
51 execute_process(COMMAND lsb_release --short --release
52 OUTPUT_VARIABLE UBUNTU_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)

Subscribers

People subscribed via source and target branches