Warning, /frameworks/kitemviews/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") # handled by release scripts 0004 project(KItemViews VERSION ${KF_VERSION}) 0005 0006 include(FeatureSummary) 0007 find_package(ECM 5.115.0 NO_MODULE) 0008 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") 0009 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) 0010 0011 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0012 0013 include(KDEInstallDirs) 0014 include(KDECMakeSettings) 0015 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0016 0017 include(KDEGitCommitHooks) 0018 include(ECMGenerateExportHeader) 0019 include(ECMSetupVersion) 0020 include(ECMGenerateHeaders) 0021 include(ECMQtDeclareLoggingCategory) 0022 include(ECMDeprecationSettings) 0023 include(ECMAddQch) 0024 include(ECMPoQmTools) 0025 include(CMakeDependentOption) 0026 include(CMakePackageConfigHelpers) 0027 0028 set(REQUIRED_QT_VERSION 5.15.2) 0029 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) 0030 0031 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") 0032 0033 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) 0034 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") 0035 0036 cmake_dependent_option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON "NOT CMAKE_CROSSCOMPILING" OFF) 0037 add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Designer") 0038 0039 ecm_setup_version(PROJECT VARIABLE_PREFIX KITEMVIEWS 0040 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kitemviews_version.h" 0041 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5ItemViewsConfigVersion.cmake" 0042 SOVERSION 5) 0043 0044 0045 ecm_install_po_files_as_qm(poqm) 0046 0047 ecm_set_disabled_deprecation_versions( 0048 QT 5.15.2 0049 ) 0050 0051 add_subdirectory(src) 0052 if (BUILD_TESTING) 0053 add_subdirectory(autotests) 0054 add_subdirectory(tests) 0055 endif() 0056 0057 # create a Config.cmake and a ConfigVersion.cmake file and install them 0058 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5ItemViews") 0059 0060 if (BUILD_QCH) 0061 ecm_install_qch_export( 0062 TARGETS KF5ItemViews_QCH 0063 FILE KF5ItemViewsQCHTargets.cmake 0064 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0065 ) 0066 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5ItemViewsQCHTargets.cmake\")") 0067 endif() 0068 0069 configure_package_config_file( 0070 "${CMAKE_CURRENT_SOURCE_DIR}/KF5ItemViewsConfig.cmake.in" 0071 "${CMAKE_CURRENT_BINARY_DIR}/KF5ItemViewsConfig.cmake" 0072 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0073 ) 0074 0075 install(FILES 0076 "${CMAKE_CURRENT_BINARY_DIR}/KF5ItemViewsConfig.cmake" 0077 "${CMAKE_CURRENT_BINARY_DIR}/KF5ItemViewsConfigVersion.cmake" 0078 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0079 COMPONENT Devel 0080 ) 0081 0082 install(EXPORT KF5ItemViewsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5ItemViewsTargets.cmake NAMESPACE KF5:: ) 0083 0084 install(FILES 0085 ${CMAKE_CURRENT_BINARY_DIR}/kitemviews_version.h 0086 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KItemViews COMPONENT Devel 0087 ) 0088 0089 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0090 0091 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)