VTK_build using cmake for including VTK within ElmerGUI

Discussion about building and installing Elmer
Post Reply
annier
Posts: 1115
Joined: 27 Aug 2013, 13:51
Antispam: Yes

VTK_build using cmake for including VTK within ElmerGUI

Post by annier » 30 Dec 2014, 23:03

Since VTK needs to be externally built with cmake, this has to be done outside Elmer using cmake. Then the path to its Makefile and other necessary files can be specified during the configuration proccess of Elmer.

The process of building VTK using cmake is described via following steps:
  • 1, Download the version of VTK from http://www.vtk.org/VTK/resources/software.html.
    2. Extract the VTK-5.8.0.tar.gz file and keep it in the $HOME directory.
    So, its location will be /home/username/VTK.
    3. create a VTK_build directory(also in $HOME) and jump into the directory.

    Code: Select all

    $mkdir build_VTK
    $cd build_VTK
    4. Run cmake-gui

    Code: Select all

    $cmake-gui
    5. Configure and generate the VTK Makefile using cmake.
    • a. Locate the source and build paths of VTK as shown in the figure.
      VTK_build_using_cmake-gui.png
      the source and build-destination folders for VTK build
      VTK_build_using_cmake-gui.png (56.08 KiB) Viewed 1376 times
      b. Click configure.
      c. Click generate (Makefile will be generated with other necessary files)
    6. Now start the Elmer configuration and generate process including WITH_VTK option for WITH_ELMERGUI option (following step by step process described in this thread) till the following error message appears.

    Code: Select all

    VTK_DIR                                    VTK_DIR-NOTFOUND
    Then, browse the path exactly at the place where this VTK_DIR-NOTFOUND is written and define this path where the Makefiles and other files/folders of previously built VTK are located. So, the path for VTK_DIR will be written as:

    Code: Select all

    VTK_DIR                                    /home/username/build_VTK
    6. Click configure for update of "Elmer build configuration" and then click generate.
    7. The Makefile for Elmerbuild is generated along with WITH_VTK option for ELMER_GUI.




Yours
Anil Kunwar
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

Post Reply