Warning, /frameworks/kholidays/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")
0004 project(KHolidays VERSION ${KF_VERSION})
0005 
0006 find_package(ECM 5.115.0 REQUIRED NO_MODULE)
0007 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0008 set(CMAKE_AUTORCC ON)
0009 
0010 include(KDEInstallDirs)
0011 include(KDECMakeSettings)
0012 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0013 
0014 include(GenerateExportHeader)
0015 include(ECMGenerateHeaders)
0016 include(CMakePackageConfigHelpers)
0017 include(ECMSetupVersion)
0018 include(ECMPoQmTools)
0019 include(FeatureSummary)
0020 include(ECMCoverageOption)
0021 include(ECMQtDeclareLoggingCategory)
0022 include(ECMAddQch)
0023 include(ECMGeneratePriFile)
0024 include(KDEGitCommitHooks)
0025 include(ECMGenerateExportHeader)
0026 include(ECMDeprecationSettings)
0027 include(ECMQmlModule)
0028 
0029 set(KHOLIDAYS_LIB_VERSION ${KF_VERSION})
0030 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0031 
0032 ecm_setup_version(PROJECT VARIABLE_PREFIX KHOLIDAYS
0033                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kholidays_version.h"
0034                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5HolidaysConfigVersion.cmake"
0035                         SOVERSION 5
0036 )
0037 
0038 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0039 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0040 
0041 ########### Find packages ###########
0042 set(REQUIRED_QT_VERSION 5.15.2)
0043 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Qml)
0044 
0045 remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
0046 ecm_set_disabled_deprecation_versions(
0047     QT 5.15.2
0048 )
0049 
0050 ########### Targets ###########
0051 add_subdirectory(src)
0052 
0053 if(BUILD_TESTING)
0054   add_subdirectory(autotests)
0055 endif()
0056 
0057 ecm_install_po_files_as_qm(poqm)
0058 
0059 ########### CMake Config Files ###########
0060 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Holidays")
0061 
0062 if(BUILD_QCH)
0063   ecm_install_qch_export(
0064     TARGETS KF5Holidays_QCH
0065     FILE KF5HolidaysQchTargets.cmake
0066     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0067     COMPONENT Devel
0068   )
0069   set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5HolidaysQchTargets.cmake\")")
0070 endif()
0071 
0072 configure_package_config_file(
0073   "${CMAKE_CURRENT_SOURCE_DIR}/KF5HolidaysConfig.cmake.in"
0074   "${CMAKE_CURRENT_BINARY_DIR}/KF5HolidaysConfig.cmake"
0075   INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0076 )
0077 
0078 install(FILES
0079   "${CMAKE_CURRENT_BINARY_DIR}/KF5HolidaysConfig.cmake"
0080   "${CMAKE_CURRENT_BINARY_DIR}/KF5HolidaysConfigVersion.cmake"
0081   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0082   COMPONENT Devel
0083 )
0084 
0085 install(EXPORT KF5HolidaysTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5HolidaysTargets.cmake NAMESPACE KF5::)
0086 
0087 install(FILES
0088   ${CMAKE_CURRENT_BINARY_DIR}/kholidays_version.h
0089   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KHolidays COMPONENT Devel
0090 )
0091 
0092 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0093 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)