Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem http://vijay.axham.com/blog/498/building-ogre3d-1-8-1-on-mingw
- @echo off
- set home=%cd%
- set "path=%home%\cmake-2.8.11.2-win32-x86\bin;%path%"
- @echo Fetch the source code.
- set "hg_url=http://hg.code.sf.net/p/q-gears/code"
- set "QGEARS_SOURCE_DIR=%home%\q-gears-code"
- set "QGEARSSDK_SOURCE_DIR=%QGEARS_SOURCE_DIR%\code"
- mkdir "%QGEARS_SOURCE_DIR%"
- cd /D %QGEARS_SOURCE_DIR%
- hg clone %hg_url%
- @echo We need to tell Ogre where boost is:
- rem set "BOOST_ROOT=%home%"
- rem set "BOOST_INCLUDEDIR=%home%\boost_1_54_0"
- rem set "BOOST_LIBRARYDIR=%home%\boost_1_54_0\stage\lib"
- call %home%\boost_root.bat
- @echo And where the dependencies are:
- rem set "OGRE_DEPENDENCIES_DIR=%home%\build\install\ogredeps"
- call %home%\ogredeps_home.bat
- call %home%\ogre_home.bat
- set "BUILD_OUTPUT_DIR=%home%\build\output"
- set "BUILD_INSTALL_DIR=%home%\build\install"
- set "QGEARS_INSTALL_DIR=%BUILD_INSTALL_DIR%\qgears"
- set "QGEARS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%\qgears"
- set "CMAKE_BUILD_TYPE=Release"
- set "MAKETARGET=MinGW Makefiles"
- mkdir "%QGEARS_OUTPUT_DIR%"
- mkdir "%QGEARS_INSTALL_DIR%"
- cd /D %QGEARS_OUTPUT_DIR%
- echo You may need to reboot to for code blocks to find ogre.
- echo qgears source is in: %QGEARSSDK_SOURCE_DIR%
- echo building with mingw
- cmake "%QGEARSSDK_SOURCE_DIR%" -G "%MAKETARGET%" -DCMAKE_BUILD_TYPE:STRING="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX:PATH="%QGEARS_INSTALL_DIR%" > %home%\qgears.log
- mingw32-make >> %home%\qgears.log
- mingw32-make install >> %home%\qgears.log
- robocopy %OGRE_HOME%\bin\%CMAKE_BUILD_TYPE% %QGEARS_INSTALL_DIR% /E /IS >> %home%\qgears.log
- robocopy %QGEARSSDK_SOURCE_DIR%\output %QGEARS_INSTALL_DIR% /E /IS >> %home%\qgears.log
- REM Linux
- REM -----
- REM CMake should find your boost and ogre files automagically
- REM Windows
- REM -------
- REM for CMake to find BOOST and OGRE SDK you should have 2 environment variables
- REM BOOST_ROOT pointing to the folder of your boost version
- REM and
- REM OGRE_HOME set to the path of the Ogre SDK
- REM after setting environment variables you might have to restart the applications depending on them
- REM to have them recognize the newly set variables
- REM Requirements
- REM ------------
- REM OgreSDK 1.8
- REM - Ogre::Singleton was changed from 1.7 to 1.8 so we're incompatible with 1.7
- REM Boost 1.40
- REM - should be what ever the Ogre SDK needs, they did build agains 1.51 but cmake script
- REM suggessts that ogre is compatible with boost 1.40 and up
- REM mostly you can follow instructions here http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Prerequisites
- cd /D %home%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement