Created
July 8, 2012 10:40
-
-
Save roxlu/3070472 to your computer and use it in GitHub Desktop.
Pointcloud PCL, compile script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # PCL version 1.5.1 | |
| # Boost 1.49 | |
| # Eigen 6e7488e20373 | |
| # Flann 1.7.1 | |
| # QHull 2012.1 | |
| # VTK 5.10.0 | |
| d=${PWD} | |
| bd=${PWD}/build | |
| pcl_dir=${d}/PCL-1.5.1-Source | |
| boost_dir=${d}/boost_1_49_0 | |
| eigen_dir=${d}/eigen-eigen-6e7488e20373 | |
| flan_dir=${d}/flann-1.7.1-src | |
| qhull_dir=${d}/qhull-2012.1 | |
| vtk_dir=${d}/VTK | |
| b2=${bd}/bin/b2 | |
| # Destination dir. | |
| if [ ! -d ${bd} ] ; then | |
| mkdir ${bd} | |
| fi | |
| #compile boost | |
| if [ "${1}" = "boost" ] ; then | |
| cd ${boost_dir} | |
| set -x | |
| if [ ! -f ${bd}/bin/b2 ] ; then | |
| cd $ | |
| cd tools/build/v2 | |
| ./bootstrap.sh | |
| ./b2 install --prefix=${bd} | |
| fi | |
| cd ${boost_dir} | |
| ${b2} --build-type=minimal \ | |
| --build-dir=${bd} \ | |
| --stage-dir=${bd} \ | |
| --layout=system \ | |
| --toolset=darwin \ | |
| variant=debug \ | |
| threading=multi \ | |
| link=static \ | |
| cflags="-m32" \ | |
| cxxflags="-m32 -arch i386" \ | |
| architecture="x86" \ | |
| address-model=32 \ | |
| stage | |
| fi | |
| #compile eigen | |
| if [ "${1}" = "eigen" ] ; then | |
| cd ${eigen_dir} | |
| if [ ! -d build ] ; then | |
| mkdir build | |
| fi | |
| cd build | |
| cmake -DCMAKE_OSX_ARCHITECTURES="i386" -DCMAKE_INSTALL_PREFIX=${bd} ${eigen_dir} | |
| make install | |
| fi | |
| #compile flann | |
| if [ "${1}" = "flan" ] ; then | |
| cd ${flan_dir} | |
| if [ ! -d build ] ; then | |
| mkdir build | |
| fi | |
| cd build | |
| cmake -DCMAKE_OSX_ARCHITECTURES="i386" -DCMAKE_INSTALL_PREFIX=${bd} ${flan_dir} | |
| make install | |
| fi | |
| # compile qhull | |
| if [ "${1}" = "qhull" ] ; then | |
| cd ${qhull_dir} | |
| if [ ! -d build ] ; then | |
| mkdir build | |
| fi | |
| cd build | |
| cmake -DCMAKE_OSX_ARCHITECTURES="i386" -DCMAKE_INSTALL_PREFIX=${bd} ${qhull_dir} | |
| make install | |
| fi | |
| # compile vtk | |
| if [ "${1}" = "vtk" ] ; then | |
| cd ${vtk_dir} | |
| if [ ! -d build ] ; then | |
| mkdir build | |
| fi | |
| cmake -DCMAKE_OSX_ARCHITECTURES="i386" -DCMAKE_INSTALL_PREFIX=${bd} ${vtk_dir} | |
| make install | |
| fi | |
| # compile PCL | |
| if [ "${1}" = "pcl" ] ; then | |
| cd ${pcl_dir} | |
| if [ ! -d build ] ; then | |
| mkdir build | |
| fi | |
| cd build | |
| cmake -DCMAKE_OSX_ARCHITECTURES="i386" \ | |
| -DCMAKE_INSTALL_PREFIX=${bd} \ | |
| -DPCL_SHARED_LIBS=OFF \ | |
| ${pcl_dir} | |
| make install | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment