diff options
author | Heiko Becker <heirecka@exherbo.org> | 2022-03-24 22:59:42 +0100 |
---|---|---|
committer | Heiko Becker <heirecka@exherbo.org> | 2022-03-24 23:53:16 +0100 |
commit | d0730273c7f712a1a6aeb887def0d1ac4448aaa3 (patch) | |
tree | 447ca57c49bc82ac4bf3c0c693b585402901c39c | |
parent | c34c6730dcfb4320ff3a18f4dc2accf157550fe8 (diff) | |
download | extra-cmake-modules-d0730273c7f712a1a6aeb887def0d1ac4448aaa3.tar.gz extra-cmake-modules-d0730273c7f712a1a6aeb887def0d1ac4448aaa3.tar.bz2 |
ECMAddQch: Make it work with Qt6::qhelpgenerator too
-rw-r--r-- | modules/ECMAddQch.cmake | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/modules/ECMAddQch.cmake b/modules/ECMAddQch.cmake index bd8116a6..cc7b7c49 100644 --- a/modules/ECMAddQch.cmake +++ b/modules/ECMAddQch.cmake @@ -427,17 +427,31 @@ function(ecm_add_qch target_name) TYPE REQUIRED PURPOSE "Needed for API dox QCH file generation${doxygen_description_addition}" ) - find_package(QHelpGenerator REQUIRED) - set_package_properties(QHelpGenerator PROPERTIES - TYPE REQUIRED - PURPOSE "Needed for API dox QCH file generation" - DESCRIPTION "Part of Qt5 tools" - ) + + if (QT_MAJOR_VERSION EQUAL "5") + find_package(QHelpGenerator REQUIRED) + set_package_properties(QHelpGenerator PROPERTIES + TYPE REQUIRED + PURPOSE "Needed for API dox QCH file generation" + DESCRIPTION "Part of Qt5 tools" + ) + else() + find_package(Qt6 COMPONENTS ToolsTools CONFIG REQUIRED) + set_package_properties(Qt6ToolsTools PROPERTIES + TYPE REQUIRED + PURPOSE "Needed for API dox QCH file generation" + DESCRIPTION "qhelpgenerator from Qt6 tools" + ) + if(TARGET Qt6::qhelpgenerator) + get_target_property(QHelpGenerator_EXECUTABLE Qt6::qhelpgenerator LOCATION) + endif() + endif() + set(_missing_tools) if (NOT DOXYGEN_FOUND) list(APPEND _missing_tools "Doxygen") endif() - if (NOT QHelpGenerator_FOUND) + if (NOT QHelpGenerator_FOUND AND NOT TARGET Qt6::qhelpgenerator) list(APPEND _missing_tools "qhelpgenerator") endif() |