From f37aa909ac56d84bde92a5ee6650d578cd871196 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 23 Jan 2023 11:19:38 +0100 Subject: [PATCH] sdktool: Don't rely on FindQt5.cmake Use the normal CMake mechanism for finding either Qt 5 or Qt 6, instead of relying of the mapping from Qt 6 to Qt 5 that is done via the custom FindQt5.cmake. Change-Id: Ia9a17d82edfb2f27e10918f05ce8a0d34d9bb5f8 Reviewed-by: Cristian Adam Reviewed-by: Qt CI Bot --- src/tools/sdktool/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/tools/sdktool/CMakeLists.txt b/src/tools/sdktool/CMakeLists.txt index 3bf84b5886f..4adf618b845 100644 --- a/src/tools/sdktool/CMakeLists.txt +++ b/src/tools/sdktool/CMakeLists.txt @@ -16,15 +16,19 @@ if (NOT QT_CREATOR_API_DEFINED) set(DESTINATION DESTINATION .) include(QtCreatorIDEBranding) include(QtCreatorAPI) + + find_package(QT NAMES Qt6 Qt5 + COMPONENTS Core + REQUIRED + ) + find_package(Qt${QT_VERSION_MAJOR} + COMPONENTS Core + REQUIRED + ) endif() configure_file(../../app/app_version.h.cmakein app/app_version.h ESCAPE_QUOTES) -find_package(Qt5 - COMPONENTS Core - REQUIRED -) - if (APPLE) find_library(FWFoundation Foundation) endif()