diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-09 13:53:53 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-12 14:05:23 +0000 |
commit | 14492ecee2e34843efd3ef070503a43a48552055 (patch) | |
tree | 37432296f2f6bbc596d2470f79c99ce68801567c /tools/qml | |
parent | 26c5243491f495194f04b449128dae36118e28da (diff) |
CMake: Regenerate and adapt to merge from devwip/cmake
Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Diffstat (limited to 'tools/qml')
-rw-r--r-- | tools/qml/.prev_CMakeLists.txt | 14 | ||||
-rw-r--r-- | tools/qml/CMakeLists.txt | 20 |
2 files changed, 28 insertions, 6 deletions
diff --git a/tools/qml/.prev_CMakeLists.txt b/tools/qml/.prev_CMakeLists.txt index 31d9a65396..b9b93d02d3 100644 --- a/tools/qml/.prev_CMakeLists.txt +++ b/tools/qml/.prev_CMakeLists.txt @@ -8,11 +8,9 @@ qt_add_tool(qml SOURCES conf.h main.cpp - LIBRARIES + PUBLIC_LIBRARIES Qt::CorePrivate Qt::QmlPrivate - PUBLIC_LIBRARIES - Qt::Qml ) # Resources: @@ -35,6 +33,8 @@ qt_add_resource(qml "qml" #### Keys ignored in scope 1:.:.:qml.pro:<TRUE>: # ICON = "resources/qml-64.png" # QMAKE_TARGET_DESCRIPTION = "QML" "Runtime" +# QML_IMPORT_NAME = "QmlRuntime.Config" +# QML_IMPORT_VERSION = "1.0" ## Scopes: ##################################################################### @@ -61,3 +61,11 @@ qt_extend_target(qml CONDITION QT_FEATURE_qml_debug DEFINES QT_QML_DEBUG_NO_WARNING ) + +set_target_properties(qml PROPERTIES + QT_QML_MODULE_INSTALL_QMLTYPES TRUE + QT_QML_MODULE_VERSION 1.0 + QT_QML_MODULE_URI QmlRuntime.Config +) + +qt6_qml_type_registration(qml) diff --git a/tools/qml/CMakeLists.txt b/tools/qml/CMakeLists.txt index 6727f51a92..6edf190389 100644 --- a/tools/qml/CMakeLists.txt +++ b/tools/qml/CMakeLists.txt @@ -9,14 +9,18 @@ qt_add_tool(qml SOURCES conf.h main.cpp - LIBRARIES + PUBLIC_LIBRARIES Qt::CorePrivate Qt::QmlPrivate - PUBLIC_LIBRARIES - Qt::Qml ) # special case begin +# Don't set properties on a host tool when cross compiling, because it +# is not being built. +if(CMAKE_CROSSCOMPILING) + return() +endif() + set_source_files_properties( conf/default.qml conf/resizeToItem.qml @@ -46,6 +50,8 @@ qt_add_resource(qml "qml" #### Keys ignored in scope 1:.:.:qml.pro:<TRUE>: # ICON = "resources/qml-64.png" # QMAKE_TARGET_DESCRIPTION = "QML" "Runtime" +# QML_IMPORT_NAME = "QmlRuntime.Config" +# QML_IMPORT_VERSION = "1.0" ## Scopes: ##################################################################### @@ -72,3 +78,11 @@ qt_extend_target(qml CONDITION QT_FEATURE_qml_debug DEFINES QT_QML_DEBUG_NO_WARNING ) + +set_target_properties(qml PROPERTIES + QT_QML_MODULE_INSTALL_QMLTYPES TRUE + QT_QML_MODULE_VERSION 1.0 + QT_QML_MODULE_URI QmlRuntime.Config +) +qt6_qml_type_registration(qml) + |