Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem http://vijay.axham.com/blog/498/building-ogre3d-1-8-1-on-mingw
- rem http://vijay.axham.com/blog/478/building-boost-binaries-on-mingw
- rem http://forums.qhimm.com/index.php?topic=15060.0
- set home=%cd%
- set "path=%home%\cmake-2.8.11.2-win32-x86\bin;%path%"
- @echo Fetch the source code.
- set "BOOST_VERSION=1_54_0"
- set "svn_url=https://svn.boost.org/svn/boost/tags/release/Boost_%BOOST_VERSION%/"
- set "BOOST_SRC_ROOT=%home%\boost_%BOOST_VERSION%"
- set "BUILD_OUTPUT_DIR=%home%\build\output"
- set "BUILD_INSTALL_DIR=%home%\build\install"
- set "BOOST_BUILD_DIR=%BUILD_OUTPUT_DIR%\boost_%BOOST_VERSION%"
- set "BOOST_INSTALL_DIR=%BUILD_INSTALL_DIR%\boost_%BOOST_VERSION%"
- mkdir "%BOOST_BUILD_DIR%"
- mkdir "%BOOST_INSTALL_DIR%"
- mkdir "%BOOST_SRC_ROOT%"
- svn co %svn_url% "%BOOST_SRC_ROOT%"
- cd /D %BOOST_SRC_ROOT%
- rem if your source directory gets messed up run
- rem svn revert -R
- rem it should remove all changes done to the files.
- @echo building boost
- @echo - tagged layout, so that version numbers and toolset are not included in output files
- @echo - build-type complete, to get debug and release versions
- @echo - I only build certain components because we don't need all, and I get errors trying
- @echo to build some components, so I leave em out
- set "generator=mingw"
- start /WAIT cmd /c "cd /D %cd% & bootstrap.bat --with-toolset=%generator%"
- set "generator=gcc"
- .\b2 --layout=tagged toolset=%generator% --build-type=complete --with-system --with-atomic --with-chrono --with-date_time --with-filesystem --with-test --with-program_options --with-wave --with-thread --prefix=%BOOST_INSTALL_DIR% install
- rem if you are missing libraries your source directory might be messed up.
- rem set does in current environment. And setx does globally (may need reboot).
- @echo set "BOOST_ROOT=%BOOST_INSTALL_DIR%" > %home%\boost_root.bat
- @echo set "BOOST_INCLUDEDIR=%BOOST_INSTALL_DIR%\include" >> %home%\boost_root.bat
- @echo set "BOOST_LIBRARYDIR=%BOOST_INSTALL_DIR%\lib" >> %home%\boost_root.bat
- call %home%\boost_root.bat
- @echo set "BOOST_INCLUDE_DIR=%BOOST_INCLUDEDIR%" >> %home%\boost_root.bat
- @echo set "BOOST_LIB_DIR=%BOOST_LIBRARYDIR%" >> %home%\boost_root.bat
- @echo set "BOOST_LIBARY_DIR=%BOOST_LIBRARYDIR%" >> %home%\boost_root.bat
- @echo setx BOOST_ROOT %BOOST_ROOT% >> %home%\boost_root.bat
- @echo setx BOOST_INCLUDEDIR %BOOST_INCLUDEDIR% >> %home%\boost_root.bat
- @echo setx BOOST_LIBRARYDIR %BOOST_LIBRARYDIR% >> %home%\boost_root.bat
- @echo setx BOOST_INCLUDE_DIR %BOOST_INCLUDEDIR% >> %home%\boost_root.bat
- @echo setx BOOST_LIB_DIR %BOOST_LIBRARYDIR% >> %home%\boost_root.bat
- @echo setx BOOST_LIBARY_DIR %BOOST_LIBRARYDIR% >> %home%\boost_root.bat
- cd /D %home%
- call %home%\boost_root.bat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement