From f0a6afb0263dee14ec1ad427bcaf3aac51708b3b Mon Sep 17 00:00:00 2001 From: august-alt <77973983+august-alt@users.noreply.github.com> Date: Wed, 2 Jun 2021 18:03:00 +0400 Subject: [PATCH] Add qhelpgenerator version selection --- doc/CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 8be75700..af702ba1 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -2,11 +2,19 @@ set(ADMC_HELP_PROJECT ${CMAKE_CURRENT_SOURCE_DIR}/admc.qhp) set(ADMC_COMPRESSED_HELP ${CMAKE_CURRENT_BINARY_DIR}/admc.qch) -add_custom_command( - OUTPUT ${ADMC_COMPRESSED_HELP} - COMMAND qhelpgenerator ${ADMC_HELP_PROJECT} -o ${ADMC_COMPRESSED_HELP} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/* -) +if (ADMC_BUILD_DEB) + add_custom_command( + OUTPUT ${ADMC_COMPRESSED_HELP} + COMMAND qhelpgenerator ${ADMC_HELP_PROJECT} -o ${ADMC_COMPRESSED_HELP} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/* + ) +else() + add_custom_command( + OUTPUT ${ADMC_COMPRESSED_HELP} + COMMAND qhelpgenerator-qt5 ${ADMC_HELP_PROJECT} -o ${ADMC_COMPRESSED_HELP} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/* + ) +endif (ADMC_BUILD_DEB) add_custom_target(doc ALL