Warning, /plasma/plasma-integration/src/platformtheme/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 find_package(X11) 0002 set_package_properties(X11 PROPERTIES DESCRIPTION "Required for updating the Cursor theme on X11" 0003 URL "https://www.x.org" 0004 TYPE REQUIRED 0005 ) 0006 set(HAVE_X11 ${X11_FOUND}) 0007 if(HAVE_X11) 0008 if (QT_MAJOR_VERSION EQUAL "5") 0009 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED X11Extras) 0010 endif() 0011 0012 find_package(XCB COMPONENTS XCB) 0013 set_package_properties(XCB PROPERTIES TYPE REQUIRED) 0014 endif() 0015 0016 configure_file(config-platformtheme.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-platformtheme.h ) 0017 0018 # qdbusmenubar uses them 0019 remove_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS) 0020 0021 set(platformtheme_SRCS 0022 kdeplatformtheme.cpp 0023 kfontsettingsdata.cpp 0024 khintssettings.cpp 0025 kdeplatformfiledialoghelper.cpp 0026 kdeplatformfiledialogbase.cpp 0027 kdeplatformsystemtrayicon.cpp 0028 kfiletreeview.cpp 0029 kdirselectdialog.cpp 0030 kwaylandintegration.cpp 0031 x11integration.cpp 0032 main.cpp 0033 qxdgdesktopportalfiledialog.cpp 0034 qtquickrenderersettings.cpp 0035 ) 0036 if (QT_MAJOR_VERSION EQUAL "5") 0037 list(APPEND platformtheme_SRCS qdbusmenubar.cpp) # fork of Qt's qdbusmenubar with some added setters for our convenience 0038 endif() 0039 0040 qt_add_dbus_interface(platformtheme_SRCS org.kde.StatusNotifierWatcher.xml statusnotifierwatcher_interface) 0041 kconfig_add_kcfg_files(platformtheme_SRCS renderersettings.kcfgc) 0042 add_library(KDEPlasmaPlatformTheme MODULE) 0043 if (QT_MAJOR_VERSION EQUAL "5") 0044 ecm_add_qtwayland_client_protocol(platformtheme_SRCS 0045 PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/appmenu.xml 0046 BASENAME appmenu 0047 ) 0048 0049 ecm_add_qtwayland_client_protocol(platformtheme_SRCS 0050 PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/server-decoration-palette.xml 0051 BASENAME server-decoration-palette 0052 ) 0053 else() 0054 # TODO KF6 Port D-Bus menu support 0055 target_compile_definitions(KDEPlasmaPlatformTheme PRIVATE -DKF6_TODO_DBUS_MENUBAR) 0056 qt6_generate_wayland_protocol_client_sources(KDEPlasmaPlatformTheme FILES 0057 ${PLASMA_WAYLAND_PROTOCOLS_DIR}/server-decoration-palette.xml 0058 ${PLASMA_WAYLAND_PROTOCOLS_DIR}/appmenu.xml 0059 ) 0060 endif() 0061 target_sources(KDEPlasmaPlatformTheme PRIVATE ${platformtheme_SRCS}) 0062 0063 target_link_libraries(KDEPlasmaPlatformTheme 0064 PRIVATE 0065 Qt::GuiPrivate 0066 Qt::DBus 0067 Qt::QuickControls2 0068 KF5::ConfigWidgets 0069 KF5::ConfigCore 0070 KF5::IconThemes 0071 KF5::KIOFileWidgets # KFileFilterCombo, KDirSortFilterProxyModel, KRecentDirs 0072 KF5::KIOWidgets 0073 KF5::XmlGui 0074 KF5::I18n 0075 KF5::Notifications 0076 KF5::WindowSystem 0077 XCB::XCB 0078 ${QT5PLATFORMSUPPORT_LIBS} 0079 Qt::WaylandClient 0080 Qt::GuiPrivate 0081 Wayland::Client 0082 ) 0083 if (QT_MAJOR_VERSION EQUAL "5") 0084 target_link_libraries(KDEPlasmaPlatformTheme PRIVATE Qt5::X11Extras) 0085 endif() 0086 0087 if(HAVE_X11) 0088 target_link_libraries(KDEPlasmaPlatformTheme PRIVATE ${X11_Xcursor_LIB} ${XCB_XCB_LIBRARY}) 0089 endif() 0090 0091 set_target_properties(KDEPlasmaPlatformTheme PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/platformthemes/") 0092 install(TARGETS KDEPlasmaPlatformTheme DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/platformthemes) 0093 0094 install(FILES fonts_global_toolbar.upd fonts_global.upd fonts_akregator.upd fonts_kate.upd DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}) 0095 install(PROGRAMS fonts_global.pl fonts_akregator.pl fonts_kate.pl DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})