diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-03 17:05:11 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2021-06-07 09:46:18 +0200 |
commit | 6481d1025b4e473d0a8d0a6e33f1e19b8f7f5868 (patch) | |
tree | eed8707e27bb5f1e9899474ccc086ebdf3168443 | |
parent | 96cf2fd294c6d990cbbc286e83e1db51ac36ea6a (diff) | |
download | qtivi-6481d1025b4e473d0a8d0a6e33f1e19b8f7f5868.tar.gz |
Update to new CMake API for QML
Change-Id: Ia2d37427d02674abf26c68514249483acbd69895
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
-rw-r--r-- | src/imports/core/CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/imports/media/CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl | 16 |
3 files changed, 27 insertions, 11 deletions
diff --git a/src/imports/core/CMakeLists.txt b/src/imports/core/CMakeLists.txt index 7029cc4..8777589 100644 --- a/src/imports/core/CMakeLists.txt +++ b/src/imports/core/CMakeLists.txt @@ -6,9 +6,14 @@ qt_internal_add_qml_module(qtivicoreplugin URI "QtIvi" - VERSION "1.0" - CLASSNAME QtIviCorePlugin - SKIP_TYPE_REGISTRATION + VERSION "${PROJECT_VERSION}" + PAST_MAJOR_VERSIONS 1 + CLASS_NAME QtIviCorePlugin + PLUGIN_TARGET qtivicoreplugin + NO_PLUGIN_OPTIONAL + NO_GENERATE_PLUGIN_SOURCE + NO_GENERATE_QMLTYPES + INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" SOURCES plugin.cpp PUBLIC_LIBRARIES diff --git a/src/imports/media/CMakeLists.txt b/src/imports/media/CMakeLists.txt index a54254b..1c8e532 100644 --- a/src/imports/media/CMakeLists.txt +++ b/src/imports/media/CMakeLists.txt @@ -6,9 +6,14 @@ qt_internal_add_qml_module(qtivimediaplugin URI "QtIvi.Media" - VERSION "1.0" - CLASSNAME QIviMediaPlugin - SKIP_TYPE_REGISTRATION + VERSION "${PROJECT_VERSION}" + PAST_MAJOR_VERSIONS 1 + CLASS_NAME QIviMediaPlugin + PLUGIN_TARGET qtivimediaplugin + NO_PLUGIN_OPTIONAL + NO_GENERATE_PLUGIN_SOURCE + NO_GENERATE_QMLTYPES + INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" SOURCES plugin.cpp PUBLIC_LIBRARIES diff --git a/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl b/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl index 389f136..e07833a 100644 --- a/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl +++ b/src/tools/ivigenerator/templates/qmlplugin/CMakeLists.txt.tpl @@ -36,20 +36,26 @@ if (NOT TARGET ${CURRENT_TARGET}) qt_add_qml_module(${CURRENT_TARGET} URI "{{module|qml_type}}" VERSION "{{module.majorVersion}}.{{module.minorVersion}}" - SKIP_TYPE_REGISTRATION + PLUGIN_TARGET ${CURRENT_TARGET} + NO_PLUGIN_OPTIONAL + NO_GENERATE_PLUGIN_SOURCE + NO_GENERATE_QMLTYPES + NO_GENERATE_QMLDIR # 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}/${TARGET_PATH} - PUBLIC_LIBRARIES - Qt::IviCore SOURCES - plugin.cpp + ${CMAKE_CURRENT_BINARY_DIR}/plugin.cpp + ) + target_link_libraries(${CURRENT_TARGET} + PUBLIC + Qt::IviCore ) else() target_sources(${CURRENT_TARGET} PRIVATE - plugin.cpp + ${CMAKE_CURRENT_BINARY_DIR}/plugin.cpp ) endif() |