diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-09-24 11:39:26 +0200 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-09-24 12:54:57 +0000 |
commit | 6e2ca1d6cb12d37a00d0c61b1aac317df02ac786 (patch) | |
tree | 54c991497356c8a6259dac179a1b124cb817da79 /util/cmake | |
parent | d64fa78829893ef54fced18d0ed306a482794e02 (diff) |
Add SKIP_TYPE_REGISTRATION option to add_qml_module
If the qml files are not listed in the qmldir file they do not need
to be written again, since it is expected that they are registered
by the c++ plugin code.
Change-Id: I624aedb182583f942bf1d1a322861c47a64b5065
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'util/cmake')
-rwxr-xr-x | util/cmake/pro2cmake.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index a2bbce53f0..4a88bf95b8 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -2905,6 +2905,8 @@ def write_example( add_target += " DEPENDENCIES\n" for dep in qml_dir.depends: add_target += f" {dep[0]}/{dep[1]}\n" + if len(qml_dir.type_names) == 0: + add_target += " SKIP_TYPE_REGISTRATION\n" add_target += " INSTALL_LOCATION ${INSTALL_EXAMPLEDIR}\n)\n\n" add_target += f"target_sources({binary_name} PRIVATE" @@ -3056,6 +3058,8 @@ def write_qml_plugin( extra_lines.append("DEPENDENCIES") for dep in qml_dir.depends: extra_lines.append(f" {dep[0]}/{dep[1]}") + if len(qml_dir.type_names) == 0: + extra_lines.append("SKIP_TYPE_REGISTRATION") return qml_dir |