Warning, /libraries/baloo-widgets/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 # KDE Application Version, managed by release script 0004 set (RELEASE_SERVICE_VERSION_MAJOR "24") 0005 set (RELEASE_SERVICE_VERSION_MINOR "04") 0006 set (RELEASE_SERVICE_VERSION_MICRO "70") 0007 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") 0008 project(baloo-widgets VERSION ${RELEASE_SERVICE_VERSION}) 0009 0010 if (BUILD_WITH_QT6) 0011 set(QT_MIN_VERSION "6.4.0") 0012 set(KF_MIN_VERSION "5.240.0") 0013 else() 0014 set(QT_MIN_VERSION "5.15.2") 0015 set(KF_MIN_VERSION "5.92.0") 0016 endif() 0017 0018 # ECM setup 0019 find_package(ECM ${KF_MIN_VERSION} CONFIG REQUIRED) 0020 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) 0021 0022 include(QtVersionOption) 0023 include(ECMSetupVersion) 0024 include(KDEInstallDirs) 0025 include(KDECMakeSettings) 0026 include(KDECompilerSettings NO_POLICY_SCOPE) 0027 include(KDEClangFormat) 0028 include(KDEGitCommitHooks) 0029 0030 include(ECMInstallIcons) 0031 0032 include(FeatureSummary) 0033 include(ECMGenerateExportHeader) 0034 include(ECMGenerateHeaders) 0035 include(ECMAddTests) 0036 include(ECMQtDeclareLoggingCategory) 0037 include(CMakePackageConfigHelpers) 0038 include(ECMDeprecationSettings) 0039 0040 0041 find_package(Qt${QT_MAJOR_VERSION} REQUIRED NO_MODULE COMPONENTS Core Widgets Test) 0042 find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Config KIO I18n FileMetaData Baloo Service) 0043 0044 ecm_setup_version(PROJECT 0045 VARIABLE_PREFIX BALOO_WIDGETS 0046 SOVERSION ${QT_MAJOR_VERSION} 0047 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/baloowidgets_version.h" 0048 0049 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF${QT_MAJOR_VERSION}BalooWidgetsConfigVersion.cmake") 0050 ecm_set_disabled_deprecation_versions(QT 5.15.2 0051 KF 5.102.0 0052 ) 0053 0054 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") 0055 0056 add_subdirectory(src) 0057 if (BUILD_TESTING) 0058 add_subdirectory(test) 0059 add_subdirectory(autotests) 0060 endif() 0061 0062 ki18n_install(po) 0063 0064 # Config files 0065 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF${QT_MAJOR_VERSION}BalooWidgets") 0066 0067 configure_package_config_file( 0068 "${CMAKE_CURRENT_SOURCE_DIR}/KFBalooWidgetsConfig.cmake.in" 0069 "${CMAKE_CURRENT_BINARY_DIR}/KF${QT_MAJOR_VERSION}BalooWidgetsConfig.cmake" 0070 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0071 ) 0072 0073 install(FILES 0074 "${CMAKE_CURRENT_BINARY_DIR}/KF${QT_MAJOR_VERSION}BalooWidgetsConfig.cmake" 0075 "${CMAKE_CURRENT_BINARY_DIR}/KF${QT_MAJOR_VERSION}BalooWidgetsConfigVersion.cmake" 0076 DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0077 COMPONENT devel 0078 ) 0079 0080 install(EXPORT KF${QT_MAJOR_VERSION}BalooWidgetsTargets 0081 NAMESPACE KF${QT_MAJOR_VERSION}:: 0082 DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0083 FILE KF${QT_MAJOR_VERSION}BalooWidgetsTargets.cmake 0084 ) 0085 0086 feature_summary(WHAT ALL 0087 INCLUDE_QUIET_PACKAGES 0088 FATAL_ON_MISSING_REQUIRED_PACKAGES 0089 ) 0090 0091 file(GLOB_RECURSE CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 0092 kde_clang_format(${CLANG_FORMAT_SOURCE_FILES}) 0093 0094 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)