CMake: Use Qt5::qhelpgenerator target

I missed that before, but it is actually there:-)

Change-Id: Ifaeaba4aa524980328cb68a8a039ff58e4b74ed8
Reviewed-by: Volker Krause <volker.krause@kdab.com>
This commit is contained in:
Tobias Hunger
2019-06-04 09:37:01 +02:00
parent d965df6483
commit 71ab4a83c2

View File

@@ -124,9 +124,8 @@ function(_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir)
set(_arg_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc") set(_arg_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
endif() endif()
_doc_find_program(_qhelpgenerator NAMES qhelpgenerator qhelpgenerator-qt5) if (NOT TARGET Qt5::qhelpgenerator)
if (_qhelpgenerator STREQUAL "_qhelpgenerator-NOTFOUND") message(WARNING "qhelpgenerator missing: No QCH documentation targets were generated")
message(WARNING "No qhelpgenerator binary found: No QCH documentation targets were generated")
return() return()
endif() endif()
@@ -138,7 +137,7 @@ function(_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir)
set(_qch_target "qch_docs_${_target}") set(_qch_target "qch_docs_${_target}")
set(_html_target "html_docs_${_target}") set(_html_target "html_docs_${_target}")
add_custom_target("${_qch_target}" add_custom_target("${_qch_target}"
"${_qhelpgenerator}" "${_html_outputdir}/${_target}.qhp" -o "${_qch_outputdir}/${_target}.qch" Qt5::qhelpgenerator "${_html_outputdir}/${_target}.qhp" -o "${_qch_outputdir}/${_target}.qch"
COMMENT "Build QCH documentation from ${_qdocconf_file}" COMMENT "Build QCH documentation from ${_qdocconf_file}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
VERBATIM VERBATIM