mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-08 11:29:02 +00:00
Allow vtkm_find_gl CMake function to be used no matter vtk-m settings
Previously vtkm_find_gl was only usable when rendering was enabled. This is problematic as examples would use vtkm_find_gl even if they didn't use vtkm rendering library.
This commit is contained in:
parent
c9deb99e14
commit
fb0da7f2de
@ -92,7 +92,4 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTKm_CMAKE_MODULE_PATH})
|
||||
|
||||
# This includes a host of functions used by VTK-m CMake.
|
||||
include(VTKmWrappers)
|
||||
|
||||
if(VTKm_ENABLE_RENDERING)
|
||||
include(VTKmRenderingContexts)
|
||||
endif()
|
||||
include(VTKmRenderingContexts)
|
||||
|
@ -94,12 +94,13 @@ if(VTKm_ENABLE_GL_CONTEXT OR
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
if(TARGET vtkm_rendering_gl_context)
|
||||
return()
|
||||
if(VTKm_ENABLE_RENDERING)
|
||||
if(TARGET vtkm_rendering_gl_context)
|
||||
return()
|
||||
endif()
|
||||
add_library(vtkm_rendering_gl_context INTERFACE)
|
||||
endif()
|
||||
|
||||
add_library(vtkm_rendering_gl_context INTERFACE)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
if(VTKm_ENABLE_GL_CONTEXT)
|
||||
if(TARGET OpenGL::GLX)
|
||||
|
@ -18,6 +18,10 @@
|
||||
## this software.
|
||||
##============================================================================
|
||||
|
||||
#unconditionally include rendering contexts so that the helper functions
|
||||
#are around even if rendering isn't enabled
|
||||
include(VTKmRenderingContexts)
|
||||
|
||||
if(NOT VTKm_ENABLE_RENDERING)
|
||||
return()
|
||||
endif()
|
||||
@ -190,7 +194,6 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
include(VTKmRenderingContexts)
|
||||
target_link_libraries(vtkm_rendering PUBLIC vtkm_rendering_gl_context)
|
||||
|
||||
if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
|
||||
|
Loading…
Reference in New Issue
Block a user