mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
Configuration - Only link TKIVtk against RenderingGL2PSOpenGL2 when VTK provides it (#1214)
- Guard `vtkRenderingGL2PSOpenGL2` being appended to `USED_TOOLKITS_BY_CURRENT_PROJECT` behind a `TARGET` existence check for both namespaced (VTK 9) and legacy (VTK 7/8) target names. - Add inline comments documenting why the guard is necessary (module omitted on Android/iOS and when building VTK with GLES).
This commit is contained in:
@@ -277,7 +277,11 @@ if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2" OR IS_VTK_9XX)
|
||||
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
|
||||
if(VTK_MAJOR_VERSION GREATER 6)
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingGL2PSOpenGL2)
|
||||
# VTK omits RenderingGL2PSOpenGL2 on Android/iOS and under GLES (Emscripten);
|
||||
# only add the dependency when the target is actually provided.
|
||||
if (TARGET VTK::RenderingGL2PSOpenGL2 OR TARGET vtkRenderingGL2PSOpenGL2)
|
||||
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingGL2PSOpenGL2)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user