Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.11.2
-
None
-
-
3d3ec897712f590e9e4e5ffad4b7017e235295cb (qt/qttools/dev)
Description
I am currently using Qt to develop a cross-platform application which uses a 3rdparty Qt Quick library, Kirigami.
To collect the program files for distribution I use windeployqt. I want Kirigami to be included into the directory, but windeployqt only adds Qt's own QML modules. According to the windeployqt manual:
-qmldir <directory> : Scan for QML-imports starting from directory.
This argument is used to specify the application's qml source directory to be scanned for import * statements. It can accept multiple paths, but these are not used as library search paths.
To specify a library search path, windeployqt would need to pass it as an -importPath argument to qmlimportscanner, but it only passes Qt's default library location: http://code.qt.io/cgit/qt/qttools.git/tree/src/windeployqt/main.cpp?h=dev#n1311
As a hack one can create a link to the custom location from inside the Qt installation, and that's what I use for now, but I believe there has to be a better way.
I faced the same issue with linuxdeployqt and authored a patch that allows to provide a list of QML module locations to linuxdeployqt. The discussion and detailed explanation ia available here.
Linuxdeployqt is heavily based on macdeployqt, so I thought I can fix the same issue upstream to avoid hacks on macOS as well and sent this patch.
I would now want to submit an equivalent change to windeployqt.