Warning, /pim/libksieve/src/kmanagesieve/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2011-2024 Laurent Montel <montel@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 
0005 ecm_setup_version(PROJECT VARIABLE_PREFIX KMANAGESIEVE
0006                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkmanagesieve_version.h"
0007                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPim6KManageSieveConfigVersion.cmake"
0008                         SOVERSION 6
0009 )
0010 
0011 add_library(KPim6KManageSieve)
0012 add_library(KPim6::KManageSieve ALIAS KPim6KManageSieve)
0013 
0014 target_sources(KPim6KManageSieve PRIVATE
0015     response.cpp
0016     session.cpp
0017     sessionthread.cpp
0018     sievejob.cpp
0019     sessionthread_p.h
0020     sievejob_p.h
0021     sasl-common.h
0022     session.h
0023     sievejob.h
0024     response.h
0025 
0026 )
0027 ecm_qt_declare_logging_category(KPim6KManageSieve HEADER kmanagersieve_debug.h IDENTIFIER KMANAGERSIEVE_LOG CATEGORY_NAME org.kde.pim.kmanagersieve
0028     DESCRIPTION "kdepim (libksieve manager)"
0029     OLD_CATEGORY_NAMES log_kmanagersieve
0030     EXPORT LIBKSIEVE
0031 )
0032 
0033 
0034 generate_export_header(KPim6KManageSieve BASE_NAME kmanagesieve)
0035 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
0036     set_target_properties(KPim6KManageSieve PROPERTIES UNITY_BUILD ON)
0037 endif()
0038 
0039 
0040 if (WIN32)
0041     set(extra_LIBS ws2_32)
0042 endif()
0043 
0044 
0045 target_link_libraries(KPim6KManageSieve
0046     PRIVATE
0047     KF6::I18n
0048     KF6::KIOCore
0049     KF6::KIOWidgets
0050     Sasl2::Sasl2
0051     ${extra_LIBS}
0052 )
0053 
0054 set_target_properties(KPim6KManageSieve PROPERTIES
0055     VERSION ${KMANAGESIEVE_VERSION}
0056     SOVERSION ${KMANAGESIEVE_SOVERSION}
0057     EXPORT_NAME KManageSieve
0058 )
0059 
0060 target_include_directories(KPim6KManageSieve
0061     INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/KPim6/KManageSieve/>"
0062 )
0063 target_include_directories(KPim6KManageSieve PUBLIC "$<BUILD_INTERFACE:${libksieve_SOURCE_DIR}/src/kmanagesieve;${libksieve_BINARY_DIR}/src/kmanagesieve>")
0064 
0065 
0066 
0067 ecm_generate_headers(kmanagesieve_CamelCase_HEADERS
0068     HEADER_NAMES
0069     SieveJob
0070     REQUIRED_HEADERS kmanagesieve_HEADERS
0071     PREFIX KManageSieve
0072 )
0073 
0074 install(TARGETS KPim6KManageSieve EXPORT KPim6KManageSieveTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0075 install(FILES
0076     ${kmanagesieve_CamelCase_HEADERS}
0077     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KManageSieve/KManageSieve
0078     COMPONENT Devel
0079 )
0080 
0081 install(FILES
0082     ${kmanagesieve_HEADERS}
0083     ${CMAKE_CURRENT_BINARY_DIR}/kmanagesieve_export.h
0084     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KManageSieve/kmanagesieve
0085     COMPONENT Devel
0086 )
0087 
0088 install(FILES
0089     ${CMAKE_CURRENT_BINARY_DIR}/libkmanagesieve_version.h
0090     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KManageSieve COMPONENT Devel
0091     )
0092 
0093 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KPim6KManageSieve")
0094 
0095 if (BUILD_QCH)
0096     ecm_add_qch(
0097         KPim6KManageSieve_QCH
0098         NAME KPim6KManageSieve
0099         BASE_NAME KPim6KManageSieve
0100         VERSION ${PIM_VERSION}
0101         ORG_DOMAIN org.kde
0102         SOURCES # using only public headers, to cover only public API
0103         ${kmanagesieve_HEADERS}
0104         LINK_QCHS
0105         Qt6Core_QCH
0106         INCLUDE_DIRS
0107         ${CMAKE_CURRENT_BINARY_DIR}
0108         BLANK_MACROS
0109         KMANAGESIEVE_EXPORT
0110         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0111         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0112         COMPONENT Devel
0113     )
0114 endif()
0115 
0116 if (BUILD_QCH)
0117     ecm_install_qch_export(
0118         TARGETS KPim6KManageSieve_QCH
0119         FILE KPim6KManageSieveQchTargets.cmake
0120         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0121         COMPONENT Devel
0122     )
0123 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KPim6KManageSieveQchTargets.cmake\")")
0124 endif()
0125 
0126 configure_package_config_file(
0127     "${CMAKE_CURRENT_SOURCE_DIR}/KPimKManageSieveConfig.cmake.in"
0128     "${CMAKE_CURRENT_BINARY_DIR}/KPim6KManageSieveConfig.cmake"
0129     INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0130 )
0131 
0132 install(FILES
0133     "${CMAKE_CURRENT_BINARY_DIR}/KPim6KManageSieveConfig.cmake"
0134     "${CMAKE_CURRENT_BINARY_DIR}/KPim6KManageSieveConfigVersion.cmake"
0135     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0136     COMPONENT Devel
0137 )
0138 
0139 install(EXPORT KPim6KManageSieveTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KPim6KManageSieveTargets.cmake NAMESPACE KPim6::)