From 18722ec7fd80c41aaad8fef9a5ff857c8c93347a Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Mon, 16 Sep 2019 16:39:41 +0530 Subject: [PATCH] Import CMakeLists file for kicker and make sure it builds --- CMakeLists.txt | 5 +- applets/CMakeLists.txt | 2 + applets/kicker/CMakeLists.txt | 87 +++++++++++++++++++++++++++++++++++ config-appstream.h.cmake | 1 + 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 applets/kicker/CMakeLists.txt create mode 100644 config-appstream.h.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 53c60502a..c24ba185e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ include(KDEPackageAppTemplates) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Plasma DocTools Runner NotifyConfig Su NewStuff Wallet IdleTime Declarative I18n KCMUtils TextWidgets KDELibs4Support Crash GlobalAccel - DBusAddons Wayland CoreAddons) + DBusAddons Wayland CoreAddons People ActivitiesStats) find_package(KDED CONFIG REQUIRED) find_package(KF5NetworkManagerQt ${KF5_MIN_VERSION}) @@ -57,6 +57,8 @@ find_package(KWinDBusInterface CONFIG REQUIRED) find_package(KF5Screen CONFIG REQUIRED) find_package(KScreenLocker 5.13.80 REQUIRED) +find_package(KRunnerAppDBusInterface CONFIG REQUIRED) +find_package(KSMServerDBusInterface CONFIG REQUIRED) find_package(ScreenSaverDBusInterface CONFIG REQUIRED) find_package(KF5Holidays) set_package_properties(KF5Holidays PROPERTIES DESCRIPTION "Holidays provider for Plasma calendar" @@ -114,6 +116,7 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}") configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h) configure_file(config-unix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-unix.h ) configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h) +configure_file(config-appstream.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-appstream.h ) add_subdirectory(login-sessions) plasma_install_package(lookandfeel org.kde.breeze.desktop look-and-feel lookandfeel) diff --git a/applets/CMakeLists.txt b/applets/CMakeLists.txt index 956105e50..95cd87c21 100644 --- a/applets/CMakeLists.txt +++ b/applets/CMakeLists.txt @@ -12,6 +12,8 @@ add_subdirectory(batterymonitor) add_subdirectory(calendar) add_subdirectory(devicenotifier) add_subdirectory(digital-clock) +add_subdirectory(kicker) + plasma_install_package(clipboard org.kde.plasma.clipboard) if(NOT WIN32) diff --git a/applets/kicker/CMakeLists.txt b/applets/kicker/CMakeLists.txt new file mode 100644 index 000000000..5147ee297 --- /dev/null +++ b/applets/kicker/CMakeLists.txt @@ -0,0 +1,87 @@ +add_definitions( + -DQT_USE_QSTRINGBUILDER + -DQT_NO_CAST_TO_ASCII +# -DQT_NO_CAST_FROM_ASCII + -DQT_STRICT_ITERATORS + -DQT_NO_URL_CAST_FROM_STRING + -DQT_NO_CAST_FROM_BYTEARRAY + -DQT_NO_SIGNALS_SLOTS_KEYWORDS + -DQT_USE_FAST_OPERATOR_PLUS + -DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.kicker\" +) + +set(kickerplugin_SRCS + plugin/abstractentry.cpp + plugin/abstractmodel.cpp + plugin/actionlist.cpp + plugin/appentry.cpp + plugin/appsmodel.cpp + plugin/computermodel.cpp + plugin/contactentry.cpp + plugin/containmentinterface.cpp + plugin/draghelper.cpp + plugin/simplefavoritesmodel.cpp + plugin/kastatsfavoritesmodel.cpp + plugin/fileentry.cpp + plugin/forwardingmodel.cpp + plugin/placeholdermodel.cpp + plugin/funnelmodel.cpp + plugin/dashboardwindow.cpp + plugin/kickerplugin.cpp + plugin/menuentryeditor.cpp + plugin/processrunner.cpp + plugin/rootmodel.cpp + plugin/runnermodel.cpp + plugin/runnermatchesmodel.cpp + plugin/recentcontactsmodel.cpp + plugin/recentusagemodel.cpp + plugin/submenu.cpp + plugin/systementry.cpp + plugin/systemmodel.cpp + plugin/systemsettings.cpp + plugin/wheelinterceptor.cpp + plugin/windowsystem.cpp + plugin/funnelmodel.cpp +) + +ecm_qt_declare_logging_category(kickerplugin_SRCS + HEADER debug.h + IDENTIFIER KICKER_DEBUG + CATEGORY_NAME org.kde.plasma.kicker) + +qt5_add_dbus_interface(kickerplugin_SRCS ${KRUNNERAPP_INTERFACE} krunner_interface) +qt5_add_dbus_interface(kickerplugin_SRCS ${KSMSERVER_DBUS_INTERFACE} ksmserver_interface) + +install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/kicker) + +add_library(kickerplugin SHARED ${kickerplugin_SRCS}) + +target_link_libraries(kickerplugin + Qt5::Core + Qt5::DBus + Qt5::Qml + Qt5::Quick + Qt5::X11Extras + KF5::Activities + KF5::ActivitiesStats + KF5::ConfigCore + KF5::CoreAddons + KF5::I18n + KF5::ItemModels + KF5::KDELibs4Support # FIXME: New Solid power management API doesn't exist yet, so we need to use deprecated stuff. + KF5::KIOCore + KF5::KIOWidgets + KF5::People + KF5::PeopleWidgets + KF5::PlasmaQuick + KF5::Runner + KF5::Service + KF5::Solid + KF5::WindowSystem + PW::KWorkspace) + +if (${HAVE_APPSTREAMQT}) +target_link_libraries(kickerplugin AppStreamQt) +endif() + +install(TARGETS kickerplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/kicker) diff --git a/config-appstream.h.cmake b/config-appstream.h.cmake new file mode 100644 index 000000000..f0e89921a --- /dev/null +++ b/config-appstream.h.cmake @@ -0,0 +1 @@ +#cmakedefine HAVE_APPSTREAMQT 1