diff options
Diffstat (limited to 'src/qml/Qt6QmlMacros.cmake')
-rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index 9e559f8755..60b57b3940 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -1254,7 +1254,8 @@ endfunction() # Adds a target called TARGET_qmllint that runs on all qml files compiled ahead-of-time. function(qt6_target_enable_qmllint target) get_target_property(target_source ${target} SOURCE_DIR) - get_target_property(includes ${target} QML2_IMPORT_PATH) + get_target_property(includes ${target} QML_IMPORT_PATH) + get_target_property(deprecated_includes ${target} QML2_IMPORT_PATH) get_target_property(files ${target} QML_FILES) if(includes) @@ -1263,6 +1264,12 @@ function(qt6_target_enable_qmllint target) endforeach() endif() + if(deprecated_includes) + foreach(dir in LISTS deprecated_includes) + list(APPEND include_args "-I${dir}") + endforeach() + endif() + add_custom_target(${target}_qmllint ${QT_CMAKE_EXPORT_NAMESPACE}::qmllint ${files} ${include_args} WORKING_DIRECTORY ${target_source} |