plasma-framework/src/plasmaquick/CMakeLists.txt

140 lines
4.0 KiB
CMake
Raw Normal View History

if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_SHAPE_FOUND)
add_definitions(-DHAVE_XCB_SHAPE=1)
else()
add_definitions(-DHAVE_XCB_SHAPE=0)
endif()
set(plasmaquick_LIB_SRC
2014-02-05 17:23:52 +01:00
appletquickitem.cpp
try to preload certain applets in a smart way Summary: preload popups of some applets after init in the background based on a value of X-Plasma-PreloadWeight in the desktop file if present, otherwise some default values based on the applet type (Provides) Save the weight in the config, if an applet is never opened, slowly decrease the weight, when it reaches 0 don't preload it next start, increase every time it gets opened, so at the moment it's quite aggressive about preloading, in order to not do it a lot of plasma startups without touching the applet are needed Applet with a very big weigth will be preloaded immediately, therefore having an impact on the time it will take to have a panel visible and usable, while lesser weigths will preload after a random number of seconds between 2 and 10, so will load in the background after everything is started Test Plan: Plasma starts up correctly, applets load correctly and can be added correctly both those expanded or collapsed. plasmashell appears correctly usable without too big hiccups even while it's loading things in the background some numbers: without preloading, plasma takes around 64 mb of memory after startup when preloading everything about 94, so it's a cost of about 30 mb which is not negligible. don't have precise timing, but if everything gets preloaded immediately, the time to get an usable desktop appears to be at least doubled, while the delayed preloading (except just a couple of applets) doesn't seem to have a big impact on the time needed to get an usable desktop Reviewers: #plasma Subscribers: davidedmundson, broulik, apol, ngraham, plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D10512
2018-02-19 18:29:27 +01:00
debug_p.cpp
dialog.cpp
dialogshadows.cpp
2014-02-19 19:40:40 +01:00
view.cpp
containmentview.cpp
2013-09-11 14:40:11 +02:00
configmodel.cpp
shellpluginloader.cpp
2013-08-27 20:12:05 +02:00
configview.cpp
packageurlinterceptor.cpp
private/configcategory_p.cpp
private/packages.cpp
../declarativeimports/core/framesvgitem.cpp
../declarativeimports/core/units.cpp
2013-08-27 20:12:05 +02:00
)
if(HAVE_KWAYLAND)
set(plasmaquick_LIB_SRC ${plasmaquick_LIB_SRC} waylandintegration.cpp)
endif()
ecm_qt_declare_logging_category(PlasmaQuick_LIB_SRCS
HEADER debug_p.h
IDENTIFIER LOG_PLASMAQUICK
CATEGORY_NAME kf.plasma.quick
OLD_CATEGORY_NAMES org.kde.plasmaquick
DESCRIPTION "Plasma Quick lib"
EXPORT PLASMA
)
try to preload certain applets in a smart way Summary: preload popups of some applets after init in the background based on a value of X-Plasma-PreloadWeight in the desktop file if present, otherwise some default values based on the applet type (Provides) Save the weight in the config, if an applet is never opened, slowly decrease the weight, when it reaches 0 don't preload it next start, increase every time it gets opened, so at the moment it's quite aggressive about preloading, in order to not do it a lot of plasma startups without touching the applet are needed Applet with a very big weigth will be preloaded immediately, therefore having an impact on the time it will take to have a panel visible and usable, while lesser weigths will preload after a random number of seconds between 2 and 10, so will load in the background after everything is started Test Plan: Plasma starts up correctly, applets load correctly and can be added correctly both those expanded or collapsed. plasmashell appears correctly usable without too big hiccups even while it's loading things in the background some numbers: without preloading, plasma takes around 64 mb of memory after startup when preloading everything about 94, so it's a cost of about 30 mb which is not negligible. don't have precise timing, but if everything gets preloaded immediately, the time to get an usable desktop appears to be at least doubled, while the delayed preloading (except just a couple of applets) doesn't seem to have a big impact on the time needed to get an usable desktop Reviewers: #plasma Subscribers: davidedmundson, broulik, apol, ngraham, plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D10512
2018-02-19 18:29:27 +01:00
add_library(KF5PlasmaQuick SHARED ${plasmaquick_LIB_SRC})
2013-12-11 14:22:39 +01:00
add_library(KF5::PlasmaQuick ALIAS KF5PlasmaQuick)
target_include_directories(KF5PlasmaQuick PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_BINARY_DIR}/..>")
2013-08-27 20:12:05 +02:00
target_link_libraries(KF5PlasmaQuick
PUBLIC
2014-05-19 18:29:41 +02:00
Qt5::Gui
Qt5::Quick
Qt5::Qml
KF5::Plasma
KF5::WindowSystem
PRIVATE
Qt5::Svg
KF5::KIOWidgets
KF5::I18n
KF5::IconThemes
KF5::Service
KF5::CoreAddons
KF5::XmlGui
KF5::Declarative
KF5::QuickAddons
2013-08-27 20:12:05 +02:00
)
if(HAVE_KWAYLAND)
target_link_libraries(KF5PlasmaQuick
PRIVATE
KF5::WaylandClient
)
endif()
if(HAVE_X11)
target_link_libraries(KF5PlasmaQuick
PRIVATE
Qt5::X11Extras
${X11_LIBRARIES}
XCB::XCB
)
if(XCB_SHAPE_FOUND)
target_link_libraries(KF5PlasmaQuick PRIVATE XCB::SHAPE)
endif()
endif()
set_target_properties(KF5PlasmaQuick PROPERTIES
VERSION ${PLASMA_VERSION_STRING}
SOVERSION ${PLASMA_SOVERSION}
EXPORT_NAME PlasmaQuick
2013-08-27 20:12:05 +02:00
)
install(TARGETS KF5PlasmaQuick EXPORT KF5PlasmaQuickTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
2013-08-27 20:12:05 +02:00
ecm_generate_export_header(KF5PlasmaQuick
BASE_NAME PlasmaQuick
GROUP_BASE_NAME KF
VERSION ${KF_VERSION}
DEPRECATED_BASE_VERSION 0
DEPRECATION_VERSIONS 5.12 5.25 5.36
)
# TODO: add support for EXCLUDE_DEPRECATED_BEFORE_AND_AT to all Plasma libs
# needs fixing of undeprecated API being still implemented using own deprecated API
set(plasmaquick_LIB_INCLUDES
${CMAKE_CURRENT_BINARY_DIR}/plasmaquick_export.h
packageurlinterceptor.h
2013-08-27 20:12:05 +02:00
)
2015-11-24 10:58:05 +01:00
ecm_generate_headers(PlasmaQuick_CamelCase_HEADERS
HEADER_NAMES
AppletQuickItem
ContainmentView
ConfigView
ConfigModel
Dialog
REQUIRED_HEADERS plasmaquick_LIB_INCLUDES
PREFIX PlasmaQuick
)
install(FILES ${plasmaquick_LIB_INCLUDES}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/plasmaquick COMPONENT Devel)
2013-08-27 20:12:05 +02:00
2015-11-24 10:58:05 +01:00
install(FILES ${PlasmaQuick_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/PlasmaQuick COMPONENT Devel)
2013-08-27 20:12:05 +02:00
2015-01-10 18:47:31 +01:00
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5PlasmaQuick")
2013-08-27 20:12:05 +02:00
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5PlasmaQuickConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfig.cmake"
2013-08-27 20:12:05 +02:00
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
PATH_VARS KDE_INSTALL_INCLUDEDIR_KF5 CMAKE_INSTALL_PREFIX
2013-08-27 20:12:05 +02:00
)
ecm_setup_version(${KF_VERSION}
VARIABLE_PREFIX PLASMAQUICK
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfigVersion.cmake" )
2013-08-27 20:12:05 +02:00
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfigVersion.cmake"
2013-08-27 20:12:05 +02:00
DESTINATION "${CMAKECONFIG_INSTALL_DIR}" COMPONENT Devel
)
install(EXPORT KF5PlasmaQuickTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5PlasmaQuickTargets.cmake NAMESPACE KF5:: )