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

0001 cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
0002 set(PIM_VERSION "5.21.40")
0003 
0004 project(KMime VERSION ${PIM_VERSION})
0005 
0006 # ECM setup
0007 set(KF5_MIN_VERSION "5.97.0")
0008 
0009 find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
0010 set(CMAKE_MODULE_PATH ${KMime_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
0011 
0012 include(KDEInstallDirs)
0013 include(KDECMakeSettings)
0014 include(KDECompilerSettings NO_POLICY_SCOPE)
0015 
0016 include(GenerateExportHeader)
0017 include(ECMGeneratePriFile)
0018 
0019 include(ECMGenerateHeaders)
0020 include(ECMSetupVersion)
0021 include(FeatureSummary)
0022 include(ECMQtDeclareLoggingCategory)
0023 include(ECMDeprecationSettings)
0024 include(ECMAddQch)
0025 
0026 set(KMIME_LIB_VERSION ${PIM_VERSION})
0027 set(QT_REQUIRED_VERSION "5.15.2")
0028 find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core)
0029 if (QT_MAJOR_VERSION STREQUAL "6")
0030     find_package(Qt6Core5Compat)
0031 endif()
0032 
0033 ecm_setup_version(PROJECT VARIABLE_PREFIX KMIME
0034                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kmime_version.h"
0035                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5MimeConfigVersion.cmake"
0036                         SOVERSION 5
0037 )
0038 
0039 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0040 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0041 
0042 ########### Find packages ###########
0043 find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
0044 find_package(KF5Codecs ${KF5_MIN_VERSION} CONFIG REQUIRED)
0045 add_definitions(-DTRANSLATION_DOMAIN=\"libkmime5\")
0046 ecm_set_disabled_deprecation_versions(QT 5.15.2 KF 5.97.0)
0047 
0048 option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" OFF)
0049 
0050 set(COMPILE_WITH_UNITY_CMAKE_SUPPORT OFF)
0051 if (USE_UNITY_CMAKE_SUPPORT)
0052     set(COMPILE_WITH_UNITY_CMAKE_SUPPORT ON)
0053 endif()
0054 ########### Targets ###########
0055 add_subdirectory(src)
0056 add_subdirectory(includes)
0057 
0058 if(BUILD_TESTING)
0059     add_subdirectory(autotests)
0060     add_subdirectory(tests)
0061 endif()
0062 
0063 ########### CMake Config Files ###########
0064 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Mime")
0065 
0066 configure_package_config_file(
0067     "${KMime_SOURCE_DIR}/KF5MimeConfig.cmake.in"
0068     "${KMime_BINARY_DIR}/KF5MimeConfig.cmake"
0069     INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0070     )
0071 
0072 install(FILES
0073     "${KMime_BINARY_DIR}/KF5MimeConfig.cmake"
0074     "${KMime_BINARY_DIR}/KF5MimeConfigVersion.cmake"
0075     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0076     COMPONENT Devel
0077     )
0078 
0079 install(EXPORT KF5MimeTargets
0080     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0081     FILE KF5MimeTargets.cmake
0082     NAMESPACE KF5::
0083     )
0084 
0085 install(FILES
0086     ${KMime_BINARY_DIR}/kmime_version.h
0087     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KMime/
0088     COMPONENT Devel
0089     )
0090 
0091 if (BUILD_QCH)
0092     ecm_install_qch_export(
0093         TARGETS KF5Mime_QCH
0094         FILE KF5MimeQchTargets.cmake
0095         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0096         COMPONENT Devel
0097     )
0098     set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5MimeQchTargets.cmake\")")
0099 endif()
0100 
0101 
0102 ki18n_install(po)
0103 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)