CMakeLists.txt 28.6 KB
Newer Older
Philippe Pebay's avatar
Philippe Pebay committed
1
SET(KIT Rendering)
2
SET(UKIT RENDERING)
3
SET(KIT_TCL_LIBS vtkGraphicsTCL vtkImagingTCL ${VTK_TK_LIBRARIES})
4
SET(KIT_PYTHON_LIBS vtkGraphicsPythonD vtkImagingPythonD)
5
SET(KIT_JAVA_LIBS vtkGraphicsJava vtkImagingJava)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
6

7
8
9
IF (JAVA_AWT_LIBRARY)
  SET(KIT_JAVA_LIBS ${KIT_JAVA_LIBS} ${JAVA_AWT_LIBRARY})
ENDIF (JAVA_AWT_LIBRARY)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
10

11
SET(KIT_INTERFACE_LIBRARIES vtkGraphics vtkImaging)
12
SET(KIT_LIBS vtkIO vtkftgl
13
  ${VTK_FREETYPE_LIBRARIES}
14
)
15
16
17
18
19
#INCLUDE(${VTK_CMAKE_DIR}/vtkTestGL.cmake)
#INCLUDE(${VTK_CMAKE_DIR}/vtkTestGLX.cmake)



20

21
22
23
24
25
26
# Fix for bug#1026 moved out of the common section.  This should be
# changed to add the flag only in the right places (CMAKE_CXX_FLAGS?).
IF(APPLE AND VTK_WRAP_JAVA)
  ADD_DEFINITIONS("-ObjC++")
ENDIF(APPLE AND VTK_WRAP_JAVA)

Andy Cedilnik's avatar
Andy Cedilnik committed
27
SET( Kit_SRCS
Alexander Neundorf's avatar
   
Alexander Neundorf committed
28
29
30
  vtkAbstractMapper3D.cxx
  vtkAbstractPicker.cxx
  vtkAbstractPropPicker.cxx
31
  vtkAbstractVolumeMapper.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
32
  vtkActorCollection.cxx
33
  vtkActor.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
34
  vtkAreaPicker.cxx
35
  vtkMapArrayValues.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
36
37
38
  vtkAssembly.cxx
  vtkAxisActor2D.cxx
  vtkCamera.cxx
Francois Bertel's avatar
Francois Bertel committed
39
  vtkCameraActor.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
40
41
42
43
44
45
  vtkCameraInterpolator.cxx
  vtkCellCenterDepthSort.cxx
  vtkCellPicker.cxx
  vtkChooserPainter.cxx
  vtkClipPlanesPainter.cxx
  vtkCoincidentTopologyResolutionPainter.cxx
46
  vtkColorMaterialHelper.cxx
47
  vtkCompositePainter.cxx
48
49
  vtkCompositePolyDataMapper2.cxx
  vtkCompositePolyDataMapper.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
50
  vtkCullerCollection.cxx
51
  vtkCuller.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
52
  vtkDataSetMapper.cxx
53
  vtkDataTransferHelper.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
54
55
  vtkDefaultPainter.cxx
  vtkDisplayListPainter.cxx
56
  vtkDistanceToCamera.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
57
  vtkDynamic2DLabelMapper.cxx
58
  vtkDummyGPUInfoList.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
59
60
  vtkExporter.cxx
  vtkFollower.cxx
61
  vtkFrameBufferObject.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
62
63
  vtkFrustumCoverageCuller.cxx
  vtkGenericRenderWindowInteractor.cxx
64
  vtkGenericVertexAttributeMapping.cxx
65
66
  vtkGPUInfo.cxx
  vtkGPUInfoList.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
67
  vtkGraphicsFactory.cxx
68
  vtkGraphMapper.cxx
69
  vtkGraphToGlyphs.cxx
70
71
  vtkHardwareSelector.cxx
  vtkHardwareSelectionPolyDataPainter.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
72
73
74
75
  vtkHierarchicalPolyDataMapper.cxx
  vtkImageActor.cxx
  vtkImageMapper.cxx
  vtkImageViewer2.cxx
76
  vtkImageViewer.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
77
78
79
80
81
82
83
84
85
  vtkImagingFactory.cxx
  vtkImporter.cxx
  vtkInteractorEventRecorder.cxx
  vtkInteractorObserver.cxx
  vtkInteractorStyle.cxx
  vtkInteractorStyleFlight.cxx
  vtkInteractorStyleImage.cxx
  vtkInteractorStyleJoystickActor.cxx
  vtkInteractorStyleJoystickCamera.cxx
86
87
  vtkInteractorStyleRubberBand2D.cxx
  vtkInteractorStyleRubberBand3D.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
88
89
90
91
92
93
  vtkInteractorStyleRubberBandPick.cxx
  vtkInteractorStyleRubberBandZoom.cxx
  vtkInteractorStyleSwitch.cxx
  vtkInteractorStyleTerrain.cxx
  vtkInteractorStyleTrackballActor.cxx
  vtkInteractorStyleTrackballCamera.cxx
94
  vtkInteractorStyleTrackball.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
95
96
  vtkInteractorStyleUnicam.cxx
  vtkInteractorStyleUser.cxx
97
  vtkIVExporter.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
98
  vtkLabeledDataMapper.cxx
99
  vtkLabeledTreeMapDataMapper.cxx
100
101
102
  vtkLabelHierarchy.cxx
  vtkLabelHierarchyAlgorithm.cxx
  vtkLabelHierarchyIterator.cxx
Jeff Baumes's avatar
Jeff Baumes committed
103
  vtkLabelHierarchyCompositeIterator.cxx
104
  vtkLabelPlacer.cxx
Jeff Baumes's avatar
Jeff Baumes committed
105
106
  vtkLabelPlacementMapper.cxx
  vtkLabelRenderStrategy.cxx
107
  vtkLabelSizeCalculator.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
108
  vtkLeaderActor2D.cxx
Francois Bertel's avatar
Francois Bertel committed
109
  vtkLightActor.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
110
  vtkLightCollection.cxx
111
  vtkLight.cxx
112
  vtkLightingHelper.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
113
  vtkLightingPainter.cxx
114
  vtkLightKit.cxx
115
  vtkLineIntegralConvolution2D.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
116
  vtkLinesPainter.cxx
117
118
  vtkLODActor.cxx
  vtkLODProp3D.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
119
  vtkMapperCollection.cxx
120
  vtkMapper.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
121
122
123
124
125
126
127
  vtkOBJExporter.cxx
  vtkObserverMediator.cxx
  vtkOOGLExporter.cxx
  vtkPainter.cxx
  vtkPainterDeviceAdapter.cxx
  vtkPainterPolyDataMapper.cxx
  vtkParallelCoordinatesActor.cxx
128
  vtkParallelCoordinatesInteractorStyle.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
129
  vtkPicker.cxx
130
  vtkPixelBufferObject.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
131
  vtkPointPicker.cxx
132
  vtkPointSetToLabelHierarchy.cxx
133
  vtkPointsPainter.cxx
134
  vtkPOVExporter.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
135
  vtkPolyDataMapper2D.cxx
136
  vtkPolyDataMapper.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
137
138
139
140
  vtkPolyDataPainter.cxx
  vtkPolygonsPainter.cxx
  vtkPrimitivePainter.cxx
  vtkProp3DCollection.cxx
141
  vtkProp3D.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
142
  vtkProperty.cxx
143
  vtkPropPicker.cxx
144
  vtkQuadricLODActor.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
145
146
147
  vtkQuaternionInterpolator.cxx
  vtkRenderedAreaPicker.cxx
  vtkRendererCollection.cxx
148
  vtkRenderer.cxx
149
  vtkRendererDelegate.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
150
  vtkRendererSource.cxx
151
152
  vtkRenderPass.cxx
  vtkRenderState.cxx
153
154
155
  vtkRenderWindowCollection.cxx
  vtkRenderWindow.cxx
  vtkRenderWindowInteractor.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
156
157
158
159
160
161
162
  vtkRepresentationPainter.cxx
  vtkScalarBarActor.cxx
  vtkScalarsToColorsPainter.cxx
  vtkScaledTextActor.cxx
  vtkScenePicker.cxx
  vtkSelectVisiblePoints.cxx
  vtkShader.cxx
163
  vtkShaderDeviceAdapter.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
164
165
  vtkShaderProgram.cxx
  vtkStandardPolyDataPainter.cxx
166
167
  vtkSurfaceLICDefaultPainter.cxx
  vtkSurfaceLICPainter.cxx
168
169
170
  vtkTDxInteractorStyle.cxx
  vtkTDxInteractorStyleCamera.cxx
  vtkTDxInteractorStyleSettings.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
171
  vtkTesting.cxx
172
173
  vtkTestingInteractor.cxx
  vtkTestingObjectFactory.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
174
175
  # vtkTextActor2D.cxx
  vtkTextActor3D.cxx
176
  vtkTextActor.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
177
178
179
  vtkTextMapper.cxx
  vtkTextProperty.cxx
  vtkTexture.cxx
180
  vtkTexturedActor2D.cxx
181
  vtkTextureObject.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
182
183
184
  vtkTransformInterpolator.cxx
  vtkTStripsPainter.cxx
  vtkTupleInterpolator.cxx
185
  vtkViewTheme.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
186
187
  vtkVisibilitySort.cxx
  vtkVolumeCollection.cxx
188
  vtkVolume.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
189
  vtkVolumeProperty.cxx
190
  vtkVRMLExporter.cxx
Alexander Neundorf's avatar
   
Alexander Neundorf committed
191
192
193
  vtkWindowToImageFilter.cxx
  vtkWorldPointPicker.cxx
  )
