forked from qt-creator/qt-creator
cmake build: Fix documentation generation with Qt6
qhelpgenerator moved to a separate package "Tools" which doesn't exist in Qt5. Task-number: QTCREATORBUG-24098 Change-Id: If7d0d638d6cee27f9154141ca415fb412745d1ee Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ if (Qt5_VERSION VERSION_LESS 6.0.0)
|
||||
install(TARGETS Qt6Core5Compat EXPORT QtCreator)
|
||||
endif()
|
||||
find_package(Qt5 COMPONENTS LinguistTools QUIET)
|
||||
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg QUIET)
|
||||
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg Tools QUIET)
|
||||
|
||||
find_package(Threads)
|
||||
find_package(Clang QUIET)
|
||||
|
||||
@@ -26,7 +26,9 @@ find_package(Qt6 ${Qt5_FIND_VERSION} CONFIG COMPONENTS Core QUIET)
|
||||
if (NOT Qt6_FOUND)
|
||||
# remove Core5Compat from components to find in Qt5, but add a dummy target,
|
||||
# which unfortunately cannot start with "Qt6::"
|
||||
# also remove Tools, where some tools have moved in Qt6, e.g. from Help
|
||||
list(REMOVE_ITEM Qt5_FIND_COMPONENTS Core5Compat)
|
||||
list(REMOVE_ITEM Qt5_FIND_COMPONENTS Tools)
|
||||
find_package(Qt5 ${Qt5_FIND_VERSION} CONFIG ${__arguments} ${Qt5_FIND_COMPONENTS})
|
||||
if (NOT TARGET Qt6Core5Compat)
|
||||
add_library(Qt6Core5Compat INTERFACE)
|
||||
|
||||
Reference in New Issue
Block a user