2014-03-18 17:39:42 +04:00
project ( KWIN )
cmake_minimum_required ( VERSION 2.8.12 FATAL_ERROR )
2014-05-20 16:16:49 +04:00
set ( QT_MIN_VERSION "5.3.0" )
2014-03-18 17:39:42 +04:00
2014-03-26 20:47:15 +04:00
set ( CMAKE_MODULE_PATH ${ CMAKE_CURRENT_SOURCE_DIR } /cmake/modules ${ CMAKE_MODULE_PATH } )
2014-03-18 17:39:42 +04:00
find_package ( ECM 0.0.11 REQUIRED NO_MODULE )
include ( FeatureSummary )
include ( WriteBasicConfigVersionFile )
2014-04-03 12:15:57 +04:00
include ( GenerateExportHeader )
2014-03-18 17:39:42 +04: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
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-17 00:26:01 +04: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 )
include ( KDECompilerSettings )
include ( ECMInstallIcons )
2014-03-18 17:39:42 +04:00
add_definitions ( -DQT_DISABLE_DEPRECATED_BEFORE=0 )
2014-05-14 12:13:23 +04: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 14:02:36 +04: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 17:39:42 +04:00
# required frameworks by Core
2014-04-26 14:03:30 +04:00
find_package ( KF5 REQUIRED COMPONENTS
2014-03-18 17:39:42 +04: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 12:15:57 +04:00
I n i t
2014-03-18 17:39:42 +04:00
N o t i f i c a t i o n s
S e r v i c e
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
)
# required frameworks by config modules
2014-04-26 14:03:30 +04:00
find_package ( KF5 REQUIRED COMPONENTS
2014-03-18 17:39:42 +04:00
C o m p l e t i o n
2014-04-02 14:02:36 +04:00
D e c l a r a t i v e
2014-03-18 17:39:42 +04:00
K C M U t i l s
K I O
N e w S t u f f
X m l G u i
)
# optional frameworks
2014-04-23 22:28:30 +04:00
find_package ( KF5Activities CONFIG )
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" )
find_package ( KF5DocTools CONFIG )
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 17:39:42 +04:00
if ( ${ Qt5Gui_OPENGL_IMPLEMENTATION } STREQUAL "GL" )
find_package ( OpenGL )
set_package_properties ( OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries"
U R L " h t t p : / / w w w . o p e n g l . o r g "
T Y P E R E Q U I R E D
)
else ( )
find_package ( OpenGLES )
set_package_properties ( OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries"
U R L " h t t p : / / w w w . k h r o n o s . o r g / o p e n g l e s "
T Y P E R E Q U I R E D
)
endif ( )
find_package ( EGL )
set_package_properties ( EGL PROPERTIES
T Y P E R E Q U I R E D
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 "
)
find_package ( Wayland 1.2 COMPONENTS Client Egl Cursor )
set_package_properties ( Wayland PROPERTIES
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 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 "
)
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" )
2014-04-28 14:07:28 +04:00
find_package ( XKB 0.4.1 )
2014-03-18 17:39:42 +04:00
set_package_properties ( XKB PROPERTIES
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 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 "
)
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
)
# All the required XCB components
find_package ( XCB REQUIRED COMPONENTS
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
X T E S T
)
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 18:22:19 +03:00
########### configure tests ###############
2013-11-15 16:37:47 +04: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 19:51:52 +04:00
option ( KWIN_BUILD_KAPPMENU "Enable building of KWin with application menu support" OFF )
2013-11-15 16:37:47 +04:00
option ( KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON )
2014-02-13 23:06:33 +04:00
cmake_dependent_option ( KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF )
2013-11-25 16:59:45 +04:00
option ( KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." OFF )
2011-07-06 19:42:24 +04:00
2014-04-04 15:24:35 +04:00
option ( KWIN_BUILD_COVERAGE "Build KWin with gcov support" OFF )
if ( KWIN_BUILD_COVERAGE )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage" )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov" )
endif ( )
2012-03-16 11:37:09 +04:00
# Binary name of KWin
set ( KWIN_NAME "kwin" )
2014-03-18 13:52:45 +04:00
set ( KWIN_VERSION_MAJOR 4 )
2014-05-09 18:55:07 +04:00
set ( KWIN_VERSION_MINOR 96 )
2014-03-29 04:45:23 +04:00
set ( KWIN_VERSION_PATCH 0 )
2014-03-18 13:52:45 +04:00
set ( KWIN_VERSION ${ KWIN_VERSION_MAJOR } . ${ KWIN_VERSION_MINOR } . ${ KWIN_VERSION_PATCH } )
2014-03-18 15:08:14 +04:00
set ( KWIN_SOURCE_DIR ${ CMAKE_CURRENT_SOURCE_DIR } )
2012-03-16 11:37:09 +04:00
2014-03-18 17:39:42 +04:00
set ( GENERIC_LIB_SOVERSION ${ KWIN_VERSION_MAJOR } )
set ( GENERIC_LIB_VERSION "${KWIN_VERSION_MAJOR}.${KWIN_VERSION_MINOR}.${KWIN_VERSION_PATCH}" )
2011-07-06 19:42:24 +04:00
if ( KWIN_PLASMA_ACTIVE )
set ( KWIN_BUILD_DECORATIONS OFF )
set ( KWIN_BUILD_KCMS OFF )
2011-07-07 20:29:11 +04:00
set ( KWIN_BUILD_SCREENEDGES OFF )
2011-07-07 21:17:00 +04:00
set ( KWIN_BUILD_XRENDER_COMPOSITING OFF )
2011-07-06 19:42:24 +04:00
set ( KWIN_BUILD_WITH_OPENGLES ON )
2012-03-16 11:37:09 +04:00
set ( KWIN_NAME "kwinactive" )
2013-02-25 14:14:56 +04:00
endif ( )
2011-07-06 19:50:30 +04:00
2012-11-09 16:44:50 +04:00
cmake_dependent_option ( KWIN_BUILD_KAPPMENU "Build without appmenu support" ON "KWIN_BUILD_DECORATIONS" FALSE )
2013-10-14 11:04:03 +04: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 12:36:50 +04:00
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled
if ( KWIN_BUILD_XRENDER_COMPOSITING )
2008-01-03 18:22:19 +03:00
set ( KWIN_HAVE_XRENDER_COMPOSITING 1 )
2013-02-25 14:14:56 +04:00
endif ( )
2008-01-03 18:22:19 +03:00
2013-10-14 11:04:03 +04:00
if ( KWIN_BUILD_OPENGL )
2010-03-05 21:30:04 +03:00
include_directories ( ${ OPENGL_INCLUDE_DIR } )
2013-02-25 14:14:56 +04:00
endif ( )
2010-03-05 21:30:04 +03:00
2014-02-24 17:07:03 +04:00
set ( KWIN_HAVE_EGL ${ EGL_FOUND } )
2012-09-29 15:19:35 +04:00
2013-10-14 11:04:03 +04:00
if ( KWIN_BUILD_OPENGLES )
2010-09-14 23:40:51 +04:00
include_directories ( ${ OPENGLES_INCLUDE_DIR } )
2013-02-25 14:14:56 +04:00
endif ( )
2010-09-14 23:40:51 +04:00
2014-03-29 12:30:45 +04:00
if ( XKB_FOUND )
include_directories ( ${ XKB_INCLUDE_DIR } )
endif ( )
2008-01-03 18:22:19 +03:00
# for things that are also used by kwin libraries
2011-02-19 11:58:44 +03:00
configure_file ( libkwineffects/kwinconfig.h.cmake ${ CMAKE_CURRENT_BINARY_DIR } /libkwineffects/kwinconfig.h )
2008-01-03 18:22:19 +03:00
# for kwin internal things
2014-03-20 15:54:24 +04:00
if ( Wayland_Client_FOUND AND XKB_FOUND )
set ( HAVE_WAYLAND ${ Wayland_Client_FOUND } )
2013-07-02 13:44:18 +04:00
set ( HAVE_XKB ${ XKB_FOUND } )
2014-03-19 14:02:39 +04:00
set ( HAVE_WAYLAND_EGL ${ Wayland_Egl_FOUND } )
2013-07-02 13:44:18 +04:00
else ( )
2014-03-20 15:54:24 +04:00
set ( HAVE_WAYLAND FALSE )
2013-07-02 13:44:18 +04:00
set ( HAVE_XKB FALSE )
2014-03-19 14:02:39 +04:00
set ( HAVE_WAYLAND_EGL FALSE )
2013-07-02 13:44:18 +04:00
endif ( )
2014-03-18 12:30:40 +04:00
2014-03-18 17:39:42 +04:00
include ( CheckIncludeFiles )
2014-03-18 12:30:40 +04:00
check_include_files ( unistd.h HAVE_UNISTD_H )
check_include_files ( malloc.h HAVE_MALLOC_H )
2008-01-03 18:22:19 +03:00
configure_file ( config-kwin.h.cmake ${ CMAKE_CURRENT_BINARY_DIR } /config-kwin.h )
########### global ###############
2014-03-19 11:10:45 +04:00
set ( kwin_effects_dbus_xml ${ CMAKE_CURRENT_SOURCE_DIR } /org.kde.kwin.Effects.xml )
2007-04-29 21:35:43 +04:00
2011-08-11 20:03:01 +04:00
include_directories ( BEFORE
2013-12-04 13:31:52 +04: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 d e c o r a t i o n s
2011-02-19 11:58:44 +03: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 20:32:06 +04: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 11:58:44 +03: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
2011-02-19 11:34:20 +03: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 d e c o r a t i o n s
2007-04-29 21:35:43 +04: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 15:36:45 +04: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 21:35:43 +04:00
)
2011-02-19 11:34:20 +03:00
add_subdirectory ( libkdecorations )
2011-02-19 11:58:44 +03:00
add_subdirectory ( libkwineffects )
2007-06-22 20:32:06 +04:00
add_subdirectory ( killer )
2011-05-01 15:27:13 +04:00
if ( KWIN_BUILD_KCMS )
add_subdirectory ( kcmkwin )
2013-02-25 14:14:56 +04:00
endif ( )
2011-04-28 18:18:15 +04:00
if ( KWIN_BUILD_DECORATIONS )
add_subdirectory ( clients )
2013-02-25 14:14:56 +04:00
endif ( )
2014-01-16 22:18:54 +04:00
add_subdirectory ( data )
2007-06-22 20:32:06 +04:00
2008-06-06 15:07:15 +04:00
add_subdirectory ( effects )
2012-02-18 15:42:36 +04:00
add_subdirectory ( scripts )
2012-02-12 18:15:54 +04:00
add_subdirectory ( tabbox )
2014-03-04 11:17:44 +04:00
add_subdirectory ( scripting )
2013-02-15 19:47:09 +04:00
2013-09-02 12:34:00 +04:00
add_definitions ( -DKDE_DEFAULT_DEBUG_AREA=1212 )
2007-04-29 21:35:43 +04:00
########### next target ###############
set ( kwin_KDEINIT_SRCS
w o r k s p a c e . c p p
2012-08-30 10:20:26 +04:00
d b u s i n t e r f a c e . c p p
2007-04-29 21:35:43 +04:00
c l i e n t . c p p
2013-01-07 11:07:27 +04:00
c l i e n t _ m a c h i n e . c p p
2013-02-19 14:25:46 +04:00
c u r s o r . c p p
2012-01-12 10:42:55 +04:00
t a b g r o u p . c p p
2012-11-20 20:26:50 +04:00
f o c u s c h a i n . c p p
2013-07-10 13:41:16 +04:00
g l o b a l s h o r t c u t s . c p p
2013-06-26 12:15:20 +04:00
i n p u t . c p p
2013-04-26 12:41:24 +04:00
n e t i n f o . c p p
2007-04-29 21:35:43 +04: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 13:16:27 +04:00
o u t l i n e . c p p
2013-04-08 13:16:48 +04:00
d e c o r a t i o n s . c p p
2007-04-29 21:35:43 +04: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 14:19:27 +04:00
s c r e e n s . c p p
2011-03-27 14:33:07 +04:00
s h a d o w . c p p
2007-04-29 21:35:43 +04:00
s m . c p p
g r o u p . c p p
b r i d g e . c p p
m a n a g e . c p p
2011-07-06 13:58:23 +04:00
o v e r l a y w i n d o w . c p p
2007-04-29 21:35:43 +04: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 12:03:31 +04:00
s c e n e _ q p a i n t e r . c p p
2012-08-26 19:14:23 +04:00
g l x b a c k e n d . c p p
2011-11-10 17:28:06 +04:00
t h u m b n a i l i t e m . c p p
2010-06-03 00:04:54 +04:00
l a n c z o s f i l t e r . c p p
2007-04-29 21:35:43 +04:00
d e l e t e d . c p p
e f f e c t s . c p p
2014-03-22 12:48:07 +04:00
e f f e c t l o a d e r . c p p
2007-09-18 17:59:06 +04:00
c o m p o s i t i n g p r e f s . c p p
2009-04-22 21:29:56 +04:00
p a i n t r e d i r e c t o r . c p p
2012-11-16 11:23:47 +04:00
v i r t u a l d e s k t o p s . c p p
2012-12-21 18:11:31 +04:00
x c b u t i l s . c p p
2014-03-04 11:17:44 +04: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
2007-04-29 21:35:43 +04:00
)
2011-06-30 15:02:30 +04: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 19:22:41 +04:00
t a b b o x / t a b b o x . c p p
2011-06-30 15:02:30 +04:00
t a b b o x / c l i e n t m o d e l . c p p
2012-11-17 14:50:59 +04: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 15:02:30 +04: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 10:14:44 +04: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 15:02:30 +04: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
)
2013-02-25 14:14:56 +04:00
endif ( )
2011-06-30 15:02:30 +04:00
2011-07-07 20:29:11 +04:00
if ( KWIN_BUILD_SCREENEDGES )
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 }
s c r e e n e d g e . c p p
)
2013-02-25 14:14:56 +04:00
endif ( )
2011-07-07 20:29:11 +04:00
2013-03-15 19:49:20 +04:00
if ( KWIN_BUILD_KAPPMENU )
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 p p m e n u . c p p
)
2014-01-07 17:06:56 +04:00
qt5_add_dbus_interface ( kwin_KDEINIT_SRCS
2014-03-26 20:49:15 +04:00
$ { C M A K E _ S O U R C E _ D I R } / p l a s m a - w o r k s p a c e / a p p m e n u / o r g . k d e . k a p p m e n u . x m l a p p m e n u _ i n t e r f a c e )
2013-03-15 19:49:20 +04:00
endif ( )
2013-04-04 18:14:12 +04: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 ( )
2012-09-29 15:19:35 +04:00
if ( KWIN_HAVE_EGL )
set ( kwin_KDEINIT_SRCS ${ kwin_KDEINIT_SRCS } eglonxbackend.cpp )
2013-02-25 14:14:56 +04:00
endif ( )
2012-09-29 15:19:35 +04:00
2014-03-13 20:52:26 +04:00
if ( Wayland_Client_FOUND AND XKB_FOUND )
2013-06-17 11:35:45 +04:00
set ( kwin_KDEINIT_SRCS ${ kwin_KDEINIT_SRCS } wayland_backend.cpp )
2014-02-24 17:46:29 +04:00
if ( KWIN_HAVE_EGL AND Wayland_Egl_FOUND )
2013-06-17 11:35:45 +04:00
set ( kwin_KDEINIT_SRCS ${ kwin_KDEINIT_SRCS } egl_wayland_backend.cpp )
endif ( )
2013-05-15 15:47:27 +04:00
endif ( )
2013-11-26 22:51:13 +04:00
kconfig_add_kcfg_files ( kwin_KDEINIT_SRCS settings.kcfgc )
2013-01-24 18:25:34 +04:00
2013-11-26 22:51:13 +04: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 19:09:20 +04:00
qt5_add_dbus_adaptor ( kwin_KDEINIT_SRCS ${ kwin_effects_dbus_xml } effects.h KWin::EffectsHandlerImpl )
2007-04-29 21:35:43 +04:00
2014-03-24 19:30:22 +04:00
qt5_add_dbus_interface ( kwin_KDEINIT_SRCS ${ CMAKE_CURRENT_SOURCE_DIR } /org.freedesktop.ScreenSaver.xml screenlocker_interface )
2010-06-11 18:26:41 +04:00
2013-11-15 16:37:47 +04:00
qt5_add_resources ( kwin_KDEINIT_SRCS resources.qrc )
2007-04-29 21:35:43 +04:00
2014-03-18 14:06:56 +04:00
qt5_wrap_ui ( kwin_KDEINIT_SRCS
2013-12-12 17:17:26 +04:00
s h o r t c u t d i a l o g . u i
)
2013-02-25 15:05:36 +04:00
########### target link libraries ###############
set ( kwin_OWN_LIBS
k d e c o r a t i o n s
k w i n e f f e c t s
2014-03-16 18:31:23 +04:00
k w i n x r e n d e r u t i l s
2014-01-17 16:46:04 +04:00
k w i n 4 _ e f f e c t _ b u i l t i n s
2013-02-25 15:05:36 +04:00
)
set ( kwin_QT_LIBS
2013-10-02 17:23:56 +04:00
Q t 5 : : C o n c u r r e n t
2013-08-20 10:47:47 +04:00
Q t 5 : : D B u s
2013-08-20 11:10:18 +04:00
Q t 5 : : Q u i c k
2014-03-04 11:17:44 +04:00
Q t 5 : : S c r i p t
2013-08-20 11:10:18 +04:00
Q t 5 : : X 1 1 E x t r a s
2013-02-25 15:05:36 +04:00
)
set ( kwin_KDE_LIBS
2013-12-12 00:41:47 +04: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 17:17:26 +04:00
K F 5 : : C o n f i g W i d g e t s
2013-12-12 00:41:47 +04:00
K F 5 : : C r a s h
2013-12-09 12:33:58 +04:00
K F 5 : : G l o b a l A c c e l
2013-12-12 00:41:47 +04:00
K F 5 : : I 1 8 n
K F 5 : : N o t i f i c a t i o n s
K F 5 : : S e r v i c e
2013-10-16 03:36:24 +04:00
K F 5 : : P l a s m a
2013-12-12 00:41:47 +04:00
K F 5 : : W i n d o w S y s t e m
2013-02-25 15:05:36 +04:00
)
set ( kwin_XLIB_LIBS
2013-03-04 11:50:23 +04:00
$ { X 1 1 _ X 1 1 _ L I B }
2013-11-11 14:30:59 +04:00
$ { X 1 1 _ X e x t _ L I B }
2013-02-25 15:05:36 +04:00
$ { X 1 1 _ X c u r s o r _ L I B }
2013-08-20 10:47:47 +04:00
$ { X 1 1 _ I C E _ L I B }
$ { X 1 1 _ S M _ L I B }
2013-02-25 15:05:36 +04:00
)
set ( kwin_XCB_LIBS
2014-02-25 18:48:39 +04: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-03-18 19:39:34 +04:00
X C B : : X T E S T
2013-02-25 15:05:36 +04:00
)
2013-05-15 15:47:27 +04:00
set ( kwin_WAYLAND_LIBS
2014-02-24 17:46:29 +04:00
W a y l a n d : : C l i e n t
2013-06-27 11:58:04 +04:00
W a y l a n d : : C u r s o r
2014-02-25 18:48:39 +04:00
X C B : : X T E S T
2014-03-13 20:52:26 +04:00
X K B : : X K B
2013-05-15 15:47:27 +04:00
)
2013-06-17 11:35:45 +04:00
set ( kwin_WAYLAND_EGL_LIBS
2014-02-24 17:46:29 +04:00
W a y l a n d : : E g l
2013-06-17 11:35:45 +04:00
)
2013-02-25 15:05:36 +04:00
set ( kwin_OPENGL_LIBS )
2011-07-10 12:48:25 +04:00
2012-03-30 00:10:40 +04:00
find_library ( XF86VM_LIBRARY Xxf86vm )
if ( XF86VM_LIBRARY )
2013-02-25 15:05:36 +04:00
set ( kwin_XLIB_LIBS ${ kwin_XLIB_LIBS } ${ XF86VM_LIBRARY } )
2013-02-25 17:47:07 +04:00
else ( )
2012-03-30 00:10:40 +04:00
add_definitions ( -DKWIN_NO_XF86VM )
2013-02-25 14:14:56 +04:00
endif ( )
2012-03-30 00:10:40 +04:00
2012-02-26 14:38:16 +04:00
if ( KWIN_BUILD_ACTIVITIES )
2014-02-13 23:06:33 +04:00
set ( kwin_KDE_LIBS ${ kwin_KDE_LIBS } KF5::Activities )
2013-02-25 14:14:56 +04:00
endif ( )
2012-02-26 14:38:16 +04:00
2014-02-24 17:07:03 +04:00
if ( KWIN_HAVE_EGL )
set ( kwin_OPENGL_LIBS ${ kwin_OPENGL_LIBS } EGL::EGL )
2013-02-25 14:14:56 +04:00
endif ( )
2012-09-29 15:19:35 +04:00
2013-02-25 15:05:36 +04: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 }
$ { k w i n _ O P E N G L _ L I B S }
)
2014-03-13 20:52:26 +04:00
if ( Wayland_Client_FOUND AND XKB_FOUND )
2013-05-15 15:47:27 +04:00
set ( kwinLibs ${ kwinLibs } ${ kwin_WAYLAND_LIBS } )
2014-02-24 17:46:29 +04:00
if ( KWIN_HAVE_EGL AND Wayland_Egl_FOUND )
2013-06-17 11:35:45 +04:00
set ( kwinLibs ${ kwinLibs } ${ kwin_WAYLAND_EGL_LIBS } )
endif ( )
2013-05-15 15:47:27 +04:00
endif ( )
2013-10-08 03:00:27 +04:00
kf5_add_kdeinit_executable ( kwin ${ kwin_KDEINIT_SRCS } )
2011-07-17 20:18:22 +04:00
target_link_libraries ( kdeinit_kwin ${ kwinLibs } )
2012-03-16 11:37:09 +04:00
set_target_properties ( kwin PROPERTIES OUTPUT_NAME ${ KWIN_NAME } )
2013-12-06 11:37:16 +04:00
generate_export_header ( kdeinit_kwin EXPORT_FILE_NAME kwin_export.h )
2011-07-17 20:18:22 +04:00
2013-10-14 11:04:03 +04:00
if ( KWIN_BUILD_OPENGL )
2011-07-17 20:18:22 +04: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 14:14:56 +04:00
endif ( )
2013-10-14 11:04:03 +04:00
elseif ( KWIN_BUILD_OPENGLES )
2011-08-06 17:29:20 +04:00
target_link_libraries ( kdeinit_kwin ${ kwinLibs } kwinglesutils ${ OPENGLES_LIBRARIES } )
2012-10-05 11:58:15 +04:00
set_target_properties ( kdeinit_kwin PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES" )
2013-02-25 14:14:56 +04:00
endif ( )
2011-07-17 20:18:22 +04:00
2008-04-01 20:42:27 +04:00
install ( TARGETS kdeinit_kwin ${ INSTALL_TARGETS_DEFAULT_ARGS } )
2012-07-24 10:17:12 +04:00
install ( TARGETS kwin ${ INSTALL_TARGETS_DEFAULT_ARGS } )
2007-04-29 21:35:43 +04:00
########### install files ###############
2012-03-16 11:37:09 +04:00
install ( FILES kwin.kcfg DESTINATION ${ KCFG_INSTALL_DIR } RENAME ${ KWIN_NAME } .kcfg )
2014-04-27 01:27:35 +04:00
install ( FILES kwin.notifyrc DESTINATION ${ KNOTIFYRC_INSTALL_DIR } RENAME ${ KWIN_NAME } .notifyrc )
2014-03-07 17:46:11 +04: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
$ { D B U S _ I N T E R F A C E S _ I N S T A L L _ D I R }
)
2013-12-06 11:37:16 +04:00
install ( FILES ${ CMAKE_CURRENT_BINARY_DIR } /kwin_export.h DESTINATION ${ INCLUDE_INSTALL_DIR } COMPONENT Devel )
2007-04-29 21:35:43 +04:00
2014-03-04 11:17:44 +04:00
# Install the KWin/Script service type
install ( FILES scripting/kwinscript.desktop DESTINATION ${ SERVICETYPES_INSTALL_DIR } )
2012-02-18 13:34:27 +04:00
2013-11-04 15:23:45 +04:00
ecm_install_icons ( ${ ICON_INSTALL_DIR } )
2012-05-18 16:03:55 +04:00
2014-02-27 18:25:03 +04:00
add_subdirectory ( qml )
2014-01-30 14:01:59 +04:00
add_subdirectory ( autotests )
2014-01-30 18:28:12 +04:00
add_subdirectory ( tests )
2014-04-03 12:15:57 +04:00
if ( KF5DocTools_FOUND )
add_subdirectory ( doc )
endif ( )
2014-03-21 19:07:55 +04:00
set ( CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KWinDBusInterface" )
2014-03-27 15:31:25 +04: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 "
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 19:07:55 +04: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 } )