#!/bin/bash
#
# Setup Eigen 3.2
#
. `dirname $0`/../common.sh

EIGEN_VERSION=3.2.7
EIGEN_HASH=b30b87236a1b

# Checkout Eigen
cd "$build_dir"
wget --quiet "http://bitbucket.org/eigen/eigen/get/${EIGEN_VERSION}.tar.gz"
tar xzf ${EIGEN_VERSION}.tar.gz
cd "$build_dir/eigen-eigen-${EIGEN_HASH}/"
mkdir -p "$build_dir/eigen-eigen-${EIGEN_HASH}/_build"
cd "$build_dir/eigen-eigen-${EIGEN_HASH}/_build"

# Build, make and install Eigen
cmake .. -DCMAKE_INSTALL_PREFIX:STRING="$install_dir" \
  -Dpkg_config_libdir:STRING="$install_dir/lib"
make
make install

# Check install
pkg-config --modversion "eigen3 >= ${EIGEN_VERSION}"
pkg-config --cflags "eigen3 >= ${EIGEN_VERSION}"

#!/bin/bash
#
# Setup Eigen 3.2
#
. `dirname $0`/../common.sh

EIGEN_VERSION=3.2.7
EIGEN_HASH=b30b87236a1b

# Checkout Eigen
cd "$build_dir"
wget --quiet "http://bitbucket.org/eigen/eigen/get/${EIGEN_VERSION}.tar.gz"
tar xzf ${EIGEN_VERSION}.tar.gz
cd "$build_dir/eigen-eigen-${EIGEN_HASH}/"
mkdir -p "$build_dir/eigen-eigen-${EIGEN_HASH}/_build"
cd "$build_dir/eigen-eigen-${EIGEN_HASH}/_build"

# Build, make and install Eigen
cmake .. -DCMAKE_INSTALL_PREFIX:STRING="$install_dir" \
  -Dpkg_config_libdir:STRING="$install_dir/lib" \
  -DEIGEN_INCLUDE_INSTALL_DIR:STRING="${install_dir}/include/eigen3"
make
make install

# Check install
pkg-config --modversion "eigen3 >= ${EIGEN_VERSION}"
pkg-config --cflags "eigen3 >= ${EIGEN_VERSION}"

Fix eigen script for eigen 3.2.7
Fix eigen script for eigen 3.2.7

Define EIGEN_INCLUDE_INSTALL_DIR to fix generation of eigen3.pc
