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):
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.