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

« back to all changes in this revision

Viewing changes to kwin/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
########### configure tests ###############
 
2
 
 
3
# KWIN_HAVE_COMPOSITING - whether any compositing support is available
 
4
if( X11_Xcomposite_FOUND AND X11_Xdamage_FOUND )
 
5
    set( KWIN_HAVE_COMPOSITING 1 )
 
6
endif( X11_Xcomposite_FOUND AND X11_Xdamage_FOUND )
 
7
 
 
8
# KWIN_HAVE_OPENGL_COMPOSITING - whether OpenGL-based compositing support is available
 
9
if( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND )
 
10
    set( KWIN_HAVE_OPENGL_COMPOSITING 1 )
 
11
endif( KWIN_HAVE_COMPOSITING AND OPENGL_FOUND )
 
12
 
 
13
# KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available
 
14
if( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND )
 
15
    set( KWIN_HAVE_XRENDER_COMPOSITING 1 )
 
16
endif( KWIN_HAVE_COMPOSITING AND X11_Xrender_FOUND AND X11_Xfixes_FOUND )
 
17
 
 
18
# KWIN_HAVE_OPENGLES_COMPOSITING - whether OpenGL ES-based compositing support is available
 
19
if( KWIN_HAVE_COMPOSITING AND OPENGLES_FOUND AND KWIN_BUILD_WITH_OPENGLES)
 
20
    set( KWIN_HAVE_OPENGL_COMPOSITING 1)
 
21
    set( KWIN_HAVE_OPENGLES_COMPOSITING 1 )
 
22
    message("Compiling KWin for mobile.")
 
23
endif( KWIN_HAVE_COMPOSITING AND OPENGLES_FOUND AND KWIN_BUILD_WITH_OPENGLES )
 
24
 
 
25
# safety
 
