Warning, /libraries/ktextaddons/textspeechtotext/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-License-Identifier: BSD-3-Clause 0002 # SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 add_definitions(-DTRANSLATION_DOMAIN=\"libtextspeechtotext\") 0004 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF${KF_MAJOR_VERSION}TextSpeechToText") 0005 0006 ecm_setup_version(PROJECT VARIABLE_PREFIX TEXTSPEECHTOTEXT 0007 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/textspeechtotext_version.h" 0008 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextSpeechToTextConfigVersion.cmake" 0009 SOVERSION 1 0010 ) 0011 0012 install(FILES 0013 "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextSpeechToTextConfig.cmake" 0014 "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextSpeechToTextConfigVersion.cmake" 0015 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0016 COMPONENT Devel 0017 ) 0018 0019 install(EXPORT KF${KF_MAJOR_VERSION}TextSpeechToTextTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0020 FILE KF${KF_MAJOR_VERSION}TextSpeechToTextTargets.cmake NAMESPACE KF${KF_MAJOR_VERSION}::) 0021 0022 install(FILES 0023 ${CMAKE_CURRENT_BINARY_DIR}/textspeechtotext_version.h 0024 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextSpeechToText/ COMPONENT Devel 0025 ) 0026 0027 add_library(KF${KF_MAJOR_VERSION}TextSpeechToText) 0028 add_library(KF${KF_MAJOR_VERSION}::TextSpeechToText ALIAS KF${KF_MAJOR_VERSION}TextSpeechToText) 0029 ecm_qt_declare_logging_category(KF${KF_MAJOR_VERSION}TextSpeechToText HEADER textspeechtotext_debug.h 0030 IDENTIFIER TEXTSPEECHTOTEXT_LOG 0031 CATEGORY_NAME org.kde.kf.textspeechtotext 0032 DESCRIPTION "KF${KF_MAJOR_VERSION} (TextSpeechToText)" 0033 EXPORT KTEXTADDONS 0034 ) 0035 0036 target_sources(KF${KF_MAJOR_VERSION}TextSpeechToText PRIVATE 0037 speechtotext/speechtotextclient.h 0038 speechtotext/speechtotextclient.cpp 0039 0040 speechtotext/speechtotextplugin.h 0041 speechtotext/speechtotextplugin.cpp 0042 0043 speechtotext/speechtotextengineloader.cpp 0044 speechtotext/speechtotextengineloader.h 0045 0046 speechtotext/speechtotextmanager.h 0047 speechtotext/speechtotextmanager.cpp 0048 0049 speechtotext/speechtotextengineaccessmanager.cpp 0050 speechtotext/speechtotextengineaccessmanager.h 0051 0052 speechtotext/widgets/speechtotextconfigurewidget.h 0053 speechtotext/widgets/speechtotextconfigurewidget.cpp 0054 0055 speechtotext/widgets/speechtotextconfiguredialog.h 0056 speechtotext/widgets/speechtotextconfiguredialog.cpp 0057 0058 speechtotext/widgets/speechtotextcomboboxwidget.h 0059 speechtotext/widgets/speechtotextcomboboxwidget.cpp 0060 0061 speechtotext/widgets/speechtotextselectdevicewidget.h 0062 speechtotext/widgets/speechtotextselectdevicewidget.cpp 0063 0064 speechtotext/widgets/speechtotexttoolbuttonwidget.h 0065 speechtotext/widgets/speechtotexttoolbuttonwidget.cpp 0066 0067 speechtotext/widgets/speechtotextaction.h 0068 speechtotext/widgets/speechtotextaction.cpp 0069 0070 speechtotext/widgets/speechtotextmenu.h 0071 speechtotext/widgets/speechtotextmenu.cpp 0072 0073 speechtotext/textspeechtotextutil.h 0074 speechtotext/textspeechtotextutil.cpp 0075 ) 0076 0077 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) 0078 set_target_properties(KF${KF_MAJOR_VERSION}TextSpeechToText PROPERTIES UNITY_BUILD ON) 0079 endif() 0080 generate_export_header(KF${KF_MAJOR_VERSION}TextSpeechToText BASE_NAME textspeechtotext) 0081 0082 0083 target_link_libraries(KF${KF_MAJOR_VERSION}TextSpeechToText 0084 PUBLIC 0085 Qt::Gui 0086 Qt::Widgets 0087 Qt::Network 0088 PRIVATE 0089 Qt::MultimediaWidgets 0090 KF${KF_MAJOR_VERSION}::I18n 0091 KF${KF_MAJOR_VERSION}::WidgetsAddons 0092 KF${KF_MAJOR_VERSION}::ConfigGui 0093 KF${KF_MAJOR_VERSION}::TextAddonsWidgets 0094 ) 0095 0096 target_include_directories(KF${KF_MAJOR_VERSION}TextSpeechToText INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/TextSpeechToText/>") 0097 0098 set_target_properties(KF${KF_MAJOR_VERSION}TextSpeechToText PROPERTIES 0099 VERSION ${TEXTSPEECHTOTEXT_VERSION} 0100 SOVERSION ${TEXTSPEECHTOTEXT_SOVERSION} 0101 EXPORT_NAME TextSpeechToText 0102 ) 0103 0104 install(TARGETS 0105 KF${KF_MAJOR_VERSION}TextSpeechToText 0106 EXPORT KF${KF_MAJOR_VERSION}TextSpeechToTextTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} 0107 ) 0108 0109 ecm_generate_headers(TextSpeechToText_Camelcasespeechtotext_HEADERS 0110 HEADER_NAMES 0111 SpeechToTextClient 0112 SpeechToTextPlugin 0113 SpeechToTextEngineLoader 0114 SpeechToTextManager 0115 REQUIRED_HEADERS TextSpeechToText_speechtotext_HEADERS 0116 PREFIX TextSpeechToText 0117 RELATIVE speechtotext 0118 ) 0119 0120 ecm_generate_headers(TextSpeechToTextWidget_Camelcasespeechtotext_HEADERS 0121 HEADER_NAMES 0122 SpeechToTextAction 0123 SpeechToTextToolButtonWidget 0124 SpeechToTextMenu 0125 REQUIRED_HEADERS TextSpeechToTextWidget_speechtotext_HEADERS 0126 PREFIX TextSpeechToText 0127 RELATIVE speechtotext/widgets 0128 ) 0129 0130 install(FILES 0131 ${CMAKE_CURRENT_BINARY_DIR}/textspeechtotext_version.h 0132 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextSpeechToText/ COMPONENT Devel 0133 ) 0134 0135 install(FILES 0136 ${TextSpeechToText_Camelcasespeechtotext_HEADERS} 0137 ${TextSpeechToTextWidget_Camelcasespeechtotext_HEADERS} 0138 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextSpeechToText/TextSpeechToText 0139 COMPONENT Devel 0140 ) 0141 0142 install(FILES 0143 ${CMAKE_CURRENT_BINARY_DIR}/textspeechtotext_export.h 0144 ${TextSpeechToText_speechtotext_HEADERS} 0145 ${TextSpeechToTextWidget_speechtotext_HEADERS} 0146 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextSpeechToText/textspeechtotext 0147 COMPONENT Devel 0148 ) 0149 0150 0151 if (BUILD_QCH) 0152 ecm_add_qch( 0153 KF${KF_MAJOR_VERSION}TextSpeechToText_QCH 0154 NAME KF${KF_MAJOR_VERSION}TextSpeechToText 0155 BASE_NAME KF${KF_MAJOR_VERSION}TextSpeechToText 0156 VERSION ${TEXTSPEECHTOTEXT_VERSION} 0157 ORG_DOMAIN org.kde 0158 SOURCES # using only public headers, to cover only public API 0159 ${TextSpeechToText_speechtotext_HEADERS} 0160 ${TextSpeechToTextWidget_speechtotext_HEADERS} 0161 LINK_QCHS 0162 Qt${QT_MAJOR_VERSION}Core_QCH 0163 Qt${QT_MAJOR_VERSION}Gui_QCH 0164 Qt${QT_MAJOR_VERSION}Widgets_QCH 0165 INCLUDE_DIRS 0166 ${CMAKE_CURRENT_BINARY_DIR} 0167 BLANK_MACROS 0168 TEXTSPEECHTOTEXT_EXPORT 0169 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0170 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0171 COMPONENT Devel 0172 ) 0173 endif() 0174 if (BUILD_QCH) 0175 ecm_install_qch_export( 0176 TARGETS KF${KF_MAJOR_VERSION}TextSpeechToText_QCH 0177 FILE KF${KF_MAJOR_VERSION}TextSpeechToTextQchTargets.cmake 0178 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0179 COMPONENT Devel 0180 ) 0181 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF${KF_MAJOR_VERSION}TextSpeechToTextQchTargets.cmake\")") 0182 endif() 0183 0184 configure_package_config_file( 0185 "${CMAKE_CURRENT_SOURCE_DIR}/KFTextSpeechToTextConfig.cmake.in" 0186 "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextSpeechToTextConfig.cmake" 0187 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0188 ) 0189 0190 add_subdirectory(speechtotext/plugins) 0191 if(BUILD_TESTING) 0192 add_subdirectory(speechtotext/widgets/autotests) 0193 add_subdirectory(speechtotext/widgets/tests) 0194 add_subdirectory(tests) 0195 endif()