From bc0692797aba5dd7f6d588bb75d3fc60512a9bd5 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Mon, 27 Dec 2021 11:58:19 +0100 Subject: Add support for finding Qt6 QML modules --- modules/ECMFindQMLModule.cmake.in | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/ECMFindQMLModule.cmake.in b/modules/ECMFindQMLModule.cmake.in index 4234b702..7cd737b2 100644 --- a/modules/ECMFindQMLModule.cmake.in +++ b/modules/ECMFindQMLModule.cmake.in @@ -5,11 +5,17 @@ #============================================================================= include(FindPackageHandleStandardArgs) -include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") - -query_qmake(qt_binaries_dir QT_HOST_BINS) +include("${ECM_MODULE_DIR}/QtVersionOption.cmake") + +if (QT_MAJOR_VERSION EQUAL "5") + include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") + query_qmake(qt_binaries_dir QT_HOST_BINS) + find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS ${qt_binaries_dir}) +elseif (QT_MAJOR_VERSION EQUAL "6") + find_package(Qt6QmlTools REQUIRED) + get_target_property(QMLPLUGINDUMP_PROGRAM Qt6::qmlplugindump LOCATION) +endif() -find_program(QMLPLUGINDUMP_PROGRAM NAMES qmlplugindump HINTS ${qt_binaries_dir}) if(NOT QMLPLUGINDUMP_PROGRAM) message(WARNING "Could not find qmlplugindump. It is necessary to look up qml module dependencies.") endif() -- cgit v1.2.1