Warning, /pim/mimetreeparser/src/core/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2023 Carl Schwan <carl.schwan@gnupg.com> 0002 # SPDX-License-Identifier: BSD-3-Clause 0003 0004 ecm_setup_version(PROJECT 0005 VARIABLE_PREFIX MIMETREEPARSER_CORE 0006 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/mimetreeparser_core_version.h" 0007 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPim6MimeTreeParserCoreConfigVersion.cmake" 0008 SOVERSION 6 0009 ) 0010 0011 # public dynamic library 0012 0013 0014 add_library(KPim6MimeTreeParserCore) 0015 add_library(KPim6::MimeTreeParserCore 0016 ALIAS KPim6MimeTreeParserCore 0017 ) 0018 0019 ecm_qt_declare_logging_category(KPim6MimeTreeParserCore 0020 HEADER mimetreeparser_core_debug.h 0021 IDENTIFIER MIMETREEPARSER_CORE_LOG 0022 CATEGORY_NAME org.kde.pim.mimetreeparser.core 0023 DESCRIPTION "mimetreeparser (pim lib)" 0024 EXPORT MIMETREEPARSERNG 0025 ) 0026 0027 target_sources(KPim6MimeTreeParserCore PRIVATE 0028 errors.h 0029 attachmentmodel.h 0030 bodypartformatter.h 0031 bodypartformatterbasefactory.h 0032 bodypartformatterbasefactory_p.h 0033 cryptohelper.h 0034 enums.h 0035 fileopener.h 0036 htmlutils.h 0037 messageparser.h 0038 messagepart.h 0039 objecttreeparser.h 0040 partmetadata.h 0041 partmodel.h 0042 utils.h 0043 attachmentmodel.cpp 0044 bodypartformatter.cpp 0045 bodypartformatter_impl.cpp 0046 bodypartformatterbasefactory.cpp 0047 cryptohelper.cpp 0048 fileopener.cpp 0049 htmlutils.cpp 0050 messageparser.cpp 0051 messagepart.cpp 0052 objecttreeparser.cpp 0053 partmodel.cpp 0054 utils.cpp 0055 ) 0056 0057 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) 0058 set_target_properties(KPim6MimeTreeParserCore PROPERTIES UNITY_BUILD ON) 0059 endif() 0060 generate_export_header(KPim6MimeTreeParserCore BASE_NAME mimetreeparser_core) 0061 0062 0063 target_include_directories(KPim6MimeTreeParserCore 0064 INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/KPim6/MimeTreeParserCore>") 0065 0066 target_link_libraries(KPim6MimeTreeParserCore 0067 PUBLIC 0068 KPim6::Mime 0069 KPim6::Mbox 0070 KF6::I18n 0071 Qt6::Gui 0072 PRIVATE 0073 KF6::Codecs 0074 Gpgmepp 0075 KPim6::Libkleo 0076 0077 ) 0078 0079 set_target_properties(KPim6MimeTreeParserCore PROPERTIES 0080 VERSION ${MIMETREEPARSERNG_VERSION} 0081 SOVERSION ${MIMETREEPARSERNG_SOVERSION} 0082 EXPORT_NAME MimeTreeParserCore 0083 ) 0084 0085 ecm_generate_pri_file(BASE_NAME MimeTreeParserCore 0086 LIB_NAME KPim6MimeTreeParserCore 0087 DEPS "MimeTreeParserCore" 0088 FILENAME_VAR PRI_FILENAME 0089 ) 0090 0091 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) 0092 0093 install(TARGETS 0094 KPim6MimeTreeParserCore 0095 EXPORT KPim6MimeTreeParserCoreTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} 0096 ) 0097 0098 ecm_generate_headers(MimeTreeParserCore_CamelCase_HEADERS 0099 HEADER_NAMES 0100 AttachmentModel 0101 CryptoHelper 0102 Errors 0103 FileOpener 0104 MessageParser 0105 MessagePart 0106 ObjectTreeParser 0107 PartModel 0108 PartMetaData 0109 REQUIRED_HEADERS MimeTreeParserCore_HEADERS 0110 PREFIX MimeTreeParserCore 0111 ) 0112 0113 install(FILES 0114 ${MimeTreeParserCore_CamelCase_HEADERS} 0115 DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/MimeTreeParserCore/MimeTreeParserCore 0116 COMPONENT Devel 0117 ) 0118 install(FILES 0119 ${CMAKE_CURRENT_BINARY_DIR}/mimetreeparser_core_export.h 0120 ${MimeTreeParserCore_HEADERS} 0121 DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/MimeTreeParserCore/mimetreeparsercore 0122 COMPONENT Devel 0123 ) 0124 0125 if (BUILD_QCH) 0126 ecm_add_qch( 0127 KPim6MimeTreeParserCore_QCH 0128 NAME MimeTreeParserCore 0129 BASE_NAME KPim6MimeTreeParserCore 0130 VERSION ${PIM_VERSION} 0131 ORG_DOMAIN org.kde 0132 # using only public headers, to cover only public API 0133 SOURCES ${MimeTreeParserCore_HEADERS} 0134 MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" 0135 LINK_QCHS 0136 Qt6Core_QCH 0137 INCLUDE_DIRS 0138 ${CMAKE_CURRENT_BINARY_DIR} 0139 BLANK_MACROS 0140 MIMETREEPARSERCORE_EXPORT 0141 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0142 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0143 COMPONENT Devel 0144 ) 0145 endif() 0146 0147 ########### CMake Config Files ########### 0148 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KPim6MimeTreeParserCore") 0149 0150 if (BUILD_QCH) 0151 ecm_install_qch_export( 0152 TARGETS KPim6MimeTreeParserCore_QCH 0153 FILE KPim6MimeTreeParserCoreQchTargets.cmake 0154 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0155 COMPONENT Devel 0156 ) 0157 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KPim6MimeTreeParserCoreQchTargets.cmake\")") 0158 endif() 0159 0160 configure_package_config_file( 0161 "${CMAKE_CURRENT_SOURCE_DIR}/KPimMimeTreeParserCoreConfig.cmake.in" 0162 "${CMAKE_CURRENT_BINARY_DIR}/KPim6MimeTreeParserCoreConfig.cmake" 0163 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0164 ) 0165 0166 install(FILES 0167 "${CMAKE_CURRENT_BINARY_DIR}/KPim6MimeTreeParserCoreConfig.cmake" 0168 "${CMAKE_CURRENT_BINARY_DIR}/KPim6MimeTreeParserCoreConfigVersion.cmake" 0169 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0170 COMPONENT Devel 0171 ) 0172 0173 install(EXPORT KPim6MimeTreeParserCoreTargets 0174 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0175 FILE KPim6MimeTreeParserCoreTargets.cmake 0176 NAMESPACE KPim6:: 0177 )