CMakeLists.txt 14.9 KB
Newer Older
Andy Cedilnik's avatar
Andy Cedilnik committed
1
SET(KIT Rendering)
2
SET(UKIT RENDERING)
3
SET(KIT_TCL_LIBS vtkGraphicsTCL vtkImagingTCL ${VTK_TK_LIBRARIES})
4
5
6
7
8
IF(APPLE)
  SET(KIT_PYTHON_LIBS vtkGraphicsPythonD vtkImagingPythonD)
ELSE(APPLE)
  SET(KIT_PYTHON_LIBS vtkGraphicsPython vtkImagingPython)
ENDIF(APPLE)
9
10
11
12
SET(KIT_JAVA_LIBS vtkGraphicsJava vtkImagingJava)
IF (JAVA_AWT_LIBRARY)
  SET(KIT_JAVA_LIBS ${KIT_JAVA_LIBS} ${JAVA_AWT_LIBRARY})
ENDIF (JAVA_AWT_LIBRARY)
13
SET(KIT_LIBS vtkGraphics vtkImaging vtkIO
14
15
16
17
  vtkftgl
  vtkfreetype
)

Andy Cedilnik's avatar
Andy Cedilnik committed
18
SET( Kit_SRCS
19
vtkAbstractMapper3D.cxx
20
vtkAbstractVolumeMapper.cxx
21
22
23
24
25
26
27
28
29
30
31
32
33
34
vtkAbstractPicker.cxx
vtkAbstractPropPicker.cxx
vtkActor.cxx
vtkActorCollection.cxx
vtkAssembly.cxx
vtkAxisActor2D.cxx
vtkCamera.cxx
vtkCellPicker.cxx
vtkCuller.cxx
vtkCullerCollection.cxx
vtkDataSetMapper.cxx
vtkExporter.cxx
vtkFollower.cxx
vtkFrustumCoverageCuller.cxx
Bill Hoffman's avatar
Bill Hoffman committed
35
vtkGenericRenderWindowInteractor.cxx
36
37
38
39
40
41
42
43
vtkGraphicsFactory.cxx
vtkIVExporter.cxx
vtkImageActor.cxx
vtkImageMapper.cxx
vtkImageViewer.cxx
vtkImageViewer2.cxx
vtkImagingFactory.cxx
vtkImporter.cxx
44
vtkInteractorEventRecorder.cxx
45
46
47
48
49
50
vtkInteractorObserver.cxx
vtkInteractorStyle.cxx
vtkInteractorStyleFlight.cxx
vtkInteractorStyleImage.cxx
vtkInteractorStyleJoystickActor.cxx
vtkInteractorStyleJoystickCamera.cxx
Amy Squillacote's avatar
Amy Squillacote committed
51
vtkInteractorStyleRubberBandZoom.cxx
52
vtkInteractorStyleSwitch.cxx
53
vtkInteractorStyleTerrain.cxx
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
vtkInteractorStyleTrackball.cxx
vtkInteractorStyleTrackballActor.cxx
vtkInteractorStyleTrackballCamera.cxx
vtkInteractorStyleUnicam.cxx
vtkInteractorStyleUser.cxx
vtkLODActor.cxx
vtkLODProp3D.cxx
vtkLabeledDataMapper.cxx
vtkLight.cxx
vtkLightCollection.cxx
vtkLightKit.cxx
vtkMapper.cxx
vtkMapperCollection.cxx
vtkOBJExporter.cxx
vtkOOGLExporter.cxx
vtkParallelCoordinatesActor.cxx
vtkPicker.cxx
vtkPointPicker.cxx
vtkPolyDataMapper.cxx
vtkPolyDataMapper2D.cxx
vtkProp3D.cxx
vtkProp3DCollection.cxx
vtkPropPicker.cxx
vtkProperty.cxx
vtkRenderWindow.cxx
vtkRenderWindowCollection.cxx
vtkRenderWindowInteractor.cxx
vtkRenderer.cxx
vtkRendererCollection.cxx
vtkRendererSource.cxx
vtkScalarBarActor.cxx
vtkScaledTextActor.cxx
vtkSelectVisiblePoints.cxx
87
vtkTesting.cxx
88
vtkTextActor.cxx
89
# vtkTextActor2D.cxx
90
vtkTextActor3D.cxx
91
vtkTextMapper.cxx
Sebastien Barre's avatar
Sebastien Barre committed
92
vtkTextProperty.cxx
93
94
95
96
97
98
99
vtkTexture.cxx
vtkVRMLExporter.cxx
vtkVolume.cxx
vtkVolumeCollection.cxx
vtkVolumeProperty.cxx
vtkWindowToImageFilter.cxx
vtkWorldPointPicker.cxx
Ken Martin's avatar
Ken Martin committed
100
101
)

