From c8b4f1e9e29187d2d9af3a8b8938712337fd2bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 19 Mar 2014 07:56:17 +0100 Subject: [PATCH] [kwin] Add hack for finding the ksmserver and screenlocker DBus interface Uses find_package in standalone build - that's for the future and in combined build just sets the same variable to hardcoded path in the repo. --- CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ae286a936..a3638c340f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,16 @@ find_package(KF5 CONFIG COMPONENTS Activities) # TODO: remove once the build system is completely cleaned find_package(KF5KDE4Support REQUIRED NO_MODULE) +# HACK: remove after split +if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + # screensaver and ksmserver dbus interface + find_package(KSMServerDBusInterface CONFIG REQUIRED) + find_package(ScreenSaverDBusInterface CONFIG REQUIRED) +else() + set(KSMSERVER_DBUS_INTERFACE ${ksmserver_SOURCE_DIR}/org.kde.KSMServerInterface.xml) + set(SCREENSAVER_DBUS_INTERFACE ${ksmserver_SOURCE_DIR}/screenlocker/dbus/org.freedesktop.ScreenSaver.xml) +endif() + if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL") find_package(OpenGL) set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries" @@ -356,10 +366,8 @@ qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::D qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml composite.h KWin::Compositor ) qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Effects.xml effects.h KWin::EffectsHandlerImpl ) -qt5_add_dbus_interface( kwin_KDEINIT_SRCS - ${ksmserver_SOURCE_DIR}/org.kde.KSMServerInterface.xml ksmserver_interface) -qt5_add_dbus_interface( kwin_KDEINIT_SRCS - ${ksmserver_SOURCE_DIR}/screenlocker/dbus/org.freedesktop.ScreenSaver.xml screenlocker_interface) +qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${KSMSERVER_DBUS_INTERFACE} ksmserver_interface) +qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${SCREENSAVER_DBUS_INTERFACE} screenlocker_interface) qt5_add_resources( kwin_KDEINIT_SRCS resources.qrc )