From 294b73e00e4455c04ac7d5263e08d4b75cc74c61 Mon Sep 17 00:00:00 2001 From: Dave Pugmire Date: Tue, 8 Mar 2016 13:08:53 -0500 Subject: [PATCH] Make the rendering part of the build optional. Add the mesa libs to the link line. --- CMakeLists.txt | 1 + vtkm/CMakeLists.txt | 10 ++++++---- vtkm/rendering/CMakeLists.txt | 1 - vtkm/rendering/testing/CMakeLists.txt | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63fa6dc7f..91b2cfffa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,6 +99,7 @@ option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF) option(VTKm_BUILD_DOCUMENTATION "Build Doxygen documentation" OFF) option(VTKm_BUILD_EXAMPLES "Build examples" OFF) +option(VTKm_BUILD_RENDERING "Build rendering" OFF) option(VTKm_USE_DOUBLE_PRECISION "Use double precision for floating point calculations" diff --git a/vtkm/CMakeLists.txt b/vtkm/CMakeLists.txt index b5e619e84..2ffb9fc1d 100644 --- a/vtkm/CMakeLists.txt +++ b/vtkm/CMakeLists.txt @@ -55,6 +55,12 @@ if(VTKm_ENABLE_OPENGL_INTEROP) add_subdirectory(opengl) endif(VTKm_ENABLE_OPENGL_INTEROP) +#----------------------------------------------------------------------------- +# Build rendering +if(VTKm_BUILD_RENDERING) + add_subdirectory(rendering) +endif(VTKm_BUILD_RENDERING) + #----------------------------------------------------------------------------- #add the control and exec folders add_subdirectory(cont) @@ -75,7 +81,3 @@ add_subdirectory(benchmarking) #----------------------------------------------------------------------------- #add the io folder add_subdirectory(io) - -#----------------------------------------------------------------------------- -#add the rendering folder -add_subdirectory(rendering) diff --git a/vtkm/rendering/CMakeLists.txt b/vtkm/rendering/CMakeLists.txt index a5a8332c7..8b6300239 100644 --- a/vtkm/rendering/CMakeLists.txt +++ b/vtkm/rendering/CMakeLists.txt @@ -39,6 +39,5 @@ include_directories(${OSMESA_INCLUDE_DIR}) - #----------------------------------------------------------------------------- add_subdirectory(testing) diff --git a/vtkm/rendering/testing/CMakeLists.txt b/vtkm/rendering/testing/CMakeLists.txt index 496289631..113104a13 100644 --- a/vtkm/rendering/testing/CMakeLists.txt +++ b/vtkm/rendering/testing/CMakeLists.txt @@ -22,6 +22,6 @@ set(unit_tests UnitTestSceneRendererOSMesa.cxx UnitTestSceneRendererVolume.cxx ) - -VTKM_unit_tests(SOURCES ${unit_tests}) +VTKM_unit_tests(SOURCES ${unit_tests} + LIBRARIES ${OSMESA_LIBRARY})