diff options
author | Li Xinwei <1326710505@qq.com> | 2020-12-08 01:56:40 +0800 |
---|---|---|
committer | Li Xinwei <1326710505@qq.com> | 2020-12-08 02:34:59 +0800 |
commit | e6e262da1423bcb7cfe3db9f83fe0df54483c8d4 (patch) | |
tree | fd9d4fbd53139b18da670682e34e93d07fd2fbd2 /tools/qmltime/CMakeLists.txt | |
parent | 1febf3da07919d48c704b8fdf9dbf654fbcb8a34 (diff) |
Use load(qt_tool) and qt_internal_add_tool for qmltime
The qmltime should be a tool, not a normal executable or an app.
Pick-to: 6.0 5.15 5.12
Change-Id: I64c76877907297a6a817ba5903786bcc7fba8fdd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tools/qmltime/CMakeLists.txt')
-rw-r--r-- | tools/qmltime/CMakeLists.txt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/qmltime/CMakeLists.txt b/tools/qmltime/CMakeLists.txt index 95794e8135..b119325471 100644 --- a/tools/qmltime/CMakeLists.txt +++ b/tools/qmltime/CMakeLists.txt @@ -1,11 +1,13 @@ # Generated from qmltime.pro. ##################################################################### -## qmltime Binary: +## qmltime Tool: ##################################################################### -qt_internal_add_executable(qmltime - GUI +qt_get_tool_target_name(target_name qmltime) +qt_internal_add_tool(${target_name} + TARGET_DESCRIPTION "QML Time" + TOOLS_TARGET Qml # special case SOURCES qmltime.cpp qmltime.h PUBLIC_LIBRARIES @@ -19,14 +21,13 @@ qt_internal_add_executable(qmltime # QMAKE_TARGET_DESCRIPTION = "QML" "Time" # QML_IMPORT_NAME = "QmlTime" # QML_IMPORT_VERSION = "1.0" -# TEMPLATE = "app" ## Scopes: ##################################################################### -set_target_properties(qmltime PROPERTIES +set_target_properties(${target_name} PROPERTIES QT_QML_MODULE_VERSION 1.0 QT_QML_MODULE_URI QmlTime ) -qt6_qml_type_registration(qmltime) +qt6_qml_type_registration(${target_name}) |