26
if( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
 
27
    # ok
 
28
else( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
 
29
    set( KWIN_HAVE_COMPOSITING ) # unset
 
30
endif( KWIN_HAVE_OPENGL_COMPOSITING OR KWIN_HAVE_XRENDER_COMPOSITING )
 
31
 
 
32
macro_log_feature(KWIN_HAVE_COMPOSITING "Compositing support" "X11 Compositing support"  "http://www.x.org/" FALSE "" "XComposite and XDamage extensions and OpenGL or XRender with XFixes are required for KWin compositing support")
 
33
 
 
34
macro_bool_to_01( OPENGL_FOUND KWIN_HAVE_OPENGL )
 
35
macro_bool_to_01( KWIN_HAVE_OPENGLES_COMPOSITING KWIN_HAVE_OPENGLES )
 
36
 
 
37
if(OPENGL_FOUND)
 
38
  include_directories(${OPENGL_INCLUDE_DIR})
 
39
endif(OPENGL_FOUND)
 
40
 
 
41
if(OPENGLES_FOUND AND KWIN_HAVE_OPENGLES_COMPOSITING)
 
42
  include_directories(${OPENGLES_INCLUDE_DIR})
 
43
endif(OPENGLES_FOUND AND KWIN_HAVE_OPENGLES_COMPOSITING)
 
44
 
 
45
OPTION(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON)
 
46
OPTION(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)
 
47
OPTION(KWIN_MOBILE_EFFECTS "Only build effects relevant for mobile devices" OFF)
 
48
 
 
49
# for things that are also used by kwin libraries
 
50
configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects/kwinconfig.h )
 
51
# for kwin internal things
 
52
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
 
53
 
 
54
 
 
55
########### global ###############
 
56
 
 
57
include_directories(
 
58
    ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects
 
59
    ${CMAKE_CURRENT_BINARY_DIR}
 
60
    ${CMAKE_CURRENT_SOURCE_DIR}/libkwineffects
 
61
    ${CMAKE_CURRENT_SOURCE_DIR}/libkdecorations
 
62
    ${CMAKE_CURRENT_SOURCE_DIR}/effects
 
63
    ${CMAKE_CURRENT_SOURCE_DIR}/tabbox
 
64
    ${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kephal
 
65
    ${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kworkspace
 
66
    )
 
67
 
 
68
add_subdirectory( libkdecorations )
 
69
add_subdirectory( libkwineffects )
 
70
add_subdirectory( killer )
 
71
if(KWIN_BUILD_KCMS)
 
72
    add_subdirectory( kcmkwin )
 
73
endif(KWIN_BUILD_KCMS)
 
74
 
 
75
if( KWIN_BUILD_DECORATIONS )
 
76
    add_subdirectory( clients )
 
77
endif( KWIN_BUILD_DECORATIONS )
 
78
add_subdirectory( data )
 
79
 
 
80
if( KWIN_HAVE_COMPOSITING )
 
81
add_subdirectory( effects )
 
82
endif( KWIN_HAVE_COMPOSITING )
 
83
 
 
84
########### next target ###############
 
85
 
 
86
set(kwin_KDEINIT_SRCS
 
87
   workspace.cpp 
 
88
   client.cpp 
 
89
   clientgroup.cpp
 
90
   placement.cpp 
 
91
   atoms.cpp 
 
92
   utils.cpp 
 
93
   layers.cpp 
 
94
   main.cpp 
 
95
   tabbox.cpp
 
96
   tabbox/clientitemdelegate.cpp 
 
97
   tabbox/clientmodel.cpp 
 
98
   tabbox/desktopitemdelegate.cpp 
 
99
   tabbox/desktopmodel.cpp 
 
100
   tabbox/itemlayoutconfig.cpp 
 
101
   tabbox/tabboxconfig.cpp 
 
102
   tabbox/tabboxhandler.cpp 
 
103
   tabbox/tabboxview.cpp 
 
104
   desktopchangeosd.cpp 
 
105
   options.cpp 
 
106
   outline.cpp
 
107
   plugins.cpp 
 
108
   events.cpp 
 
109
   killwindow.cpp 
 
110
   geometrytip.cpp 
 
111
   shadow.cpp
 
112
   sm.cpp 
 
113
   group.cpp 
 
114
   bridge.cpp 
 
115
   manage.cpp 
 
116
   notifications.cpp 
 
117
   activation.cpp 
 
118
   useractions.cpp 
 
119
   geometry.cpp 
 
120
   rules.cpp
 
121
   composite.cpp
 
122
   toplevel.cpp
 
123
   unmanaged.cpp
 
124
   scene.cpp
 
125
   scene_basic.cpp
 
126
   scene_xrender.cpp
 
127
   scene_opengl.cpp
 
128
   lanczosfilter.cpp
 
129
   deleted.cpp
 
130
   effects.cpp
 
131
   compositingprefs.cpp
 
132
   desktoplayout.cpp
 
133
   paintredirector.cpp
 
134
   tile.cpp
 
135
   tiling.cpp
 
136
   tilinglayout.cpp
 
137
   tilinglayoutfactory.cpp
 
138
 
 
139
   #load the scripting related functions
 
140
   scripting/scripting.cpp
 
141
   scripting/workspace.cpp
 
142
   scripting/client.cpp
 
143
   scripting/meta.cpp
 
144
   scripting/toplevel.cpp
 
145
   scripting/windowinfo.cpp
 
146
   scripting/s_clientgroup.cpp
 
147
   scripting/workspaceproxy.cpp
 
148
   scripting/chelate.cpp
 
149
   scripting/timer.cpp
 
150
 
 
151
   # tiling layouts
 
152
   # spiral
 
153
   #tilinglayouts/spiral/spiralfactory.cpp
 
154
   tilinglayouts/spiral/spiral.cpp
 
155
 
 
156
   # columns
 
157
   #tilinglayouts/columns/columnsfactory.cpp
 
158
   tilinglayouts/columns/columns.cpp
 
159
 
 
160
   # floating
 
161
   tilinglayouts/floating/floating.cpp
 
162
   )
 
163
 
 
164
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Workspace )
 
165
 
 
166
qt4_add_dbus_interface( kwin_KDEINIT_SRCS
 
167
  ${KDEBASE_WORKSPACE_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml ksmserver_interface)
 
168
 
 
169
qt4_add_resources( kwin_KDEINIT_SRCS resources.qrc )
 
170
 
 
171
kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
 
172
 
 
173
target_link_libraries(kdeinit_kwin ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTXML_LIBRARY} ${QT_QTSCRIPT_LIBRARY} kephal kworkspace kdecorations kwineffects ${X11_LIBRARIES})
 
174
 
 
175
if(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING)
 
176
  add_subdirectory(opengltest)
 
177
  target_link_libraries(kdeinit_kwin ${OPENGL_gl_LIBRARY})
 
178
  # -ldl used by OpenGL code
 
179
  find_library(DL_LIBRARY dl)
 
180
  if (DL_LIBRARY)
 
181
    target_link_libraries(kdeinit_kwin ${DL_LIBRARY})
 
182
  endif(DL_LIBRARY)
 
183
  # must be after opengl, to be initialized first by the linker
 
184
  target_link_libraries(kdeinit_kwin kwinnvidiahack)
 
185
endif(OPENGL_FOUND AND NOT KWIN_HAVE_OPENGLES_COMPOSITING)
 
186
 
 
187
if(KWIN_HAVE_OPENGLES_COMPOSITING)
 
188
  target_link_libraries(kdeinit_kwin ${OPENGLES_LIBRARIES} ${OPENGLES_EGL_LIBRARIES})
 
189
endif(KWIN_HAVE_OPENGLES_COMPOSITING)
 
190
 
 
191
if (X11_Xrandr_FOUND)
 
192
  target_link_libraries(kdeinit_kwin ${X11_Xrandr_LIB})
 
193
endif (X11_Xrandr_FOUND)
 
194
if (X11_Xcomposite_FOUND)
 
195
  target_link_libraries(kdeinit_kwin ${X11_Xcomposite_LIB})
 
196
endif (X11_Xcomposite_FOUND)
 
197
if (X11_Xdamage_FOUND)
 
198
  target_link_libraries(kdeinit_kwin ${X11_Xdamage_LIB})
 
199
endif (X11_Xdamage_FOUND)
 
200
if (X11_Xrender_FOUND)
 
201
  target_link_libraries(kdeinit_kwin ${X11_Xrender_LIB})
 
202
endif (X11_Xrender_FOUND)
 
203
if (X11_Xfixes_FOUND)
 
204
  target_link_libraries(kdeinit_kwin ${X11_Xfixes_LIB})
 
205
endif (X11_Xfixes_FOUND)
 
206
 
 
207
install(TARGETS kdeinit_kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
 
208
install(TARGETS kwin         ${INSTALL_TARGETS_DEFAULT_ARGS} )
 
209
 
 
210
 
 
211
########### next target ###############
 
212
 
 
213
set( kwinnvidiahack_LIB_SRCS 
 
214
    nvidiahack.cpp )
 
215
 
 
216
 
 
217
kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS})
 
218
 
 
219
set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION}  )
 
220
install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
 
221
 
 
222
########### install files ###############
 
223
 
 
224
install( FILES kwin.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
 
225
install( FILES kwin.notifyrc  DESTINATION  ${DATA_INSTALL_DIR}/kwin )
 
226
install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
 
227
install( FILES tabbox/DefaultTabBoxLayouts.xml DESTINATION ${DATA_INSTALL_DIR}/kwin )
 
228
 
 
229
kde4_install_icons( ${ICON_INSTALL_DIR} )