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 )