Files
RedBear-OS/local/recipes/kde/kf6-extra-cmake-modules/source/find-modules/FindQHelpGenerator.cmake
T
vasilito e0590a0b56 kde/kf6-extra-cmake-modules: rebase to 6.28.0 (ECM) + teach version parser set(VERSION)
kf6-kcoreaddons 6.28.0 requires ECM >= 6.28.0 but the vendored ECM source/ was
still 6.10.0: the sync engine skipped it because ECM's version marker is a bare
set(VERSION "X.Y.Z") that the parser didn't recognize (only KF_VERSION /
PROJECT_VERSION / RELEASE_SERVICE_VERSION). Re-lay ECM from its 6.28.0 source.tar
(pure cmake modules, no Redox port) and teach both the sync engine and the
validator to read set(VERSION) so this class is caught, not silently skipped.
2026-08-01 08:07:00 +03:00

58 lines
1.7 KiB
CMake

# SPDX-FileCopyrightText: 2016 Friedrich W. H. Kossebau <kossebau@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
#[=======================================================================[.rst:
WARNING: FOR ECM-INTERNAL USE ONLY, DO NOT USE IN OWN PROJECTS
THIS FILE MIGHT DISAPPEAR IN FUTURE VERSIONS OF ECM.
Finds the Qt5 QHelpGenerator
QHelpGenerator_FOUND - True if QHelpGenerator found.
QHelpGenerator_EXECUTABLE - Path to executable
#]=======================================================================]
cmake_policy(VERSION 3.16)
include(${CMAKE_CURRENT_LIST_DIR}/../modules/QtVersionOption.cmake)
find_package(Qt${QT_MAJOR_VERSION}Help QUIET)
if (TARGET Qt5::qhelpgenerator)
get_target_property(QHelpGenerator_EXECUTABLE Qt5::qhelpgenerator LOCATION)
else()
# assume same folder as qmake executable
if (TARGET Qt5::qmake)
get_target_property(_qmake_EXECUTABLE Qt5::qmake LOCATION)
get_filename_component(_path ${_qmake_EXECUTABLE} DIRECTORY)
else()
set(_path)
endif()
find_program(QHelpGenerator_EXECUTABLE
NAMES
qhelpgenerator-qt5
qhelpgenerator
PATHS
${_path}
NO_DEFAULT_PATH
)
endif()
mark_as_advanced(QHelpGenerator_EXECUTABLE)
if(QHelpGenerator_EXECUTABLE)
set(QHelpGenerator_FOUND TRUE)
else()
set(QHelpGenerator_FOUND FALSE)
endif()
if(QHelpGenerator_FOUND)
if(NOT QHelpGenerator_FIND_QUIETLY )
message( STATUS "Found QHelpGenerator executable: ${QHelpGenerator_EXECUTABLE}")
endif()
else()
if(QHelpGenerator_FIND_REQUIRED)
message( FATAL_ERROR "Could not find QHelpGenerator executable" )
else()
message( STATUS "Optional QHelpGenerator executable was not found" )
endif()
endif()