diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2024-05-10 14:26:27 +0200 |
|---|---|---|
| committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2024-05-30 22:28:44 +0200 |
| commit | d807fb50785aa4dc5a6392269928bbaae249da17 (patch) | |
| tree | 60560aa45c072f326d53e3051d4bd4f3869dbe71 /src/qml/jsruntime/qv4function.cpp | |
| parent | 4d6a8a9886300acbe2ba3d0ce6804b0998ec5a8b (diff) | |
qt_add_qml_module: Create qt.conf in build dir
To ease development with multiple QML modules, we'll collect the set of
dependencies (if they were set with the TARGET syntax), and write their
import paths into a qt.conf file. This allows users to work on
multi-module projects, without having to manually fiddle with the
engines import path when locally runnig their executables or tests.
This is especially useful in the case of tests, where there normally
isn't a separate deploy step (which could take care of setting up the
import paths).
There is (currently) no way to provide two different configurations to
two binaries in the same directories, as we can only have one qt.conf
file in any given place. Resolve this by merging the import paths. To
enable this, we safe the list of dependency targets as a directory
property, and do a deferred write-out of the qt.conf file.
The feature is currently limited to direct dependencies
This feature requires CMake 3.19, as we otherwise can't set directory
properties on the build directory.
[ChangeLog][QML][qt_add_qml_module] When using CMake >= 3.19,
qt_add_qml_module now creates a qt.conf file in the build directory next
to each binary. This sets up import paths for targets passed to
DEPENDENCIES and IMPORTS with the new TARGET option.
Fixes: QTBUG-122987
Change-Id: Ic30e6ae2b58c6c5916978ca200d5f24564314e7e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
0 files changed, 0 insertions, 0 deletions