102
IF(VTK_USE_GL2PS)
103
104
105
  SET(Kit_SRCS ${Kit_SRCS} vtkGL2PSExporter.cxx)
  SET(Kit_GL2PS_SRCS ${VTK_SOURCE_DIR}/Utilities/gl2ps/gl2ps.c)
  ADD_DEFINITIONS(-DGL2PS_HAVE_ZLIB)
106
107
ENDIF(VTK_USE_GL2PS)

Andy Cedilnik's avatar
Andy Cedilnik committed
108
SET( KitOpenGL_SRCS
Ken Martin's avatar
Ken Martin committed
109
110
  vtkOpenGLActor.cxx
  vtkOpenGLCamera.cxx
111
  vtkOpenGLExtensionManager.cxx
Ken Martin's avatar
Ken Martin committed
112
113
114
115
116
117
118
  vtkOpenGLImageActor.cxx
  vtkOpenGLImageMapper.cxx
  vtkOpenGLLight.cxx
  vtkOpenGLPolyDataMapper.cxx
  vtkOpenGLPolyDataMapper2D.cxx
  vtkOpenGLProperty.cxx
  vtkOpenGLRenderWindow.cxx
Brad King's avatar
Brad King committed
119
  vtkOpenGLRenderer.cxx
Ken Martin's avatar
Ken Martin committed
120
121
122
  vtkOpenGLTexture.cxx
  )

123

Ken Martin's avatar
Ken Martin committed
124
SET_SOURCE_FILES_PROPERTIES(
125
vtkAbstractMapper3D
126
vtkAbstractVolumeMapper
127
128
129
130
131
vtkAbstractPicker
vtkAbstractPropPicker
vtkCuller
vtkExporter
vtkImporter
Brad King's avatar
Brad King committed
132
vtkInteractorObserver
133
134
135
vtkMapper
vtkOpenGLRenderWindow
vtkProp3D
Ken Martin's avatar
Ken Martin committed
136
ABSTRACT
Ken Martin's avatar
Ken Martin committed
137
138
)

Andy Cedilnik's avatar
Andy Cedilnik committed
139
140
# Freetype stuff

Andy Cedilnik's avatar
Andy Cedilnik committed
141
SET(Kit_SRCS ${Kit_SRCS}
142
  vtkFreeTypeUtilities.cxx
143
)
Andy Cedilnik's avatar
Andy Cedilnik committed
144
SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
145
146
147
  vtkOpenGLFreeTypeTextMapper.cxx
)
SET_SOURCE_FILES_PROPERTIES(
148
  vtkFreeTypeUtilities
149
150
  WRAP_EXCLUDE
)
Andy Cedilnik's avatar
Andy Cedilnik committed
151
SET(Kit_FT_SRCS 
152
153
154
155
156
157
158
159
160
161
162
163
164
  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
)
165

Yves Starreveld's avatar
   
Yves Starreveld committed
166
IF(VTK_USE_X)
Andy Cedilnik's avatar
Andy Cedilnik committed
167
  SET( Kit_SRCS ${Kit_SRCS}
168
    vtkXRenderWindowInteractor.cxx)
Yves Starreveld's avatar
   
Yves Starreveld committed
169
ENDIF(VTK_USE_X)
Ken Martin's avatar
Ken Martin committed
170

171
172
173
174
# OpenGL extensions stuff.

# Parse the extensions into vtkgl.h/vtkgl.cxx.
ADD_CUSTOM_COMMAND(
175
176
  OUTPUT ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx
  COMMAND ${VTK_PARSEOGLEXT_EXE}
177
  ARGS ${VTK_BINARY_DIR}/Rendering ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE}
178
179
180
181
  DEPENDS ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE} ${VTK_PARSEOGLEXT_EXE}
  )
ADD_CUSTOM_COMMAND(
  OUTPUT ${VTK_BINARY_DIR}/Rendering/vtkgl.h
182
  COMMAND ${VTK_PARSEOGLEXT_EXE}
183
  ARGS ${VTK_BINARY_DIR}/Rendering ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE}
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
  DEPENDS ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE} ${VTK_PARSEOGLEXT_EXE}
  )

SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
  ${VTK_BINARY_DIR}/Rendering/vtkgl.cxx
)

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
  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)
215
    INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
216
    SET(VTK_SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
217
    SET(CMAKE_REQUIRED_LIBRARIES "${OPENGL_LIBRARIES};${CMAKE_THREAD_LIBS};${CMAKE_REQUIRED_LIBRARIES}")
218
219
220
221
    CHECK_FUNCTION_EXISTS(glXGetProcAddressARB VTK_USE_GLX_GET_PROC_ADDRESS_ARB)
    IF (NOT 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)
222
223
224
#         SET(VTK_USE_VTK_DYNAMIC_LOADER 1)
        MESSAGE(STATUS "Could not find extension loader.  Extensions disabled.")
        SET(VTK_NO_EXTENSION_LOADING 1)
225
226
227
228
229
230
231
232
233
      ENDIF (NOT VTK_USE_GLX_GET_PROC_ADDRESS)
    ENDIF (NOT VTK_USE_GLX_GET_PROC_ADDRESS_ARB)
    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
234
235
# Build a list of libraries to link to vtkRendering.

236
IF(VTK_USE_GL2PS)
237
  SET(KIT_LIBS ${KIT_LIBS} ${VTK_ZLIB_LIBRARIES})
238
ENDIF(VTK_USE_GL2PS)
239

Ken Martin's avatar
Ken Martin committed
240
IF (WIN32)
241
  IF(VTK_USE_X)
242
    IF (OPENGL_gl_LIBRARY)
Andy Cedilnik's avatar
Andy Cedilnik committed
243
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
244
                   vtkXOpenGLRenderWindow.cxx)
245
246
      SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} )
    ENDIF (OPENGL_gl_LIBRARY)    
247
  ELSE(VTK_USE_X)
Andy Cedilnik's avatar
Andy Cedilnik committed
248
    SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
249
250
                 vtkWin32OpenGLRenderWindow.cxx
                 vtkWin32RenderWindowInteractor.cxx)
251
    SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} )
252
  ENDIF(VTK_USE_X)
Ken Martin's avatar
Ken Martin committed
253
ELSE (WIN32)
Yves Starreveld's avatar
   
Yves Starreveld committed
254
  IF (APPLE)
255
    IF(VTK_USE_COCOA)
Andy Cedilnik's avatar
Andy Cedilnik committed
256
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
257
258
259
260
                   vtkCocoaRenderWindowInteractor.mm
                   vtkCocoaRenderWindow.mm
                   vtkCocoaWindow.mm
                   vtkCocoaGLView.mm)
Ken Martin's avatar
Ken Martin committed
261
      SET_SOURCE_FILES_PROPERTIES(vtkCocoaGLView vtkCocoaWindow WRAP_EXCLUDE)
262
      SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} "-framework Cocoa")
263
264
    ENDIF(VTK_USE_COCOA)
    IF(VTK_USE_CARBON)
Andy Cedilnik's avatar
Andy Cedilnik committed
265
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
266
267
                   vtkCarbonRenderWindowInteractor.cxx
                   vtkCarbonRenderWindow.cxx)
268
      SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} "-framework Carbon")
269
270
    ENDIF(VTK_USE_CARBON)
    IF(VTK_USE_X)
271
      IF (OPENGL_gl_LIBRARY)
Andy Cedilnik's avatar
Andy Cedilnik committed
272
        SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
273
                     vtkXOpenGLRenderWindow.cxx)
274
        SET (KIT_LIBS ${KIT_LIBS} "-lGL")
275
      ENDIF (OPENGL_gl_LIBRARY)
276
    ENDIF(VTK_USE_X)
Yves Starreveld's avatar
   
Yves Starreveld committed
277
  ELSE (APPLE)
278
    IF (OPENGL_gl_LIBRARY)
Andy Cedilnik's avatar
Andy Cedilnik committed
279
      SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
280
                   vtkXOpenGLRenderWindow.cxx)
281
282
      SET (KIT_LIBS ${KIT_LIBS} ${OPENGL_gl_LIBRARY} )
    ENDIF (OPENGL_gl_LIBRARY)
Yves Starreveld's avatar
   
Yves Starreveld committed
283
  ENDIF (APPLE)
Ken Martin's avatar
Ken Martin committed
284
285
ENDIF (WIN32)

286
287
IF (VTK_USE_MANGLED_MESA)
  IF (MANGLED_MESA_LIBRARY)
Andy Cedilnik's avatar
Andy Cedilnik committed
288
    SET ( KitOpenGL_SRCS ${KitOpenGL_SRCS}
289
290
291
292
293
294
295
296
                 vtkMesaActor.cxx
                 vtkMesaCamera.cxx
                 vtkMesaImageActor.cxx
                 vtkMesaImageMapper.cxx
                 vtkMesaLight.cxx
                 vtkMesaPolyDataMapper.cxx
                 vtkMesaPolyDataMapper2D.cxx
                 vtkMesaProperty.cxx
Brad King's avatar
Brad King committed
297
                 vtkMesaRenderWindow.cxx
298
299
300
                 vtkMesaRenderer.cxx
                 vtkMesaTexture.cxx
                 vtkXMesaRenderWindow.cxx
Berk Geveci's avatar
Berk Geveci committed
301
                )
Andy Cedilnik's avatar
Andy Cedilnik committed
302
    SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
303
304
      vtkMesaFreeTypeTextMapper.cxx
    )
Ken Martin's avatar
Ken Martin committed
305
    SET_SOURCE_FILES_PROPERTIES(vtkMesaRenderWindow ABSTRACT)
306
    SET (KIT_LIBS ${KIT_LIBS} ${MANGLED_MESA_LIBRARY})
307
    IF(MANGLED_OSMESA_LIBRARY)
308
      SET( KIT_LIBS ${KIT_LIBS} ${MANGLED_OSMESA_LIBRARY} )
309
310
311
312
313
    ENDIF(MANGLED_OSMESA_LIBRARY)
  ENDIF (MANGLED_MESA_LIBRARY)
ELSE (VTK_USE_MANGLED_MESA)
  IF(VTK_OPENGL_HAS_OSMESA)
    IF (OSMESA_LIBRARY)
314
      SET(KIT_LIBS ${KIT_LIBS} ${OSMESA_LIBRARY})
315
316
317
    ENDIF (OSMESA_LIBRARY)
  ENDIF(VTK_OPENGL_HAS_OSMESA)
ENDIF(VTK_USE_MANGLED_MESA)
Andy Cedilnik's avatar
Andy Cedilnik committed
318
319
SET(Kit_SRCS ${Kit_SRCS} ${KitOpenGL_SRCS})
SET(Kit_EXTRA_SRCS ${Kit_FT_SRCS})
320
321
322
323
324

IF(VTK_USE_GL2PS)
SET(Kit_EXTRA_SRCS ${Kit_EXTRA_SRCS} ${Kit_GL2PS_SRCS})
ENDIF(VTK_USE_GL2PS)

Andy Cedilnik's avatar
Andy Cedilnik committed
325
326
327
328
329
SET(Kit_EXTRA_CMDS)
SET(Kit_TCL_EXTRA_SRCS)
SET(Kit_PYTHON_EXTRA_SRCS)
SET(Kit_JAVA_EXTRA_SRCS)
SET(Kit_TCL_EXTRA_CMDS)
Ken Martin's avatar
Ken Martin committed
330

331
IF (TK_LIBRARY)
332
333
334
335
336
  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)
337
338
339
340
  IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
    INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR}
                  FILES ${CMAKE_CURRENT_BINARY_DIR}/vtkTkInternals.h)
  ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
