Last active
December 19, 2015 03:38
-
-
Save robe2/5891340 to your computer and use it in GitHub Desktop.
Building pgRouting under mingw64 using non-standard install locations of dependencies
This file contains 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
export OS_BUILD=64 | |
export PROJECTS=/projects | |
export PG_VER=9.4 | |
export GCC_TYPE=gcc48 | |
export PGPATH=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE} | |
export PATHOLD=$PATH | |
echo $PATHOLD >c:/path.txt | |
export PATHOLD="/mingw/bin:/mingw/include:/c/Windows/system32:/c/Windows" | |
export PGWINVER=${PG_VER}edb | |
export PATH="${PATHOLD}:${PGPATH}/bin:${PGPATH}/lib:${PGPATH}/include" | |
export PATH="${PROJECTS}/rel-libiconv-1.13.1w${OS_BUILD}/include:${PATH}" | |
GMP_VER=5.1.2 | |
MPFR_VER=3.1.2 | |
CGAL_VER=4.2 | |
BOOST_VER=1.58.0 | |
BOOST_VER_WU=1_58_0 | |
BOOST_VER_WUM=1_58 | |
ZLIB_VER=1.2.8 | |
#export PATH="/mingw/bin:/mingw/include:/c/Windows/system32" | |
#zlib | |
PATH="${PATH}:${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin" | |
#gmp | |
PATH="${PATH}:${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/lib" | |
#mpfr | |
PATH="${PATH}:${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}/bin" | |
#boost | |
PATH="${PATH}:${PROJECTS}/boost/rel-${BOOST_VER_WU}w${OS_BUILD}${GCC_TYPE}/lib" | |
#cgal | |
PATH="${PATH}:${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/lib" | |
#cmake | |
export PATH="${PATH}:/cmake/bin" | |
export PATH="${PATH}:.:/bin:/include" | |
echo $PATH | |
echo "" >> c:/path.txt | |
echo $PATH >> c:/path.txt | |
cd ${PROJECTS} | |
cd pgrouting | |
#mkdir branches | |
#rm -rf branches/2.0 | |
#git clone -b develop https://github.com/pgRouting/pgrouting.git branches/2.1 | |
cd branches/2.1 | |
git pull | |
cd ${PROJECTS}/pgrouting | |
export PostgreSQL_ROOT=${PGPATH} | |
rm -rf build | |
mkdir build | |
cd build | |
#if you get an error boost not found, most likely boost version you are using is missing in the FindBoost.cmake | |
# http://www.boost.org/doc/libs/master/libs/test/doc/html/boost_test/section_faq.html#boost_test.section_faq.how_to_set_up_a_cmake_project_us | |
# packaged with your cmake. Easiest way to fix is | |
# edit the share/cmake-2.8/Modules/FindBoost.cmake script that came with your cmake, and add | |
# "1.58.0" "1.58" to the _Boost_KNOWN_VERSIONS section | |
cmake -G "MSYS Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_ROOT:PATH=${PROJECTS}/boost/rel-${BOOST_VER_WU}w${OS_BUILD}${GCC_TYPE} -DCGAL_ROOT:PATH=${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE} -DGMP_ROOT:PATH=${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE} -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON -DCMAKE_CXX_FLAGS="-I${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/include -I${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}/include" ../branches/2.1 | |
make && make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment