1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494
|
# This module cannot be built at the same time as vtkRenderingOpenGL2
if(TARGET vtkRenderingOpenGL2)
message(FATAL_ERROR "vtkRenderingOpenGL cannot be built with vtkRenderingOpenGL2, please disable one of them.")
endif()
# FIXME: This should probably be fixed, vtkgl generation needs some refinement
# to allow for things to split up properly.
set(VTK_USE_X_DEFAULT OFF)
if(APPLE)
option(VTK_USE_COCOA "Use Cocoa for VTK render windows" ON)
option(VTK_USE_CARBON "Use Carbon for VTK render windows (deprecated)" OFF)
mark_as_advanced(VTK_USE_COCOA VTK_USE_CARBON)
if(VTK_USE_COCOA AND VTK_USE_CARBON)
message(FATAL_ERROR "You can't enable Carbon and Cocoa - you must choose one.")
endif()
elseif(UNIX)
set(VTK_USE_X_DEFAULT ON)
endif()
option(VTK_USE_X "Use X for VTK render windows" ${VTK_USE_X_DEFAULT})
mark_as_advanced(VTK_USE_X)
# OSMesa logic for offscreen mesa rendering.
option(VTK_OPENGL_HAS_OSMESA
"The OpenGL library being used supports off screen Mesa calls" OFF)
option(VTK_USE_OFFSCREEN "Use off screen calls by default" OFF)
unset(VTK_CAN_DO_OFFSCREEN)
if(VTK_OPENGL_HAS_OSMESA OR WIN32)
set(VTK_CAN_DO_OFFSCREEN 1)
endif()
mark_as_advanced(VTK_OPENGL_HAS_OSMESA VTK_USE_OFFSCREEN)
if(VTK_USE_X OR VTK_USE_CARBON OR VTK_USE_COCOA OR WIN32)
set(VTK_USE_OSMESA FALSE)
else()
set(VTK_USE_OSMESA TRUE)
endif()
# FIXME: The TDx support needs some refactoring before we can build it in a
# modular fashion, for now it must remain an option on vtkRenderingOpenGL.
option(VTK_USE_TDX "Use TDx interaction devices" OFF)
mark_as_advanced(VTK_USE_TDX)
if (TDX_INCLUDE_DIR)
include_directories(${TDX_INCLUDE_DIR})
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkTDxConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h)
include(vtkObjectFactory)
set(Module_SRCS
vtkCameraPass.cxx
vtkChooserPainter.cxx
vtkClearRGBPass.cxx
vtkClearZPass.cxx
vtkClipPlanesPainter.cxx
vtkCoincidentTopologyResolutionPainter.cxx
vtkColorMaterialHelper.cxx
vtkCompositePainter.cxx
vtkCompositePolyDataMapper2.cxx
vtkDataTransferHelper.cxx
vtkDefaultPainter.cxx
vtkDefaultPass.cxx
vtkDepthPeelingPass.cxx
vtkDisplayListPainter.cxx
vtkFrameBufferObject.cxx
vtkFrameBufferObject2.cxx
vtkGLSLShaderDeviceAdapter2.cxx
vtkGaussianBlurPass.cxx
vtkGenericOpenGLRenderWindow.cxx
vtkHardwareSelectionPolyDataPainter.cxx # Needed by vtkPainterPolyDataMapper
vtkImageProcessingPass.cxx
vtkLightingHelper.cxx
vtkLightingPainter.cxx
vtkLightsPass.cxx
vtkLinesPainter.cxx
vtkOpaquePass.cxx
vtkOpenGLActor.cxx
vtkOpenGLCamera.cxx
vtkOpenGLClipPlanesPainter.cxx
vtkOpenGLCoincidentTopologyResolutionPainter.cxx
vtkOpenGLCompositePainter.cxx
vtkOpenGLDisplayListPainter.cxx
vtkOpenGLExtensionManager.cxx
vtkOpenGLGL2PSHelper.cxx
vtkOpenGLGlyph3DMapper.cxx
vtkOpenGLHardwareSelector.cxx
vtkOpenGLHardwareSupport.cxx
vtkOpenGLImageMapper.cxx
vtkOpenGLImageSliceMapper.cxx
vtkOpenGLLabeledContourMapper.cxx
vtkOpenGLLight.cxx
vtkOpenGLLightMonitor.cxx
vtkOpenGLLightingPainter.cxx
vtkOpenGLModelViewProjectionMonitor.cxx
vtkOpenGLPainterDeviceAdapter.cxx
vtkOpenGLPolyDataMapper2D.cxx
vtkOpenGLProperty.cxx
vtkOpenGLRenderWindow.cxx
vtkOpenGLRenderer.cxx
vtkOpenGLRepresentationPainter.cxx
vtkOpenGLScalarsToColorsPainter.cxx
vtkOpenGLState.cxx
vtkOpenGLTexture.cxx
vtkOverlayPass.cxx
vtkPainter.cxx
vtkPainterPolyDataMapper.cxx
vtkPixelBufferObject.cxx
vtkPointsPainter.cxx
vtkPolyDataPainter.cxx
vtkPolygonsPainter.cxx
vtkPrimitivePainter.cxx
vtkRenderPass.cxx
vtkRenderPassCollection.cxx
vtkRenderState.cxx
vtkRenderbuffer.cxx
vtkRepresentationPainter.cxx
vtkScalarsToColorsPainter.cxx
vtkSequencePass.cxx
vtkShader2.cxx
vtkShader2Collection.cxx
vtkShaderProgram2.cxx
vtkShadowMapBakerPass.cxx
vtkShadowMapPass.cxx
vtkSobelGradientMagnitudePass.cxx
vtkStandardPolyDataPainter.cxx
vtkTStripsPainter.cxx
vtkTextureObject.cxx
vtkTextureUnitManager.cxx
vtkTranslucentPass.cxx
vtkUniformVariables.cxx
vtkValuePainter.cxx
vtkValuePass.cxx
vtkValuePasses.cxx
vtkVolumetricPass.cxx
${CMAKE_CURRENT_BINARY_DIR}/vtkgl.cxx
${CMAKE_CURRENT_BINARY_DIR}/vtkRenderingOpenGLObjectFactory.cxx
)
if (NOT VTK_LEGACY_REMOVE)
# vtkOpenGLPolyDataMapper is only added if not removing legacy code.
list(APPEND Module_SRCS
vtkOpenGLPolyDataMapper.cxx)
endif()
if(VTK_USE_TDX)
list(APPEND Module_SRCS
vtkTDxDevice.cxx
vtkTDxInteractorStyleGeo.cxx)
if(WIN32)
list(APPEND Module_SRCS vtkTDxWinDevice.cxx)
endif()
if(UNIX)
list(APPEND Module_SRCS vtkTDxUnixDevice.cxx)
endif()
if(APPLE)
list(APPEND Module_SRCS vtkTDxMacDevice.cxx)
endif()
endif()
set(${vtk-module}_HDRS
vtkgluPickMatrix.h
vtkOpenGL.h
${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h
${CMAKE_CURRENT_BINARY_DIR}/vtkRenderingOpenGLConfigure.h
${CMAKE_CURRENT_BINARY_DIR}/vtkgl.h
${CMAKE_CURRENT_BINARY_DIR}/vtkOpenGLError.h
)
set_source_files_properties(
vtkImageProcessingPass
vtkOpenGLRenderWindow
vtkRenderPass
vtkRenderState
vtkPainter
vtkPolyDataPainter
vtkPrimitivePainter
ABSTRACT
)
set_source_files_properties(
vtkLightingHelper
vtkRenderState
vtkOpenGLState
vtkOpenGLGL2PSHelper
vtkShader2
vtkShader2Collection
vtkShaderProgram2
vtkTextureUnitManager
vtkgl
vtkRenderingOpenGLObjectFactory
WRAP_EXCLUDE
)
if(VTK_USE_OSMESA)
find_package(OpenGL)
else()
find_package(OpenGL REQUIRED)
endif()
# Configuration for vtkOpenGLExtensionManager
if(WIN32)
set(VTK_USE_WGL_GET_PROC_ADDRESS 1)
find_package(DirectX QUIET)
if(DirectX_FOUND)
set(VTK_USE_DIRECTX 1)
endif()
elseif(APPLE)
set(VTK_USE_APPLE_LOADER 1)
set(VTK_USE_CORE_GRAPHICS 1)
else()
include(CheckFunctionExists)
set(VTK_SAVE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
set(CMAKE_REQUIRED_LIBRARIES
${OPENGL_LIBRARIES}
${CMAKE_THREAD_LIBS}
${CMAKE_REQUIRED_LIBRARIES}
-lm
)
if(VTK_USE_X)
include(vtkTestGLX)
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()
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()
if(NOT VTK_GLX_GET_PROC_ADDRESS_ARB_PROTOTYPE_EXISTS)
set(VTK_DEFINE_GLX_GET_PROC_ADDRESS_PROTOTYPE 1)
endif()
else()
check_function_exists(glXGetProcAddress VTK_USE_GLX_GET_PROC_ADDRESS)
if(NOT VTK_USE_GLX_GET_PROC_ADDRESS)
message(STATUS "Could not find extension loader. Extensions disabled.")
set(VTK_NO_EXTENSION_LOADING 1)
endif()
endif()
find_package(NVCtrlLib QUIET)
mark_as_advanced(NVCtrlLib_INCLUDE_DIR NVCtrlLib_LIBRARY)
if(NVCtrlLib_FOUND)
set(VTK_USE_NVCONTROL 1)
endif()
elseif (VTK_USE_OSMESA)
# we'll use OSMesa to load extensions.
else()
set(VTK_NO_EXTENSION_LOADING 1)
endif()
set(CMAKE_REQUIRED_LIBRARIES "${VTK_SAVE_CMAKE_REQUIRED_LIBRARIES}")
endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/vtkOpenGLExtensionManagerConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkOpenGLExtensionManagerConfigure.h)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vtkgl.cxx ${CMAKE_CURRENT_BINARY_DIR}/vtkgl.h
COMMAND vtkParseOGLExt
ARGS ${CMAKE_CURRENT_BINARY_DIR} ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE}
DEPENDS ${VTK_GLEXT_FILE} ${VTK_GLXEXT_FILE} ${VTK_WGLEXT_FILE}
)
include_directories(${OPENGL_INCLUDE_DIR})
set(shader_files
vtkColorMaterialHelper_vs.glsl
vtkDepthPeeling_fs.glsl
vtkGaussianBlurPassShader_fs.glsl
vtkLighting_s.glsl # s not vs or fs because it can be used in both.
vtkLightingHelper_s.glsl # s not vs or fs because it can be used in both.
vtkOpenGLRenderer_PeelingFS.glsl
vtkOpenGLPropertyDefaultPropFunc_fs.glsl
vtkOpenGLPropertyDefaultPropFunc_vs.glsl
vtkOpenGLPropertyDefaultMain_fs.glsl
vtkOpenGLPropertyDefaultMain_vs.glsl
vtkSobelGradientMagnitudePassShader1_fs.glsl
vtkSobelGradientMagnitudePassShader2_fs.glsl
vtkShadowMapPassShader_fs.glsl
vtkShadowMapPassShader_vs.glsl
)
unset(shader_h_files)
foreach(file ${shader_files})
get_filename_component(file_we ${file} NAME_WE)
set(src ${CMAKE_CURRENT_SOURCE_DIR}/${file})
set(res ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.cxx)
set(resh ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.h)
list(APPEND shader_h_files ${resh})
add_custom_command(
OUTPUT ${res} ${resh}
DEPENDS ${src} vtkEncodeString
COMMAND vtkEncodeString
ARGS ${res} ${src} ${file_we} --build-header VTKRENDERINGOPENGL_EXPORT vtkRenderingOpenGLModule.h
)
list(APPEND Module_SRCS ${res})
set_source_files_properties(${file_we} WRAP_EXCLUDE)
endforeach()
set(opengl_overrides
Actor
Camera
ClipPlanesPainter
CoincidentTopologyResolutionPainter
CompositePainter
DisplayListPainter
Glyph3DMapper
HardwareSelector
ImageSliceMapper
LabeledContourMapper
Light
LightingPainter
PainterDeviceAdapter
Property
Renderer
RepresentationPainter
ScalarsToColorsPainter
Texture
# Some from the vtkImagingFactory class
ImageMapper
PolyDataMapper2D
)
# Some that do not follow the naming scheme...
list(APPEND vtk_module_overrides "vtkPolyDataMapper")
set(vtk_module_vtkPolyDataMapper_override "vtkPainterPolyDataMapper")
# FIXME: Not sure that this is the best way to handle X...
if(VTK_USE_X)
find_package(X11 REQUIRED)
if(NOT X11_Xt_FOUND)
message(FATAL_ERROR "X11_Xt_LIB could not be found. Required for VTK X lib.")
endif()
include_directories(${X11_INCLUDE_DIR} ${X11_Xt_INCLUDE_PATH})
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkXRenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkXOpenGLRenderWindow")
list(APPEND Module_SRCS
vtkXRenderWindowInteractor.cxx
vtkXOpenGLRenderWindow.cxx
)
elseif(VTK_USE_OSMESA)
message(STATUS "VTK will be built with OSMesa support!")
find_package(OSMesa REQUIRED)
if(NOT OSMESA_FOUND)
message(FATAL_ERROR "The OSMesa library could not be found. REQUIRED for off screen rendering")
endif()
include_directories(${OSMESA_INCLUDE_DIR})
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkOSOpenGLRenderWindow")
list(APPEND Module_SRCS vtkOSOpenGLRenderWindow.cxx)
elseif(WIN32)
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkWin32RenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkWin32OpenGLRenderWindow")
list(APPEND Module_SRCS
vtkWin32RenderWindowInteractor.cxx
vtkWin32OpenGLRenderWindow.cxx
)
elseif(VTK_USE_COCOA)
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkCocoaRenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkCocoaRenderWindow")
list(APPEND Module_SRCS
vtkCocoaRenderWindowInteractor.mm
vtkCocoaRenderWindow.mm
vtkCocoaGLView.mm
)
list(APPEND ${vtk-module}_HDRS
vtkCocoaMacOSXSDKCompatibility.h
)
# Set specified Objective-C++ flags, if any.
if(VTK_REQUIRED_OBJCXX_FLAGS)
set_source_files_properties(vtkCocoaRenderWindowInteractor.mm
vtkCocoaRenderWindow.mm
vtkCocoaGLView.mm
PROPERTIES COMPILE_FLAGS "${VTK_REQUIRED_OBJCXX_FLAGS}")
endif()
set_source_files_properties(vtkCocoaGLView WRAP_EXCLUDE)
elseif(VTK_USE_CARBON)
# Add some custom overrides
list(APPEND vtk_module_overrides "vtkRenderWindowInteractor")
set(vtk_module_vtkRenderWindowInteractor_override "vtkCarbonRenderWindowInteractor")
list(APPEND vtk_module_overrides "vtkRenderWindow")
set(vtk_module_vtkRenderWindow_override "vtkCarbonRenderWindow")
list(APPEND Module_SRCS
vtkCarbonRenderWindowInteractor.cxx
vtkCarbonRenderWindow.cxx
)
endif()
# Now to see about the GPU info list.
list(APPEND vtk_module_overrides "vtkGPUInfoList")
if(VTK_USE_NVCONTROL)
list(APPEND Module_SRCS "vtkXGPUInfoList.cxx")
set(extra_libs ${NVCtrlLib_LIBRARY})
include_directories(${NVCtrlLib_INCLUDE_DIR})
set(vtk_module_vtkGPUInfoList_override "vtkXGPUInfoList")
elseif(VTK_USE_CORE_GRAPHICS)
list(APPEND Module_SRCS "vtkCoreGraphicsGPUInfoList.cxx")
set(extra_libs)
set(vtk_module_vtkGPUInfoList_override "vtkCoreGraphicsGPUInfoList")
elseif(VTK_USE_DIRECTX)
list(APPEND Module_SRCS "vtkDirectXGPUInfoList.cxx")
set(extra_libs ${DirectX_LIBRARY} wbemuuid)
include_directories(${DirectX_INCLUDE_DIR})
set(vtk_module_vtkGPUInfoList_override "vtkDirectXGPUInfoList")
else()
# Shouldn't this just be the base class, and the others override if needed?
list(APPEND Module_SRCS "vtkDummyGPUInfoList.cxx")
set(vtk_module_vtkGPUInfoList_override "vtkDummyGPUInfoList")
endif()
foreach(_override ${opengl_overrides})
vtk_add_override(vtk${_override} vtkOpenGL${_override})
endforeach()
# Now lets create the object factory classes
vtk_object_factory_configure("${vtk_module_overrides}")
# Configure the module specific settings into a module configured header.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkRenderingOpenGLConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkRenderingOpenGLConfigure.h)
# Set up some of the module specific preprocessor definitions.
set(${vtk-module}_EXPORT_CODE "#include \"vtkRenderingOpenGLConfigure.h\"")
# Since several headers in this module include vtkOpenGL.h which needed GL.h,
# need to ensure that any dependent modules inherit the include directory
# automatically.
set(${vtk-module}_INCLUDE_DIRS "${OPENGL_INCLUDE_DIR}")
# Detect and clear OpenGL errors. If not then other classes/user code
# may detect VTK's OpenGL errors and vice-versa.
set(VTK_REPORT_OPENGL_ERRORS ON CACHE BOOL "Enable OpenGL error check and report")
cmake_dependent_option(VTK_REPORT_OPENGL_ERRORS_IN_RELEASE_BUILDS
"Enable OpenGL error check and reporting in non-debug builds." OFF
VTK_REPORT_OPENGL_ERRORS OFF)
mark_as_advanced(VTK_REPORT_OPENGL_ERRORS VTK_REPORT_OPENGL_ERRORS_IN_RELEASE_BUILDS)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/vtkOpenGLError.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkOpenGLError.h)
# For testing new driver releases
set(VTK_IGNORE_GLDRIVER_BUGS
OFF CACHE BOOL
"Enable buggy OpenGL drivers for testing.")
mark_as_advanced(VTK_IGNORE_GLDRIVER_BUGS)
if (VTK_IGNORE_GLDRIVER_BUGS)
set_property(SOURCE
vtkOpenGLExtensionManager.cxx
APPEND PROPERTY
COMPILE_DEFINITIONS
VTK_IGNORE_GLDRIVER_BUGS)
endif()
vtk_module_library(vtkRenderingOpenGL ${Module_SRCS})
vtk_module_link_libraries(vtkRenderingOpenGL
LINK_PUBLIC ${OPENGL_LIBRARIES} ${extra_libs})
if(VTK_USE_X)
vtk_module_link_libraries(vtkRenderingOpenGL
LINK_PUBLIC ${X11_LIBRARIES} ${X11_Xt_LIB})
elseif(VTK_USE_COCOA)
vtk_module_link_libraries(vtkRenderingOpenGL LINK_PUBLIC "-framework Cocoa")
elseif(VTK_USE_CARBON)
vtk_module_link_libraries(vtkRenderingOpenGL LINK_PUBLIC "-framework Carbon")
endif()
if(VTK_OPENGL_HAS_OSMESA)
vtk_module_link_libraries(vtkRenderingOpenGL LINK_PUBLIC ${OSMESA_LIBRARY})
endif()
|