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