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

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 set(KF_VERSION "6.0.0") # handled by release scripts
0004 set(KF_DEP_VERSION "5.249.0") # handled by release scripts
0005 
0006 project(Syndication VERSION ${KF_VERSION})
0007 
0008 set(REQUIRED_QT_VERSION 6.5.0)
0009 
0010 # ECM setup
0011 find_package(ECM ${KF_DEP_VERSION} CONFIG REQUIRED)
0012 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0013 
0014 include(ECMGenerateExportHeader)
0015 include(ECMGenerateHeaders)
0016 include(CMakePackageConfigHelpers)
0017 include(ECMSetupVersion)
0018 include(FeatureSummary)
0019 include(KDEInstallDirs)
0020 include(KDECMakeSettings)
0021 include(KDEGitCommitHooks)
0022 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0023 include(ECMQtDeclareLoggingCategory)
0024 include(ECMAddQch)
0025 include(ECMDeprecationSettings)
0026 
0027 set(syndication_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/syndication_version.h")
0028 ecm_setup_version(PROJECT VARIABLE_PREFIX SYNDICATION
0029                         VERSION_HEADER "${syndication_version_header}"
0030                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6SyndicationConfigVersion.cmake"
0031                         SOVERSION 6
0032 )
0033 
0034 ########### Find packages ###########
0035 find_package(Qt6Xml ${REQUIRED_QT_VERSION} CONFIG REQUIRED)
0036 
0037 find_package(KF6Codecs ${KF_DEP_VERSION} CONFIG REQUIRED)
0038 
0039 ecm_set_disabled_deprecation_versions(
0040     QT 6.5
0041     KF 5.240
0042 )
0043 
0044 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0045 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0046 
0047 ########### Targets ###########
0048 if(BUILD_TESTING)
0049    add_definitions(-DBUILD_TESTING)
0050 endif()
0051 add_subdirectory(src)
0052 
0053 if(BUILD_TESTING)
0054     add_subdirectory(autotests)
0055     add_subdirectory(tests)
0056 endif()
0057 
0058 ########### CMake Config Files ###########
0059 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6Syndication")
0060 
0061 if (BUILD_QCH)
0062     ecm_install_qch_export(
0063         TARGETS KF6Syndication_QCH
0064         FILE KF6SyndicationQchTargets.cmake
0065         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0066         COMPONENT Devel
0067     )
0068     set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6SyndicationQchTargets.cmake\")")
0069 endif()
0070 
0071 configure_package_config_file(
0072   "${CMAKE_CURRENT_SOURCE_DIR}/KF6SyndicationConfig.cmake.in"
0073   "${CMAKE_CURRENT_BINARY_DIR}/KF6SyndicationConfig.cmake"
0074   INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0075 )
0076 
0077 install(FILES
0078   "${CMAKE_CURRENT_BINARY_DIR}/KF6SyndicationConfig.cmake"
0079   "${CMAKE_CURRENT_BINARY_DIR}/KF6SyndicationConfigVersion.cmake"
0080   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0081   COMPONENT Devel
0082 )
0083 
0084 install(EXPORT KF6SyndicationTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF6SyndicationTargets.cmake NAMESPACE KF6::)
0085 
0086 install(FILES
0087    ${syndication_version_header}
0088   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/Syndication COMPONENT Devel
0089 )
0090 
0091 include(ECMFeatureSummary)
0092 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0093 
0094 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)