Warning, /plasma/xdg-desktop-portal-kde/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 set(CMAKE_C_STANDARD 99)
0004 
0005 set(PROJECT_VERSION "6.0.80")
0006 set(PROJECT_VERSION_MAJOR 6)
0007 
0008 project(xdg-desktop-portal-kde VERSION ${PROJECT_VERSION})
0009 
0010 set(PROJECT_DEP_VERSION "6.0.80")
0011 set(QT_MIN_VERSION "6.6.0")
0012 set(KF6_MIN_VERSION "5.240.0")
0013 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0014 set(CMAKE_CXX_STANDARD 20)
0015 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0016 
0017 ################# set KDE specific information #################
0018 
0019 find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
0020 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
0021 
0022 include(KDEInstallDirs)
0023 include(KDECMakeSettings)
0024 include(KDECompilerSettings NO_POLICY_SCOPE)
0025 include(KDEClangFormat)
0026 include(KDEGitCommitHooks)
0027 include(ECMSetupVersion)
0028 include(ECMConfiguredInstall)
0029 include(ECMQtDeclareLoggingCategory)
0030 include(ECMAddTests)
0031 include(ECMFindQmlModule)
0032 
0033 include(FeatureSummary)
0034 
0035 find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
0036     Core
0037     Concurrent
0038     DBus
0039     PrintSupport
0040     QuickWidgets
0041     Widgets
0042     WaylandClient
0043     Quick
0044     QuickControls2
0045     Qml
0046     Test
0047 )
0048 find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient)
0049 
0050 find_package(KF6 ${KF6_MIN_VERSION} REQUIRED
0051     CoreAddons
0052     Config
0053     I18n
0054     GuiAddons
0055     GlobalAccel
0056     KIO
0057     Kirigami
0058     Notifications
0059     Service
0060     WidgetsAddons
0061     WindowSystem
0062     IconThemes
0063     StatusNotifierItem
0064 )
0065 
0066 find_package(KWayland ${PROJECT_DEP_VERSION} REQUIRED)
0067 
0068 ecm_find_qmlmodule(org.kde.iconthemes 1.0)
0069 ecm_find_qmlmodule(org.kde.plasma.workspace.dialogs 1.0)
0070 find_package(Wayland 1.15 REQUIRED COMPONENTS Client)
0071 find_package(PlasmaWaylandProtocols 1.7.0 REQUIRED)
0072 
0073 find_package(WaylandProtocols 1.25)
0074 set_package_properties(WaylandProtocols PROPERTIES
0075     TYPE REQUIRED
0076     PURPOSE "Collection of Wayland protocols that add functionality not available in the Wayland core protocol"
0077     URL "https://gitlab.freedesktop.org/wayland/wayland-protocols/"
0078 )
0079 
0080 find_package(KIOFuse)
0081 set_package_properties(KIOFuse PROPERTIES
0082     URL https://commits.kde.org/system/kio-fuse
0083     TYPE RUNTIME
0084     PURPOSE "Automatic mounting of remote URLs")
0085 
0086 pkg_check_modules(XKB IMPORTED_TARGET xkbcommon REQUIRED)
0087 add_feature_info(XKB XKB_FOUND "Required for converting keysyms into keycodes")
0088 
0089 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
0090 add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055B00)
0091 
0092 ecm_setup_version(${PROJECT_VERSION}
0093     VARIABLE_PREFIX XDPK
0094     VERSION_HEADER ${CMAKE_BINARY_DIR}/version.h)
0095 
0096 add_subdirectory(data)
0097 add_subdirectory(src)
0098 add_subdirectory(autotests)
0099 
0100 # add clang-format target for all our real source files
0101 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0102 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0103 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0104 
0105 ki18n_install(po)
0106 
0107 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)