diff options
author | Volker Krause <vkrause@kde.org> | 2021-12-27 11:58:19 +0100 |
---|---|---|
committer | Volker Krause <vkrause@kde.org> | 2021-12-27 11:58:19 +0100 |
commit | bc0692797aba5dd7f6d588bb75d3fc60512a9bd5 (patch) | |
tree | 1dbf2e0ae726a49e87e2b7dd3445ca9001a72d4c /modules | |
parent | cca11c3432af161fa7da56548e1fc36bb1f4b345 (diff) | |
download | extra-cmake-modules-bc0692797aba5dd7f6d588bb75d3fc60512a9bd5.tar.gz extra-cmake-modules-bc0692797aba5dd7f6d588bb75d3fc60512a9bd5.tar.bz2 |
Add support for finding Qt6 QML modules
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ECMFindQMLModule.cmake.in | 14 |
1 files 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() |