Warning, /libraries/kproperty/cmake/modules/FindQHelpGenerator.cmake is written in an unsupported language. File is not indexed.
0001 # Finds the Qt5 QHelpGenerator 0002 # 0003 # QHelpGenerator_FOUND - True if QHelpGenerator found. 0004 # QHelpGenerator_EXECUTABLE - Path to executable 0005 0006 find_package(Qt5Core QUIET) 0007 if (TARGET Qt5::qhelpgenerator) 0008 get_target_property(QHelpGenerator_EXECUTABLE Qt5::qhelpgenerator LOCATION) 0009 else() 0010 # assume same folder as qmake executable 0011 if (TARGET Qt5::qmake) 0012 get_target_property(_qmake_EXECUTABLE Qt5::qmake LOCATION) 0013 get_filename_component(_path ${_qmake_EXECUTABLE} DIRECTORY) 0014 else() 0015 set(_path) 0016 endif() 0017 # TODO: prevent that the Qt4 version is picked up 0018 find_program(QHelpGenerator_EXECUTABLE 0019 NAMES 0020 qhelpgenerator-qt5 0021 qhelpgenerator 0022 PATH 0023 ${_path} 0024 ) 0025 endif() 0026 mark_as_advanced(QHelpGenerator_EXECUTABLE) 0027 0028 if(QHelpGenerator_EXECUTABLE) 0029 set(QHelpGenerator_FOUND TRUE) 0030 else() 0031 set(QHelpGenerator_FOUND FALSE) 0032 endif() 0033 0034 if(QHelpGenerator_FOUND) 0035 if(NOT QHelpGenerator_FIND_QUIETLY ) 0036 message( STATUS "Found QHelpGenerator executable: ${QHelpGenerator_EXECUTABLE}") 0037 endif() 0038 else() 0039 if(QHelpGenerator_FIND_REQUIRED) 0040 message( FATAL_ERROR "Could not find QHelpGenerator executable" ) 0041 else() 0042 message( STATUS "Optional QHelpGenerator executable was not found" ) 0043 endif() 0044 endif() 0045