| Compiling FSLView |
Please read Preparing a build environment first to ensure that you have all the required support libraries on your system. The current version of FSLView (2.4.x) needs: Qt, Qwt, boost and VTK packages to build.
The sources are bundled with every FSL distribution and in particular the fsl-X.Y.Z-sources.tar.gz or "Uncompiled sources only" download. Look in $FSLDIR/src/fslview for them.
FMRIB account holders only may get the sources via our CVS repository. Set up your environment as follows:
export CVSROOT=:ext:mace.fmrib.ox.ac.uk:/usr/local/share/sources export CVS_RSH=ssh
Now check out the fslview project: cvs co fslview - supporting FSL modules should come from your existing FSL installation.
You need to set QTDIR, PATH and LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on Mac OS X) so all the Qt and Qwt tools and libraries can be found. In the following examples I have assumed everything has been installed into the /usr/local directory tree.
export QTDIR=/usr/local/qt export PATH=$QTDIR/bin:$PATH export QWTDIR=/usr/local/qwt export LD_LIBRARY_PATH=$QTDIR/lib:$QWTDIR/lib:$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=$QTDIR/lib:$QWTDIR/lib:$DYLD_LIBRARY_PATH
If you're building using a pre-installed FSL distribution then you also need to set FSLDIR as per the FSL instructions.
I always configure the build trees away from the source directories. This has several advantages including being able to build for multiple platforms or configurations (i.e. Release/Debug) from the same sources. The CMake setup I've used makes this particularly easy:
cd /home/builds; mkdir fslview-release; cd fslview-release cmake $FSLDIR/src/fslview \ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \ -DVTK_DIR=/usr/local/vtk/lib/vtk-5.0 -DBOOST_DIR=/usr/local/boost \ -DQWT_DIR=/usr/local/qwt
Now you're ready to build the binary:
make make install