Warning, /libraries/ktextaddons/textautocorrection/core/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 
0005 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF${KF_MAJOR_VERSION}TextAutoCorrectionCore")
0006 
0007 
0008 
0009 ecm_setup_version(PROJECT VARIABLE_PREFIX TEXTAUTOCORRECTIONCORE
0010     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/textautocorrectioncore_version.h"
0011     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextAutoCorrectionCoreConfigVersion.cmake"
0012     SOVERSION 1
0013     )
0014 
0015 install(FILES
0016     "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextAutoCorrectionCoreConfig.cmake"
0017     "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextAutoCorrectionCoreConfigVersion.cmake"
0018     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0019     COMPONENT Devel
0020     )
0021 
0022 install(EXPORT KF${KF_MAJOR_VERSION}TextAutoCorrectionTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF${KF_MAJOR_VERSION}TextAutoCorrectionCoreTargets.cmake NAMESPACE KF${KF_MAJOR_VERSION}::)
0023 
0024 kconfig_add_kcfg_files(textautocorrection_settings_SRCS
0025     settings/textautocorrectionsetting_base.kcfgc
0026     )
0027 
0028 add_library(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore )
0029 add_library(KF${KF_MAJOR_VERSION}::TextAutoCorrectionCore ALIAS KF${KF_MAJOR_VERSION}TextAutoCorrectionCore)
0030 ecm_qt_declare_logging_category(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore HEADER textautocorrection_debug.h
0031         IDENTIFIER TEXTAUTOCORRECTION_LOG
0032         CATEGORY_NAME org.kde.kf.textautocorrection
0033         OLD_CATEGORY_NAMES org.kde.kf${KF_MAJOR_VERSION}.textautocorrection
0034         DESCRIPTION "KF${KF_MAJOR_VERSION} (text AutoCorrection)"
0035         EXPORT KTEXTADDONS
0036     )
0037 
0038 ecm_qt_declare_logging_category(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore HEADER textautocorrectionautocorrect_debug.h
0039         IDENTIFIER TEXTAUTOCORRECTION_AUTOCORRECT_LOG
0040         CATEGORY_NAME org.kde.kf.textautocorrection.autocorrect
0041         OLD_CATEGORY_NAMES org.kde.kf${KF_MAJOR_VERSION}.textautocorrection.autocorrect
0042         DESCRIPTION "KF${KF_MAJOR_VERSION} (AutoCorrection autocorrect text)"
0043         EXPORT KTEXTADDONS
0044     )
0045 
0046 target_sources(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore PRIVATE
0047     ${textautocorrection_settings_SRCS}
0048     autocorrection.cpp
0049     autocorrection.h
0050     autocorrectionutils.h
0051     autocorrectionutils.cpp
0052     autocorrectionsettings.h
0053     autocorrectionsettings.cpp
0054 
0055     import/importlibreofficeautocorrection.cpp
0056     import/importkmailautocorrection.cpp
0057     import/importabstractautocorrection.cpp
0058     import/importkmailautocorrection.h
0059     import/importlibreofficeautocorrection.h
0060     import/importabstractautocorrection.h
0061 
0062     export/exportabstractautocorrection.h
0063     export/exportabstractautocorrection.cpp
0064     export/exportlibreofficeautocorrection.h
0065     export/exportlibreofficeautocorrection.cpp
0066 
0067     settings/textautocorrectionsettings.h
0068     settings/textautocorrectionsettings.cpp
0069 
0070     )
0071 
0072 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
0073     set_target_properties(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore PROPERTIES UNITY_BUILD ON)
0074 endif()
0075 generate_export_header(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore BASE_NAME textautocorrectioncore)
0076 
0077 
0078 target_link_libraries(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore
0079     PUBLIC
0080     Qt::Gui
0081     KF${KF_MAJOR_VERSION}::ConfigWidgets
0082     PRIVATE
0083     KF${KF_MAJOR_VERSION}::I18n
0084     KF${KF_MAJOR_VERSION}::Archive
0085     Qt::Xml
0086     )
0087 
0088 target_include_directories(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/TextAutoCorrectionCore/>")
0089 
0090 set_target_properties(KF${KF_MAJOR_VERSION}TextAutoCorrectionCore PROPERTIES
0091     VERSION ${TEXTAUTOCORRECTIONCORE_VERSION}
0092     SOVERSION ${TEXTAUTOCORRECTIONCORE_SOVERSION}
0093     EXPORT_NAME TextAutoCorrectionCore
0094     )
0095 
0096 install(TARGETS
0097     KF${KF_MAJOR_VERSION}TextAutoCorrectionCore
0098     EXPORT KF${KF_MAJOR_VERSION}TextAutoCorrectionTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
0099     )
0100 
0101 if (BUILD_TESTING)
0102     add_subdirectory(autotests)
0103 endif()
0104 
0105 
0106 ecm_generate_headers(TextAutoCorrectionCore_Camelcaseautocorrection_HEADERS
0107     HEADER_NAMES
0108     AutoCorrection
0109     AutoCorrectionSettings
0110     AutoCorrectionUtils
0111 
0112     REQUIRED_HEADERS TextAutoCorrectionCore_autocorrection_HEADERS
0113     PREFIX TextAutoCorrectionCore
0114     )
0115 
0116 ecm_generate_headers(TextAutoCorrectionCore_Camelcaseautocorrectionimport_HEADERS
0117     HEADER_NAMES
0118     ImportLibreOfficeAutocorrection
0119     ImportKMailAutocorrection
0120     ImportAbstractAutocorrection
0121 
0122     REQUIRED_HEADERS TextAutoCorrectionCore_autocorrectionimport_HEADERS
0123     PREFIX TextAutoCorrectionCore
0124     RELATIVE import
0125     )
0126 
0127 ecm_generate_headers(TextAutoCorrectionCore_Camelcasesettings_HEADERS
0128     HEADER_NAMES
0129     TextAutoCorrectionSettings
0130     REQUIRED_HEADERS TextAutoCorrectionCore_settings_HEADERS
0131     PREFIX TextAutoCorrectionCore
0132     RELATIVE settings
0133     )
0134 
0135 
0136 install(FILES
0137     ${TextAutoCorrectionCore_Camelcaseautocorrection_HEADERS}
0138     ${TextAutoCorrectionCore_Camelcaseautocorrectionimport_HEADERS}
0139     ${TextAutoCorrectionCore_Camelcasesettings_HEADERS}
0140     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextAutoCorrectionCore/TextAutoCorrectionCore
0141     COMPONENT Devel
0142     )
0143 
0144 install(FILES
0145     ${CMAKE_CURRENT_BINARY_DIR}/textautocorrectioncore_export.h
0146     ${CMAKE_CURRENT_BINARY_DIR}/textautocorrectionsetting_base.h
0147     ${TextAutoCorrectionCore_autocorrection_HEADERS}
0148     ${TextAutoCorrectionCore_settings_HEADERS}
0149     ${TextAutoCorrectionCore_autocorrectionimport_HEADERS}
0150 
0151     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextAutoCorrectionCore/textautocorrectioncore
0152     COMPONENT Devel
0153     )
0154 
0155 if (BUILD_QCH)
0156     ecm_add_qch(
0157         KF${KF_MAJOR_VERSION}TextAutoCorrectionCore_QCH
0158         NAME KF${KF_MAJOR_VERSION}TextAutoCorrectionCore
0159         BASE_NAME KF${KF_MAJOR_VERSION}TextAutoCorrectionCore
0160         VERSION ${TEXTAUTOCORRECTIONCORE_VERSION}
0161         ORG_DOMAIN org.kde
0162         SOURCES # using only public headers, to cover only public API
0163         ${TextAutoCorrectionCore_autocorrection_HEADERS}
0164         ${TextAutoCorrectionCore_settings_HEADERS}
0165         LINK_QCHS
0166             Qt${QT_MAJOR_VERSION}Core_QCH
0167             Qt${QT_MAJOR_VERSION}Gui_QCH
0168             Qt${QT_MAJOR_VERSION}Widgets_QCH
0169         INCLUDE_DIRS
0170             ${CMAKE_CURRENT_BINARY_DIR}
0171         BLANK_MACROS
0172             TEXTAUTOCORRECTIONCORE_EXPORT
0173         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0174         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0175         COMPONENT Devel
0176     )
0177 endif()
0178 
0179 if (BUILD_QCH)
0180     ecm_install_qch_export(
0181         TARGETS KF${KF_MAJOR_VERSION}TextAutoCorrectionCore_QCH
0182         FILE KF${KF_MAJOR_VERSION}TextAutoCorrectionQchTargets.cmake
0183         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0184         COMPONENT Devel
0185     )
0186 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF${KF_MAJOR_VERSION}TextAutoCorrectionQchTargets.cmake\")")
0187 endif()
0188 
0189 configure_package_config_file(
0190         "${CMAKE_CURRENT_SOURCE_DIR}/KFTextAutoCorrectionCoreConfig.cmake.in"
0191         "${CMAKE_CURRENT_BINARY_DIR}/KF${KF_MAJOR_VERSION}TextAutoCorrectionCoreConfig.cmake"
0192     INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0193     )
0194 
0195 
0196 install(FILES
0197     ${CMAKE_CURRENT_BINARY_DIR}/textautocorrectioncore_version.h
0198     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextAutoCorrectionCore/ COMPONENT Devel
0199     )