Ken Martin's avatar
Ken Martin committed
194

195
196
197
198
199
200
201
202
IF (NOT VTK_LEGACY_REMOVE)
  SET (Kit_Deprecated_SRCS
    vtkVisibleCellSelector.cxx
    vtkIdentColoredPainter.cxx)

  SET (Kit_SRCS ${Kit_SRCS} ${Kit_Deprecated_SRCS})
ENDIF (NOT VTK_LEGACY_REMOVE)

203
IF(VTK_USE_GL2PS)
204
  SET(Kit_SRCS ${Kit_SRCS} vtkGL2PSExporter.cxx)
205
206
207
208
209
210
211
   
  IF(VTK_USE_SYSTEM_GL2PS)
  ELSE(VTK_USE_SYSTEM_GL2PS)
    SET(Kit_GL2PS_SRCS ${VTK_SOURCE_DIR}/Utilities/vtkgl2ps/gl2ps.c)
    ADD_DEFINITIONS(-DGL2PS_HAVE_ZLIB)
    ADD_DEFINITIONS(-DGL2PS_HAVE_LIBPNG)
  ENDIF(VTK_USE_SYSTEM_GL2PS)
212
213
ENDIF(VTK_USE_GL2PS)

214
215
216
IF(VTK_USE_CG_SHADERS)
  SET(Kit_SRCS ${Kit_SRCS} 
    vtkCgShader.cxx
217
    vtkCgShaderDeviceAdapter.cxx
218
219
220
221
222
223
224
    vtkCgShaderProgram.cxx
    )
  INCLUDE_DIRECTORIES(${CG_INCLUDE_PATH})
  SET (KIT_LIBS ${KIT_LIBS} ${CG_LIBRARY} ${CG_GL_LIBRARY})
ENDIF(VTK_USE_CG_SHADERS)


Andy Cedilnik's avatar
Andy Cedilnik committed
225
SET( KitOpenGL_SRCS
226
  vtkCameraPass.cxx
227
  vtkClearZPass.cxx
228
229
  vtkDefaultPass.cxx
  vtkDepthPeelingPass.cxx
230
  vtkGaussianBlurPass.cxx
231
  vtkImageProcessingPass.cxx
232
  vtkLightsPass.cxx
233
  vtkGLSLShaderDeviceAdapter2.cxx
234
  vtkOpaquePass.cxx
Ken Martin's avatar
Ken Martin committed
235
236
  vtkOpenGLActor.cxx
  vtkOpenGLCamera.cxx
237
238
239
  vtkOpenGLClipPlanesPainter.cxx
  vtkOpenGLCoincidentTopologyResolutionPainter.cxx
  vtkOpenGLDisplayListPainter.cxx
240
  vtkOpenGLExtensionManager.cxx
241
  vtkOpenGLHardwareSupport.cxx
Ken Martin's avatar
Ken Martin committed
242
243
244
  vtkOpenGLImageActor.cxx
  vtkOpenGLImageMapper.cxx
  vtkOpenGLLight.cxx
245
246
  vtkOpenGLLightingPainter.cxx
  vtkOpenGLPainterDeviceAdapter.cxx
Ken Martin's avatar
Ken Martin committed
247
248
249
250
  vtkOpenGLPolyDataMapper.cxx
  vtkOpenGLPolyDataMapper2D.cxx
  vtkOpenGLProperty.cxx
  vtkOpenGLRenderWindow.cxx
Brad King's avatar
Brad King committed
251
  vtkOpenGLRenderer.cxx
252
253
  vtkOpenGLRepresentationPainter.cxx
  vtkOpenGLScalarsToColorsPainter.cxx
254
  vtkOpenGLState.cxx
Ken Martin's avatar
Ken Martin committed
255
  vtkOpenGLTexture.cxx
256
257
258
  vtkOverlayPass.cxx
  vtkRenderPassCollection.cxx
  vtkSequencePass.cxx
259
260
261
  vtkShader2.cxx
  vtkShader2Collection.cxx
  vtkShaderProgram2.cxx
Francois Bertel's avatar
Francois Bertel committed
262
  vtkShadowMapPass.cxx
263
  vtkSobelGradientMagnitudePass.cxx
264
  vtkTextureUnitManager.cxx
265
  vtkTranslucentPass.cxx
266
  vtkUniformVariables.cxx
267
  vtkVolumetricPass.cxx
Ken Martin's avatar
Ken Martin committed
268
269
  )

270
271
272
IF(VTK_USE_GLSL_SHADERS)
  SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
    vtkGLSLShader.cxx
273
    vtkGLSLShaderDeviceAdapter.cxx
274
275
276
    vtkGLSLShaderProgram.cxx
    )
ENDIF(VTK_USE_GLSL_SHADERS)
277

Ken Martin's avatar
Ken Martin committed
278
SET_SOURCE_FILES_PROPERTIES(
Alexander Neundorf's avatar
   
Alexander Neundorf committed
279
280
281
282
283
284
  vtkAbstractMapper3D
  vtkAbstractVolumeMapper
  vtkAbstractPicker
  vtkAbstractPropPicker
  vtkCuller
  vtkExporter
285
  vtkGPUInfoList
286
  vtkImageProcessingPass
Alexander Neundorf's avatar
   
Alexander Neundorf committed
287
288
  vtkImporter
  vtkInteractorObserver
Jeff Baumes's avatar
Jeff Baumes committed
289
  vtkLabelRenderStrategy
Alexander Neundorf's avatar
   
Alexander Neundorf committed
290
291
292
293
294
295
  vtkMapper
  vtkOpenGLRenderWindow
  vtkPainter
  vtkPolyDataPainter
  vtkPrimitivePainter
  vtkProp3D
296
  vtkRendererDelegate
297
298
  vtkRenderPass
  vtkRenderState # not abstract just not using instantiator
Alexander Neundorf's avatar
   
Alexander Neundorf committed
299
  vtkShader
300
  vtkShaderDeviceAdapter
Alexander Neundorf's avatar
   
Alexander Neundorf committed
301
  vtkShaderProgram
302
  vtkTDxInteractorStyle
Alexander Neundorf's avatar
   
Alexander Neundorf committed
303
304
305
  vtkVisibilitySort.cxx
  ABSTRACT
  )
Ken Martin's avatar
Ken Martin committed
306

307
SET_SOURCE_FILES_PROPERTIES(
308
  vtkLightingHelper
309
  vtkRenderState
310
  vtkOpenGLState
311
312
313
  vtkShader2
  vtkShader2Collection
  vtkShaderProgram2
314
  vtkTextureUnitManager
315
316
  vtkTestingInteractor
  vtkTestingObjectFactory
317
318
319
  WRAP_EXCLUDE
  )

Andy Cedilnik's avatar
Andy Cedilnik committed
320
321
# Freetype stuff

Jeff Baumes's avatar
Jeff Baumes committed
322
323
324
325
SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
  vtkFreeTypeLabelRenderStrategy.cxx
  vtkOpenGLFreeTypeTextMapper.cxx
  )
Alexander Neundorf's avatar
   
Alexander Neundorf committed
326

327
328
329
330
# Get GPU VRAM info
# on Windows
#message("DirectX_FOUND=${DirectX_FOUND}")
if(DirectX_FOUND)
331
 set(Kit_SRCS ${Kit_SRCS} vtkDirectXGPUInfoList.cxx)
332
333
334
335
endif(DirectX_FOUND)

# on Mac
if(ApplicationServices_FOUND)
336
337
 set(Kit_SRCS ${Kit_SRCS} vtkCoreGraphicsGPUInfoList.mm)
endif()
338
339
340

# on Linux, for Nvidia
if(VTK_USE_X)
341
342
 set(Kit_SRCS ${Kit_SRCS} vtkXGPUInfoList.cxx)
endif()
343

Alexander Neundorf's avatar
   
Alexander Neundorf committed
344
SET(Kit_SRCS ${Kit_SRCS} vtkFreeTypeUtilities.cxx )
345
SET_SOURCE_FILES_PROPERTIES(vtkFreeTypeUtilities WRAP_EXCLUDE)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
346

Andy Cedilnik's avatar
Andy Cedilnik committed
347
SET(Kit_FT_SRCS 
348
349
350
351
352
353
354
355
356
357
358
359
360
  fonts/face_arial.cxx
  fonts/face_arial_bold.cxx
  fonts/face_arial_bold_italic.cxx
  fonts/face_arial_italic.cxx
  fonts/face_courier.cxx
  fonts/face_courier_bold.cxx
  fonts/face_courier_bold_italic.cxx
  fonts/face_courier_italic.cxx
  fonts/face_times.cxx
  fonts/face_times_bold.cxx
  fonts/face_times_bold_italic.cxx
  fonts/face_times_italic.cxx
)
361

Yves Starreveld's avatar
   
Yves Starreveld committed
362
IF(VTK_USE_X)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
363
  SET( Kit_SRCS ${Kit_SRCS} vtkXRenderWindowInteractor.cxx)
Yves Starreveld's avatar
   
Yves Starreveld committed
364
ENDIF(VTK_USE_X)
Ken Martin's avatar
Ken Martin committed
365

366
367
368
369
370
371
# -----------------------------------------------------------------------------
# 3DConnexion device (SpaceNavigator, etc... ) on Unix.
IF(VTK_USE_X)
  OPTION(VTK_USE_TDX "Use 3Dconnexion device" OFF)
  MARK_AS_ADVANCED(VTK_USE_TDX)
  IF(VTK_USE_TDX)
372
   
