Commit 1b1e962c authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Klipper: Do not compile sources twice to build the data engine

libklipper_common_SRCS are compiled into the libklipper_common_static
library and then linked for the Klipper application.  The same sources
are also compiled again to build plasma_engine_clipboard via
plasma_engine_clipboard_SRCS.  This results in almost double the
compile time and repeated diagnostic messages (if there are any).

Use the previously built static library for linking the data engine.
parent 3e542824
Pipeline #136060 passed with stage
in 8 minutes and 7 seconds
......@@ -30,6 +30,8 @@ kconfig_add_kcfg_files(libklipper_common_SRCS klippersettings.kcfgc)
add_library(libklipper_common_static STATIC ${libklipper_common_SRCS})
target_link_libraries(libklipper_common_static
Qt::Concurrent
Qt::Widgets
Qt::DBus
KF5::ConfigGui
KF5::CoreAddons
KF5::DBusAddons
......@@ -59,30 +61,13 @@ install(FILES org.kde.klipper.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES klipper.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
# Plasma Data Engine
set(plasma_engine_clipboard_SRCS ${libklipper_common_SRCS} clipboardengine.cpp clipboardservice.cpp clipboardjob.cpp)
set(plasma_engine_clipboard_SRCS clipboardengine.cpp clipboardservice.cpp clipboardjob.cpp)
kcoreaddons_add_plugin(plasma_engine_clipboard SOURCES ${plasma_engine_clipboard_SRCS} INSTALL_NAMESPACE "plasma/dataengine")
target_link_libraries(plasma_engine_clipboard
Qt::Concurrent
Qt::DBus
Qt::Widgets # QAction
KF5::ConfigGui
KF5::CoreAddons # KUrlMimeData
KF5::GlobalAccel
KF5::KIOWidgets # PreviewJob
libklipper_common_static
KF5::Plasma
KF5::Notifications
KF5::Service
KF5::Prison
KF5::TextWidgets # KTextEdit
KF5::WidgetsAddons # KMessageBox
KF5::WindowSystem
KF5::XmlGui # KActionCollection
KF5::GuiAddons
${ZLIB_LIBRARY}
)
if (X11_FOUND)
target_link_libraries(plasma_engine_clipboard XCB::XCB Qt::X11Extras)
endif()
install(FILES org.kde.plasma.clipboard.operations DESTINATION ${PLASMA_DATA_INSTALL_DIR}/services)
if(BUILD_TESTING)
add_subdirectory(autotests)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment