[vtkusers] building vtk without opengl and rendering

Alex Pletzer axp5530 at psu.edu
Fri May 15 17:25:12 EDT 2015


Thanks Marcus and Bill!

The following settings will be build a lightweight version of vtk, with 
python wrapping but no rendering and no dependency on opengl:

cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:PATH=`pwd`/../software \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_Group_StandAlone:BOOL=OFF \
-DVTK_Group_Rendering:BOOL=OFF \
-DModule_vtkCommonColor:BOOL=ON \
-DModule_vtkCommonComputationalGeometry:BOOL=ON \
-DModule_vtkCommonDataModel:BOOL=ON \
-DModule_vtkCommonExecutionModel:BOOL=ON \
-DModule_vtkCommonMath:BOOL=ON \
-DModule_vtkCommonMisc:BOOL=ON \
-DModule_vtkCommonSystem:BOOL=ON \
-DModule_vtkCommonTransforms:BOOL=ON \
-DModule_vtkFiltersCore:BOOL=ON \
-DModule_vtkFiltersExtraction:BOOL=ON \
-DModule_vtkFiltersGeneral:BOOL=ON \
-DModule_vtkFiltersGeneric:BOOL=ON \
-DModule_vtkFiltersGeometry:BOOL=ON \
-DModule_vtkFiltersPython:BOOL=ON \
-DModule_vtkIOCore:BOOL=ON \
-DModule_vtkIOGeometry:BOOL=ON \
-DModule_vtkIOLegacy:BOOL=ON \
-DModule_vtkWrappingPythonCore:BOOL=ON \
<srcdir>

--Alex

On 05/14/2015 11:37 AM, Marcus D. Hanwell wrote:
> You should be able to leave StandAlone ON, Rendering OFF (that was the
> point of the rendering group, to separate stand alone from modules
> requiring OpenGL). It is possible something crept in, I haven't looked
> into it yet, but if StandAlone currently requires OpenGL we should fix
> that, and try to add a dashboard that tests this.
>
> On Thu, May 14, 2015 at 11:06 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> In the past, I have done the following:
>> VTK_BUILD_ALL_MODULES_FOR_TESTS:BOOL=OFF
>> VTK_Group_Rendering:BOOL=OFF
>> VTK_Group_StandAlone:BOOL=OFF
>>
>> then I enable the modules I need (e.g.)
>> Module_vtkCommonCore:BOOL=ON
>> Module_vtkFiltersGeneral:BOOL=ON
>>
>>
>> On Thu, May 14, 2015 at 11:01 AM, Alex Pletzer <axp5530 at psu.edu> wrote:
>>> Hi David,
>>>
>>> Yes, tests and examples are turned off. My settings are:
>>>
>>>   BUILD_DOCUMENTATION              OFF
>>>   BUILD_EXAMPLES                   OFF
>>>   BUILD_SHARED_LIBS                ON
>>>   BUILD_TESTING                    OFF
>>>   BUILD_USER_DEFINED_LIBS          OFF
>>>   CMAKE_BUILD_TYPE                 Debug
>>>   CMAKE_INSTALL_PREFIX             /usr/local
>>>   VTK_ANDROID_BUILD                OFF
>>>   VTK_EXTRA_COMPILER_WARNINGS      OFF
>>>   VTK_Group_Imaging                OFF
>>>   VTK_Group_MPI                    OFF
>>>   VTK_Group_Qt                     OFF
>>>   VTK_Group_Rendering              OFF
>>>   VTK_Group_StandAlone             ON
>>>   VTK_Group_Tk                     OFF
>>>   VTK_Group_Views                  OFF
>>>   VTK_Group_Web                    OFF
>>>   VTK_IOS_BUILD                    OFF
>>>   VTK_PYTHON_VERSION               2
>>>   VTK_RENDERING_BACKEND            OpenGL
>>>   VTK_SMP_IMPLEMENTATION_TYPE      Sequential
>>>   VTK_USE_LARGE_DATA               OFF
>>>   VTK_WRAP_JAVA                    OFF
>>>   VTK_WRAP_PYTHON                  OFF
>>>   VTK_WRAP_TCL                     OFF
>>>
>>> Thanks.
>>>
>>> --Alex
>>>
>>>
>>> On 05/13/2015 07:29 PM, David E DeMarle wrote:
>>>
>>> Are tests off?
>>>
>>> Most of the tests are end to end ones that render some image and compare it
>>> against a baseline. This could be why Rendering/OpenGL is being built.
>>>
>>>
>>>
>>> David E DeMarle
>>> Kitware, Inc.
>>> R&D Engineer
>>> 21 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-881-4909
>>>
>>> On Wed, May 13, 2015 at 12:40 PM, Alex Pletzer <axp5530 at psu.edu> wrote:
>>>> Hi VTK'ians,
>>>>
>>>> Is it possible to build VTK without rendering? On a platform that does not
>>>> have OpenGL? I'm working on a project which uses VTK classes but I'm not
>>>> producing any picture. The code should run in the cloud, which does not have
>>>> OpenGL.
>>>>
>>>> I have set:
>>>>
>>>> VTK_Group_Rendering             *OFF
>>>>
>>>> When I configure, I get
>>>>
>>>> CMake Error at
>>>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
>>>>     Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
>>>>   Call Stack (most recent call first):
>>>>     /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315
>>>> (_FPHSA_FAILURE_MESSAGE)
>>>>     /usr/share/cmake/Modules/FindOpenGL.cmake:161
>>>> (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>>>>     Rendering/OpenGL/CMakeLists.txt:196 (find_package)
>>>>
>>>> Thanks in advance!
>>>>
>>>> --Alex
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>> --
>>> Alexander Pletzer (pletzer at psu.edu)
>>> Office 224G, Computer Building
>>> Institute of CyberScience
>>> The Pennsylvania State University
>>> cell: +1 609 799 7999
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers

-- 
Alexander Pletzer (pletzer at psu.edu)
Office 224G, Computer Building
Institute of CyberScience
The Pennsylvania State University
cell: +1 609 799 7999



More information about the vtkusers mailing list