aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/FindQt5.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/FindQt5.cmake b/cmake/FindQt5.cmake
index 589fd4eed5..ae58487eea 100644
--- a/cmake/FindQt5.cmake
+++ b/cmake/FindQt5.cmake
@@ -42,6 +42,17 @@ if (NOT Qt6_FOUND)
endif()
return()
else()
+ # since Qt 6.2 some components are renamed to *Private
+ foreach(possible_private_libs DesignerComponents QmlDebug)
+ list(FIND Qt5_FIND_COMPONENTS ${possible_private_libs} dcIndex)
+ if(dcIndex GREATER_EQUAL 0)
+ find_package(Qt6${possible_private_libs}Private CONFIG QUIET)
+ if(TARGET Qt6::${possible_private_libs}Private)
+ add_library(Qt5::${possible_private_libs} ALIAS Qt6::${possible_private_libs}Private)
+ list(REMOVE_AT Qt5_FIND_COMPONENTS ${dcIndex})
+ endif()
+ endif()
+ endforeach()
find_package(Qt6 CONFIG ${__arguments} ${Qt5_FIND_COMPONENTS})
endif()