Warning, /frameworks/baloo/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # set minimum version requirements 0002 cmake_minimum_required(VERSION 3.16) 0003 set(REQUIRED_QT_VERSION 5.15.2) 0004 set(KF_VERSION "5.105.0") # handled by release scripts 0005 set(KF_DEP_VERSION "5.104.0") # handled by release scripts 0006 0007 # set up project 0008 project(Baloo VERSION ${KF_VERSION}) 0009 0010 # set up extra-cmake-modules before trying anything else 0011 include(FeatureSummary) 0012 0013 find_package(ECM ${KF_DEP_VERSION} NO_MODULE) 0014 set_package_properties(ECM 0015 PROPERTIES 0016 TYPE REQUIRED 0017 DESCRIPTION "Extra CMake Modules" 0018 URL "https://commits.kde.org/extra-cmake-modules" 0019 ) 0020 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) 0021 0022 # we found extra-cmake-modules, so use it now 0023 set(CMAKE_MODULE_PATH 0024 "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${ECM_MODULE_PATH} 0025 ) 0026 0027 include(ECMSetupVersion) 0028 0029 # set up baloo versions 0030 ecm_setup_version(PROJECT 0031 VARIABLE_PREFIX BALOO 0032 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/baloo_version.h" 0033 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5BalooConfigVersion.cmake" 0034 SOVERSION 5 0035 ) 0036 0037 # include optional and extra cmake stuff 0038 include(ECMGenerateHeaders) 0039 include(CMakePackageConfigHelpers) 0040 include(KDEInstallDirs) 0041 include(KDECMakeSettings) 0042 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0043 include(ECMAddTests) 0044 include(ECMAddQch) 0045 include(ECMQtDeclareLoggingCategory) 0046 include(ECMMarkNonGuiExecutable) 0047 include(ECMGenerateExportHeader) 0048 include(ECMConfiguredInstall) 0049 include(ECMDeprecationSettings) 0050 0051 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") 0052 0053 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) 0054 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") 0055 0056 option(BUILD_EXPERIMENTAL "Build experimental features" OFF) 0057 add_feature_info(EXP ${BUILD_EXPERIMENTAL} "Build experimental features") 0058 0059 0060 # set up build dependencies 0061 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Core DBus Widgets Qml Quick Test) 0062 if (QT_MAJOR_VERSION STREQUAL "6") 0063 find_package(Qt6Core5Compat) 0064 endif() 0065 0066 find_package(KF5 ${KF_DEP_VERSION} REQUIRED COMPONENTS CoreAddons Config DBusAddons I18n IdleTime Solid FileMetaData Crash KIO) 0067 0068 find_package(LMDB) 0069 set_package_properties(LMDB 0070 PROPERTIES 0071 DESCRIPTION "Lightning Memory-Mapped Database (LMDB)" 0072 URL "https://symas.com/lmdb" 0073 TYPE REQUIRED 0074 ) 0075 if(${LMDB_FOUND}) 0076 include_directories(${LMDB_INCLUDE_DIRS}) 0077 endif() 0078 0079 # compiler flags and build system 0080 ecm_set_disabled_deprecation_versions( 0081 QT 5.15.2 0082 KF 5.97 0083 ) 0084 0085 find_package(Inotify) 0086 set_package_properties(Inotify PROPERTIES 0087 PURPOSE "Filesystem alteration notifications using inotify") 0088 set(BUILD_KINOTIFY ${Inotify_FOUND}) 0089 0090 configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h) 0091 0092 include_directories( 0093 ${CMAKE_BINARY_DIR} 0094 ${CMAKE_SOURCE_DIR} 0095 0096 # we'll configure the rest here so that we don't have to 0097 # specify them in the source and test directories separately 0098 ${CMAKE_SOURCE_DIR}/src/lib 0099 ${CMAKE_BINARY_DIR}/src/lib 0100 ${CMAKE_BINARY_DIR}/src/codecs 0101 ${CMAKE_SOURCE_DIR}/src/codecs 0102 ${CMAKE_BINARY_DIR}/src/engine 0103 ${CMAKE_SOURCE_DIR}/src/engine 0104 ${CMAKE_BINARY_DIR}/src/file 0105 ${CMAKE_SOURCE_DIR}/src/file 0106 ${CMAKE_BINARY_DIR}/src/dbus 0107 ${CMAKE_SOURCE_DIR}/src/dbus 0108 ) 0109 0110 # targets 0111 add_subdirectory(src) 0112 0113 if (BUILD_TESTING AND BUILD_KINOTIFY) 0114 add_subdirectory(tests) 0115 add_subdirectory(autotests) 0116 endif() 0117 0118 # i18n 0119 if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") 0120 ki18n_install(po) 0121 endif() 0122 0123 # config files 0124 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Baloo") 0125 0126 if (BUILD_QCH) 0127 ecm_install_qch_export( 0128 TARGETS KF5Baloo_QCH 0129 FILE KF5BalooQchTargets.cmake 0130 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0131 COMPONENT Devel 0132 ) 0133 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5BalooQchTargets.cmake\")") 0134 endif() 0135 0136 configure_package_config_file( 0137 "${CMAKE_CURRENT_SOURCE_DIR}/KF5BalooConfig.cmake.in" 0138 "${CMAKE_CURRENT_BINARY_DIR}/KF5BalooConfig.cmake" 0139 PATH_VARS KDE_INSTALL_DBUSINTERFACEDIR 0140 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0141 ) 0142 0143 # install targets 0144 install(FILES 0145 "${CMAKE_CURRENT_BINARY_DIR}/KF5BalooConfig.cmake" 0146 "${CMAKE_CURRENT_BINARY_DIR}/KF5BalooConfigVersion.cmake" 0147 DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0148 COMPONENT devel 0149 ) 0150 0151 install(EXPORT KF5BalooTargets 0152 NAMESPACE KF5:: 0153 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0154 FILE KF5BalooTargets.cmake) 0155 0156 install(FILES 0157 "${CMAKE_CURRENT_BINARY_DIR}/baloo_version.h" 0158 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/Baloo 0159 COMPONENT Devel 0160 ) 0161 0162 # and we're done 0163 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)