2014-03-18 13:39:42 +00:00
project ( KWIN )
2016-09-29 10:00:41 +00:00
set ( PROJECT_VERSION "5.8.0" )
2014-08-20 13:43:27 +00:00
set ( PROJECT_VERSION_MAJOR 5 )
2014-03-18 13:39:42 +00:00
cmake_minimum_required ( VERSION 2.8.12 FATAL_ERROR )
2016-05-13 08:21:19 +00:00
set ( QT_MIN_VERSION "5.5.0" )
2016-09-14 13:08:44 +00:00
set ( KF5_MIN_VERSION "5.26.0" )
2014-03-18 13:39:42 +00:00
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 )
2014-04-03 08:15:57 +00:00
include ( GenerateExportHeader )
2014-03-18 13:39:42 +00:00
# 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 } )
find_package ( Qt5 ${ QT_MIN_VERSION } CONFIG REQUIRED COMPONENTS
C o n c u r r e n t
C o r e
D B u s
Q u i c k
2014-10-31 06:53:04 +00:00
Q u i c k W i d g e t s
2014-03-18 13:39:42 +00:00
S c r i p t
U i T o o l s
W i d g e t s
X 1 1 E x t r a s
)
2014-04-16 20:26:01 +00:00
find_package ( Qt5Test ${ QT_MIN_VERSION } CONFIG QUIET )
set_package_properties ( Qt5Test PROPERTIES
P U R P O S E " R e q u i r e d f o r t e s t s "
T Y P E O P T I O N A L
)
add_feature_info ( "Qt5Test" Qt5Test_FOUND "Required for building tests" )
if ( NOT Qt5Test_FOUND )
set ( BUILD_TESTING OFF CACHE BOOL "Build the testing tree." )
endif ( )
include ( KDEInstallDirs )
include ( KDECMakeSettings )
2016-01-28 14:08:23 +00:00
include ( KDECompilerSettings NO_POLICY_SCOPE )
2014-04-16 20:26:01 +00:00
include ( ECMInstallIcons )
2015-02-19 16:12:18 +00:00
include ( ECMOptionalAddSubdirectory )
2014-04-16 20:26:01 +00:00
2015-11-05 14:14:06 +00:00
add_definitions ( -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_USE_QSTRINGBUILDER )
2014-03-18 13:39:42 +00:00
2014-05-14 08:13:23 +00:00
# require at least gcc 4.8
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
if ( "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.8" )
message ( SEND_ERROR "Version ${CMAKE_CXX_COMPILER_VERSION} of the ${CMAKE_CXX_COMPILER_ID} C++ compiler is not supported. Please use version 4.8 or later." )
endif ( )
endif ( )
2014-04-02 10:02:36 +00:00
find_package ( Qt5Multimedia QUIET )
set_package_properties ( Qt5Multimedia PROPERTIES
P U R P O S E " R u n t i m e - o n l y d e p e n d e n c y f o r e f f e c t v i d e o p l a y b a c k "
T Y P E R U N T I M E
)
2014-03-18 13:39:42 +00:00
# required frameworks by Core
2014-09-19 05:44:42 +00:00
find_package ( KF5 ${ KF5_MIN_VERSION } REQUIRED COMPONENTS
2014-03-18 13:39:42 +00:00
C o n f i g
C o n f i g W i d g e t s
C o r e A d d o n s
C r a s h
G l o b a l A c c e l
I 1 8 n
2014-04-03 08:15:57 +00:00
I n i t
2014-03-18 13:39:42 +00:00
N o t i f i c a t i o n s
2015-07-06 14:50:33 +00:00
P a c k a g e
2014-03-18 13:39:42 +00:00
P l a s m a
W i d g e t s A d d o n s
W i n d o w S y s t e m
2015-03-19 00:15:22 +00:00
I c o n T h e m e s
2015-11-06 11:57:24 +00:00
I d l e T i m e
2016-07-01 05:54:53 +00:00
W a y l a n d
2014-03-18 13:39:42 +00:00
)
# required frameworks by config modules
2014-09-19 05:44:42 +00:00
find_package ( KF5 ${ KF5_MIN_VERSION } REQUIRED COMPONENTS
2014-03-18 13:39:42 +00:00
C o m p l e t i o n
2014-04-02 10:02:36 +00:00
D e c l a r a t i v e
2014-03-18 13:39:42 +00:00
K C M U t i l s
K I O
N e w S t u f f
2015-07-07 15:35:57 +00:00
S e r v i c e
2014-03-18 13:39:42 +00:00
X m l G u i
)
2015-03-31 07:30:19 +00:00
find_package ( Threads )
set_package_properties ( Threads PROPERTIES
P U R P O S E " N e e d e d f o r V i r t u a l T e r m i n a l s u p p o r t i n K W i n W a y l a n d "
T Y P E R E Q U I R E D
)
2014-03-18 13:39:42 +00:00
# optional frameworks
2014-09-19 05:44:42 +00:00
find_package ( KF5Activities ${ KF5_MIN_VERSION } CONFIG )
2014-04-23 18:28:30 +00:00
set_package_properties ( KF5Activities PROPERTIES
P U R P O S E " E n a b l e b u i l d i n g o f K W i n w i t h k a c t i v i t i e s s u p p o r t "
T Y P E O P T I O N A L
)
add_feature_info ( "KF5Activities" KF5Activities_FOUND "Enable building of KWin with kactivities support" )
2014-09-19 05:44:42 +00:00
find_package ( KF5DocTools ${ KF5_MIN_VERSION } CONFIG )
2014-04-23 18:28:30 +00:00
set_package_properties ( KF5DocTools PROPERTIES
P U R P O S E " E n a b l e b u i l d i n g d o c u m e n t a t i o n "
T Y P E O P T I O N A L
)
add_feature_info ( "KF5DocTools" KF5DocTools_FOUND "Enable building documentation" )
2014-03-18 13:39:42 +00:00
2014-07-22 11:11:19 +00:00
find_package ( KDecoration2 CONFIG REQUIRED )
2014-09-19 11:59:51 +00:00
2015-11-05 13:09:23 +00:00
find_package ( KScreenLocker CONFIG REQUIRED )
set_package_properties ( KScreenLocker PROPERTIES
T Y P E R E Q U I R E D
P U R P O S E " F o r s c r e e n l o c k e r i n t e g r a t i o n i n k w i n _ w a y l a n d " )
2016-04-07 12:25:42 +00:00
find_package ( Breeze ${ PROJECT_VERSION } CONFIG )
set_package_properties ( Breeze PROPERTIES
T Y P E O P T I O N A L
P U R P O S E " F o r s e t t i n g t h e d e f a u l t w i n d o w d e c o r a t i o n p l u g i n " )
if ( ${ Breeze_FOUND } )
if ( ${ BREEZE_WITH_KDECORATION } )
set ( HAVE_BREEZE_DECO true )
else ( )
set ( HAVE_BREEZE_DECO FALSE )
endif ( )
else ( )
set ( HAVE_BREEZE_DECO FALSE )
endif ( )
add_feature_info ( "Breeze-Decoration" HAVE_BREEZE_DECO "Default decoration plugin Breeze" )
2014-03-18 13:39:42 +00:00
find_package ( EGL )
set_package_properties ( EGL PROPERTIES
2014-02-10 16:34:09 +00:00
T Y P E R U N T I M E
2014-03-18 13:39:42 +00:00
P U R P O S E " R e q u i r e d t o b u i l d K W i n w i t h E G L s u p p o r t "
)
2014-02-10 16:34:09 +00:00
find_package ( epoxy )
set_package_properties ( epoxy PROPERTIES DESCRIPTION "libepoxy"
U R L " h t t p : / / g i t h u b . c o m / a n h o l t / l i b e p o x y "
T Y P E R E Q U I R E D
P U R P O S E " O p e n G L d i s p a t c h l i b r a r y "
)
2015-11-30 07:34:52 +00:00
find_package ( Wayland 1.2 REQUIRED COMPONENTS Cursor OPTIONAL_COMPONENTS Egl )
2014-03-18 13:39:42 +00:00
set_package_properties ( Wayland PROPERTIES
2015-08-10 12:50:45 +00:00
T Y P E R E Q U I R E D
2014-03-18 13:39:42 +00:00
P U R P O S E " R e q u i r e d f o r b u i l d i n g K W i n w i t h W a y l a n d s u p p o r t "
)
2015-11-30 07:34:52 +00:00
add_feature_info ( "Wayland::EGL" Wayland_Egl_FOUND "Enable building of Wayland backend and QPA with EGL support." )
set ( HAVE_WAYLAND_EGL FALSE )
if ( Wayland_Egl_FOUND )
set ( HAVE_WAYLAND_EGL TRUE )
endif ( )
2014-08-19 07:31:31 +00:00
2016-08-29 15:04:13 +00:00
find_package ( XKB 0.5.0 )
2014-03-18 13:39:42 +00:00
set_package_properties ( XKB PROPERTIES
2015-08-10 12:50:45 +00:00
T Y P E R E Q U I R E D
2014-03-18 13:39:42 +00:00
P U R P O S E " R e q u i r e d f o r b u i l d i n g K W i n w i t h W a y l a n d s u p p o r t "
)
2016-08-08 07:18:39 +00:00
find_package ( Libinput 1.2 )
2014-08-14 12:43:57 +00:00
set_package_properties ( Libinput PROPERTIES TYPE OPTIONAL PURPOSE "Required for input handling on Wayland." )
find_package ( UDev )
set_package_properties ( UDev PROPERTIES URL "http://www.freedesktop.org/software/systemd/libudev/"
D E S C R I P T I O N " L i n u x d e v i c e l i b r a r y . "
T Y P E O P T I O N A L
P U R P O S E " R e q u i r e d f o r i n p u t h a n d l i n g o n W a y l a n d . "
)
set ( HAVE_INPUT FALSE )
2015-03-20 11:42:57 +00:00
if ( Libinput_FOUND AND UDEV_FOUND )
2014-08-14 12:43:57 +00:00
set ( HAVE_INPUT TRUE )
endif ( )
2016-07-19 08:51:09 +00:00
set ( HAVE_UDEV FALSE )
if ( UDEV_FOUND )
set ( HAVE_UDEV TRUE )
endif ( )
2014-08-14 12:43:57 +00:00
2015-04-09 12:49:32 +00:00
find_package ( Libdrm )
set_package_properties ( Libdrm PROPERTIES TYPE OPTIONAL PURPOSE "Required for drm output on Wayland." )
set ( HAVE_DRM FALSE )
if ( Libdrm_FOUND AND UDEV_FOUND )
set ( HAVE_DRM TRUE )
endif ( )
2015-04-10 08:44:07 +00:00
find_package ( gbm )
set_package_properties ( gbm PROPERTIES TYPE OPTIONAL PURPOSE "Required for egl ouput of drm backend." )
set ( HAVE_GBM FALSE )
if ( HAVE_DRM AND gbm_FOUND )
set ( HAVE_GBM TRUE )
endif ( )
2015-05-06 15:47:07 +00:00
find_package ( libhybris )
set_package_properties ( libhybris PROPERTIES TYPE OPTIONAL PURPOSE "Required for libhybris backend" )
2015-05-08 11:19:04 +00:00
set ( HAVE_LIBHYBRIS ${ libhybris_FOUND } )
2015-05-06 15:47:07 +00:00
2014-03-18 13:39:42 +00:00
find_package ( X11 )
set_package_properties ( X11 PROPERTIES DESCRIPTION "X11 libraries"
U R L " h t t p : / / w w w . x . o r g "
T Y P E R E Q U I R E D
)
2016-01-13 14:40:02 +00:00
add_feature_info ( "XInput" X11_Xinput_FOUND "Required for poll-free mouse cursor updates" )
set ( HAVE_X11_XINPUT ${ X11_Xinput_FOUND } )
2014-03-18 13:39:42 +00:00
# All the required XCB components
2015-06-04 16:39:04 +00:00
find_package ( XCB 1.10
2014-06-11 05:51:07 +00:00
R E Q U I R E D C O M P O N E N T S
X C B
X F I X E S
D A M A G E
C O M P O S I T E
S H A P E
S Y N C
R E N D E R
R A N D R
K E Y S Y M S
I M A G E
S H M
2014-09-18 15:09:16 +00:00
G L X
2015-06-04 15:50:29 +00:00
C U R S O R
2014-06-11 05:51:07 +00:00
O P T I O N A L _ C O M P O N E N T S
I C C C M
2014-03-18 13:39:42 +00:00
)
set_package_properties ( XCB PROPERTIES TYPE REQUIRED )
# and the optional XCB dependencies
2014-06-11 05:51:07 +00:00
if ( XCB_ICCCM_VERSION VERSION_LESS "0.4" )
set ( XCB_ICCCM_FOUND FALSE )
endif ( )
2014-03-18 13:39:42 +00:00
add_feature_info ( "XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin" )
2015-03-19 10:07:49 +00:00
find_package ( X11_XCB )
set_package_properties ( X11_XCB PROPERTIES
2015-08-11 11:50:35 +00:00
P U R P O S E " R e q u i r e d f o r b u i l d i n g X 1 1 w i n d o w e d b a c k e n d o f k w i n _ w a y l a n d "
2015-03-19 10:07:49 +00:00
T Y P E O P T I O N A L )
2015-08-14 14:52:40 +00:00
# dependencies for QPA plugin
find_package ( Qt5PlatformSupport REQUIRED )
find_package ( Freetype REQUIRED )
set_package_properties ( Freetype PROPERTIES DESCRIPTION "A font rendering engine"
U R L " h t t p : / / w w w . f r e e t y p e . o r g "
T Y P E R E Q U I R E D
P U R P O S E " N e e d e d f o r K W i n ' s Q P A p l u g i n . "
)
find_package ( Fontconfig REQUIRED )
set_package_properties ( Fontconfig PROPERTIES DESCRIPTION "Font access configuration library"
U R L " h t t p : / / w w w . f r e e d e s k t o p . o r g / w i k i / S o f t w a r e / f o n t c o n f i g "
T Y P E R E Q U I R E D
P U R P O S E " N e e d e d f o r K W i n ' s Q P A p l u g i n . "
)
2016-02-03 14:48:13 +00:00
find_package ( Xwayland )
set_package_properties ( Xwayland PROPERTIES
U R L " h t t p : / / x . o r g "
D E S C R I P T I O N " X w a y l a n d X s e r v e r "
T Y P E R U N T I M E
P U R P O S E " N e e d e d f o r r u n n i n g k w i n _ w a y l a n d "
)
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_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 )
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-06-10 10:05:54 +00:00
set ( KWIN_INTERNAL_NAME_X11 "kwin_x11" )
set ( KWIN_INTERNAL_NAME_WAYLAND "kwin_wayland" )
2014-03-18 11:08:14 +00:00
set ( KWIN_SOURCE_DIR ${ CMAKE_CURRENT_SOURCE_DIR } )
2012-03-16 07:37:09 +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 )
2013-02-25 10:14:56 +00:00
endif ( )
2008-01-03 15:22:19 +00:00
2015-08-10 12:50:45 +00:00
include_directories ( ${ XKB_INCLUDE_DIR } )
2014-03-29 08:30:45 +00:00
2014-10-24 19:58:59 +00:00
include_directories ( ${ epoxy_INCLUDE_DIR } )
2015-10-30 10:50:31 +00:00
set ( HAVE_EPOXY_GLX ${ epoxy_HAS_GLX } )
2014-10-24 19:58:59 +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
2015-08-10 12:50:45 +00:00
set ( HAVE_X11_XCB ${ X11_XCB_FOUND } )
2015-05-12 08:03:00 +00:00
2015-12-08 10:42:48 +00:00
include ( CheckIncludeFile )
2014-03-18 13:39:42 +00:00
include ( CheckIncludeFiles )
2015-12-08 10:42:48 +00:00
include ( CheckSymbolExists )
2014-03-18 08:30:40 +00:00
check_include_files ( unistd.h HAVE_UNISTD_H )
check_include_files ( malloc.h HAVE_MALLOC_H )
2015-12-08 10:42:48 +00:00
check_include_file ( "sys/prctl.h" HAVE_SYS_PRCTL_H )
check_symbol_exists ( PR_SET_DUMPABLE "sys/prctl.h" HAVE_PR_SET_DUMPABLE )
Disallow ptrace on greeter and kwin_wayland process on FreeBSD [... for the future]
Summary:
Similar to[[ https://phabricator.kde.org/D1216 | D1216 ]] add procctl call to disable ptrace on FreeBSD.
We cannot do the procfs-lookup to check whether the process is already being run inside gdb -- however, on FreeBSD, we could use the P_TRACED flag of the process to figure this out:
> sys/proc.h:#define P_TRACED 0x00800 /* Debugged process being traced. */
And the code would look something similar to
```
pid_t pid = getpid();
struct procstat *prstat = procstat_open_sysctl();
struct kinfo_proc *procinfo;
unsigned int cnt;
procinfo = procstat_getprocs(prstat, KERN_PROC_PID, pid, &cnt);
long p_flags = procinfo->ki_flag;
int p_traced = p_flags & P_TRACED;
if (p_traced != P_TRACED) {
mode = PROC_TRACE_CTL_DISABLE;
procctl(P_PID, getpid(), PROC_TRACE_CTL, &mode);
}
procstat_freeprocs(prstat,procinfo);
procstat_close(prstat);
```
But as wayland is [far] in the future on FreeBSD, and that check above is a bit lengthy, I think it is enough if we add it once it is needed.
Reviewers: rakuco, graesslin
Reviewed By: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1425
2016-05-10 06:49:58 +00:00
check_include_file ( "sys/procctl.h" HAVE_SYS_PROCCTL_H )
check_symbol_exists ( PROC_TRACE_CTL "sys/procctl.h" HAVE_PROC_TRACE_CTL )
if ( HAVE_PR_SET_DUMPABLE OR HAVE_PROC_TRACE_CTL )
set ( CAN_DISABLE_PTRACE TRUE )
endif ( )
add_feature_info ( "prctl/procctl tracing control"
C A N _ D I S A B L E _ P T R A C E
" R e q u i r e d f o r d i s a l l o w i n g p t r a c e o n k w i n _ w a y l a n d p r o c e s s " )
2015-12-08 10:42:48 +00:00
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
2011-02-19 08:58:44 +00:00
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / l i b k w i n e f f e c t s
2007-06-22 16:32:06 +00:00
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R }
2011-02-19 08:58:44 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / l i b k w i n e f f e c t s
2007-04-29 17:35:43 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / e f f e c t s
2009-09-13 11:36:45 +00:00
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / t a b b o x
2007-04-29 17:35:43 +00:00
)
2011-02-19 08:58:44 +00:00
add_subdirectory ( libkwineffects )
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
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 )
2016-06-20 09:21:16 +00:00
add_subdirectory ( helpers )
2013-02-15 15:47:09 +00:00
2007-04-29 17:35:43 +00:00
########### next target ###############
set ( kwin_KDEINIT_SRCS
w o r k s p a c e . c p p
2012-08-30 06:20:26 +00:00
d b u s i n t e r f a c e . c p p
2015-03-05 09:21:03 +00:00
a b s t r a c t _ c l i e n t . c p p
2007-04-29 17:35:43 +00:00
c l i e n t . c p p
2013-01-07 07:07:27 +00:00
c l i e n t _ m a c h i n e . c p p
2013-02-19 10:25:46 +00:00
c u r s o r . c p p
2016-03-14 09:23:52 +00:00
d e b u g _ c o n s o l e . c p p
2012-01-12 06:42:55 +00:00
t a b g r o u p . c p p
2012-11-20 16:26:50 +00:00
f o c u s c h a i n . c p p
2013-07-10 09:41:16 +00:00
g l o b a l s h o r t c u t s . c p p
2013-06-26 08:15:20 +00:00
i n p u t . c p p
2016-05-24 08:57:57 +00:00
i n p u t _ e v e n t . c p p
2016-02-15 12:42:48 +00:00
k e y b o a r d _ i n p u t . c p p
2016-02-12 12:30:00 +00:00
p o i n t e r _ i n p u t . c p p
2016-02-15 08:36:59 +00:00
t o u c h _ i n p u t . c p p
2013-04-26 08:41:24 +00:00
n e t i n f o . c p p
2007-04-29 17:35:43 +00:00
p l a c e m e n t . c p p
a t o m s . c p p
u t i l s . c p p
l a y e r s . c p p
m a i n . c p p
o p t i o n s . c p p
2011-04-28 09:16:27 +00:00
o u t l i n e . c p p
2007-04-29 17:35:43 +00:00
e v e n t s . c p p
k i l l w i n d o w . c p p
g e o m e t r y t i p . c p p
2013-04-03 10:19:27 +00:00
s c r e e n s . c p p
2011-03-27 10:33:07 +00:00
s h a d o w . c p p
2007-04-29 17:35:43 +00:00
s m . c p p
g r o u p . c p p
m a n a g e . c p p
2011-07-06 09:58:23 +00:00
o v e r l a y w i n d o w . c p p
2007-04-29 17:35:43 +00:00
a c t i v a t i o n . c p p
u s e r a c t i o n s . c p p
g e o m e t r y . c p p
r u l e s . c p p
c o m p o s i t e . c p p
t o p l e v e l . c p p
u n m a n a g e d . c p p
s c e n e . c p p
s c e n e _ x r e n d e r . c p p
s c e n e _ o p e n g l . c p p
2013-06-21 08:03:31 +00:00
s c e n e _ q p a i n t e r . c p p
2016-08-15 06:16:33 +00:00
s c r e e n l o c k e r w a t c h e r . c p p
2011-11-10 13:28:06 +00:00
t h u m b n a i l i t e m . c p p
2010-06-02 20:04:54 +00:00
l a n c z o s f i l t e r . c p p
2007-04-29 17:35:43 +00:00
d e l e t e d . c p p
e f f e c t s . c p p
2014-03-22 08:48:07 +00:00
e f f e c t l o a d e r . c p p
2012-11-16 07:23:47 +00:00
v i r t u a l d e s k t o p s . c p p
2012-12-21 14:11:31 +00:00
x c b u t i l s . c p p
2014-09-02 16:46:07 +00:00
x 1 1 e v e n t f i l t e r . c p p
2014-08-15 07:30:08 +00:00
l o g i n d . c p p
2014-11-21 16:12:50 +00:00
s c r e e n e d g e . c p p
2014-03-04 07:17:44 +00:00
s c r i p t i n g / s c r i p t i n g . c p p
s c r i p t i n g / w o r k s p a c e _ w r a p p e r . c p p
s c r i p t i n g / m e t a . c p p
s c r i p t i n g / s c r i p t e d e f f e c t . c p p
s c r i p t i n g / s c r i p t i n g u t i l s . c p p
s c r i p t i n g / t i m e r . c p p
s c r i p t i n g / s c r i p t i n g _ m o d e l . c p p
s c r i p t i n g / d b u s c a l l . c p p
s c r i p t i n g / s c r e e n e d g e i t e m . c p p
2015-07-31 11:24:56 +00:00
s c r i p t i n g / s c r i p t i n g _ l o g g i n g . c p p
2014-07-22 11:11:19 +00:00
d e c o r a t i o n s / d e c o r a t e d c l i e n t . c p p
d e c o r a t i o n s / d e c o r a t i o n b r i d g e . c p p
2015-03-31 13:26:42 +00:00
d e c o r a t i o n s / d e c o r a t i o n p a l e t t e . c p p
2014-07-22 11:11:19 +00:00
d e c o r a t i o n s / s e t t i n g s . c p p
d e c o r a t i o n s / d e c o r a t i o n r e n d e r e r . c p p
2015-07-31 11:12:43 +00:00
d e c o r a t i o n s / d e c o r a t i o n s _ l o g g i n g . c p p
2015-08-11 08:27:18 +00:00
a b s t r a c t _ e g l _ b a c k e n d . c p p
2016-04-07 07:24:17 +00:00
p l a t f o r m . c p p
2015-08-10 12:50:45 +00:00
s h e l l _ c l i e n t . c p p
w a y l a n d _ s e r v e r . c p p
w a y l a n d _ c u r s o r _ t h e m e . c p p
2016-04-29 13:05:03 +00:00
v i r t u a l k e y b o a r d . c p p
2007-04-29 17:35:43 +00:00
)
2011-06-30 11:02:30 +00:00
if ( KWIN_BUILD_TABBOX )
set (
k w i n _ K D E I N I T _ S R C S $ { k w i n _ K D E I N I T _ S R C S }
2011-07-15 15:22:41 +00:00
t a b b o x / t a b b o x . c p p
2011-06-30 11:02:30 +00:00
t a b b o x / c l i e n t m o d e l . c p p
2012-11-17 10:50:59 +00:00
t a b b o x / d e s k t o p c h a i n . c p p
2011-06-30 11:02:30 +00:00
t a b b o x / d e s k t o p m o d e l . c p p
2013-12-10 06:14:44 +00:00
t a b b o x / s w i t c h e r i t e m . c p p
2011-06-30 11:02:30 +00:00
t a b b o x / t a b b o x c o n f i g . c p p
t a b b o x / t a b b o x h a n d l e r . c p p
2015-07-31 11:03:35 +00:00
t a b b o x / t a b b o x _ l o g g i n g . c p p
2011-06-30 11:02:30 +00:00
)
2013-02-25 10:14:56 +00:00
endif ( )
2011-06-30 11:02:30 +00:00
2013-04-04 14:14:12 +00:00
if ( KWIN_BUILD_ACTIVITIES )
set (
k w i n _ K D E I N I T _ S R C S $ { k w i n _ K D E I N I T _ S R C S }
a c t i v i t i e s . c p p
)
endif ( )
2015-04-08 08:25:51 +00:00
if ( UDEV_FOUND )
set ( kwin_KDEINIT_SRCS
$ { k w i n _ K D E I N I T _ S R C S }
u d e v . c p p
)
endif ( )
2014-08-14 12:43:57 +00:00
if ( HAVE_INPUT )
set ( kwin_KDEINIT_SRCS
$ { k w i n _ K D E I N I T _ S R C S }
l i b i n p u t / c o n t e x t . c p p
l i b i n p u t / c o n n e c t i o n . c p p
[libinput] Add a wrapper class Device for a libinput_device
Summary:
The Device class wraps all the information we can get from libinput
about the device, like whether it's a keyboard, pointer, touch, etc.
In addition some more information is queried to figure out how "useful"
a device is. For a keyboard all alphanumeric keys are checked whether
they exist, for a pointer all (normal) buttons are queried.
All the information is exposed as Q_PROPERTY and used by the
DebugConsole. The DebugConsole gained a new tab "Input Devices" which
renders all devices and their properties in a tree view. When plugging
in/out a device, the model gets reset, so it's always up to date.
The new Device class can be used in future to configure the device,
e.g. disable touch pad, set mouse acceleration, etc.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1538
2016-05-04 11:42:26 +00:00
l i b i n p u t / d e v i c e . c p p
2014-08-14 12:43:57 +00:00
l i b i n p u t / e v e n t s . c p p
2015-07-31 10:43:06 +00:00
l i b i n p u t / l i b i n p u t _ l o g g i n g . c p p
2015-11-27 07:44:59 +00:00
v i r t u a l _ t e r m i n a l . c p p
2014-08-14 12:43:57 +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 )
2014-06-02 06:51:28 +00:00
qt5_add_dbus_adaptor ( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface )
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
2015-02-19 13:38:09 +00:00
ki18n_wrap_ui ( kwin_KDEINIT_SRCS
2016-03-14 09:23:52 +00:00
d e b u g _ c o n s o l e . u i
2013-12-12 13:17:26 +00:00
s h o r t c u t d i a l o g . u i
)
2013-02-25 11:05:36 +00:00
########### target link libraries ###############
set ( kwin_OWN_LIBS
k w i n e f f e c t s
2014-03-16 14:31:23 +00:00
k w i n x r e n d e r u t i l s
2014-01-17 12:46:04 +00:00
k w i n 4 _ e f f e c t _ b u i l t i n s
2013-02-25 11:05:36 +00:00
)
set ( kwin_QT_LIBS
2013-10-02 13:23:56 +00:00
Q t 5 : : C o n c u r r e n t
2013-08-20 06:47:47 +00:00
Q t 5 : : D B u s
2013-08-20 07:10:18 +00:00
Q t 5 : : Q u i c k
2014-03-04 07:17:44 +00:00
Q t 5 : : S c r i p t
2013-08-20 07:10:18 +00:00
Q t 5 : : X 1 1 E x t r a s
2013-02-25 11:05:36 +00:00
)
set ( kwin_KDE_LIBS
2013-12-11 20:41:47 +00:00
K F 5 : : C o n f i g C o r e
K F 5 : : C o r e A d d o n s
2013-12-12 13:17:26 +00:00
K F 5 : : C o n f i g W i d g e t s
2013-12-09 08:33:58 +00:00
K F 5 : : G l o b a l A c c e l
2015-06-26 08:51:11 +00:00
K F 5 : : G l o b a l A c c e l P r i v a t e
2013-12-11 20:41:47 +00:00
K F 5 : : I 1 8 n
K F 5 : : N o t i f i c a t i o n s
2015-07-06 14:50:33 +00:00
K F 5 : : P a c k a g e
2013-10-15 23:36:24 +00:00
K F 5 : : P l a s m a
2013-12-11 20:41:47 +00:00
K F 5 : : W i n d o w S y s t e m
2014-07-22 11:11:19 +00:00
K D e c o r a t i o n 2 : : K D e c o r a t i o n
K D e c o r a t i o n 2 : : K D e c o r a t i o n 2 P r i v a t e
2015-11-05 13:09:23 +00:00
P W : : K S c r e e n L o c k e r
2013-02-25 11:05:36 +00:00
)
set ( kwin_XLIB_LIBS
2013-03-04 07:50:23 +00:00
$ { X 1 1 _ X 1 1 _ L I B }
2013-08-20 06:47:47 +00:00
$ { X 1 1 _ I C E _ L I B }
$ { X 1 1 _ S M _ L I B }
2016-01-19 21:35:14 +00:00
)
2013-02-25 11:05:36 +00:00
set ( kwin_XCB_LIBS
2014-02-25 14:48:39 +00:00
X C B : : X C B
X C B : : X F I X E S
X C B : : D A M A G E
X C B : : C O M P O S I T E
X C B : : S H A P E
X C B : : S Y N C
X C B : : R E N D E R
X C B : : R A N D R
X C B : : K E Y S Y M S
X C B : : S H M
2014-09-18 15:09:16 +00:00
X C B : : G L X
2013-02-25 11:05:36 +00:00
)
2013-05-15 11:47:27 +00:00
set ( kwin_WAYLAND_LIBS
2014-03-13 16:52:26 +00:00
X K B : : X K B
2014-09-19 11:59:51 +00:00
K F 5 : : W a y l a n d C l i e n t
2015-02-09 12:28:37 +00:00
K F 5 : : W a y l a n d S e r v e r
2015-08-10 12:50:45 +00:00
W a y l a n d : : C u r s o r
2015-03-31 07:30:19 +00:00
$ { C M A K E _ T H R E A D _ L I B S _ I N I T }
2013-05-15 11:47:27 +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
2013-02-25 11:05:36 +00:00
set ( kwinLibs
$ { k w i n _ O W N _ L I B S }
$ { k w i n _ Q T _ L I B S }
$ { k w i n _ K D E _ L I B S }
$ { k w i n _ X L I B _ L I B S }
$ { k w i n _ X C B _ L I B S }
2015-08-10 12:50:45 +00:00
$ { k w i n _ W A Y L A N D _ L I B S }
2013-02-25 11:05:36 +00:00
)
2015-04-08 08:25:51 +00:00
if ( UDEV_FOUND )
set ( kwinLibs ${ kwinLibs } ${ UDEV_LIBS } )
endif ( )
2014-08-14 12:43:57 +00:00
if ( HAVE_INPUT )
2015-04-08 08:25:51 +00:00
set ( kwinLibs ${ kwinLibs } Libinput::Libinput )
2014-08-14 12:43:57 +00:00
endif ( )
2014-08-12 07:08:48 +00:00
add_library ( kwin SHARED ${ kwin_KDEINIT_SRCS } )
2011-07-17 16:18:22 +00:00
2014-08-12 07:08:48 +00:00
set_target_properties ( kwin PROPERTIES
2014-08-20 13:43:27 +00:00
V E R S I O N $ { P R O J E C T _ V E R S I O N }
S O V E R S I O N $ { P R O J E C T _ V E R S I O N _ M A J O R }
2014-08-12 07:08:48 +00:00
)
target_link_libraries ( kwin ${ kwinLibs } )
generate_export_header ( kwin EXPORT_FILE_NAME kwin_export.h )
2011-07-17 16:18:22 +00:00
2015-10-30 12:47:37 +00:00
target_link_libraries ( kwin kwinglutils ${ epoxy_LIBRARY } )
# -ldl used by OpenGL code
find_library ( DL_LIBRARY dl )
if ( DL_LIBRARY )
target_link_libraries ( kwin ${ DL_LIBRARY } )
2013-02-25 10:14:56 +00:00
endif ( )
2011-07-17 16:18:22 +00:00
2014-08-12 07:08:48 +00:00
kf5_add_kdeinit_executable ( kwin_x11 main_x11.cpp )
2016-05-06 14:28:29 +00:00
target_link_libraries ( kdeinit_kwin_x11 kwin KF5::Crash )
2014-08-12 07:08:48 +00:00
2014-08-25 10:49:03 +00:00
install ( TARGETS kwin ${ INSTALL_TARGETS_DEFAULT_ARGS } LIBRARY NAMELINK_SKIP )
2014-08-12 07:08:48 +00:00
install ( TARGETS kdeinit_kwin_x11 ${ INSTALL_TARGETS_DEFAULT_ARGS } )
install ( TARGETS kwin_x11 ${ INSTALL_TARGETS_DEFAULT_ARGS } )
2015-08-10 12:50:45 +00:00
add_executable ( kwin_wayland main_wayland.cpp )
target_link_libraries ( kwin_wayland kwin )
2014-08-12 07:08:48 +00:00
2015-08-10 12:50:45 +00:00
install ( TARGETS kwin_wayland ${ INSTALL_TARGETS_DEFAULT_ARGS } )
2015-05-05 15:58:09 +00:00
2015-08-10 12:50:45 +00:00
add_subdirectory ( plugins )
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 )
2014-04-26 21:27:35 +00:00
install ( FILES kwin.notifyrc DESTINATION ${ KNOTIFYRC_INSTALL_DIR } RENAME ${ KWIN_NAME } .notifyrc )
2014-03-07 13:46:11 +00:00
install (
F I L E S
o r g . k d e . K W i n . x m l
o r g . k d e . k w i n . C o m p o s i t i n g . x m l
o r g . k d e . k w i n . E f f e c t s . x m l
D E S T I N A T I O N
2015-10-28 17:15:36 +00:00
$ { K D E _ I N S T A L L _ D B U S I N T E R F A C E D I R }
2014-03-07 13:46:11 +00:00
)
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
2014-05-22 14:38:07 +00:00
ecm_install_icons (
I C O N S
1 6 - a p p s - k w i n . p n g
3 2 - a p p s - k w i n . p n g
4 8 - a p p s - k w i n . p n g
s c - a p p s - k w i n . s v g z
D E S T I N A T I O N
$ { I C O N _ I N S T A L L _ D I R }
T H E M E
2014-06-27 11:20:49 +00:00
h i c o l o r
2014-05-22 14:38:07 +00:00
)
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-04-03 08:15:57 +00:00
if ( KF5DocTools_FOUND )
add_subdirectory ( doc )
endif ( )
2014-03-21 15:07:55 +00:00
2015-03-22 21:25:38 +00:00
feature_summary ( WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES )
2014-12-02 08:58:29 +00:00
include ( ECMPackageConfigHelpers )
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
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / K W i n D B u s I n t e r f a c e C o n f i g . c m a k e "
2015-10-28 17:15:36 +00:00
P A T H _ V A R S K D E _ I N S T A L L _ D B U S I N T E R F A C E D I R
2014-03-27 11:31:25 +00:00
I N S T A L L _ D E S T I N A T I O N $ { C M A K E C O N F I G _ I N S T A L L _ D I R } )
2014-03-21 15:07:55 +00:00
install ( FILES ${ CMAKE_CURRENT_BINARY_DIR } /KWinDBusInterfaceConfig.cmake
D E S T I N A T I O N $ { C M A K E C O N F I G _ I N S T A L L _ D I R } )