diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2022-01-25 21:30:41 +0100 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2022-01-26 19:23:16 +0100 |
commit | 97123dbe6755a787e93797f717f8ebf193352b85 (patch) | |
tree | cd1dd06c612f1a704a6275f67c71a8a39f68b2a8 /src/qml | |
parent | dd55dc7e3d20d12af333731448346a58b5d0ba19 (diff) |
qmltc: Rename CMake command's argument FILES -> QML_FILES
This way we make it consistent with qt_add_qml_module()
Fixes: QTBUG-100214
Pick-to: 6.3
Change-Id: I9f38a8ba3dec978ccdf4ea937ff662ae2449e582
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/Qt6QmlBuildInternals.cmake | 2 | ||||
-rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 6 | ||||
-rw-r--r-- | src/qml/doc/snippets/qmltc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc | 12 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake index 445de26cef..a155c963df 100644 --- a/src/qml/Qt6QmlBuildInternals.cmake +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -444,7 +444,7 @@ endfunction() function(qt_internal_target_compile_qml_to_cpp target) set(option_args "") set(single_args NAMESPACE) - set(multi_args FILES IMPORT_PATHS) + set(multi_args QML_FILES IMPORT_PATHS) qt_parse_all_arguments(arg "qt_internal_target_compile_qml_to_cpp" "${option_args}" "${single_args}" diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index c41c45a0f0..433fb0b596 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -1056,7 +1056,7 @@ endfunction() function(qt6_target_compile_qml_to_cpp target) set(args_option "") set(args_single NAMESPACE) - set(args_multi FILES IMPORT_PATHS) + set(args_multi QML_FILES IMPORT_PATHS) cmake_parse_arguments(PARSE_ARGV 1 arg "${args_option}" "${args_single}" "${args_multi}" @@ -1065,7 +1065,7 @@ function(qt6_target_compile_qml_to_cpp target) message(FATAL_ERROR "Unknown/unexpected arguments: ${arg_UNPARSED_ARGUMENTS}") endif() - if (NOT arg_FILES) + if (NOT arg_QML_FILES) message(FATAL_ERROR "FILES option not given or contains empty list for target ${target}") endif() @@ -1139,7 +1139,7 @@ function(qt6_target_compile_qml_to_cpp target) endif() endforeach() - foreach(qml_file_src IN LISTS arg_FILES) + foreach(qml_file_src IN LISTS arg_QML_FILES) if(NOT qml_file_src MATCHES "\\.(qml)$") list(APPEND non_qml_files ${qml_file_src}) continue() diff --git a/src/qml/doc/snippets/qmltc/CMakeLists.txt b/src/qml/doc/snippets/qmltc/CMakeLists.txt index 4eb60fce38..69bfda7249 100644 --- a/src/qml/doc/snippets/qmltc/CMakeLists.txt +++ b/src/qml/doc/snippets/qmltc/CMakeLists.txt @@ -55,6 +55,6 @@ target_link_libraries(${application_name} PRIVATE Qt::QmlPrivate Qt::QuickPrivat # Compile qml files (listed in FILES) to C++ using qmltc and add these files to # the application binary: qt6_target_compile_qml_to_cpp(${application_name} - FILES ${application_qml_files} + QML_FILES ${application_qml_files} ) #! [qmltc-compile-to-cpp] diff --git a/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc b/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc index 739d18d88d..2d1da9efe8 100644 --- a/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc +++ b/src/qml/doc/src/cmake/qt_target_compile_qml_to_cpp.qdoc @@ -39,7 +39,7 @@ \badcode qt_target_compile_qml_to_cpp( target - FILES ... + QML_FILES ... [NAMESPACE namespace] [IMPORT_PATHS ...] ) @@ -67,10 +67,10 @@ The \c target specifies the name of the binary that the QML files belong to. In order for the compilation to succeed, the target is expected to be a valid QML module, defined with qt_add_qml_module() command. -\c FILES lists the \c{.qml} files that are going to be compiled into C++. In -most cases, all the target's QML files would be specified in the FILES. This -way, FILES argument is equivalent to QML_FILES argument of the -qt_add_qml_module() command. +\c QML_FILES lists the \c{.qml} files that are going to be compiled into C++. In +most cases, all the target's QML files would be specified in the QML_FILES. This +way, QML_FILES argument of this command is equivalent to QML_FILES argument of +the qt_add_qml_module() command. \c NAMESPACE argument defines a namespace, in which the generated C++ code resides. By default, no namespace is specified for user projects. The code @@ -80,7 +80,7 @@ generated from Qt's own sources is put under a QT_NAMESPACE namespace. specified entries are passed to qmltc and allow to correctly import modules that do not reside under the location specified by QLibraryInfo::QmlImportsPath. -While processing FILES, the following source file properties are respected: +While processing QML_FILES, the following source file properties are respected: \list \li \c{QT_QMLTC_FILE_BASENAME}: use this source file property to specify a non-default .h and .cpp file name, which might be useful to e.g. resolve |