373
374
375
376
377
378
379
380
381
   SET(VTK_TDX_INCLUDE_PATH CACHE PATH "Directory path to xdrvlib.h for 3DConnexion device")
   SET(VTK_TDX_OBJECT_PATH CACHE FILEPATH "File path to xdrvlib.a for 3DConnexion device")
   SET(Kit_SRCS ${Kit_SRCS} vtkTDxDevice.cxx vtkTDxUnixDevice.cxx)
   INCLUDE_DIRECTORIES(${VTK_TDX_INCLUDE_PATH})
   SET_SOURCE_FILES_PROPERTIES(vtkTDxDevice.cxx ABSTRACT)
   LIST(APPEND KIT_INTERFACE_LIBRARIES ${VTK_TDX_OBJECT_PATH})
  ENDIF()
ENDIF()
# -----------------------------------------------------------------------------
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# 3DConnexion device (SpaceNavigator, etc... ) on Mac (not X11).
IF(VTK_USE_CARBON OR VTK_USE_COCOA)
  OPTION(VTK_USE_TDX "Use 3Dconnexion device" OFF)
  MARK_AS_ADVANCED(VTK_USE_TDX)
  IF(VTK_USE_TDX)
# framework is in /Library/Frameworks/3DconnexionClient.framework
   find_package(3DconnexionClient)
   if(3DconnexionClient_FOUND)
     set(KIT_LIBS ${KIT_LIBS} ${3DconnexionClient_LIBRARY})
     include_directories(${3DconnexionClient_INCLUDE_DIR})
   endif()
   SET(Kit_SRCS ${Kit_SRCS} vtkTDxDevice.cxx vtkTDxMacDevice.cxx)
   SET_SOURCE_FILES_PROPERTIES(vtkTDxDevice.cxx ABSTRACT)
   LIST(APPEND KIT_INTERFACE_LIBRARIES ${VTK_TDX_OBJECT_PATH})
  ENDIF()
ENDIF()
# -----------------------------------------------------------------------------
399
400
# 3DConnexion device (SpaceNavigator, etc... ) on Windows.
IF(WIN32)
401
  OPTION(VTK_USE_TDX "Use 3Dconnextion device" OFF)
402
403
404
405
406
407
408
409
410
411
  MARK_AS_ADVANCED(VTK_USE_TDX)
  IF(VTK_USE_TDX)
   SET(Kit_SRCS ${Kit_SRCS} vtkTDxDevice.cxx vtkTDxWinDevice.cxx)
   SET_SOURCE_FILES_PROPERTIES(vtkTDxDevice.cxx ABSTRACT)
  ENDIF()
ENDIF()
# -----------------------------------------------------------------------------
CONFIGURE_FILE(${VTK_SOURCE_DIR}/Rendering/vtkTDxConfigure.h.in
               ${VTK_BINARY_DIR}/Rendering/vtkTDxConfigure.h @ONLY IMMEDIATE)

412
413
414
415
416
417
IF(VTK_USE_QT)   
  SET(QT_DONT_USE_QTGUI)
  INCLUDE(${QT_USE_FILE})

  SET( Kit_SRCS ${Kit_SRCS}
    vtkQImageToImageSource.cxx
418
    vtkQtInitialization.cxx
Jeff Baumes's avatar
Jeff Baumes committed
419
    vtkQtLabelRenderStrategy.cxx
420
421
    vtkQtTreeRingLabelMapper.cxx
    )
422
423
424
425
426
427
428
429
430
431
432
433
434
  # On the Mac, make the QT_LIBRARIES KIT_INTERFACE_LIBRARIES. This is a
  # workaround a problem with the Qt binaries from Trolltech. These libraries
  # use install names that are relative. Then when the linker tries to pull them
  # indirectly (through vtkRendering's list of libraries), it fails to find them.
  # This does not happen when Qt is build from source because it uses absolute
  # path in install names. This workaround fixes the problem by forcing all libraries
  # and executables that depend on vtkRendering to also directly link to Qt libraries.
  IF (APPLE)
    LIST (APPEND KIT_INTERFACE_LIBRARIES ${QT_LIBRARIES})
  ELSE (APPLE)
    LIST (APPEND KIT_LIBS ${QT_LIBRARIES})
  ENDIF (APPLE)

435
436
ENDIF(VTK_USE_QT)

437
438
# The set of source files to be encoded.
SET(glsl_files
439
  vtkColorMaterialHelper_vs
440
  vtkDepthPeeling_fs
441
  vtkGaussianBlurPassShader_fs
Francois Bertel's avatar
Francois Bertel committed
442
  vtkLighting_s # s not vs or fs because it can be used in both.
443
444
445
446
  vtkLightingHelper_s # s not vs or fs because it can be used in both.
  vtkLineIntegralConvolution2D_fs
  vtkLineIntegralConvolution2D_fs1
  vtkLineIntegralConvolution2D_fs2
447
  vtkOpenGLRenderer_PeelingFS
448
  vtkOpenGLPropertyDefaultPropFunc_fs
449
  vtkOpenGLPropertyDefaultPropFunc_vs
450
451
  vtkOpenGLPropertyDefaultMain_fs
  vtkOpenGLPropertyDefaultMain_vs
452
453
  vtkSobelGradientMagnitudePassShader1_fs
  vtkSobelGradientMagnitudePassShader2_fs
Francois Bertel's avatar
Francois Bertel committed
454
455
  vtkShadowMapPassShader_fs
  vtkShadowMapPassShader_vs
456
457
458
  vtkSurfaceLICPainter_fs1
  vtkSurfaceLICPainter_fs2
  vtkSurfaceLICPainter_vs1
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
  )

# Create custom commands to encode each assembly file into a C string
# literal in a header file.

SET(glsl_h_files)
FOREACH(file ${glsl_files})
  SET(src ${VTK_SOURCE_DIR}/Rendering/${file}.glsl)
  SET(res ${VTK_BINARY_DIR}/Rendering/${file}.cxx)
  SET(resh ${VTK_BINARY_DIR}/Rendering/${file}.h)
  SET(glsl_h_files ${glsl_h_files} "${resh}")
  ADD_CUSTOM_COMMAND(
    OUTPUT ${res} ${resh}
    DEPENDS ${src} vtkEncodeString
    COMMAND ${VTK_ENCODESTRING_EXE}
    ARGS ${res} ${src} ${file} --build-header VTK_RENDERING_EXPORT vtkSystemIncludes.h
    )
  SET(Kit_EXTRA_SRCS ${Kit_EXTRA_SRCS} ${res})
