Warning, /libraries/ktextaddons/texttranslator/translator/plugins/libretranslate/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-License-Identifier: BSD-3-Clause
0002 # SPDX-FileCopyrightText: none
0003 
0004 include_directories(${CMAKE_CURRENT_BINARY_DIR}/)
0005 add_library(translator_libretranslate MODULE)
0006 
0007 ecm_qt_declare_logging_category(translator_libretranslate_debug_SRCS
0008     HEADER libretranslatetranslator_debug.h
0009     IDENTIFIER TRANSLATOR_LIBRETRANSLATE_LOG
0010     CATEGORY_NAME org.kde.kf.texttranslator.libretranslate
0011     OLD_CATEGORY_NAMES org.kde.kf${KF_MAJOR_VERSION}.texttranslator.libretranslate
0012     DESCRIPTION "libretranslate translator"
0013     EXPORT KTEXTADDONS
0014 )
0015 
0016 target_sources(translator_libretranslate PRIVATE
0017     ${translator_libretranslate_debug_SRCS}
0018     libretranslateengineclient.cpp
0019     libretranslateengineclient.h
0020     libretranslateengineplugin.cpp
0021     libretranslateengineplugin.h
0022     libretranslateengineconfiguredialog.h
0023     libretranslateengineconfiguredialog.cpp
0024     libretranslateengineconfigurewidget.h
0025     libretranslateengineconfigurewidget.cpp
0026     libretranslateengineutil.h
0027     libretranslateengineutil.cpp
0028 )
0029 
0030 target_link_libraries(translator_libretranslate PRIVATE KF${KF_MAJOR_VERSION}::TextTranslator
0031     KF${KF_MAJOR_VERSION}::I18n KF${KF_MAJOR_VERSION}::ConfigCore
0032     KF${KF_MAJOR_VERSION}::TextAddonsWidgets
0033     KF${KF_MAJOR_VERSION}::WidgetsAddons
0034 )
0035 if (QT_MAJOR_VERSION STREQUAL "6")
0036     target_link_libraries(translator_libretranslate PRIVATE qt6keychain)
0037 else()
0038     target_link_libraries(translator_libretranslate PRIVATE qt5keychain)
0039 endif()
0040 install(TARGETS translator_libretranslate  DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/translator/)
0041 
0042 if (BUILD_TESTING)
0043     add_subdirectory(autotests)
0044 endif()