3 ## -- Command line options
4 while [[ "$#" -gt 1 ]]; do
34 ## -- Check command line options
37 [ -z "$build_type" ] ; then
38 (>&2 echo "Usage: $0 -prefix [dir] [-build_type [Release/Debug]] [-cores [n]] [-install_type [compile/install]] [-eigen_version [x.y.z]]}")
42 if [ -z "$cores" ] ; then
45 if [ -z "$build_type" ] ; then
48 if [ -z "$install_type" ] ; then
49 install_type="install"
52 cmake=`find $prefix -type f -name "cmake" | grep bin`
53 cpPluginsConfig=`find $prefix -type f -name "cpPluginsConfig.cmake"`
59 if [ -n "$eigen_version" ] ; then
60 url="http://bitbucket.org/eigen/eigen/get/$eigen_version.tar.bz2"
63 mkdir -p $dir/eigen/src
64 mkdir -p $dir/eigen/bin
66 curl -L -o eigen.tar.bz2 $url
67 tar xf eigen.tar.bz2 -C $dir/eigen/src --strip-components=1
75 ## -- Configure, build and install
79 -DCMAKE_BUILD_TYPE:STRING=$build_type \
80 -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
81 -Dfpa_BUILD_CTArteries:BOOL=ON \
82 -Dfpa_BUILD_CTBronchi:BOOL=ON \
83 -DcpPlugins_DIR:PATH=`dirname $cpPluginsConfig` \
86 if [[ "$install_type" == 'install' ]] ; then