diff options
author | Dominik Holland <dominik.holland@qt.io> | 2021-02-17 17:34:35 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2021-05-10 17:28:11 +0200 |
commit | 8e3d637e7776638149119bd62f459178cbca2955 (patch) | |
tree | 077f7a597039a05555da2c2fe33c1535227dd35e /src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl | |
parent | eac2590d4266e234f0f2ec4d261d940b14dd79bf (diff) |
cmake integration of the ivigenerator
Rerun pro2cmake.py for all examples and tests.
Ivigenerator based tests and examples are compiling
fine, but the cmake files need to be reworked to be
also able to run them.
Task-number: AUTOSUITE-1633
Change-Id: Icb95ecfa62ecb319d042dc30ea9f643b69a4aacf
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl')
-rw-r--r-- | src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl b/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl new file mode 100644 index 0000000..435b92a --- /dev/null +++ b/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl @@ -0,0 +1,33 @@ +# TODO We probably dont' need this template at all in the cmake case +# Keep it until the templates have been adapted and everything can be done without autogenerating + +if (NOT TARGET ${CURRENT_TARGET}) + qt_add_qml_module(${CURRENT_TARGET} + URI "{{module|qml_type}}" + VERSION "{{module.majorVersion}}.{{module.minorVersion}}" + SKIP_TYPE_REGISTRATION + # TODO remove this again + # This is needed to make the test build work as it would create duplicate qmldir entries + # in the global qml folder + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + PUBLIC_LIBRARIES + Qt::IviCore + SOURCES + plugin.cpp + ) +else() + target_sources(${CURRENT_TARGET} + PRIVATE + plugin.cpp + ) +endif() + +#set_target_properties(${CURRENT_TARGET} PROPERTIES +# QT_QML_MODULE_VERSION {{module.majorVersion}}.{{module.minorVersion}} +# QT_QML_MODULE_URI {{module|qml_type}} +# QT_QMLTYPES_FILENAME plugins.qmltypes +#) + +### MISSING +# AUX_QML_FILES += $$PWD/qmldir \ +# $$PWD/designer/{{module.module_name|lower}}.metainfo |