From 86fae5664cbcaf9e6f98eca984564e5452730abd Mon Sep 17 00:00:00 2001 From: Andrei Golubev Date: Tue, 24 May 2022 13:10:26 +0200 Subject: Remove qmltc compilation command in favor of qt_add_qml_module() [ChangeLog][CMake] The qmltc compilation functionality provided by qt6_target_compile_qml_to_cpp() is merged into qt6_add_qml_module() command and is available through ENABLE_TYPE_COMPILER argument. The qt6_target_compile_qml_to_cpp() function does nothing and is left only to highlight that users must migrate away from it. Fixes: QTBUG-100215 Change-Id: Ie7d6b82564dff86176194fce35039ba0d93c0977 Reviewed-by: Alexandru Croitor --- src/qml/doc/snippets/qmltc/CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/qml/doc/snippets') diff --git a/src/qml/doc/snippets/qmltc/CMakeLists.txt b/src/qml/doc/snippets/qmltc/CMakeLists.txt index 671db0e30d..aa5fa8e230 100644 --- a/src/qml/doc/snippets/qmltc/CMakeLists.txt +++ b/src/qml/doc/snippets/qmltc/CMakeLists.txt @@ -45,16 +45,14 @@ qt6_add_qml_module(${application_name} VERSION 1.0 URI QmltcExample QML_FILES ${application_qml_files} + + # Compile qml files (listed in QML_FILES) to C++ using qmltc and add these + # files to the application binary: + ENABLE_TYPE_COMPILER ) #! [qmltc-add-qml-module] #! [qmltc-compile-to-cpp] # (qmltc-specific) Link *private* libraries that correspond to QML modules: target_link_libraries(${application_name} PRIVATE Qt::QmlPrivate Qt::QuickPrivate) - -# Compile qml files (listed in QML_FILES) to C++ using qmltc and add these files -# to the application binary: -qt6_target_compile_qml_to_cpp(${application_name} - QML_FILES ${application_qml_files} -) #! [qmltc-compile-to-cpp] -- cgit v1.2.3