Warning, /frameworks/kpeople/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 project (KPeople VERSION ${KF_VERSION}) 0006 0007 include(FeatureSummary) 0008 find_package(ECM 5.249.0 NO_MODULE) 0009 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") 0010 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) 0011 0012 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0013 0014 include(KDEInstallDirs) 0015 include(KDECMakeSettings) 0016 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0017 0018 include(KDEGitCommitHooks) 0019 include(ECMSetupVersion) 0020 include(ECMGenerateHeaders) 0021 include(ECMSetupVersion) 0022 include(ECMAddTests) 0023 include(ECMAddQch) 0024 include(CMakePackageConfigHelpers) 0025 include(ECMGenerateExportHeader) 0026 include(ECMQtDeclareLoggingCategory) 0027 include(ECMDeprecationSettings) 0028 0029 set(REQUIRED_QT_VERSION 6.5.0) 0030 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui Sql Widgets Qml Quick) 0031 0032 # On non-Apple UNIX DBus integration is required, on Android it does not exist and on other platforms it is optional 0033 if(UNIX AND NOT APPLE) 0034 if(NOT ANDROID) 0035 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus) 0036 endif() 0037 else() 0038 find_package(Qt6 ${REQUIRED_QT_VERSION} OPTIONAL_COMPONENTS DBus) 0039 endif() 0040 0041 find_package(KF6CoreAddons ${KF_DEP_VERSION} CONFIG REQUIRED) 0042 find_package(KF6WidgetsAddons ${KF_DEP_VERSION} CONFIG REQUIRED) 0043 find_package(KF6I18n ${KF_DEP_VERSION} CONFIG REQUIRED) 0044 find_package(KF6ItemViews ${KF_DEP_VERSION} CONFIG REQUIRED) 0045 find_package(KF6Contacts ${KF_DEP_VERSION} CONFIG REQUIRED) 0046 0047 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) 0048 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") 0049 0050 add_definitions(-DTRANSLATION_DOMAIN=\"kpeople6\") 0051 0052 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6People") 0053 0054 set(kpeople_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/kpeople_version.h") 0055 ecm_setup_version(PROJECT VARIABLE_PREFIX KPEOPLE 0056 VERSION_HEADER "${kpeople_version_header}" 0057 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6PeopleConfigVersion.cmake" 0058 SOVERSION 6) 0059 0060 option(ENABLE_EXAMPLES "Build the examples" "ON") 0061 0062 ki18n_install(po) 0063 0064 ecm_set_disabled_deprecation_versions( 0065 QT 6.5 0066 KF 5.102 0067 ) 0068 0069 add_subdirectory (src) 0070 if (ENABLE_EXAMPLES) 0071 add_subdirectory(examples) 0072 endif() 0073 if (BUILD_TESTING) 0074 add_subdirectory(autotests) 0075 endif() 0076 0077 if (BUILD_QCH) 0078 ecm_install_qch_export( 0079 TARGETS KF6People_QCH 0080 FILE KF6PeopleQchTargets.cmake 0081 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0082 COMPONENT Devel 0083 ) 0084 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6PeopleQchTargets.cmake\")") 0085 endif() 0086 0087 configure_package_config_file( 0088 "${CMAKE_CURRENT_SOURCE_DIR}/KF6PeopleConfig.cmake.in" 0089 "${CMAKE_CURRENT_BINARY_DIR}/KF6PeopleConfig.cmake" 0090 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0091 ) 0092 0093 install(EXPORT KPeopleTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KPeopleTargets.cmake NAMESPACE KF6::) 0094 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KF6PeopleConfig.cmake" 0095 "${CMAKE_CURRENT_BINARY_DIR}/KF6PeopleConfigVersion.cmake" 0096 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0097 COMPONENT Devel ) 0098 0099 install( 0100 FILES ${kpeople_version_header} 0101 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KPeople 0102 COMPONENT Devel 0103 ) 0104 0105 include(ECMFeatureSummary) 0106 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0107 0108 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)