2014-03-18 13:39:42 +00:00
|
|
|
project(KWIN)
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
|
|
|
set(QT_MIN_VERSION "5.2.0")
|
|
|
|
|
2014-03-26 16:47:15 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} )
|
2014-03-18 13:39:42 +00:00
|
|
|
|
|
|
|
find_package(ECM 0.0.11 REQUIRED NO_MODULE)
|
|
|
|
|
|
|
|
include(FeatureSummary)
|
|
|
|
include(WriteBasicConfigVersionFile)
|
|
|
|
|
|
|
|
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
|
|
|
|
|
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(KDECMakeSettings)
|
|
|
|
include(KDECompilerSettings)
|
|
|
|
|
|
|
|
include(ECMInstallIcons)
|
|
|
|
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
|
|
|
Concurrent
|
|
|
|
Core
|
|
|
|
DBus
|
|
|
|
Quick
|
|
|
|
Script
|
|
|
|
Test
|
|
|
|
UiTools
|
|
|
|
Widgets
|
|
|
|
X11Extras
|
|
|
|
)
|
|
|
|
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
|
|
|
|
|
|
|
|
|
|
|
|
# required frameworks by Core
|
|
|
|
find_package(KF5 CONFIG REQUIRED COMPONENTS
|
|
|
|
Config
|
|
|
|
ConfigWidgets
|
|
|
|
CoreAddons
|
|
|
|
Crash
|
|
|
|
GlobalAccel
|
|
|
|
I18n
|
|
|
|
Notifications
|
|
|
|
Service
|
|
|
|
Plasma
|
|
|
|
WidgetsAddons
|
|
|
|
WindowSystem
|
|
|
|
)
|
|
|
|
# required frameworks by config modules
|
|
|
|
find_package(KF5 CONFIG REQUIRED COMPONENTS
|
|
|
|
Completion
|
|
|
|
KCMUtils
|
|
|
|
KIO
|
|
|
|
NewStuff
|
|
|
|
XmlGui
|
|
|
|
)
|
|
|
|
|
|
|
|
# optional frameworks
|
|
|
|
find_package(KF5 CONFIG COMPONENTS Activities)
|
|
|
|
|
|
|
|
# TODO: remove once the build system is completely cleaned
|
|
|
|
find_package(KF5KDE4Support REQUIRED NO_MODULE)
|
|
|
|
|
|
|
|
if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")
|
|
|
|
find_package(OpenGL)
|
|
|
|
set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries"
|
|
|
|
URL "http://www.opengl.org"
|
|
|
|
TYPE REQUIRED
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
find_package(OpenGLES)
|
|
|
|
set_package_properties(OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries"
|
|
|
|
URL "http://www.khronos.org/opengles"
|
|
|
|
TYPE REQUIRED
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(EGL)
|
|
|
|
set_package_properties(EGL PROPERTIES
|
|
|
|
TYPE REQUIRED
|
|
|
|
PURPOSE "Required to build KWin with EGL support"
|
|
|
|
)
|
|
|
|
|
|
|
|
find_package(Wayland 1.2 COMPONENTS Client Egl Cursor)
|
|
|
|
set_package_properties(Wayland PROPERTIES
|
|
|
|
TYPE OPTIONAL
|
|
|
|
PURPOSE "Required for building KWin with Wayland support"
|
|
|
|
)
|
|
|
|
add_feature_info("Wayland-Client" Wayland_Client_FOUND "Required for building the Wayland backend in KWin")
|
|
|
|
add_feature_info("Wayland-EGL" Wayland_Egl_FOUND "Required for building the Wayland EGL compositing backend in KWin")
|
|
|
|
|
|
|
|
find_package(XKB)
|
|
|
|
set_package_properties(XKB PROPERTIES
|
|
|
|
TYPE OPTIONAL
|
|
|
|
PURPOSE "Required for building KWin with Wayland support"
|
|
|
|
)
|
|
|
|
|
|
|
|
find_package(X11)
|
|
|
|
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
|
|
|
|
URL "http://www.x.org"
|
|
|
|
TYPE REQUIRED
|
|
|
|
)
|
|
|
|
|
|
|
|
# All the required XCB components
|
|
|
|
find_package(XCB REQUIRED COMPONENTS
|
|
|
|
XCB
|
|
|
|
XFIXES
|
|
|
|
DAMAGE
|
|
|
|
COMPOSITE
|
|
|
|
SHAPE
|
|
|
|
SYNC
|
|
|
|
RENDER
|
|
|
|
RANDR
|
|
|
|
KEYSYMS
|
|
|
|
IMAGE
|
|
|
|
SHM
|
|
|
|
XTEST
|
|
|
|
)
|
|
|
|
set_package_properties(XCB PROPERTIES TYPE REQUIRED)
|
|
|
|
|
|
|
|
# and the optional XCB dependencies
|
|
|
|
find_package(XCB COMPONENTS ICCCM)
|
|
|
|
add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
|
|
|
|
|
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
|
2008-01-03 15:22:19 +00:00
|
|
|
########### configure tests ###############
|
2013-11-15 12:37:47 +00:00
|
|
|
include(CMakeDependentOption)
|
|
|
|
|
|
|
|
option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." 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)
|
2014-03-24 15:51:52 +00:00
|
|
|
option(KWIN_BUILD_KAPPMENU "Enable building of KWin with application menu support" OFF)
|
2013-11-15 12:37:47 +00:00
|
|
|
option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON)
|
2014-02-13 19:06:33 +00:00
|
|
|
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF)
|
2013-11-25 12:59:45 +00:00
|
|
|
option(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." OFF)
|
2011-07-06 15:42:24 +00:00
|
|
|
|
2012-03-16 07:37:09 +00:00
|
|
|
# Binary name of KWin
|
|
|
|
set(KWIN_NAME "kwin")
|
2014-03-18 09:52:45 +00:00
|
|
|
set(KWIN_VERSION_MAJOR 4)
|
2014-03-29 00:45:23 +00:00
|
|
|
set(KWIN_VERSION_MINOR 95)
|
|
|
|
set(KWIN_VERSION_PATCH 0)
|
2014-03-18 09:52:45 +00:00
|
|
|
set(KWIN_VERSION ${KWIN_VERSION_MAJOR}.${KWIN_VERSION_MINOR}.${KWIN_VERSION_PATCH} )
|
2014-03-18 11:08:14 +00:00
|
|
|
set(KWIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
2012-03-16 07:37:09 +00:00
|
|
|
|
2014-03-18 13:39:42 +00:00
|
|
|
set(GENERIC_LIB_SOVERSION ${KWIN_VERSION_MAJOR})
|
|
|
|
|
|
|
|
set(GENERIC_LIB_VERSION "${KWIN_VERSION_MAJOR}.${KWIN_VERSION_MINOR}.${KWIN_VERSION_PATCH}")
|
|
|
|
|
2011-07-06 15:42:24 +00:00
|
|
|
if(KWIN_PLASMA_ACTIVE)
|
|
|
|
set(KWIN_BUILD_DECORATIONS OFF)
|
|
|
|
set(KWIN_BUILD_KCMS OFF)
|
2011-07-07 16:29:11 +00:00
|
|
|
set(KWIN_BUILD_SCREENEDGES 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_BUILD_WITH_OPENGLES ON)
|
2012-03-16 07:37:09 +00:00
|
|
|
set(KWIN_NAME "kwinactive")
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-07-06 15:50:30 +00:00
|
|
|
|
2012-11-09 12:44:50 +00:00
|
|
|
cmake_dependent_option(KWIN_BUILD_KAPPMENU "Build without appmenu support" ON "KWIN_BUILD_DECORATIONS" FALSE)
|
|
|
|
|
2013-10-14 07:04:03 +00:00
|
|
|
set(KWIN_BUILD_OPENGL FALSE)
|
|
|
|
set(KWIN_BUILD_OPENGLES FALSE)
|
|
|
|
if(OPENGL_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL"))
|
|
|
|
set(KWIN_BUILD_OPENGL TRUE)
|
|
|
|
message("Building KWin with OpenGL support")
|
|
|
|
endif()
|
|
|
|
if(OPENGLES_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GLESv2"))
|
|
|
|
set(KWIN_BUILD_OPENGLES TRUE)
|
|
|
|
message("Building KWin with OpenGL ES 2 support")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT KWIN_BUILD_OPENGL AND NOT KWIN_BUILD_OPENGLES)
|
|
|
|
message(FATAL_ERROR "KWin needs to be built against either OpenGL or OpenGL ES 2. Check your Qt config!")
|
|
|
|
endif()
|
|
|
|
|
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 )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2008-01-03 15:22:19 +00:00
|
|
|
|
2013-10-14 07:04:03 +00:00
|
|
|
if(KWIN_BUILD_OPENGL)
|
2010-03-05 18:30:04 +00:00
|
|
|
include_directories(${OPENGL_INCLUDE_DIR})
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2010-03-05 18:30:04 +00:00
|
|
|
|
2014-02-24 13:07:03 +00:00
|
|
|
set(KWIN_HAVE_EGL ${EGL_FOUND})
|
2012-09-29 11:19:35 +00:00
|
|
|
|
2013-10-14 07:04:03 +00:00
|
|
|
if(KWIN_BUILD_OPENGLES)
|
2010-09-14 19:40:51 +00:00
|
|
|
include_directories(${OPENGLES_INCLUDE_DIR})
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2010-09-14 19:40:51 +00:00
|
|
|
|
2014-03-29 08:30:45 +00:00
|
|
|
if (XKB_FOUND)
|
|
|
|
include_directories(${XKB_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
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
|
2014-03-20 11:54:24 +00:00
|
|
|
if(Wayland_Client_FOUND AND XKB_FOUND)
|
|
|
|
set(HAVE_WAYLAND ${Wayland_Client_FOUND})
|
2013-07-02 09:44:18 +00:00
|
|
|
set(HAVE_XKB ${XKB_FOUND})
|
2014-03-19 10:02:39 +00:00
|
|
|
set(HAVE_WAYLAND_EGL ${Wayland_Egl_FOUND})
|
2013-07-02 09:44:18 +00:00
|
|
|
else()
|
2014-03-20 11:54:24 +00:00
|
|
|
set(HAVE_WAYLAND FALSE)
|
2013-07-02 09:44:18 +00:00
|
|
|
set(HAVE_XKB FALSE)
|
2014-03-19 10:02:39 +00:00
|
|
|
set(HAVE_WAYLAND_EGL FALSE)
|
2013-07-02 09:44:18 +00:00
|
|
|
endif()
|
2014-03-18 08:30:40 +00:00
|
|
|
|
2014-03-18 13:39:42 +00:00
|
|
|
include(CheckIncludeFiles)
|
2014-03-18 08:30:40 +00:00
|
|
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
|
|
|
check_include_files(malloc.h HAVE_MALLOC_H)
|
2008-01-03 15:22:19 +00:00
|
|
|
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
|
|
|
|
|
|
|
|
|
|
|
|
########### global ###############
|
2014-03-19 07:10:45 +00:00
|
|
|
set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2011-08-11 16:03:01 +00:00
|
|
|
include_directories(BEFORE
|
2013-12-04 09:31:52 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/libkdecorations
|
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
|
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 )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-04-28 14:18:15 +00:00
|
|
|
|
|
|
|
if( KWIN_BUILD_DECORATIONS )
|
|
|
|
add_subdirectory( clients )
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2014-01-16 18:18:54 +00:00
|
|
|
add_subdirectory( data )
|
2007-06-22 16:32:06 +00:00
|
|
|
|
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 )
|
2014-03-04 07:17:44 +00:00
|
|
|
add_subdirectory(scripting)
|
2013-02-15 15:47:09 +00:00
|
|
|
|
2013-09-02 08:34:00 +00:00
|
|
|
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1212)
|
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
########### next target ###############
|
|
|
|
|
|
|
|
set(kwin_KDEINIT_SRCS
|
|
|
|
workspace.cpp
|
2012-08-30 06:20:26 +00:00
|
|
|
dbusinterface.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
client.cpp
|
2013-01-07 07:07:27 +00:00
|
|
|
client_machine.cpp
|
2013-02-19 10:25:46 +00:00
|
|
|
cursor.cpp
|
2012-01-12 06:42:55 +00:00
|
|
|
tabgroup.cpp
|
2012-11-20 16:26:50 +00:00
|
|
|
focuschain.cpp
|
2013-07-10 09:41:16 +00:00
|
|
|
globalshortcuts.cpp
|
2013-06-26 08:15:20 +00:00
|
|
|
input.cpp
|
2013-04-26 08:41:24 +00:00
|
|
|
netinfo.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
|
2013-04-08 09:16:48 +00:00
|
|
|
decorations.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
events.cpp
|
|
|
|
killwindow.cpp
|
|
|
|
geometrytip.cpp
|
2013-04-03 10:19:27 +00:00
|
|
|
screens.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
|
|
|
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
|
2013-06-21 08:03:31 +00:00
|
|
|
scene_qpainter.cpp
|
2012-08-26 15:14:23 +00:00
|
|
|
glxbackend.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
|
2014-03-22 08:48:07 +00:00
|
|
|
effectloader.cpp
|
2007-09-18 13:59:06 +00:00
|
|
|
compositingprefs.cpp
|
2009-04-22 17:29:56 +00:00
|
|
|
paintredirector.cpp
|
2012-11-16 07:23:47 +00:00
|
|
|
virtualdesktops.cpp
|
2012-12-21 14:11:31 +00:00
|
|
|
xcbutils.cpp
|
2014-03-04 07:17:44 +00:00
|
|
|
scripting/scripting.cpp
|
|
|
|
scripting/workspace_wrapper.cpp
|
|
|
|
scripting/meta.cpp
|
|
|
|
scripting/scriptedeffect.cpp
|
|
|
|
scripting/scriptingutils.cpp
|
|
|
|
scripting/timer.cpp
|
|
|
|
scripting/scripting_model.cpp
|
|
|
|
scripting/dbuscall.cpp
|
|
|
|
scripting/screenedgeitem.cpp
|
2007-04-29 17:35:43 +00:00
|
|
|
)
|
|
|
|
|
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
|
2012-11-17 10:50:59 +00:00
|
|
|
tabbox/desktopchain.cpp
|
2011-06-30 11:02:30 +00:00
|
|
|
tabbox/desktopmodel.cpp
|
2013-12-10 06:14:44 +00:00
|
|
|
tabbox/switcheritem.cpp
|
2011-06-30 11:02:30 +00:00
|
|
|
tabbox/tabboxconfig.cpp
|
|
|
|
tabbox/tabboxhandler.cpp
|
|
|
|
)
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-06-30 11:02:30 +00:00
|
|
|
|
2011-07-07 16:29:11 +00:00
|
|
|
if(KWIN_BUILD_SCREENEDGES)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
|
|
|
screenedge.cpp
|
|
|
|
)
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-07-07 16:29:11 +00:00
|
|
|
|
2013-03-15 15:49:20 +00:00
|
|
|
if(KWIN_BUILD_KAPPMENU)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
|
|
|
appmenu.cpp
|
|
|
|
)
|
2014-01-07 13:06:56 +00:00
|
|
|
qt5_add_dbus_interface(kwin_KDEINIT_SRCS
|
2014-03-26 16:49:15 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/plasma-workspace/appmenu/org.kde.kappmenu.xml appmenu_interface)
|
2013-03-15 15:49:20 +00:00
|
|
|
endif()
|
|
|
|
|
2013-04-04 14:14:12 +00:00
|
|
|
if(KWIN_BUILD_ACTIVITIES)
|
|
|
|
set(
|
|
|
|
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
|
|
|
|
activities.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2012-09-29 11:19:35 +00:00
|
|
|
if(KWIN_HAVE_EGL)
|
|
|
|
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} eglonxbackend.cpp)
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2012-09-29 11:19:35 +00:00
|
|
|
|
2014-03-13 16:52:26 +00:00
|
|
|
if(Wayland_Client_FOUND AND XKB_FOUND)
|
2013-06-17 07:35:45 +00:00
|
|
|
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} wayland_backend.cpp)
|
2014-02-24 13:46:29 +00:00
|
|
|
if(KWIN_HAVE_EGL AND Wayland_Egl_FOUND)
|
2013-06-17 07:35:45 +00:00
|
|
|
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} egl_wayland_backend.cpp)
|
|
|
|
endif()
|
2013-05-15 11:47:27 +00:00
|
|
|
endif()
|
|
|
|
|
2013-11-26 18:51:13 +00:00
|
|
|
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc)
|
2013-01-24 14:25:34 +00:00
|
|
|
|
2013-11-26 18:51:13 +00:00
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface )
|
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml composite.h KWin::Compositor )
|
2014-03-18 15:09:20 +00:00
|
|
|
qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl )
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2014-03-24 15:30:22 +00:00
|
|
|
qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.ScreenSaver.xml screenlocker_interface)
|
2010-06-11 14:26:41 +00:00
|
|
|
|
2013-11-15 12:37:47 +00:00
|
|
|
qt5_add_resources( kwin_KDEINIT_SRCS resources.qrc )
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2014-03-18 10:06:56 +00:00
|
|
|
qt5_wrap_ui(kwin_KDEINIT_SRCS
|
2013-12-12 13:17:26 +00:00
|
|
|
shortcutdialog.ui
|
|
|
|
)
|
|
|
|
|
2013-02-25 11:05:36 +00:00
|
|
|
########### target link libraries ###############
|
|
|
|
|
|
|
|
set(kwin_OWN_LIBS
|
|
|
|
kdecorations
|
|
|
|
kwineffects
|
2014-03-16 14:31:23 +00:00
|
|
|
kwinxrenderutils
|
2014-01-17 12:46:04 +00:00
|
|
|
kwin4_effect_builtins
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_QT_LIBS
|
2013-10-02 13:23:56 +00:00
|
|
|
Qt5::Concurrent
|
2013-08-20 06:47:47 +00:00
|
|
|
Qt5::DBus
|
2013-08-20 07:10:18 +00:00
|
|
|
Qt5::Quick
|
2014-03-04 07:17:44 +00:00
|
|
|
Qt5::Script
|
2013-08-20 07:10:18 +00:00
|
|
|
Qt5::X11Extras
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_KDE_LIBS
|
2013-12-11 20:41:47 +00:00
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::CoreAddons
|
2013-12-12 13:17:26 +00:00
|
|
|
KF5::ConfigWidgets
|
2013-12-11 20:41:47 +00:00
|
|
|
KF5::Crash
|
2013-12-09 08:33:58 +00:00
|
|
|
KF5::GlobalAccel
|
2013-12-11 20:41:47 +00:00
|
|
|
KF5::I18n
|
|
|
|
KF5::Notifications
|
|
|
|
KF5::Service
|
2013-10-15 23:36:24 +00:00
|
|
|
KF5::Plasma
|
2013-12-11 20:41:47 +00:00
|
|
|
KF5::WindowSystem
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_XLIB_LIBS
|
2013-03-04 07:50:23 +00:00
|
|
|
${X11_X11_LIB}
|
2013-11-11 10:30:59 +00:00
|
|
|
${X11_Xext_LIB}
|
2013-02-25 11:05:36 +00:00
|
|
|
${X11_Xcursor_LIB}
|
2013-08-20 06:47:47 +00:00
|
|
|
${X11_ICE_LIB}
|
|
|
|
${X11_SM_LIB}
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_XCB_LIBS
|
2014-02-25 14:48:39 +00:00
|
|
|
XCB::XCB
|
|
|
|
XCB::XFIXES
|
|
|
|
XCB::DAMAGE
|
|
|
|
XCB::COMPOSITE
|
|
|
|
XCB::SHAPE
|
|
|
|
XCB::SYNC
|
|
|
|
XCB::RENDER
|
|
|
|
XCB::RANDR
|
|
|
|
XCB::KEYSYMS
|
|
|
|
XCB::SHM
|
2014-03-18 15:39:34 +00:00
|
|
|
XCB::XTEST
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
2013-05-15 11:47:27 +00:00
|
|
|
set(kwin_WAYLAND_LIBS
|
2014-02-24 13:46:29 +00:00
|
|
|
Wayland::Client
|
2013-06-27 07:58:04 +00:00
|
|
|
Wayland::Cursor
|
2014-02-25 14:48:39 +00:00
|
|
|
XCB::XTEST
|
2014-03-13 16:52:26 +00:00
|
|
|
XKB::XKB
|
2013-05-15 11:47:27 +00:00
|
|
|
)
|
|
|
|
|
2013-06-17 07:35:45 +00:00
|
|
|
set(kwin_WAYLAND_EGL_LIBS
|
2014-02-24 13:46:29 +00:00
|
|
|
Wayland::Egl
|
2013-06-17 07:35:45 +00:00
|
|
|
)
|
|
|
|
|
2013-02-25 11:05:36 +00:00
|
|
|
set(kwin_OPENGL_LIBS )
|
2011-07-10 08:48:25 +00:00
|
|
|
|
2012-03-29 20:10:40 +00:00
|
|
|
find_library(XF86VM_LIBRARY Xxf86vm)
|
|
|
|
if (XF86VM_LIBRARY)
|
2013-02-25 11:05:36 +00:00
|
|
|
set(kwin_XLIB_LIBS ${kwin_XLIB_LIBS} ${XF86VM_LIBRARY})
|
2013-02-25 13:47:07 +00:00
|
|
|
else()
|
2012-03-29 20:10:40 +00:00
|
|
|
add_definitions(-DKWIN_NO_XF86VM)
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2012-03-29 20:10:40 +00:00
|
|
|
|
2012-02-26 10:38:16 +00:00
|
|
|
if(KWIN_BUILD_ACTIVITIES)
|
2014-02-13 19:06:33 +00:00
|
|
|
set(kwin_KDE_LIBS ${kwin_KDE_LIBS} KF5::Activities)
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2012-02-26 10:38:16 +00:00
|
|
|
|
2014-02-24 13:07:03 +00:00
|
|
|
if(KWIN_HAVE_EGL)
|
|
|
|
set(kwin_OPENGL_LIBS ${kwin_OPENGL_LIBS} EGL::EGL)
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2012-09-29 11:19:35 +00:00
|
|
|
|
2013-02-25 11:05:36 +00:00
|
|
|
set(kwinLibs
|
|
|
|
${kwin_OWN_LIBS}
|
|
|
|
${kwin_QT_LIBS}
|
|
|
|
${kwin_KDE_LIBS}
|
|
|
|
${kwin_XLIB_LIBS}
|
|
|
|
${kwin_XCB_LIBS}
|
|
|
|
${kwin_OPENGL_LIBS}
|
|
|
|
)
|
|
|
|
|
2014-03-13 16:52:26 +00:00
|
|
|
if(Wayland_Client_FOUND AND XKB_FOUND)
|
2013-05-15 11:47:27 +00:00
|
|
|
set(kwinLibs ${kwinLibs} ${kwin_WAYLAND_LIBS})
|
2014-02-24 13:46:29 +00:00
|
|
|
if(KWIN_HAVE_EGL AND Wayland_Egl_FOUND)
|
2013-06-17 07:35:45 +00:00
|
|
|
set(kwinLibs ${kwinLibs} ${kwin_WAYLAND_EGL_LIBS})
|
|
|
|
endif()
|
2013-05-15 11:47:27 +00:00
|
|
|
endif()
|
|
|
|
|
2013-10-07 23:00:27 +00:00
|
|
|
kf5_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
|
2011-07-17 16:18:22 +00:00
|
|
|
|
|
|
|
target_link_libraries(kdeinit_kwin ${kwinLibs})
|
2012-03-16 07:37:09 +00:00
|
|
|
set_target_properties(kwin PROPERTIES OUTPUT_NAME ${KWIN_NAME})
|
2013-12-06 07:37:16 +00:00
|
|
|
generate_export_header(kdeinit_kwin EXPORT_FILE_NAME kwin_export.h)
|
2011-07-17 16:18:22 +00:00
|
|
|
|
2013-10-14 07:04:03 +00:00
|
|
|
if(KWIN_BUILD_OPENGL)
|
2011-07-17 16:18:22 +00:00
|
|
|
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})
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2013-10-14 07:04:03 +00:00
|
|
|
elseif(KWIN_BUILD_OPENGLES)
|
2011-08-06 13:29:20 +00:00
|
|
|
target_link_libraries(kdeinit_kwin ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES})
|
2012-10-05 07:58:15 +00:00
|
|
|
set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES")
|
2013-02-25 10:14:56 +00:00
|
|
|
endif()
|
2011-07-17 16:18:22 +00:00
|
|
|
|
2008-04-01 16:42:27 +00:00
|
|
|
install(TARGETS kdeinit_kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
2012-07-24 06:17:12 +00:00
|
|
|
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
########### install files ###############
|
|
|
|
|
2012-03-16 07:37:09 +00:00
|
|
|
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg )
|
|
|
|
install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME} RENAME ${KWIN_NAME}.notifyrc)
|
2014-03-07 13:46:11 +00:00
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
org.kde.KWin.xml
|
|
|
|
org.kde.kwin.Compositing.xml
|
|
|
|
org.kde.kwin.Effects.xml
|
|
|
|
DESTINATION
|
|
|
|
${DBUS_INTERFACES_INSTALL_DIR}
|
|
|
|
)
|
2013-12-06 07:37:16 +00:00
|
|
|
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2014-03-04 07:17:44 +00:00
|
|
|
# Install the KWin/Script service type
|
|
|
|
install( FILES scripting/kwinscript.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
|
2012-02-18 09:34:27 +00:00
|
|
|
|
2013-11-04 11:23:45 +00:00
|
|
|
ecm_install_icons( ${ICON_INSTALL_DIR} )
|
2012-05-18 12:03:55 +00:00
|
|
|
|
2014-02-27 14:25:03 +00:00
|
|
|
add_subdirectory(qml)
|
2014-01-30 10:01:59 +00:00
|
|
|
add_subdirectory(autotests)
|
2014-01-30 14:28:12 +00:00
|
|
|
add_subdirectory(tests)
|
2014-03-26 13:51:18 +00:00
|
|
|
add_subdirectory(doc)
|
2014-03-21 15:07:55 +00:00
|
|
|
|
|
|
|
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KWinDBusInterface")
|
2014-03-27 11:31:25 +00:00
|
|
|
ecm_configure_package_config_file(KWinDBusInterfaceConfig.cmake.in
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake"
|
|
|
|
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
2014-03-21 15:07:55 +00:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KWinDBusInterfaceConfig.cmake
|
|
|
|
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|