Warning, /frameworks/kdav/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 set(KF_VERSION "5.116.0") # handled by release scripts
0004 set(KF_DEP_VERSION "5.115.0") # handled by release scripts
0005 
0006 project(libkdav VERSION ${KF_VERSION})
0007 
0008 find_package(ECM 5.115.0 CONFIG REQUIRED)
0009 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0010 
0011 include(KDEInstallDirs)
0012 include(KDECMakeSettings)
0013 include(KDEGitCommitHooks)
0014 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0015 
0016 include(CMakeFindDependencyMacro)
0017 include(ECMSetupVersion)
0018 include(GenerateExportHeader)
0019 include(ECMGenerateHeaders)
0020 include(ECMGeneratePriFile)
0021 include(FeatureSummary)
0022 include(ECMAddQch)
0023 include(ECMAddTests)
0024 include(ECMInstallIcons)
0025 include(ECMQtDeclareLoggingCategory)
0026 include(ECMDeprecationSettings)
0027 
0028 
0029 set(REQUIRED_QT_VERSION 5.15.2)
0030 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Gui Test)
0031 
0032 find_package(KF5 ${KF_DEP_VERSION} REQUIRED CoreAddons KIO I18n)
0033 
0034 # setup lib
0035 
0036 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0037 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0038 
0039 ecm_set_disabled_deprecation_versions(
0040     QT 5.15.2
0041     KF 5.95
0042 )
0043 
0044 ecm_setup_version(PROJECT VARIABLE_PREFIX KDAV
0045     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdav_version.h"
0046     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5DAVConfigVersion.cmake"
0047     SOVERSION 5
0048     )
0049 
0050 ki18n_install(po)
0051 
0052 add_subdirectory(src)
0053 if(BUILD_TESTING)
0054     add_subdirectory(autotests)
0055     add_subdirectory(test)
0056 endif()
0057 
0058 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5DAV")
0059 
0060 if (BUILD_QCH)
0061     ecm_install_qch_export(
0062         TARGETS KF5DAV_QCH
0063         FILE KF5DAVQchTargets.cmake
0064         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0065         COMPONENT Devel
0066     )
0067     set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5DAVQchTargets.cmake\")")
0068 endif()
0069 
0070 configure_package_config_file(
0071     "${CMAKE_CURRENT_SOURCE_DIR}/KF5DAVConfig.cmake.in"
0072     "${CMAKE_CURRENT_BINARY_DIR}/KF5DAVConfig.cmake"
0073     INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0074     )
0075 
0076 install(FILES
0077     "${CMAKE_CURRENT_BINARY_DIR}/KF5DAVConfig.cmake"
0078     "${CMAKE_CURRENT_BINARY_DIR}/KF5DAVConfigVersion.cmake"
0079     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0080     COMPONENT Devel
0081     )
0082 
0083 install(EXPORT KF5DAVTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5DAVTargets.cmake NAMESPACE KF5::)
0084 
0085 install(FILES
0086     ${CMAKE_CURRENT_BINARY_DIR}/kdav_version.h
0087     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KDAV COMPONENT Devel
0088     )
0089 
0090 
0091 feature_summary(WHAT ALL
0092                 INCLUDE_QUIET_PACKAGES
0093                 FATAL_ON_MISSING_REQUIRED_PACKAGES
0094 )
0095 
0096 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)