Split EGL and OSMesa into separate directories. libGL and libOSMesa do not play well together.

This commit is contained in:
Mark Kim 2016-08-08 21:57:38 -04:00
parent 06abce55f4
commit 7bb3e89e87
7 changed files with 75 additions and 24 deletions

@ -116,13 +116,13 @@ macro(vtkm_configure_component_OpenGL)
endmacro(vtkm_configure_component_OpenGL)
macro(vtkm_configure_component_OSMesa)
vtkm_configure_component_OpenGL()
vtkm_configure_component_Base()
if (UNIX AND NOT APPLE)
find_package(MESA ${VTKm_FIND_PACKAGE_QUIETLY})
vtkm_finish_configure_component(OSMesa
DEPENDENT_VARIABLES VTKm_OpenGL_FOUND OSMESA_FOUND
DEPENDENT_VARIABLES OSMESA_FOUND
ADD_INCLUDES ${OSMESA_INCLUDE_DIR}
ADD_LIBRARIES ${OSMESA_LIBRARY}
)

@ -58,19 +58,20 @@ set(osmesa_headers
)
#-----------------------------------------------------------------------------
vtkm_configure_component_OpenGL()
if(VTKm_OpenGL_FOUND)
find_package(MESA ${VTKm_FIND_PACKAGE_QUIETLY})
if(OSMESA_FOUND)
set(headers ${headers} ${osmesa_headers})
endif()
find_package(OpenGL ${VTKm_FIND_PACKAGE_QUIETLY})
if(OPENGL_FOUND)
set(headers ${headers} ${opengl_headers})
vtkm_configure_component_OSMesa()
if(VTKm_OSMesa_FOUND)
set(headers ${headers} ${osmesa_headers})
endif()
vtkm_configure_component_EGL()
if(VTKm_EGL_FOUND)
set(headers ${headers} ${egl_headers})
endif()
find_package(EGL ${VTKm_FIND_PACKAGE_QUIETLY})
if(EGL_FOUND)
set(headers ${headers} ${egl_headers})
endif()
endif()
vtkm_declare_headers(${headers})

@ -18,21 +18,13 @@
## this software.
##============================================================================
add_subdirectory(osmesa)
add_subdirectory(egl)
set(unit_tests
UnitTestMapperRayTracer.cxx
UnitTestMapperVolume.cxx
)
if (VTKm_EGL_FOUND)
set(unit_tests ${unit_tests}
UnitTestMapperEGL.cxx
)
endif()
VTKm_unit_tests(SOURCES ${unit_tests})
if (VTKm_OSMesa_FOUND)
set(unit_tests ${unit_tests}
UnitTestMapperOSMesa.cxx
)
endif()
VTKM_unit_tests(SOURCES ${unit_tests})

@ -0,0 +1,29 @@
#============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
## Copyright 2014 Sandia Corporation.
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
## the U.S. Government retains certain rights in this software.
##
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
## Laboratory (LANL), the U.S. Government retains certain rights in
## this software.
##============================================================================
set(unit_tests)
vtkm_configure_component_EGL()
if (VTKm_EGL_FOUND)
set(unit_tests ${unit_tests}
UnitTestMapperEGL.cxx
)
endif()
VTKm_unit_tests(SOURCES ${unit_tests})

@ -0,0 +1,29 @@
#============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
## Copyright 2014 Sandia Corporation.
## Copyright 2014 UT-Battelle, LLC.
## Copyright 2014 Los Alamos National Security.
##
## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
## the U.S. Government retains certain rights in this software.
##
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
## Laboratory (LANL), the U.S. Government retains certain rights in
## this software.
##============================================================================
set(unit_tests)
vtkm_configure_component_OSMesa()
if (VTKm_OSMesa_FOUND)
set(unit_tests ${unit_tests}
UnitTestMapperOSMesa.cxx
)
endif()
VTKm_unit_tests(SOURCES ${unit_tests})