Commit b248e11f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add info about texttospeech support

parent fae2e4d0
Pipeline #137319 failed with stages
in 5 minutes and 5 seconds
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(PIM_VERSION "5.19.40")
set(PIM_VERSION "5.19.41")
project(KPimTextEdit VERSION ${PIM_VERSION})
......@@ -82,10 +82,13 @@ set_package_properties(Qt5TextToSpeech PROPERTIES DESCRIPTION
TYPE OPTIONAL
)
if(TARGET Qt${QT_MAJOR_VERSION}::TextToSpeech)
set(HAVE_TEXT_TO_SPEECH_SUPPORT TRUE)
add_definitions(-DHAVE_TEXT_TO_SPEECH_SUPPORT)
add_definitions(-DHAVE_TEXT_TO_SPEECH_SUPPORT)
set(KPIMTEXTEDIT_TEXT_TO_SPEECH TRUE)
endif()
configure_file(kpimtextedit-texttospeech.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kpimtextedit-texttospeech.h )
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt6Core5Compat)
endif()
......
#cmakedefine01 KPIMTEXTEDIT_TEXT_TO_SPEECH
......@@ -53,7 +53,7 @@ target_sources(KF5PimTextEdit PRIVATE
composer-ng/richtextcomposeremailquotehighlighter.h
composer-ng/richtextcomposerwidget.h
)
if (HAVE_TEXT_TO_SPEECH_SUPPORT)
if (KPIMTEXTEDIT_TEXT_TO_SPEECH)
target_sources(KF5PimTextEdit PRIVATE
texttospeech/texttospeech.cpp
texttospeech/texttospeechwidget.cpp
......@@ -168,7 +168,7 @@ target_link_libraries(KF5PimTextEdit
KF5::I18n
KF5::SyntaxHighlighting
)
if (HAVE_TEXT_TO_SPEECH_SUPPORT)
if (KPIMTEXTEDIT_TEXT_TO_SPEECH)
target_link_libraries(KF5PimTextEdit
PRIVATE
Qt${QT_MAJOR_VERSION}::TextToSpeech
......@@ -245,7 +245,7 @@ ecm_generate_headers(KPimTextEdit_CamelCasetexteditor_commonwidget_HEADERS
)
if (HAVE_TEXT_TO_SPEECH_SUPPORT)
if (KPIMTEXTEDIT_TEXT_TO_SPEECH)
ecm_generate_headers(KPimTextEdit_CamelCasetexttospeechs_HEADERS
HEADER_NAMES
TextToSpeech
......@@ -274,7 +274,7 @@ ecm_generate_headers(KPimTextEdit_Camelcasecomposerng_HEADERS
########### install files ###############
if (HAVE_TEXT_TO_SPEECH_SUPPORT)
if (KPIMTEXTEDIT_TEXT_TO_SPEECH)
install(FILES
${KPimTextEdit_texttospeechs_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KPIMTextEdit/kpimtextedit
......@@ -289,6 +289,7 @@ endif()
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kpimtextedit_export.h
${CMAKE_CURRENT_BINARY_DIR}/../kpimtextedit-texttospeech.h
${kpimtextedit_HEADERS}
${KPimTextEdit_richtexteditor_HEADERS}
${KPimTextEdit_texteditor_commonwidget_HEADERS}
......@@ -321,7 +322,7 @@ if (BUILD_TESTING)
add_subdirectory(texteditor/commonwidget/autotests)
add_subdirectory(texteditor/plaintexteditor/tests)
add_subdirectory(texteditor/richtexteditor/tests)
if (HAVE_TEXT_TO_SPEECH_SUPPORT)
if (KPIMTEXTEDIT_TEXT_TO_SPEECH)
add_subdirectory(texttospeech/autotests)
add_subdirectory(texttospeech/tests)
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment