[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.
This commit is contained in:
Martin Gräßlin 2014-03-19 07:56:17 +01:00
parent d8fea66396
commit c8b4f1e9e2

View file

@ -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 )