ENDFOREACH(file)

479
480
# OpenGL extensions stuff.

481
482
483
484
IF(VTK_USE_X)
 INCLUDE(${VTK_CMAKE_DIR}/vtkTestGLX.cmake)
ENDIF(VTK_USE_X)

485
486
# Parse the extensions into vtkgl.h/vtkgl.cxx.
ADD_CUSTOM_COMMAND(
487
488
  OUTPUT ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx
  COMMAND ${VTK_PARSEOGLEXT_EXE}
489
  ARGS ${VTK_BINARY_DIR}/Rendering ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE}
490
491
  DEPENDS ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE} ${VTK_PARSEOGLEXT_EXE}
  )
492

493
494
495
SET_SOURCE_FILES_PROPERTIES(vtkOpenGLExtensionManager.cxx
  PROPERTIES OBJECT_DEPENDS ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx)

Alexander Neundorf's avatar
   
Alexander Neundorf committed
496
497
498
SET(KitOpenGL_SRCS ${KitOpenGL_SRCS} 
  ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx 
  )
499
500
501
502
503

SET_SOURCE_FILES_PROPERTIES(
  # OK, so it's not abstract, but this stops the instantiator
  # from trying to call vtkRenderingInstantiatorvtkglNew():
  ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx
504
  vtkLabelHierarchyIterator.cxx
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
  ABSTRACT
  )

SET_SOURCE_FILES_PROPERTIES(
  ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx
  GENERATED
  )

SET_SOURCE_FILES_PROPERTIES(
  ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx
  WRAP_EXCLUDE
  )

# Configuration for vtkOpenGLExtensionManager
IF (WIN32)
  SET(VTK_USE_WGL_GET_PROC_ADDRESS 1)
ELSE (WIN32)
  IF (APPLE)
    SET(VTK_USE_APPLE_LOADER 1)
  ELSE (APPLE)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
525
    INCLUDE(CheckFunctionExists)
526
    SET(VTK_SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
527
528
529
530
531
532
    SET(CMAKE_REQUIRED_LIBRARIES
      ${OPENGL_LIBRARIES}
      ${CMAKE_THREAD_LIBS}
      ${CMAKE_REQUIRED_LIBRARIES}
      -lm
      )
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
    IF(VTK_USE_X)
      CHECK_FUNCTION_EXISTS(glXGetProcAddressARB VTK_USE_GLX_GET_PROC_ADDRESS_ARB)
      IF (VTK_USE_GLX_GET_PROC_ADDRESS_ARB)
        IF (NOT "${VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS_INCLUDES}" STREQUAL "${OPENGL_INCLUDE_DIR}")
          # The OpenGL includes changed.  Retest glXGetProcAddressARB prototype.
          SET(VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS_TESTED 0)
        ENDIF (NOT "${VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS_INCLUDES}" STREQUAL "${OPENGL_INCLUDE_DIR}")
        IF (NOT VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS_TESTED)
          MESSAGE(STATUS "Looking for glXGetProcAddressARB in GL/glx.h")
          TRY_COMPILE(VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS
            ${CMAKE_BINARY_DIR}
            ${CMAKE_CURRENT_SOURCE_DIR}/CheckglXGetProcAddressARB.cxx
            CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
            "-DINCLUDE_DIRECTORIES:STRING=${OPENGL_INCLUDE_DIR}"
            OUTPUT_VARIABLE OUTPUT)
          MESSAGE(STATUS "Looking for glXGetProcAddressARB in GL/glx.h - ${VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS}")
          FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
            "Determining if glXGetProcAddressARB exists in GL/glx.h ${VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS} with the following output:\n"
            "${OUTPUT}\n\n")
          SET(VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS_TESTED 1
            CACHE INTERNAL "Already set VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS")
          SET(VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS_INCLUDES
            "${OPENGL_INCLUDE_DIR}"
            CACHE INTERNAL "OpenGL includes used to test glXGetProcAddressARB prototype.")
        ENDIF (NOT VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS_TESTED)
        IF (NOT VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS)
          SET(VTK_DEFINE_GLX_GET_PROC_ADDRESS_PROTOTYPE 1)
        ENDIF (NOT VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS)
      ELSE (VTK_USE_GLX_GET_PROC_ADDRESS_ARB)
        CHECK_FUNCTION_EXISTS(glXGetProcAddress VTK_USE_GLX_GET_PROC_ADDRESS)
        IF (NOT VTK_USE_GLX_GET_PROC_ADDRESS)
          #         SET(VTK_USE_VTK_DYNAMIC_LOADER 1)
          MESSAGE(STATUS "Could not find extension loader.  Extensions disabled.")
          SET(VTK_NO_EXTENSION_LOADING 1)
        ENDIF (NOT VTK_USE_GLX_GET_PROC_ADDRESS)
      ENDIF (VTK_USE_GLX_GET_PROC_ADDRESS_ARB)
    ELSE(VTK_USE_X)
      SET(VTK_NO_EXTENSION_LOADING 1)
    ENDIF(VTK_USE_X)
572
573
574
575
576
577
    SET(CMAKE_REQUIRED_LIBRARIES "${VTK_SAVE_CMAKE_REQUIRED_LIBRARIES}")
  ENDIF (APPLE)
ENDIF (WIN32)
CONFIGURE_FILE(
  ${VTK_SOURCE_DIR}/Rendering/vtkOpenGLExtensionManagerConfigure.h.in
  ${VTK_BINARY_DIR}/Rendering/vtkOpenGLExtensionManagerConfigure.h)
Andy Cedilnik's avatar
Andy Cedilnik committed
578
579
# Build a list of libraries to link to vtkRendering.

580
IF(VTK_USE_GL2PS)
581
582
583
584
585
  IF(VTK_USE_SYSTEM_GL2PS)
    SET(KIT_LIBS ${KIT_LIBS} ${GL2PS_LIBRARIES} ${VTK_ZLIB_LIBRARIES} ${VTK_PNG_LIBRARIES})
  ELSE(VTK_USE_SYSTEM_GL2PS)
    SET(KIT_LIBS ${KIT_LIBS} ${VTK_ZLIB_LIBRARIES} ${VTK_PNG_LIBRARIES})
  ENDIF(VTK_USE_SYSTEM_GL2PS)
586
ENDIF(VTK_USE_GL2PS)
587

Ken Martin's avatar
Ken Martin committed
588
IF (WIN32)
589
  IF(VTK_USE_X)
