General Unix Build Instructions for the VTP Software

  1. Dependencies.  There are a lot of libraries that the VTP uses, but fortunately many of them are already included in most flavors of Unix/Linux, and several of them are optional.   It's recommended to use the libraries that are already available in a repository for your operating system, for example, with the Package Manger on Ubuntu.
    Otherwise, if you prefer, you can download and build them yourself.

    Library Version Typical Repository Name Library Website
    GDAL 1.5.x or later libgdal1-dev http://www.gdal.org/
    PROJ.4 4.4.9 or later (installed by GDAL) http://trac.osgeo.org/proj/
    OSG 2.8.x or later libopenscenegraph-dev http://www.openscenegraph.org/
    wxWidgets 2.8.x or later libwxgtk2.8-dev http://www.wxwidgets.org/
    libMini 8.9.2 or later (none) http://stereofx.org/terrain.html
    optional libraries:
    netCDF (any) libnetdef-dev http://www.unidata.ucar.edu/packages/netcdf/
    Libcurl (any) libcurl3 http://curl.haxx.se/
    Bzip2 (any) libbz2-dev  
    Squish (any) (none)  
    QuikGrid (any) (none)  

  2. The three libraries (libMini, Squish, Quikgrid) which aren't in standard Linux distros can be downloaded with:

    svn checkout http://vtp.googlecode.com/svn/deps/ deps
     
  3. For each dependent library you build yourself, see in the build instructions included with each, but first read this advice:
  4. Confirm that you have the data files installed for  GDAL and PROJ.4.
  5. There are two options on how to build the software: CMake or the standard makefiles
    CMake
    is recommended.

    With CMake

    1. Run CMake (if you don't have it installed, it should be available from your package manager.)
    2. Tell if your source location (e.g. /home/me/vtp) and a place to build (e.g. /home/me/vtp/build)
    3. Fill in the location of all the dependencies.  It's OK to omit the optional libraries (netcdf, curl, bzip2, squish, quikgrid).
    4. Press "configure" and "generate"
    5. If you told CMake to generate IDE files, then use your IDE, otherwise go to your build folder and make.

    With the standard makefiles

    1. Look at the file Make.defs.  It provide definitions for the Makefiles.  Most platform-specific build changes (compiler, flags, library locations, etc.) can be made here.  You can also set the location of each dependency, if it is not in the default place.
      Optionally, you set any of these flags to 1 to use an optional library:
      SUPPORT_BZIP2
      SUPPORT_CURL
      SUPPORT_NETCDF
      SUPPORT_QUIKGRID
      SUPPORT_SQUISH

    2. Do a make in the TerrainSDK directory to build the VTP libraries.  Each library is created as a .so file (or .dylib on OS X)

    3. In order for the shared libraries (.so) to be found, you need to either to do one of the following:
      1. copy each .so to a place on your library path, or
      2. use make install in your TerrainSDK folder, which will copy your .so to the install folder, which on Linux defaults to /usr/local/lib (unless you have changed it in Make.defs), which is generally already on the library path, or
      3. add each directory that contains a .so to your library path.  On most Linux flavors, this can be done by setting the LD_LIBRARY_PATH environment variable
        The paths depend, naturally, on where you installed and built your libraries.
    4. Do a make in the TerrainApps directory to build the VTP applications.

If you encounter build problems, the vtp-unix mailing list exists to answer any questions.