Warning, /frameworks/kparts/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(KParts 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 0013 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0014 0015 include(KDEInstallDirs) 0016 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0017 include(KDECMakeSettings) 0018 include(KDEGitCommitHooks) 0019 include(KDEPackageAppTemplates) 0020 include(ECMAddQch) 0021 0022 include(ECMGenerateExportHeader) 0023 include(ECMQtDeclareLoggingCategory) 0024 include(ECMSetupVersion) 0025 include(ECMDeprecationSettings) 0026 0027 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control how much of deprecated API is build [default=0].") 0028 0029 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) 0030 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") 0031 0032 set(kparts_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/kparts_version.h") 0033 ecm_setup_version(PROJECT VARIABLE_PREFIX KPARTS 0034 VERSION_HEADER "${kparts_version_header}" 0035 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6PartsConfigVersion.cmake" 0036 SOVERSION 6) 0037 0038 set(REQUIRED_QT_VERSION 6.5.0) 0039 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Widgets Xml) 0040 0041 find_package(KF6Config ${KF_DEP_VERSION} REQUIRED) 0042 find_package(KF6CoreAddons ${KF_DEP_VERSION} REQUIRED) 0043 find_package(KF6I18n ${KF_DEP_VERSION} REQUIRED) 0044 find_package(KF6KIO ${KF_DEP_VERSION} REQUIRED) 0045 find_package(KF6JobWidgets ${KF_DEP_VERSION} REQUIRED) 0046 find_package(KF6Service ${KF_DEP_VERSION} REQUIRED) 0047 find_package(KF6WidgetsAddons ${KF_DEP_VERSION} REQUIRED) 0048 find_package(KF6XmlGui ${KF_DEP_VERSION} REQUIRED) 0049 0050 ecm_set_disabled_deprecation_versions( 0051 QT 6.5 0052 KF 5.240.0 0053 ) 0054 0055 if(BUILD_TESTING) 0056 add_subdirectory( tests ) 0057 add_subdirectory( autotests ) 0058 endif() 0059 add_definitions(-DTRANSLATION_DOMAIN=\"kparts6\") 0060 ki18n_install(po) 0061 0062 add_subdirectory( src ) 0063 add_subdirectory(templates) 0064 0065 # create a Config.cmake and a ConfigVersion.cmake file and install them 0066 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6Parts") 0067 0068 if (BUILD_QCH) 0069 ecm_install_qch_export( 0070 TARGETS KF6Parts_QCH 0071 FILE KF6PartsQchTargets.cmake 0072 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0073 COMPONENT Devel 0074 ) 0075 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6PartsQchTargets.cmake\")") 0076 endif() 0077 0078 include(CMakePackageConfigHelpers) 0079 0080 configure_package_config_file( 0081 "${CMAKE_CURRENT_SOURCE_DIR}/KF6PartsConfig.cmake.in" 0082 "${CMAKE_CURRENT_BINARY_DIR}/KF6PartsConfig.cmake" 0083 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0084 ) 0085 0086 install(FILES 0087 "${CMAKE_CURRENT_BINARY_DIR}/KF6PartsConfig.cmake" 0088 "${CMAKE_CURRENT_BINARY_DIR}/KF6PartsConfigVersion.cmake" 0089 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0090 COMPONENT Devel 0091 ) 0092 0093 install(EXPORT KF6PartsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF6PartsTargets.cmake NAMESPACE KF6:: ) 0094 0095 install(FILES 0096 ${kparts_version_header} 0097 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KParts COMPONENT Devel 0098 ) 0099 0100 include(ECMFeatureSummary) 0101 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0102 0103 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)