Important: Please read the Qt Code of Conduct -

Qt5.5.1 from source builds Qt5WebKit but does not install it.

  • I have not built Qt from source since the Qt4 days but now I would like to build a couple of Qt apps that need Qt5. I built the latest [5.5.1] from source on my Debian 8.2 box. One of these apps [qmapshack] requires Qt5WebKit and Qt5WebkitWidgets and I can see that these have been built as all the libs and shared objects are in directory tree with the source [ and etc] but they have not been installed into /usr/local/Qt5.5.1 with the rest of the system following the 'make install'. Am I missing something really obvious or made a rookie error?

    The qmapshack build fails because It can not find a .cmake files for Qt5WebKit and Qt5WebKitWidgets - again these files are there with the source but not installed in /usr/local.

    For reference:



  • Answering my own post here: I can now build qmapshack successfully. I got around the problem of the cmake build script not finding the cmake config files for Qt5WebKit by adding the path to my build of Qt5 rather than the actual installed directory; by build directory, I mean the location on my file system where I built Qt5.5.1 rather than where it was installed. You add locations of the cmake config files using the CMAKE_PREFIX_PATH environment variable; ie:

    $ export CMAKE_PREFIX_PATH=~/qt-everywhere-opensource-src-5.5.1/qtbase/lib/cmake

    Then the normal cmake build for qmapshack worked - apart from a few compile failures that were fixable.

    Having built and installed qmapshack, I then had to copy the following shared objects, by hand, from my build directory to the default installation directory for Qt5 (/usr/local/Qt5.5.1/lib):

    I also had to do an 'ldconfig' as well before the qmapshack app could find the shared objects/libs and run successfully.


Log in to reply