aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlMacros.cmake
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-05 18:43:30 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-02-10 09:27:06 +0100
commit63bfaae1f527a8f6de34e76dfd1282cd7e22d989 (patch)
treef280c4b17993ffe647ba5cf13c7f8d159acb6277 /src/qml/Qt6QmlMacros.cmake
parent026f8f4df59b641bcafca7bd392f5efefd795898 (diff)
Support and prefer QML_IMPORT_PATH over QML2_IMPORT_PATH
The 2 is meaningless. Task-number: QTBUG-85064 Change-Id: I9f140155d274c691b5eab1285d9b7153f9f93a87 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlMacros.cmake')
-rw-r--r--src/qml/Qt6QmlMacros.cmake9
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}