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 "6.0.0")
0004 project(KHolidays VERSION ${KF_VERSION})
0005 
0006 find_package(ECM 5.249.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(KDEGitCommitHooks)
0024 include(ECMGenerateExportHeader)
0025 include(ECMDeprecationSettings)
0026 include(ECMQmlModule)
0027 
0028 set(KHOLIDAYS_LIB_VERSION ${KF_VERSION})
0029 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0030 
0031 set(kholidays_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/kholidays_version.h")
0032 ecm_setup_version(PROJECT VARIABLE_PREFIX KHOLIDAYS
0033                         VERSION_HEADER "${kholidays_version_header}"
0034                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6HolidaysConfigVersion.cmake"
0035                         SOVERSION 6
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 6.5.0)
0043 find_package(Qt6 ${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 6.5
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}/KF6Holidays")
0061 
0062 if(BUILD_QCH)
0063   ecm_install_qch_export(
0064     TARGETS KF6Holidays_QCH
0065     FILE KF6HolidaysQchTargets.cmake
0066     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0067     COMPONENT Devel
0068   )
0069   set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6HolidaysQchTargets.cmake\")")
0070 endif()
0071 
0072 configure_package_config_file(
0073   "${CMAKE_CURRENT_SOURCE_DIR}/KF6HolidaysConfig.cmake.in"
0074   "${CMAKE_CURRENT_BINARY_DIR}/KF6HolidaysConfig.cmake"
0075   INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0076 )
0077 
0078 install(FILES
0079   "${CMAKE_CURRENT_BINARY_DIR}/KF6HolidaysConfig.cmake"
0080   "${CMAKE_CURRENT_BINARY_DIR}/KF6HolidaysConfigVersion.cmake"
0081   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0082   COMPONENT Devel
0083 )
0084 
0085 install(EXPORT KF6HolidaysTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF6HolidaysTargets.cmake NAMESPACE KF6::)
0086 
0087 install(FILES
0088   ${kholidays_version_header}
0089   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KHolidays COMPONENT Devel
0090 )
0091 
0092 include(ECMFeatureSummary)
0093 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0094 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)