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

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 project(Purpose)
0004 
0005 find_package(ECM 5.249.0 REQUIRED NO_MODULE)
0006 
0007 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0008 
0009 set(REQUIRED_QT_VERSION 6.5.0)
0010 include(KDEInstallDirs)
0011 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0012 include(KDECMakeSettings)
0013 include(KDEGitCommitHooks)
0014 
0015 include(FeatureSummary)
0016 
0017 include(ECMGenerateExportHeader)
0018 include(ECMSetupVersion)
0019 include(ECMAddTests)
0020 include(ECMInstallIcons)
0021 include(ECMGenerateHeaders)
0022 include(ECMMarkNonGuiExecutable)
0023 include(ECMQtDeclareLoggingCategory)
0024 include(ECMDeprecationSettings)
0025 include(ECMGenerateQmlTypes)
0026 include(ECMQMLModules)
0027 include(ECMQmlModule)
0028 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Qml Gui DBus Widgets Network Test)
0029 
0030 set(KF_VERSION "6.0.0") # handled by release scripts
0031 set(KF_DEP_VERSION "5.249.0") # handled by release scripts
0032 
0033 find_package(KF6 ${KF_DEP_VERSION} REQUIRED COMPONENTS CoreAddons I18n Config Kirigami Notifications KIO Service)
0034 
0035 find_package(KAccounts6)
0036 
0037 set_package_properties(KAccounts6 PROPERTIES
0038                        PURPOSE "Needed for YouTube and Nextcloud upload"
0039                        TYPE OPTIONAL
0040 )
0041 ecm_find_qmlmodule(SSO.OnlineAccounts 0.1)
0042 
0043 ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0)
0044 ecm_find_qmlmodule(org.kde.prison 1.0)
0045 
0046 ecm_setup_version(${KF_VERSION} VARIABLE_PREFIX PURPOSE
0047                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/purpose_version.h"
0048                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6PurposeConfigVersion.cmake"
0049                         SOVERSION 6)
0050 
0051 ecm_set_disabled_deprecation_versions(
0052     QT 6.5.0
0053     KF 5.240
0054 )
0055 
0056 add_subdirectory( src )
0057 if (BUILD_TESTING)
0058     add_subdirectory( autotests )
0059     add_subdirectory( tests )
0060 endif()
0061 
0062 ki18n_install(po)
0063 
0064 # create a Config.cmake and a ConfigVersion.cmake file and install them
0065 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6Purpose")
0066 
0067 include(CMakePackageConfigHelpers)
0068 
0069 configure_package_config_file(
0070   "${CMAKE_CURRENT_SOURCE_DIR}/KF6PurposeConfig.cmake.in"
0071   "${CMAKE_CURRENT_BINARY_DIR}/KF6PurposeConfig.cmake"
0072   INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0073 )
0074 
0075 install(FILES
0076   "${CMAKE_CURRENT_BINARY_DIR}/KF6PurposeConfig.cmake"
0077   "${CMAKE_CURRENT_BINARY_DIR}/KF6PurposeConfigVersion.cmake"
0078   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0079   COMPONENT Devel
0080 )
0081 
0082 install(EXPORT KF6PurposeTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF6PurposeTargets.cmake NAMESPACE KF6:: )
0083 
0084 install(FILES
0085   ${CMAKE_CURRENT_BINARY_DIR}/purpose_version.h
0086   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/Purpose COMPONENT Devel
0087 )
0088 
0089 include(ECMFeatureSummary)
0090 ecm_feature_summary(WHAT ALL   FATAL_ON_MISSING_REQUIRED_PACKAGES)
0091 
0092 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)