341
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
342
ENDIF (TK_LIBRARY)
343

Ken Martin's avatar
Ken Martin committed
344
IF (VTK_WRAP_TCL)
345
  IF(NOT VTK_USE_COCOA)
Andy Cedilnik's avatar
Andy Cedilnik committed
346
    SET(KitTCL_SRCS
347
348
349
       vtkTkRenderWidget.cxx
       vtkTkImageViewerWidget.cxx)
  ENDIF(NOT VTK_USE_COCOA)
Ken Martin's avatar
updates    
Ken Martin committed
350

351
352
353
354
355
  # Use special interactor for X and Tk.
  IF(VTK_USE_X)
    SET(KitTCL_SRCS ${KitTCL_SRCS}
      vtkXRenderWindowTclInteractor.cxx)
  ENDIF(VTK_USE_X)
356

357
358
359
360
  # if VTK_DISABLE_TK_INIT is not defined, then those widgets *will* be
  # initialized by the Rendering kit. If *not* defined we need to do it
  # manually when needed (for example, in vtkTkAppInit so that
  # we can use them from the vtk executable
361
  IF (NOT VTK_DISABLE_TK_INIT)
Andy Cedilnik's avatar
Andy Cedilnik committed
362
363
364
   SET(Kit_TCL_EXTRA_CMDS 
     vtkTkRenderWidget 
     vtkTkImageViewerWidget)
365
  ENDIF (NOT VTK_DISABLE_TK_INIT)
Andy Cedilnik's avatar
Andy Cedilnik committed
366
ENDIF (VTK_WRAP_TCL)
Yves Starreveld's avatar
   
Yves Starreveld committed
367

368
# -----------------------------------------------------------------
369
# Start of common section
370
371

# Setup vtkInstantiator registration for this library's classes.
Ken Martin's avatar
Ken Martin committed
372
373
VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
                       "${Kit_SRCS}"
Ken Martin's avatar
Ken Martin committed
374
                       VTK_${UKIT}_EXPORT
Ken Martin's avatar
Ken Martin committed
375
                       ${VTK_BINARY_DIR} "")
376
377
378
379
380

ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})

# Allow the user to customize their build with some local options
#
381
SET(LOCALUSERMACRODEFINED 0)
382
383
384
385
386
387
388
INCLUDE (${VTK_BINARY_DIR}/${KIT}/LocalUserOptions.cmake OPTIONAL)
INCLUDE (${VTK_SOURCE_DIR}/${KIT}/LocalUserOptions.cmake OPTIONAL)

# if we are wrapping into Tcl then add the library and extra
# source files
#
IF (VTK_WRAP_TCL)
389
390
391
  VTK_WRAP_TCL3(vtk${KIT}TCL KitTCL_SRCS 
                "${Kit_SRCS}"
                "${Kit_TCL_EXTRA_CMDS}")
392
393
  ADD_LIBRARY(vtk${KIT}TCL ${KitTCL_SRCS} ${Kit_TCL_EXTRA_SRCS})
  TARGET_LINK_LIBRARIES (vtk${KIT}TCL vtk${KIT} ${KIT_TCL_LIBS})
394
395
396
397

  IF(NOT VTK_INSTALL_NO_LIBRARIES)
    INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}TCL)
  ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
Ken Martin's avatar
Ken Martin committed
398
399
ENDIF (VTK_WRAP_TCL)

400
# if we are wrapping into Python then add the library and extra
Ken Martin's avatar
Ken Martin committed
401
402
403
# source files
#
IF (VTK_WRAP_PYTHON)
404
  VTK_WRAP_PYTHON3(vtk${KIT}Python KitPython_SRCS "${Kit_SRCS}")
405
406
407
  IF (APPLE)
    ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
    ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
408
409
    TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
                          ${VTK_PYTHON_LIBRARIES})
410
    TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
411
412
413
    IF(NOT VTK_INSTALL_NO_LIBRARIES)
      INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}PythonD)
    ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