590
    IF (OPENGL_gl_LIBRARY)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
591
592
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS} vtkXOpenGLRenderWindow.cxx)
      SET(KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} )
593
    ENDIF (OPENGL_gl_LIBRARY)    
594
  ELSE(VTK_USE_X)
Andy Cedilnik's avatar
Andy Cedilnik committed
595
    SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
596
597
                 vtkWin32OpenGLRenderWindow.cxx
                 vtkWin32RenderWindowInteractor.cxx)
598
    SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} )
599
  ENDIF(VTK_USE_X)
Ken Martin's avatar
Ken Martin committed
600
ELSE (WIN32)
Yves Starreveld's avatar
   
Yves Starreveld committed
601
  IF (APPLE)
602
    IF(VTK_USE_COCOA)
Andy Cedilnik's avatar
Andy Cedilnik committed
603
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
604
605
606
                   vtkCocoaRenderWindowInteractor.mm
                   vtkCocoaRenderWindow.mm
                   vtkCocoaGLView.mm)
607
608
609
610
611
612
613
614
615
616
617
618
       
      # The objective-c++ classes might need their own flags.
      # Set them if specified.
      IF(VTK_REQUIRED_OBJCXX_FLAGS)

        SET_SOURCE_FILES_PROPERTIES(vtkCocoaRenderWindowInteractor.mm 
                                    vtkCocoaRenderWindow.mm 
                                    vtkCocoaGLView.mm
                                    PROPERTIES COMPILE_FLAGS "${VTK_REQUIRED_OBJCXX_FLAGS}")

      ENDIF(VTK_REQUIRED_OBJCXX_FLAGS)

619
      SET_SOURCE_FILES_PROPERTIES(vtkCocoaGLView WRAP_EXCLUDE)
620
      SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} "-framework Cocoa")
621
622
623
624
625
626
      # This is to resolve a linker error that happens on older (?) OS X builds.
      # If an executable links against vtkRendering, it would get the following
      # error unless we add the objc to its link interface:
      # ld: /usr/lib/crt1.o illegal reference to symbol: __objcInit defined in indirectly
      # referenced dynamic library /usr/lib/libobjc.A.dylib
      LIST(APPEND KIT_INTERFACE_LIBRARIES objc)
627
628
    ENDIF(VTK_USE_COCOA)
    IF(VTK_USE_CARBON)
Andy Cedilnik's avatar
Andy Cedilnik committed
629
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
630
631
                   vtkCarbonRenderWindowInteractor.cxx
                   vtkCarbonRenderWindow.cxx)
632
      SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} "-framework Carbon")
633
    ENDIF(VTK_USE_CARBON)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
634
635
636
    IF(VTK_USE_X  AND  OPENGL_gl_LIBRARY)
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS} vtkXOpenGLRenderWindow.cxx)
    ENDIF(VTK_USE_X  AND  OPENGL_gl_LIBRARY)
Yves Starreveld's avatar
   
Yves Starreveld committed
637
  ELSE (APPLE)
638
    IF (VTK_USE_X AND OPENGL_gl_LIBRARY)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
639
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS} vtkXOpenGLRenderWindow.cxx)
640
      SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} )
641
642
643
644
645
646
    ELSE (VTK_USE_X AND OPENGL_gl_LIBRARY)
      IF (VTK_OPENGL_HAS_OSMESA  AND  OSMESA_LIBRARY)
        SET(KitOpenGL_SRCS ${KitOpenGL_SRCS} vtkOSOpenGLRenderWindow.cxx)
        SET (KIT_LIBS ${KIT_LIBS} ${OSMESA_LIBRARY} )
      ENDIF (VTK_OPENGL_HAS_OSMESA  AND  OSMESA_LIBRARY)
    ENDIF (VTK_USE_X AND OPENGL_gl_LIBRARY)
Yves Starreveld's avatar
   
Yves Starreveld committed
647
  ENDIF (APPLE)
Ken Martin's avatar
Ken Martin committed
648
ENDIF (WIN32)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
649

Andy Cedilnik's avatar
Andy Cedilnik committed
650
651
652
IF(VTK_USE_CG_SHADERS)
  SET(KIT_LIBS ${KIT_LIBS} ${OPENGL_glu_LIBRARY})
ENDIF(VTK_USE_CG_SHADERS)
Ken Martin's avatar
Ken Martin committed
653

654
655
656
657
658
659
660
661
662
if(DirectX_FOUND)
 # d3d9.lib for symbol Direct3DCreate9
 # symbol CLSID_WbemLocator IID_IWbemLocator: wbemuuid.lib 
 # wbemuuid.lib is *NOT A FILE* (you cannot find it), it is probably an
 # embedded library added by the linker itself.
 set(KIT_LIBS ${KIT_LIBS} ${DirectX_LIBRARY} wbemuuid)
 include_directories(${DirectX_INCLUDE_DIR})
endif(DirectX_FOUND)

663
664
665
666
667
668
669
670
671
672
673
674
if(VTK_USE_CORE_GRAPHICS)
 set(KIT_LIBS ${KIT_LIBS} ${ApplicationServices_LIBRARY} ${IOKit_LIBRARY})
 include_directories(${ApplicationServices_INCLUDE_DIR} ${IOKit_INCLUDE_DIR})
endif(VTK_USE_CORE_GRAPHICS)

if(VTK_USE_NVCONTROL)
 # NVCONTROL depends on X11. We solve that by making KIT_LIBS depending on
 # vtkRendering, as vtkRendering depends on X11 on Unix.
 set(KIT_LIBS ${KIT_LIBS} ${NVCtrlLib_LIBRARY} vtkRendering)
 include_directories(${NVCtrlLib_INCLUDE_DIR})
endif(VTK_USE_NVCONTROL)

675
676
IF (VTK_USE_MANGLED_MESA)
  IF (MANGLED_MESA_LIBRARY)
