kde-workspace/kwin/CMakeLists.txt

200 lines
4.6 KiB
Text
Raw Normal View History

2014-11-13 19:30:51 +02:00
########### configure tests ###############
INCLUDE(CMakeDependentOption)
OPTION(KWIN_BUILD_OXYGEN "Enable building of default decoration Oxygen" ON)
OPTION(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)
OPTION(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
OPTION(KWIN_BUILD_SCREENEDGES "Enable building of KWin with screen edge support" ON)
OPTION(KWIN_BUILD_KAPPMENU "Enable building of KWin with application menu support" ON)
OPTION(KWIN_BUILD_COMPOSITE "Enable building of KWin with XRender Compositing support" ON)
2014-11-13 19:30:51 +02:00
include_directories(${XCB_INCLUDE_DIR})
# for kwin internal things
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h)
2014-11-13 19:30:51 +02:00
########### global ###############
include_directories(BEFORE
${CMAKE_CURRENT_BINARY_DIR}/libkwineffects
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/libkwineffects
${CMAKE_CURRENT_SOURCE_DIR}/libkdecorations
${CMAKE_CURRENT_SOURCE_DIR}/effects
${CMAKE_CURRENT_SOURCE_DIR}/tabbox
)
2014-11-13 19:30:51 +02:00
add_subdirectory( libkdecorations )
add_subdirectory( libkwineffects )
add_subdirectory( killer )
if(KWIN_BUILD_KCMS)
add_subdirectory( kcmkwin )
endif()
add_subdirectory( clients )
2014-11-13 19:30:51 +02:00
add_subdirectory( effects )
add_subdirectory( tabbox )
########### next target ###############
set(kwin_SRCS
2014-11-13 19:30:51 +02:00
workspace.cpp
dbusinterface.cpp
client.cpp
client_machine.cpp
cursor.cpp
tabgroup.cpp
focuschain.cpp
netinfo.cpp
placement.cpp
atoms.cpp
utils.cpp
layers.cpp
main.cpp
options.cpp
outline.cpp
decorations.cpp
events.cpp
killwindow.cpp
geometrytip.cpp
screens.cpp
shadow.cpp
sm.cpp
group.cpp
bridge.cpp
manage.cpp
overlaywindow.cpp
activation.cpp
useractions.cpp
geometry.cpp
rules.cpp
composite.cpp
toplevel.cpp
unmanaged.cpp
scene.cpp
scene_xrender.cpp
thumbnailitem.cpp
deleted.cpp
effects.cpp
compositingprefs.cpp
paintredirector.cpp
virtualdesktops.cpp
xcbutils.cpp
)
2014-11-13 19:30:51 +02:00
if(KWIN_BUILD_TABBOX)
set(kwin_SRCS
${kwin_SRCS}
2014-11-13 19:30:51 +02:00
tabbox/tabbox.cpp
tabbox/clientmodel.cpp
tabbox/declarative.cpp
tabbox/desktopchain.cpp
tabbox/desktopmodel.cpp
tabbox/tabboxconfig.cpp
tabbox/tabboxhandler.cpp
)
endif()
if(KWIN_BUILD_SCREENEDGES)
set(kwin_SRCS
${kwin_SRCS}
2014-11-13 19:30:51 +02:00
screenedge.cpp
)
endif()
if(KWIN_BUILD_KAPPMENU)
set(kwin_SRCS
${kwin_SRCS}
2014-11-13 19:30:51 +02:00
appmenu.cpp
)
endif()
kde4_add_kcfg_files(kwin_SRCS settings.kcfgc)
2014-11-13 19:30:51 +02:00
qt4_add_dbus_adaptor(kwin_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface)
qt4_add_dbus_adaptor(kwin_SRCS org.kde.kwin.Compositing.xml composite.h KWin::Compositor)
qt4_add_dbus_adaptor(kwin_SRCS org.kde.kwin.Effects.xml effects.h KWin::EffectsHandlerImpl)
2014-11-13 19:30:51 +02:00
qt4_add_dbus_interface(kwin_SRCS
${CMAKE_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml ksmserver_interface
)
qt4_add_dbus_interface(kwin_SRCS
${CMAKE_SOURCE_DIR}/ksmserver/screenlocker/dbus/org.freedesktop.ScreenSaver.xml screenlocker_interface
)
2014-11-13 19:30:51 +02:00
########### target link libraries ###############
set(kwin_OWN_LIBS
kdecorations
kwineffects
)
set(kwin_QT_LIBS
${QT_QTDECLARATIVE_LIBRARY}
)
set(kwin_KDE_LIBS
${KDE4_KDEUI_LIBS}
${KDE4_PLASMA_LIBS}
2015-10-29 11:04:29 +02:00
${KDE4_KDECLARATIVE_LIBS}
2014-11-13 19:30:51 +02:00
)
set(kwin_XLIB_LIBS
${X11_X11_LIB}
${X11_Xext_LIB}
${X11_ICE_LIB}
${X11_SM_LIB}
${X11_Xcursor_LIB}
${X11_Xrandr_LIB}
${X11_Xdamage_LIB}
${X11_Xrender_LIB}
${X11_Xfixes_LIB}
)
set(kwin_XCB_LIBS
${XCB_XCB_LIBRARIES}
${X11_XCB_LIBRARIES}
${XCB_XFIXES_LIBRARIES}
${XCB_DAMAGE_LIBRARIES}
${XCB_COMPOSITE_LIBRARIES}
${XCB_SHAPE_LIBRARIES}
${XCB_SYNC_LIBRARIES}
${XCB_RENDER_LIBRARIES}
${XCB_RANDR_LIBRARIES}
${XCB_KEYSYMS_LIBRARIES}
)
find_library(XF86VM_LIBRARY Xxf86vm)
if (XF86VM_LIBRARY)
set(kwin_XLIB_LIBS ${kwin_XLIB_LIBS} ${XF86VM_LIBRARY})
else()
add_definitions(-DKWIN_NO_XF86VM)
endif()
set(kwinLibs
${kwin_OWN_LIBS}
${kwin_QT_LIBS}
${kwin_KDE_LIBS}
${kwin_XLIB_LIBS}
${kwin_XCB_LIBS}
)
add_executable(kwin ${kwin_SRCS})
2014-11-13 19:30:51 +02:00
target_link_libraries(kwin ${kwinLibs})
2014-11-13 19:30:51 +02:00
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS})
2014-11-13 19:30:51 +02:00
########### install files ###############
install(FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME kwin.kcfg)
install(FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin RENAME kwin.notifyrc)
install(FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
2014-11-13 19:30:51 +02:00
kde4_install_icons(${ICON_INSTALL_DIR})
2014-11-13 19:30:51 +02:00
2015-09-01 04:37:19 +03:00
if(ENABLE_TESTING)
add_subdirectory(tests)
endif()