414
415
416
417
  ELSE (APPLE)
    ADD_LIBRARY(vtk${KIT}Python MODULE ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
    TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
  ENDIF(APPLE)
418
  IF(WIN32)
419
    TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
420
  ENDIF(WIN32)
421
422
423
  IF(NOT VTK_INSTALL_NO_LIBRARIES)
    INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Python)
  ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
424
425
426
427
428
429
ENDIF (VTK_WRAP_PYTHON)

# if we are wrapping into Java then add the library and extra
# source files
#
IF (VTK_WRAP_JAVA)
430
431
432
  IF(APPLE)
    ADD_DEFINITIONS("-ObjC++")
  ENDIF(APPLE)
433
  VTK_WRAP_JAVA3(vtk${KIT}Java KitJava_SRCS "${Kit_SRCS}")
434
435
  ADD_LIBRARY(vtk${KIT}Java SHARED ${KitJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
  TARGET_LINK_LIBRARIES(vtk${KIT}Java vtk${KIT} ${KIT_JAVA_LIBS})
436
437
438
  IF(NOT VTK_INSTALL_NO_LIBRARIES)
    INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Java)
  ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
439
440
441
442
ENDIF (VTK_WRAP_JAVA)

TARGET_LINK_LIBRARIES(vtk${KIT} ${KIT_LIBS})

443
444
445
446
447
448
IF(NOT VTK_INSTALL_NO_LIBRARIES)
  INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT})
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
  INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h ${Kit_SRCS})
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
449

450
451
VTK_EXPORT_KIT("${KIT}" "${UKIT}" "${Kit_SRCS}")

452
453
454
455
456
457
458
459
460
# If the user defined a custom macro, execute it now and pass in all the srcs
#
IF(LOCALUSERMACRODEFINED)
  LocalUserOptionsMacro( "${Kit_SRCS}"       "${Kit_EXTRA_SRCS}"
                         "${KitTCL_SRCS}"    "${Kit_TCL_EXTRA_SRCS}"
                         "${KitJava_SRCS}"   "${Kit_JAVA_EXTRA_SRCS}"
                         "${KitPython_SRCS}" "${Kit_PYTHON_EXTRA_SRCS}")
ENDIF(LOCALUSERMACRODEFINED)

461
462
463
# End of common section
# -----------------------------------------------------------------

464
465
466
467
468
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
  INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h
    vtkOpenGL
    )
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
469

470
IF (VTK_WRAP_PYTHON)
471
  IF (TK_LIBRARY)
472
     IF(NOT VTK_USE_COCOA)
Andy Cedilnik's avatar
Andy Cedilnik committed
473
       SET(RenderingPythonTkWidgets_SRCS
474
475
476
477
          vtkTkWidgetsInit.cxx
          vtkTkRenderWidgetPython.cxx
          vtkTkImageViewerWidgetPython.cxx
          )
Andy Cedilnik's avatar
Andy Cedilnik committed
478
479
480
         ADD_LIBRARY(vtkRenderingPythonTkWidgets SHARED
                     ${RenderingPythonTkWidgets_SRCS})
       TARGET_LINK_LIBRARIES (vtkRenderingPythonTkWidgets
Andy Cedilnik's avatar
Andy Cedilnik committed
481
                              vtk${KIT}
482
                              ${VTK_TK_LIBRARIES})
483
484
485
       IF(NOT VTK_INSTALL_NO_LIBRARIES)
         INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkRenderingPythonTkWidgets)
       ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
486
     ENDIF(NOT VTK_USE_COCOA)
487
  ENDIF (TK_LIBRARY)
Ken Martin's avatar
Ken Martin committed
488
ENDIF (VTK_WRAP_PYTHON)
Andy Cedilnik's avatar
Andy Cedilnik committed
489

Yves Starreveld's avatar
   
Yves Starreveld committed
490
IF(VTK_USE_X)
491
  TARGET_LINK_LIBRARIES(vtk${KIT} -lXt ${X11_LIBRARIES})
Yves Starreveld's avatar
   
Yves Starreveld committed
492
ENDIF(VTK_USE_X)
493

494
495
496
497
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
  INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} FILES
                ${VTK_SOURCE_DIR}/${KIT}/Testing/Cxx/vtkRegressionTestImage.h)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)