Andy Cedilnik's avatar
Andy Cedilnik committed
677
    SET ( KitOpenGL_SRCS ${KitOpenGL_SRCS}
678
679
                 vtkMesaActor.cxx
                 vtkMesaCamera.cxx
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
680
681
682
                 vtkMesaClipPlanesPainter.cxx
                 vtkMesaCoincidentTopologyResolutionPainter.cxx
                 vtkMesaDisplayListPainter.cxx
683
684
685
                 vtkMesaImageActor.cxx
                 vtkMesaImageMapper.cxx
                 vtkMesaLight.cxx
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
686
687
                 vtkMesaLightingPainter.cxx
                 vtkMesaPainterDeviceAdapter.cxx
688
689
690
                 vtkMesaPolyDataMapper.cxx
                 vtkMesaPolyDataMapper2D.cxx
                 vtkMesaProperty.cxx
Brad King's avatar
Brad King committed
691
                 vtkMesaRenderWindow.cxx
692
                 vtkMesaRenderer.cxx
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
693
694
                 vtkMesaRepresentationPainter.cxx
                 vtkMesaScalarsToColorsPainter.cxx
695
696
                 vtkMesaTexture.cxx
                 vtkXMesaRenderWindow.cxx
Berk Geveci's avatar
Berk Geveci committed
697
                )
Andy Cedilnik's avatar
Andy Cedilnik committed
698
    SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
699
700
      vtkMesaFreeTypeTextMapper.cxx
    )
Ken Martin's avatar
Ken Martin committed
701
    SET_SOURCE_FILES_PROPERTIES(vtkMesaRenderWindow ABSTRACT)
702
    SET (KIT_LIBS ${KIT_LIBS} ${MANGLED_MESA_LIBRARY})
703
    IF(MANGLED_OSMESA_LIBRARY)
704
      SET( KIT_LIBS ${KIT_LIBS} ${MANGLED_OSMESA_LIBRARY} )
705
706
707
    ENDIF(MANGLED_OSMESA_LIBRARY)
  ENDIF (MANGLED_MESA_LIBRARY)
ELSE (VTK_USE_MANGLED_MESA)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
708
709
710
  IF(VTK_OPENGL_HAS_OSMESA  AND  OSMESA_LIBRARY)
    SET(KIT_LIBS ${KIT_LIBS} ${OSMESA_LIBRARY})
  ENDIF(VTK_OPENGL_HAS_OSMESA  AND  OSMESA_LIBRARY)
711
ENDIF(VTK_USE_MANGLED_MESA)
Andy Cedilnik's avatar
Andy Cedilnik committed
712
SET(Kit_SRCS ${Kit_SRCS} ${KitOpenGL_SRCS})
713
SET(Kit_EXTRA_SRCS ${Kit_EXTRA_SRCS} ${Kit_FT_SRCS})
714
715

IF(VTK_USE_GL2PS)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
716
  SET(Kit_EXTRA_SRCS ${Kit_EXTRA_SRCS} ${Kit_GL2PS_SRCS})
717
718
ENDIF(VTK_USE_GL2PS)

Andy Cedilnik's avatar
Andy Cedilnik committed
719
720
721
722
723
SET(Kit_EXTRA_CMDS)
SET(Kit_TCL_EXTRA_SRCS)
SET(Kit_PYTHON_EXTRA_SRCS)
SET(Kit_JAVA_EXTRA_SRCS)
SET(Kit_TCL_EXTRA_CMDS)
724
725
726
SET(KIT_TCL_DEPS)
SET(KIT_PYTHON_DEPS)
SET(KIT_JAVA_DEPS)
Ken Martin's avatar
Ken Martin committed
727

Alexander Neundorf's avatar
   
Alexander Neundorf committed
728
IF (TK_FOUND AND VTK_USE_TK)
729
  SET(VTK_GENERATE_TK_INTERNALS 1)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
730
731
ENDIF (TK_FOUND AND VTK_USE_TK)

732
IF(VTK_GENERATE_TK_INTERNALS)
733
734
735
736
737
  SET (HAVE_LIMITS_H ${CMAKE_HAVE_LIMITS_H})
  SET (HAVE_UNISTD_H ${CMAKE_HAVE_UNISTD_H})
  CONFIGURE_FILE(
    ${CMAKE_CURRENT_SOURCE_DIR}/vtkTkInternals.h.in
    ${CMAKE_CURRENT_BINARY_DIR}/vtkTkInternals.h)
738
  IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
739
740
741
742
743
    INSTALL(FILES
      ${CMAKE_CURRENT_BINARY_DIR}/vtkTkInternals.h
      DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
      COMPONENT Development
      )
744
  ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
745
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
746
ENDIF (VTK_GENERATE_TK_INTERNALS)
747

Alexander Neundorf's avatar
   
Alexander Neundorf committed
748
749
750
751
IF (VTK_WRAP_TCL AND VTK_USE_TK)
  SET(KitTCL_SRCS
    vtkTkRenderWidget.cxx
    vtkTkImageViewerWidget.cxx)
752
753
754
755
756
  IF (VTK_USE_COCOA)
    SET(KitTCL_SRCS ${KitTCL_SRCS}
      vtkCocoaTkUtilities.mm)
    SET_SOURCE_FILES_PROPERTIES(vtkCocoaTkUtilities WRAP_EXCLUDE)
  ENDIF(VTK_USE_COCOA)
Ken Martin's avatar
updates    
Ken Martin committed
757

Alexander Neundorf's avatar
   
Alexander Neundorf committed
758
759
  # Use special interactor for X and Tk.
  IF(VTK_USE_X)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
760
    SET(KitTCL_SRCS ${KitTCL_SRCS} vtkXRenderWindowTclInteractor.cxx)
761
    SET(KIT_TCL_LIBS ${KIT_TCL_LIBS} ${X11_LIBRARIES})
Alexander Neundorf's avatar
   
Alexander Neundorf committed
762
  ENDIF(VTK_USE_X)
763
764
765
  IF(VTK_USE_CARBON)
    SET(KIT_TCL_LIBS ${KIT_TCL_LIBS} "-framework Carbon")
  ENDIF(VTK_USE_CARBON)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
766
767
768
769
  SET(Kit_TCL_EXTRA_CMDS 
    vtkTkRenderWidget 
    vtkTkImageViewerWidget)
ENDIF (VTK_WRAP_TCL AND VTK_USE_TK)
Yves Starreveld's avatar
   
Yves Starreveld committed
770

771
772
#-----------------------------------------------------------------------------
# Include CMake code common to all kits.
773
INCLUDE(${VTK_CMAKE_DIR}/KitCommonBlock.cmake)
774
#-----------------------------------------------------------------------------
Alexander Neundorf's avatar
   
Alexander Neundorf committed
775
776
777
778
779
780

# when crosscompiling vtkParseOGLExt is imported, don't add a dependency to it
# this should be handled by cmake so it doesn't have to be done here
IF(NOT CMAKE_CROSSCOMPILING)
  # Add target dependency to ensure the vtkParseOGLExt is built before
  # Rendering is.
