Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.14.0
-
Ubuntu 19.04
CMake 3.16.0
-
-
2e98ccde7b89bdb45c87c154d27566215533ac76
Description
I built Qt 5.14.0 from sources using "configure/make/make install" commands (I set a prefix so that Qt is built in the folder I wanted):
./configure
-prefix path/to/install/qt
-opensource
-confirm-license
-static
-release
-static-runtime
-c+std c+14
-no-reduce-relocations
-gui
-widgets
-openssl-linked
-qt-doubleconversion
-qt-pcre
-qt-zlib
-qt-freetype
-qt-harfbuzz
-qt-xcb
-qt-libpng
-qt-libjpeg
-skip qt3d
-skip qtactiveqt
-skip qtandroidextras
-skip qtcanvas3d
-skip qtconnectivity
-skip qtdatavis3d
-skip qtdoc
-skip qtdocgallery
-skip qtfeedback
-skip qtgamepad
-skip qtlottie
-skip qtmacextras
-skip qtmultimedia
-skip qtnetworkauth
-skip qtpim
-skip qtpurchasing
-skip qtqa
-skip qtquick3d
-skip qtquicktimeline
-skip qtremoteobjects
-skip qtrepotools
-skip qtscxml
-skip qtsensors
-skip qtserialbus
-skip qtserialport
-skip qtspeech
-skip qtsystems
-skip qttools
-skip qtvirtualkeyboard
-skip qtwayland
-skip qtwebchannel
-skip qtwebengine
-skip qtwebglplugin
-skip qtwebsockets
-skip qtwebview
-skip qtwinextras
-skip qtx11extras
-no-compile-examples
-make libs
-make tools
-silent
Building of Qt was successful.
Then, I tried to link my application to static Qt in a CMake project, using qt5_import_qml_plugins function as described in the doc: https://doc.qt.io/qt-5/qtqml-cmake-qt5-import-qml-plugins.html.
When running cmake, I got the following output:
– Running qmlimportscanner to find used QML plugins.
qmlimportscanner: No such file or directory: "....../qtbase/qml/"
Then, compilation obviously failed because of undefined references to QtQuickControls2Plugin, QtQuick2WindowPlugin, ...
In my opinion, the root cause is:
either "make install" does not copy "qml" folder where it should OR qt5_import_qml_plugins() does not take into account the installation prefix.
To solve my problem, I had to manually copy the "qml" folder (located in "path/to/install/qt" which is the prefix I used in configure command) into "qtbase" folder.
Update: I made a test where I removed the "prefix" option from configure call and I replaced with "developer-build" option. In this case, everything worked as expected.
Attachments
Issue Links
- relates to
-
QTBUG-80846 [cmake]Qml plugin targets missing
- Closed