Here is a build script to build SEACAS in Trilinos. 

SEACAS uses the following TPLS, some are optional: 

* netcdf -- http://www.unidata.ucar.edu/software/netcdf/index.html
  - used by exodus and nemesis (and ioss since it uses exodus and nemesis)
  - see libraries/exodus/README for some details on modifications recommended for netcdf.

* xdmf -- http://xdmf.org/index.php/Main_Page
  - optionally used for ioss.  A DoD HPC code output format.

* hdf5 -- http://www.hdfgroup.org/HDF5
  - optionally used by netcdf in netcdf-4 mode.
  - used by xdmf

* pamgen -- http://trilinos.sandia.gov/packages/pamgen

* matio -- https://sourceforge.net/projects/matio/

========================================================================
CMake defines used to build SEACAS:
      -D Trilinos_ENABLE_SEACAS:BOOL=ON 
  
  EXODUS:  
    If the exodus library should be built, then add the defines:
      -D Trilinos_ENABLE_SEACAS:BOOL=ON 
      -D Trilinos_ENABLE_SECONDARY_STABLE_CODE:BOOL=ON
      -D Netcdf_LIBRARY_DIRS:PATH={path to netcdf library}
      -D TPL_ENABLE_Netcdf:BOOL=ON
      -D TPL_Netcdf_INCLUDE_DIRS:PATH={path to netcdf includes}
    This will also enable exodus support in the ioss library.
      
    If using a netcdf library that is built with --enable-netcdf-4,
    then you also need to tell it to link with the hdf5
    libraries. There is not really a good way to do this; the best
    option is:

    -D Trilinos_EXTRA_LINK_FLAGS="-L{path_to_hdf5_libraries} -lhdf5_hl -lhdf5 -lz -lm"

  PAMGEN: 
    For pamgen support in ioss, add the defines:
      -D Trilinos_ENABLE_Pamgen:BOOL=TRUE 

  XDMF:
      -D SEACAS_ENABLE_XDMF:BOOL=FALSE 
  if xdmf enabled: (will also need hdf5 library)
      -D TPL_XDMF_INCLUDE_DIRS:PATH={path to xdmf includes}
      -D XDMF_LIBRARY_DIRS:PATH={path to xdmf library}

  MAT2EXO and EXO2MAT:
      -D Matio_LIBRARY_DIRS:PATH={path to matio library source}/lib
      -D Matio_INCLUDE_DIRS:PATH={path to matio library source}/include

  SEACAS/ioss can be built either in serial mode or with mpi using the
  standard Trilinos configuration flag.  The exodus and nemesis
  libraries can be built either way, but they have no mpi-related
  code, so the parallel and serial libraries are the same.

A script that can be used to build SEACAS is:
--------------------------------cut here--------------------------------
EXTRA_ARGS=$@

#MPI=ON
MPI=OFF

if [ "$MPI" == "ON" ]
then
  CXX=mpiCC
  CC=mpicc
  FC=mpif77
else
  CXX=/opt/local/bin/g++-mp-4.8
  CC=/opt/local/bin/gcc-mp-4.8
  FC=/opt/local/bin/gfortran-mp-4.8
fi

ACCESS=/path/to/libraries/SEACAS.git
NETCDF=/path/to/libraries/netcdf-4.2.1.1
MATIO=/path/to/libraries/matio-1.5.0

rm -f CMakeCache.txt

cmake  \
-D BUILD_SHARED_LIBS:BOOL=OFF \
-D CMAKE_CXX_COMPILER:FILEPATH=${CXX} \
-D CMAKE_C_COMPILER:FILEPATH=${CC} \
-D CMAKE_Fortran_COMPILER:FILEPATH=${FC} \
-D CMAKE_INSTALL_PREFIX:PATH=../install_trilinos \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-D DART_TESTING_TIMEOUT:STRING=600 \
-D Matio_LIBRARY_DIRS:PATH=${MATIO}/lib \
-D Matio_INCLUDE_DIRS:PATH=${MATIO}/include \
-D Netcdf_LIBRARY_DIRS:PATH=${NETCDF}/lib \
-D TPL_Netcdf_INCLUDE_DIRS:PATH=${NETCDF}/include \
-D TPL_ENABLE_Netcdf:BOOL=ON \
-D TPL_ENABLE_Matio:BOOL=ON \
-D TPL_ENABLE_MPI:BOOL=${MPI} \
-D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF \
-D Trilinos_ENABLE_Pamgen:BOOL=ON \
-D Trilinos_ENABLE_SEACAS:BOOL=ON \
-D Trilinos_ENABLE_SECONDARY_STABLE_CODE:BOOL=ON \
-D Trilinos_ENABLE_STK:BOOL=OFF \
-D Trilinos_ENABLE_Sundance:BOOL=OFF \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D Trilinos_ENABLE_TrilinosCouplings:BOOL=OFF \
-D Trilinos_ENABLE_TrilinosFramework:BOOL=OFF \
$EXTRA_ARGS \
../