Alexander Neundorf's avatar
   
Alexander Neundorf committed
781
  ADD_DEPENDENCIES(vtk${KIT} vtkParseOGLExt)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
782
ENDIF(NOT CMAKE_CROSSCOMPILING)
783

784
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
785
786
  INSTALL(FILES
    ${CMAKE_CURRENT_SOURCE_DIR}/vtkOpenGL.h
787
    ${CMAKE_CURRENT_BINARY_DIR}/vtkgl.h
788
789
    DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
    COMPONENT Development
790
791
    )
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
792

Alexander Neundorf's avatar
   
Alexander Neundorf committed
793
794
795
796
797
798
IF (VTK_WRAP_PYTHON AND VTK_USE_TK AND TK_FOUND)
  SET(RenderingPythonTkWidgets_SRCS
    vtkTkWidgetsInit.cxx
    vtkTkRenderWidgetPython.cxx
    vtkTkImageViewerWidgetPython.cxx
    )
799
800
801
802
803
  IF (VTK_USE_COCOA)
    SET(RenderingPythonTkWidgets_SRCS ${RenderingPythonTkWidgets_SRCS}
        vtkCocoaTkUtilities.mm)
  ENDIF (VTK_USE_COCOA)

Alexander Neundorf's avatar
   
Alexander Neundorf committed
804
805
  ADD_LIBRARY(vtkRenderingPythonTkWidgets SHARED
              ${RenderingPythonTkWidgets_SRCS})
806
807
808
809
  SET(VTK_PYTHONTK_LIBRARIES ${VTK_TK_LIBRARIES})
  IF(VTK_USE_X)
    SET(VTK_PYTHONTK_LIBRARIES ${VTK_PYTHONTK_LIBRARIES} ${X11_LIBRARIES})
  ENDIF(VTK_USE_X)
810
  IF(VTK_USE_CARBON)
811
    SET(VTK_PYTHONTK_LIBRARIES ${VTK_PYTHONTK_LIBRARIES} "-framework Carbon")
812
  ENDIF(VTK_USE_CARBON)
813
814
815
816
 
  TARGET_LINK_LIBRARIES (vtkRenderingPythonTkWidgets
                        vtk${KIT}
                        ${VTK_PYTHONTK_LIBRARIES})
Alexander Neundorf's avatar
   
Alexander Neundorf committed
817
818
819
820
821
822
823
824
825
826
827
828
829
830

  # Apply user-defined properties to the library target.
  IF(VTK_LIBRARY_PROPERTIES)
    SET_TARGET_PROPERTIES(vtkRenderingPythonTkWidgets PROPERTIES
      ${VTK_LIBRARY_PROPERTIES})
  ENDIF(VTK_LIBRARY_PROPERTIES)

  IF(NOT VTK_INSTALL_NO_LIBRARIES)
    INSTALL(TARGETS vtkRenderingPythonTkWidgets
      RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
      LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
      ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
  ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
ENDIF (VTK_WRAP_PYTHON AND VTK_USE_TK AND TK_FOUND)
Andy Cedilnik's avatar
Andy Cedilnik committed
831

Yves Starreveld's avatar
   
Yves Starreveld committed
832
IF(VTK_USE_X)
Sebastien Barre's avatar
Sebastien Barre committed
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
  SET(X11_LIB_SEARCH_PATH
    /usr/X11R6/lib
    /usr/local/lib 
    /usr/openwin/lib 
    /usr/lib 
    )
  FIND_LIBRARY(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH})
  MARK_AS_ADVANCED(X11_Xt_LIB)
  IF (X11_Xt_LIB)
    TARGET_LINK_LIBRARIES(vtk${KIT} ${X11_Xt_LIB})
  ENDIF (X11_Xt_LIB)
  TARGET_LINK_LIBRARIES(vtk${KIT} ${X11_LIBRARIES})
  IF (VTK_USE_TK)
    # Definitely needed in case we are linking against a Tcl/Tk 8.5 static,
    # which by default seems to be missing Xss and Xft. It can not just be
    # attached to the vtk interpreter because sub-projects may need the
    # very same fix.
    FIND_LIBRARY(X11_Xscreensaver_LIB Xss ${X11_LIB_SEARCH_PATH})
    MARK_AS_ADVANCED(X11_Xscreensaver_LIB)
    IF(X11_Xscreensaver_LIB)
      TARGET_LINK_LIBRARIES(vtk${KIT} ${X11_Xscreensaver_LIB})
    ENDIF(X11_Xscreensaver_LIB)
    FIND_LIBRARY(X11_Xft_LIB Xft ${X11_LIB_SEARCH_PATH})
    MARK_AS_ADVANCED(X11_Xft_LIB)
    IF(X11_Xft_LIB)
      TARGET_LINK_LIBRARIES(vtk${KIT} ${X11_Xft_LIB})
    ENDIF(X11_Xft_LIB)
860
861
862
863
864
865
866
    IF(APPLE)
      FIND_LIBRARY(X11_fontconfig_LIB fontconfig ${X11_LIB_SEARCH_PATH})
      MARK_AS_ADVANCED(X11_fontconfig_LIB)
      IF(X11_fontconfig_LIB)
        TARGET_LINK_LIBRARIES(vtk${KIT} ${X11_fontconfig_LIB})
      ENDIF(X11_fontconfig_LIB)
    ENDIF(APPLE)
Sebastien Barre's avatar
Sebastien Barre committed
867
  ENDIF(VTK_USE_TK)
Yves Starreveld's avatar
   
Yves Starreveld committed
868
ENDIF(VTK_USE_X)
869

870
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
871
  SET(__inst_files
872
    ${VTK_SOURCE_DIR}/${KIT}/Testing/Cxx/vtkRegressionTestImage.h
873
874
875
    ${VTK_BINARY_DIR}/Rendering/vtkTDxConfigure.h
    ${VTK_SOURCE_DIR}/${KIT}/vtkTDxMotionEventInfo.h
    )
876
  INSTALL(FILES ${__inst_files}
877
    DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
878
    COMPONENT Development)
879
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
880
881
882
883
884
885

IF(NOT CMAKE_CROSSCOMPILING)
  # Add target dependency to ensure the vtkEncodeString is built before
  # Rendering is.
  ADD_DEPENDENCIES(vtk${KIT} vtkEncodeString)
ENDIF(NOT CMAKE_CROSSCOMPILING)