~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kwin/effects/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# the factory macros cause errors
 
2
kde4_no_enable_final(kwineffects)
 
3
 
 
4
# Uncomment to have the test effects built as well
 
5
#add_subdirectory( _test )
 
6
 
 
7
# Adds effect plugin with given name. Sources are given after the name
 
8
macro( KWIN4_ADD_EFFECT name )
 
9
    kde4_add_plugin( kwin4_effect_${name} ${ARGN} )
 
10
    target_link_libraries( kwin4_effect_${name} kwineffects ${KDE4_KDEUI_LIBS} kephal ${KDE4_PLASMA_LIBS} ${X11_Xfixes_LIB} ${X11_Xcursor_LIB})
 
11
    if (X11_Xfixes_FOUND)
 
12
        target_link_libraries(kwin4_effect_${name} ${X11_Xfixes_LIB})
 
13
    endif (X11_Xfixes_FOUND)
 
14
    install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
 
15
endmacro( KWIN4_ADD_EFFECT )
 
16
 
 
17
macro( KWIN4_ADD_EFFECT_CONFIG name )
 
18
    set( kwin4_effect_ui ) # Initially empty
 
19
    set( kwin4_effect_src ) # Initially empty
 
20
 
 
21
    foreach( file ${ARGN} )
 
22
        if( file MATCHES \\.ui )
 
23
            set( kwin4_effect_ui ${kwin4_effect_ui} ${file} )
 
24
        else( file MATCHES \\.ui )
 
25
            set( kwin4_effect_src ${kwin4_effect_src} ${file} )
 
26
        endif( file MATCHES \\.ui )
 
27
    endforeach( file )
 
28
 
 
29
    kde4_add_ui_files( kwin4_effect_src ${kwin4_effect_ui} )
 
30
    kde4_add_plugin( kcm_kwin4_effect_${name} ${kwin4_effect_src} )
 
31
    target_link_libraries( kcm_kwin4_effect_${name} kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS} kephal )
 
32
    install( TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} )
 
33
endmacro( KWIN4_ADD_EFFECT_CONFIG )
 
34
 
 
35
macro( KWIN4_EFFECT_LINK_XRENDER name )
 
36
    if( KWIN_HAVE_XRENDER_COMPOSITING )
 
37
        target_link_libraries( kwin4_effect_${name} ${X11_Xrender_LIB} ${X11_LIBRARIES} kephal )
 
38
    endif( KWIN_HAVE_XRENDER_COMPOSITING )
 
39
endmacro( KWIN4_EFFECT_LINK_XRENDER )
 
40
 
 
41
# Make sure we can see our libraries
 
42
include_directories(
 
43
    ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/lib
 
44
    )
 
45
 
 
46
# Install the KWin/Effect service type
 
47
install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
 
48
 
 
49
# Create initial variables
 
50
set( kwin4_effect_builtins_sources )
 
51
if( NOT KWIN_MOBILE_EFFECTS )
 
52
    set( kwin4_effect_builtins_config_sources configs_builtins.cpp )
 
53
endif( NOT KWIN_MOBILE_EFFECTS )
 
54
set( kwin4_effect_include_directories )
 
55
 
 
56
###############################################################################
 
57
# Built-in effects go here
 
58
 
 
59
# Common effects
 
60
include( dialogparent/CMakeLists.txt )
 
61
include( fade/CMakeLists.txt )
 
62
include( login/CMakeLists.txt )
 
63
include( outline/CMakeLists.txt )
 
64
include( presentwindows/CMakeLists.txt )
 
65
include( slidingpopups/CMakeLists.txt )
 
66
include( taskbarthumbnail/CMakeLists.txt )
 
67
 
 
68
# Common effects only relevant to desktop
 
69
if( NOT KWIN_MOBILE_EFFECTS )
 
70
    include( boxswitch/CMakeLists.txt )
 
71
    include( dashboard/CMakeLists.txt )
 
72
    include( desktopgrid/CMakeLists.txt )
 
73
    include( diminactive/CMakeLists.txt )
 
74
    include( dimscreen/CMakeLists.txt )
 
75
    include( fadedesktop/CMakeLists.txt )
 
76
    include( fallapart/CMakeLists.txt )
 
77
    include( highlightwindow/CMakeLists.txt )
 
78
    include( magiclamp/CMakeLists.txt )
 
79
    include( translucency/CMakeLists.txt )
 
80
    include( minimizeanimation/CMakeLists.txt )
 
81
    include( resize/CMakeLists.txt )
 
82
    include( scalein/CMakeLists.txt )
 
83
    include( showfps/CMakeLists.txt )
 
84
    include( showpaint/CMakeLists.txt )
 
85
    include( slide/CMakeLists.txt )
 
86
    include( slideback/CMakeLists.txt )
 
87
    include( thumbnailaside/CMakeLists.txt )
 
88
    include( windowgeometry/CMakeLists.txt )
 
89
    include( zoom/CMakeLists.txt )
 
90
 
 
91
    if( NOT KWIN_HAVE_OPENGLES_COMPOSITING )
 
92
    include( logout/CMakeLists.txt )
 
93
    endif( NOT KWIN_HAVE_OPENGLES_COMPOSITING )
 
94
endif( NOT KWIN_MOBILE_EFFECTS )
 
95
 
 
96
# OpenGL-specific effects
 
97
if( KWIN_HAVE_OPENGL_COMPOSITING )
 
98
    include( blur/CMakeLists.txt )
 
99
    include( screenshot/CMakeLists.txt )
 
100
    # OpenGL-specific effects for desktop
 
101
    if( NOT KWIN_MOBILE_EFFECTS )
 
102
        include( coverswitch/CMakeLists.txt )
 
103
        include( cube/CMakeLists.txt )
 
104
        include( explosion/CMakeLists.txt )
 
105
        include( flipswitch/CMakeLists.txt )
 
106
        include( glide/CMakeLists.txt )
 
107
        include( invert/CMakeLists.txt )
 
108
        include( lookingglass/CMakeLists.txt )
 
109
        include( magnifier/CMakeLists.txt )
 
110
        include( mousemark/CMakeLists.txt )
 
111
        include( sheet/CMakeLists.txt )
 
112
        include( snaphelper/CMakeLists.txt )
 
113
        include( startupfeedback/CMakeLists.txt )
 
114
        include( trackmouse/CMakeLists.txt )
 
115
        include( wobblywindows/CMakeLists.txt )
 
116
    endif( NOT KWIN_MOBILE_EFFECTS )
 
117
endif( KWIN_HAVE_OPENGL_COMPOSITING )
 
118
 
 
119
###############################################################################
 
120
 
 
121
# Add the builtins plugin
 
122
KWIN4_ADD_EFFECT( builtins ${kwin4_effect_builtins_sources} )
 
123
if( NOT KWIN_MOBILE_EFFECTS )
 
124
    KWIN4_ADD_EFFECT_CONFIG( builtins ${kwin4_effect_builtins_config_sources} )
 
125
endif( NOT KWIN_MOBILE_EFFECTS )
 
126
KWIN4_EFFECT_LINK_XRENDER( builtins )
 
127
 
 
128
# Install global data files
 
129
install( FILES
 
130
    _data/circle-edgy.png
 
131
    _data/circle.png
 
132
    DESTINATION ${DATA_INSTALL_DIR}/kwin )