Close #457: Support Qt5 < 5.12

Qt5 before 5.12 has to use qcollectiongenerator
instead of qhelpgenerator, which also exists but creates an error.

if qcollectiongenerator prioritize it.
This commit is contained in:
Christian Hohnstaedt 2023-09-22 14:55:27 +02:00
parent cccc8ee1e3
commit 7b2342f5cd

View File

@ -105,11 +105,20 @@ if(SPHINX)
endif()
endif()
if(TARGET ${QT}::qhelpgenerator)
if (QT_VERSION VERSION_LESS 5.12.0)
if (TARGET ${QT}::qcollectiongenerator)
set(QHELPGEN $<TARGET_FILE:${QT}::qcollectiongenerator>)
endif()
else()
if(TARGET ${QT}::qhelpgenerator)
set(QHELPGEN $<TARGET_FILE:${QT}::qhelpgenerator>)
endif()
endif()
if(QHELPGEN)
set(QTHELP_IDX ${D}/qthelp/xca.qhc ${D}/qthelp/xca.qch)
add_custom_command(
OUTPUT ${QTHELP_IDX}
COMMAND $<TARGET_FILE:${QT}::qhelpgenerator> ${D}/qthelp/xca.qhcp
COMMAND ${QHELPGEN} ${D}/qthelp/xca.qhcp
DEPENDS sphinx-qthelp
COMMENT "Create context sensitive help index"
)