2008-01-03 15:22:19 +00:00
|
|
|
########### configure tests ###############
|
|
|
|
|
2011-07-06 15:50:30 +00:00
|
|
|
OPTION(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON)
|
|
|
|
OPTION(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)
|
|
|
|
OPTION(KWIN_MOBILE_EFFECTS "Only build effects relevant for mobile devices" OFF)
|
|
|
|
OPTION(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
|
2011-07-20 11:25:00 +00:00
|
|
|
OPTION(KWIN_BUILD_TILING "Enable building of KWin Tiling functionality" ON)
|
2011-07-07 16:29:11 +00:00
|
|
|
OPTION(KWIN_BUILD_SCREENEDGES "Enable building of KWin with screen edge support" ON)
|
2011-07-10 08:48:25 +00:00
|
|
|
OPTION(KWIN_BUILD_SCRIPTING "Enable building of KWin with scripting support" ON)
|
2011-07-07 17:17:00 +00:00
|
|
|
OPTION(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON)
|
2011-07-25 17:07:54 +00:00
|
|
|
if(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop")
|
|
|
|
OPTION(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." OFF)
|
|
|
|
else(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop")
|
|
|
|
OPTION(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." On)
|
|
|
|
endif(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop")
|
2011-07-06 15:42:24 +00:00
|
|
|
|
|
|
|
if(KWIN_PLASMA_ACTIVE)
|
|
|
|
set(KWIN_BUILD_DECORATIONS OFF)
|
|
|
|
set(KWIN_BUILD_KCMS OFF)
|
2011-07-20 11:25:00 +00:00
|
|
|
set(KWIN_BUILD_TILING OFF)
|
2011-07-07 16:29:11 +00:00
|
|
|
set(KWIN_BUILD_SCREENEDGES OFF)
|
2011-07-10 08:48:25 +00:00
|
|
|
set(KWIN_BUILD_SCRIPTING OFF)
|
2011-07-07 17:17:00 +00:00
|
|
|
set(KWIN_BUILD_XRENDER_COMPOSITING OFF)
|
2011-07-06 15:42:24 +00:00
|
|
|
set(KWIN_MOBILE_EFFECTS ON)
|
|
|
|
set(KWIN_BUILD_WITH_OPENGLES ON)
|
|
|
|
endif(KWIN_PLASMA_ACTIVE)
|
2011-07-06 15:50:30 +00:00
|
|
|
|
2011-08-13 08:36:50 +00:00
|
|
|
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled
|
|
|
|
if( KWIN_BUILD_XRENDER_COMPOSITING )
|
2008-01-03 15:22:19 +00:00
|
|
|
set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
|
2011-08-13 08:36:50 +00:00
|
|
|
endif( KWIN_BUILD_XRENDER_COMPOSITING )
|
2008-01-03 15:22:19 +00:00
|
|
|
|
2010-03-05 18:30:04 +00:00
|
|
|
if(OPENGL_FOUND)
|
|
|
|
include_directories(${OPENGL_INCLUDE_DIR})
|
|
|
|
endif(OPENGL_FOUND)
|
|
|
|
|
2011-08-13 13:21:51 +00:00
|
|
|
if(OPENGLES_FOUND)
|
2010-09-14 19:40:51 +00:00
|
|
|
include_directories(${OPENGLES_INCLUDE_DIR})
|
2011-08-13 13:21:51 +00:00
|
|
|
endif(OPENGLES_FOUND)
|
2010-09-14 19:40:51 +00:00
|
|
|
|
2008-01-03 15:22:19 +00:00
|
|
|
# for things that are also used by kwin libraries
|
2011-02-19 08:58:44 +00:00
|
|
|
configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h )
|
2008-01-03 15:22:19 +00:00
|
|
|
# for kwin internal things
|
|
|
|
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
|
|
|
|
|
|
|
|
|
|
|
|
########### global ###############
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-08-11 16:03:01 +00:00
|
|
|
include_directories(BEFORE
|
2011-02-19 08:58:44 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/libkwineffects
|
2007-06-22 16:32:06 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2011-02-19 08:58:44 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libkwineffects
|
2011-02-19 08:34:20 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libkdecorations
|
2007-04-29 17:35:43 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/effects
|
2009-09-13 11:36:45 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/tabbox
|
2008-11-15 15:31:07 +00:00
|
|
|
${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kephal
|
2010-05-11 20:30:20 +00:00
|
|
|
${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kworkspace
|
2007-04-29 17:35:43 +00:00
|
|
|
)
|
|
|
|
|
2011-02-19 08:34:20 +00:00
|
|
|
add_subdirectory( libkdecorations )
|
2011-02-19 08:58:44 +00:00
|
|
|
add_subdirectory( libkwineffects )
|
2007-06-22 16:32:06 +00:00
|
|
|
add_subdirectory( killer )
|
2011-05-01 11:27:13 +00:00
|
|
|
if(KWIN_BUILD_KCMS)
|
|
|
|
add_subdirectory( kcmkwin )
|
|
|
|
endif(KWIN_BUILD_KCMS)
|
2011-04-28 14:18:15 +00:00
|
|
|
|
|
|
|
if( KWIN_BUILD_DECORATIONS )
|
|
|
|
add_subdirectory( clients )
|
|
|
|
endif( KWIN_BUILD_DECORATIONS )
|
2007-06-22 16:32:06 +00:00
|
|
|
add_subdirectory( data )
|
|
|
|
|
2008-06-06 11:07:15 +00:00
|
|
|
add_subdirectory( effects )
|
2012-02-18 11:42:36 +00:00
|
|
|
add_subdirectory( scripts )
|
2012-02-12 14:15:54 +00:00
|
|
|
add_subdirectory( tabbox )
|
2008-06-06 11:07:15 +00:00
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
########### next target ###############
|
|
|
|
|
|
|
|
set(kwin_KDEINIT_SRCS
|
|
|
|
workspace.cpp
|
|
|
|
client.cpp
|
2012-01-12 06:42:55 +00:00
|
|
|
tabgroup.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
placement.cpp
|
|
|
|
atoms.cpp
|
|
|
|
utils.cpp
|
|
|
|
layers.cpp
|
|
|
|
main.cpp
|
|
|
|
options.cpp
|
2011-04-28 09:16:27 +00:00
|
|
|
outline.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
plugins.cpp
|
|
|
|
events.cpp
|
|
|
|
killwindow.cpp
|
|
|
|
geometrytip.cpp
|
2011-03-27 10:33:07 +00:00
|
|
|
shadow.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
sm.cpp
|
|
|
|
group.cpp
|
|
|
|
bridge.cpp
|
|
|
|
manage.cpp
|
2011-07-06 09:58:23 +00:00
|
|
|
notifications.cpp
|
|
|
|
overlaywindow.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
activation.cpp
|
|
|
|
useractions.cpp
|
|
|
|
geometry.cpp
|
|
|
|
rules.cpp
|
|
|
|
composite.cpp
|
|
|
|
toplevel.cpp
|
|
|
|
unmanaged.cpp
|
|
|
|
scene.cpp
|
|
|
|
scene_xrender.cpp
|
|
|
|
scene_opengl.cpp
|
2011-11-10 13:28:06 +00:00
|
|
|
thumbnailitem.cpp
|
2010-06-02 20:04:54 +00:00
|
|
|
lanczosfilter.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
deleted.cpp
|
|
|
|
effects.cpp
|
2007-09-18 13:59:06 +00:00
|
|
|
compositingprefs.cpp
|
2009-02-14 09:46:12 +00:00
|
|
|
desktoplayout.cpp
|
2009-04-22 17:29:56 +00:00
|
|
|
paintredirector.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
)
|
|
|
|
|
2011-07-10 08:48:25 +00:00
|
|
|
if(KWIN_BUILD_SCRIPTING)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
|
|
|
scripting/scripting.cpp
|
2012-01-22 11:38:03 +00:00
|
|
|
scripting/workspace_wrapper.cpp
|
2011-07-10 08:48:25 +00:00
|
|
|
scripting/meta.cpp
|
2012-01-29 16:32:56 +00:00
|
|
|
scripting/scriptedeffect.cpp
|
2011-07-10 08:48:25 +00:00
|
|
|
scripting/timer.cpp
|
|
|
|
)
|
|
|
|
endif(KWIN_BUILD_SCRIPTING)
|
|
|
|
|
2011-06-30 11:02:30 +00:00
|
|
|
if(KWIN_BUILD_TABBOX)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
2011-07-15 15:22:41 +00:00
|
|
|
tabbox/tabbox.cpp
|
2011-06-30 11:02:30 +00:00
|
|
|
tabbox/clientmodel.cpp
|
2011-10-30 15:07:14 +00:00
|
|
|
tabbox/declarative.cpp
|
2011-06-30 11:02:30 +00:00
|
|
|
tabbox/desktopmodel.cpp
|
|
|
|
tabbox/tabboxconfig.cpp
|
|
|
|
tabbox/tabboxhandler.cpp
|
|
|
|
)
|
|
|
|
endif(KWIN_BUILD_TABBOX)
|
|
|
|
|
2011-07-20 11:25:00 +00:00
|
|
|
if(KWIN_BUILD_TILING)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
2011-07-28 11:36:25 +00:00
|
|
|
tiling/tile.cpp
|
|
|
|
tiling/tiling.cpp
|
|
|
|
tiling/tilinglayout.cpp
|
2011-07-20 11:25:00 +00:00
|
|
|
tilinglayoutfactory.cpp
|
|
|
|
|
|
|
|
# tiling layouts
|
|
|
|
# spiral
|
|
|
|
tilinglayouts/spiral/spiral.cpp
|
|
|
|
|
|
|
|
# columns
|
|
|
|
tilinglayouts/columns/columns.cpp
|
|
|
|
|
|
|
|
# floating
|
|
|
|
tilinglayouts/floating/floating.cpp
|
|
|
|
)
|
|
|
|
endif(KWIN_BUILD_TILING)
|
|
|
|
|
2011-07-07 16:29:11 +00:00
|
|
|
if(KWIN_BUILD_SCREENEDGES)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
|
|
|
screenedge.cpp
|
|
|
|
)
|
|
|
|
endif(KWIN_BUILD_SCREENEDGES)
|
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Workspace )
|
|
|
|
|
2010-06-11 14:26:41 +00:00
|
|
|
qt4_add_dbus_interface( kwin_KDEINIT_SRCS
|
|
|
|
${KDEBASE_WORKSPACE_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml ksmserver_interface)
|
|
|
|
|
2010-06-02 20:04:54 +00:00
|
|
|
qt4_add_resources( kwin_KDEINIT_SRCS resources.qrc )
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-12-04 23:33:25 +00:00
|
|
|
set(kwinLibs ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${KACTIVITIES_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} kdeclarative kephal kworkspace kdecorations kwineffects ${X11_LIBRARIES} ${X11_Xrandr_LIB} ${X11_Xcomposite_LIB} ${X11_Xdamage_LIB} ${X11_Xrender_LIB} ${X11_Xfixes_LIB})
|
2011-07-10 08:48:25 +00:00
|
|
|
|
|
|
|
if(KWIN_BUILD_SCRIPTING)
|
2011-07-17 16:18:22 +00:00
|
|
|
set(kwinLibs ${kwinLibs} ${QT_QTSCRIPT_LIBRARY})
|
2011-07-10 08:48:25 +00:00
|
|
|
endif(KWIN_BUILD_SCRIPTING)
|
2011-07-10 08:02:04 +00:00
|
|
|
|
2011-07-17 16:18:22 +00:00
|
|
|
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(kdeinit_kwin ${kwinLibs})
|
|
|
|
|
|
|
|
if(OPENGL_FOUND)
|
|
|
|
set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL)
|
|
|
|
add_subdirectory(opengltest)
|
|
|
|
target_link_libraries(kdeinit_kwin kwinglutils ${OPENGL_gl_LIBRARY})
|
|
|
|
# -ldl used by OpenGL code
|
|
|
|
find_library(DL_LIBRARY dl)
|
|
|
|
if (DL_LIBRARY)
|
|
|
|
target_link_libraries(kdeinit_kwin ${DL_LIBRARY})
|
|
|
|
endif(DL_LIBRARY)
|
|
|
|
# must be after opengl, to be initialized first by the linker
|
|
|
|
target_link_libraries(kdeinit_kwin kwinnvidiahack)
|
2011-08-03 14:39:36 +00:00
|
|
|
elseif(OPENGLES_FOUND)
|
2011-08-06 13:29:20 +00:00
|
|
|
target_link_libraries(kdeinit_kwin ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES})
|
2011-08-03 14:39:36 +00:00
|
|
|
set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES")
|
2011-07-17 16:18:22 +00:00
|
|
|
endif(OPENGL_FOUND)
|
|
|
|
|
2008-04-01 16:42:27 +00:00
|
|
|
install(TARGETS kdeinit_kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
2008-04-11 06:52:03 +00:00
|
|
|
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-07-17 16:18:22 +00:00
|
|
|
if(OPENGLES_FOUND)
|
|
|
|
kde4_add_kdeinit_executable( kwin_gles ${kwin_KDEINIT_SRCS})
|
2011-08-06 13:29:20 +00:00
|
|
|
target_link_libraries(kdeinit_kwin_gles ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES})
|
2011-07-17 16:18:22 +00:00
|
|
|
set_target_properties(kdeinit_kwin_gles PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES")
|
|
|
|
install(TARGETS kdeinit_kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
|
|
|
install(TARGETS kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
|
|
|
endif(OPENGLES_FOUND)
|
2007-12-17 14:19:41 +00:00
|
|
|
|
|
|
|
########### next target ###############
|
|
|
|
|
|
|
|
set( kwinnvidiahack_LIB_SRCS
|
|
|
|
nvidiahack.cpp )
|
|
|
|
|
|
|
|
|
|
|
|
kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS})
|
|
|
|
|
|
|
|
set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
|
2010-10-01 12:36:28 +00:00
|
|
|
install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
|
2007-12-17 14:19:41 +00:00
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
########### install files ###############
|
|
|
|
|
|
|
|
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
|
|
|
|
install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
|
2007-07-23 07:01:14 +00:00
|
|
|
install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2012-02-18 09:34:27 +00:00
|
|
|
if( KWIN_BUILD_SCRIPTING )
|
|
|
|
# Install the KWin/WindowSwitcher service type
|
|
|
|
install( FILES scripting/kwinscript.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
|
|
|
|
endif( KWIN_BUILD_SCRIPTING )
|
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
kde4_install_icons( ${ICON_INSTALL_DIR} )
|