Warning, /system/dolphin/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 "22")
0005 set (RELEASE_SERVICE_VERSION_MINOR "11")
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(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
0009 
0010 set(QT_MIN_VERSION "5.15.2")
0011 set(KF5_MIN_VERSION "5.92.0")
0012 
0013 # ECM setup
0014 find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
0015 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
0016 
0017 include(KDEInstallDirs)
0018 include(KDECMakeSettings)
0019 include(KDECompilerSettings NO_POLICY_SCOPE)
0020 
0021 include(ECMSetupVersion)
0022 include(ECMGenerateHeaders)
0023 include(ECMGenerateDBusServiceFile)
0024 include(ECMConfiguredInstall)
0025 include(CMakePackageConfigHelpers)
0026 include(GenerateExportHeader)
0027 include(FeatureSummary)
0028 include(ECMQtDeclareLoggingCategory)
0029 include(ECMDeprecationSettings)
0030 
0031 ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX DOLPHIN
0032                   VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/dolphin_version.h"
0033 )
0034 
0035 ecm_setup_version("5.0.0" VARIABLE_PREFIX DOLPHINVCS
0036                   VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_version.h"
0037                   PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfigVersion.cmake"
0038                   SOVERSION 5
0039 )
0040 
0041 ecm_setup_version("5.0.0" VARIABLE_PREFIX DOLPHINPRIVATE
0042                   SOVERSION 5
0043 )
0044 
0045 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
0046     Core
0047     Concurrent
0048     Widgets
0049     Gui
0050     DBus
0051 )
0052 
0053 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0054     KCMUtils
0055     NewStuff
0056     CoreAddons
0057     I18n
0058     DBusAddons
0059     Bookmarks
0060     Config
0061     KIO
0062     Parts
0063     Solid
0064     IconThemes
0065     Completion
0066     TextWidgets
0067     Notifications
0068     Crash
0069     WindowSystem
0070     WidgetsAddons
0071 )
0072 
0073 find_package(KUserFeedback 1.2.0)
0074 set_package_properties(KUserFeedback
0075         PROPERTIES TYPE OPTIONAL
0076         PURPOSE "Used for submission of telemetry data"
0077         )
0078 
0079 if(KUserFeedback_FOUND)
0080     set(HAVE_KUSERFEEDBACK TRUE)
0081 endif()
0082 
0083 find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS
0084     Activities
0085     DocTools
0086 )
0087 set_package_properties(KF5Activities PROPERTIES DESCRIPTION "KActivities libraries"
0088                        URL "https://www.kde.org"
0089                        TYPE OPTIONAL
0090                        PURPOSE "For tracking which folders are frequently accessed on a Plasma desktop"
0091                       )
0092 
0093 find_package(Phonon4Qt${QT_MAJOR_VERSION} CONFIG REQUIRED)
0094 
0095 find_package(PackageKitQt${QT_MAJOR_VERSION})
0096 set_package_properties(PackageKitQt${QT_MAJOR_VERSION}
0097         PROPERTIES DESCRIPTION "Software Manager integration"
0098         TYPE OPTIONAL
0099         PURPOSE "Used in the service menu installer"
0100         )
0101 if(PackageKitQt${QT_MAJOR_VERSION}_FOUND)
0102     set(HAVE_PACKAGEKIT TRUE)
0103 endif()
0104 
0105 find_package(KF5Baloo ${KF5_MIN_VERSION})
0106 set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "Baloo Core libraries"
0107                        URL "https://www.kde.org"
0108                        TYPE OPTIONAL
0109                        PURPOSE "For adding desktop-wide search and tagging support to dolphin"
0110                       )
0111 
0112 find_package(KF5BalooWidgets 19.07.70)
0113 set_package_properties(KF5BalooWidgets PROPERTIES DESCRIPTION "Baloos Widgets"
0114                        URL "https://www.kde.org"
0115                        TYPE OPTIONAL
0116                       )
0117 
0118 find_package(KF5FileMetaData ${KF5_MIN_VERSION})
0119 set_package_properties(KF5FileMetaData PROPERTIES
0120                        URL "https://projects.kde.org/kfilemetadata"
0121                        TYPE OPTIONAL
0122                        PURPOSE "For accessing file metadata labels"
0123                       )
0124 
0125 if (KF5Activities_FOUND)
0126     set(HAVE_KACTIVITIES TRUE)
0127 endif()
0128 
0129 if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND)
0130     message(STATUS "Baloo packages are found")
0131     set(HAVE_BALOO TRUE)
0132 else()
0133     message(WARNING "Baloo packages not found. They are needed for the metadata features of Dolphin (including the information panel).")
0134 endif()
0135 
0136 # TODO: drop HAVE_TERMINAL once we are sure the terminal panel works on Windows too.
0137 if(WIN32)
0138     set(HAVE_TERMINAL FALSE)
0139 else()
0140     set(HAVE_TERMINAL TRUE)
0141 endif()
0142 
0143 ecm_set_disabled_deprecation_versions(
0144     QT 5.15
0145     KF 5.90
0146     KSERVICE 5.89 # We use KServiceTypeTrader in a compat code path
0147 )
0148 
0149 add_subdirectory(src)
0150 add_subdirectory(doc)
0151 
0152 # CMake files
0153 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/DolphinVcs")
0154 
0155 configure_package_config_file(
0156     "${CMAKE_CURRENT_SOURCE_DIR}/DolphinVcsConfig.cmake.in"
0157     "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfig.cmake"
0158     INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0159 )
0160 
0161 install(FILES
0162     "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfig.cmake"
0163     "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfigVersion.cmake"
0164     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0165     COMPONENT Devel
0166 )
0167 
0168 install(EXPORT DolphinVcsTargets
0169     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0170     FILE DolphinVcsTargets.cmake
0171 )
0172 
0173 install(FILES
0174     "${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_version.h"
0175     DESTINATION "${KDE_INSTALL_INCLUDEDIR}/Dolphin"
0176     COMPONENT Devel
0177 )
0178 
0179 if(FLATPAK)
0180     ecm_generate_dbus_service_file(
0181         NAME org.freedesktop.FileManager1
0182         EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon"
0183         SYSTEMD_SERVICE plasma-dolphin.service
0184         DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
0185     )
0186 else()
0187     ecm_generate_dbus_service_file(
0188         NAME org.freedesktop.FileManager1
0189         EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon"
0190         SYSTEMD_SERVICE plasma-dolphin.service
0191         DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
0192         RENAME org.kde.dolphin.FileManager1.service
0193     )
0194 endif()
0195 
0196 ecm_install_configured_files(INPUT plasma-dolphin.service.in DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
0197 
0198 ecm_qt_install_logging_categories(
0199         EXPORT DOLPHIN
0200         FILE dolphin.categories
0201         DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0202         )
0203 
0204 ki18n_install(po)
0205 if(KF5DocTools_FOUND)
0206     kdoctools_install(po)
0207 endif()
0208 
0209 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0210