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

0001 include(ConfigureChecks)
0002 
0003 configure_file(config-kmime.h.cmake ${KMime_BINARY_DIR}/src/config-kmime.h)
0004 
0005 # Turn exceptions on
0006 kde_enable_exceptions()
0007 
0008 ########### next target ###############
0009 add_library(KF5Mime)
0010 add_library(KF5::Mime ALIAS KF5Mime)
0011 
0012 target_sources(KF5Mime PRIVATE
0013    kmime_charfreq.cpp
0014    kmime_util.cpp
0015    kmime_mdn.cpp
0016    kmime_parsers.cpp
0017    kmime_header_parsing.cpp
0018    kmime_headerfactory.cpp
0019    kmime_content.cpp
0020    kmime_contentindex.cpp
0021    kmime_headers.cpp
0022    kmime_message.cpp
0023    kmime_newsarticle.cpp
0024    kmime_dateformatter.cpp
0025    kmime_codecs.cpp
0026    kmime_types.cpp
0027 
0028    kmime_charfreq.h
0029    kmime_util.h
0030    kmime_mdn.h
0031    kmime_parsers.h
0032    kmime_header_parsing.h
0033    kmime_headerfactory_p.h
0034    kmime_content.h
0035    kmime_contentindex.h
0036    kmime_headers.h
0037    kmime_message.h
0038    kmime_newsarticle.h
0039    kmime_dateformatter.h
0040    kmime_codecs.h
0041    kmime_types.h
0042    )
0043 
0044 ecm_qt_declare_logging_category(KF5Mime
0045        HEADER kmime_debug.h
0046        IDENTIFIER KMIME_LOG
0047        CATEGORY_NAME org.kde.pim.kmime
0048         DESCRIPTION "kmime (pim lib)" EXPORT KMIME)
0049 
0050 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
0051     set_target_properties(KF5Mime PROPERTIES UNITY_BUILD ON)
0052 endif()
0053 generate_export_header(KF5Mime BASE_NAME KMime)
0054 
0055 target_include_directories(KF5Mime INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KMime>")
0056 target_include_directories(KF5Mime PUBLIC "$<BUILD_INTERFACE:${KMime_SOURCE_DIR}/src;${KMime_BINARY_DIR}/src;${KMime_BINARY_DIR}>")
0057 
0058 if (WIN32)
0059     set(_kmime_extra_libs ws2_32)
0060 endif()
0061 
0062 target_link_libraries(KF5Mime
0063 PUBLIC
0064     Qt::Core
0065 PRIVATE
0066     KF5::I18n
0067     KF5::Codecs
0068     ${_kmime_extra_libs}
0069 )
0070 if (TARGET Qt6::Core5Compat)
0071     target_link_libraries(KF5Mime PRIVATE Qt6::Core5Compat) # QTextCodec
0072 endif()
0073 
0074 set_target_properties(KF5Mime PROPERTIES
0075     VERSION ${KMIME_VERSION}
0076     SOVERSION ${KMIME_SOVERSION}
0077     EXPORT_NAME Mime
0078 )
0079 
0080 install(TARGETS KF5Mime EXPORT KF5MimeTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
0081 
0082 # Don't install them but needed to compile kdepimlibs
0083 ecm_generate_headers(KMime_CamelCase_HEADERS
0084   HEADER_NAMES
0085   KMime_Content
0086   KMime_Message
0087   KMime_Util
0088   KMime_Dateformatter
0089   KMime_Header_Parsing
0090   PREFIX KMime
0091 
0092   REQUIRED_HEADERS KMime_HEADERS
0093 )
0094 
0095 
0096 install(FILES
0097          ${KMime_BINARY_DIR}/src/kmime_export.h
0098          kmime_content.h
0099          kmime_contentindex.h
0100          kmime_header_parsing.h
0101          kmime_headers.h
0102          kmime_message.h
0103          kmime_mdn.h
0104          kmime_newsarticle.h
0105          kmime_dateformatter.h
0106          kmime_util.h
0107          kmime_types.h
0108          DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KMime/kmime COMPONENT Devel
0109 )
0110 
0111 if (BUILD_QCH)
0112     ecm_add_qch(
0113         KF5Mime_QCH
0114         NAME KMime
0115         BASE_NAME KF5Mime
0116         VERSION ${PIM_VERSION}
0117         ORG_DOMAIN org.kde
0118         SOURCES # using only public headers, to cover only public API
0119             ${KMime_CamelCase_HEADERS}
0120         MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
0121         #IMAGE_DIRS "${CMAKE_SOURCE_DIR}/docs/pics"
0122         LINK_QCHS
0123             Qt5Core_QCH
0124         INCLUDE_DIRS
0125             ${CMAKE_CURRENT_BINARY_DIR}
0126         BLANK_MACROS
0127             KMIME_EXPORT
0128         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0129         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0130         COMPONENT Devel
0131     )
0132 endif()
0133 
0134 ecm_qt_install_logging_categories(EXPORT KMIME FILE kmime.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
0135 
0136 ecm_generate_pri_file(BASE_NAME KMime LIB_NAME KF5Mime DEPS "" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KMime)
0137 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})