forked from OGRECave/ogre-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_ogre_Visual_Studio_9_2008_x64.bat
67 lines (60 loc) · 1.88 KB
/
build_ogre_Visual_Studio_9_2008_x64.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo off
SETLOCAL
set OGRE_BRANCH_NAME=master
set GENERATOR="Visual Studio 9 2008"
set PLATFORM=x64
set CMAKE_BIN_x86="C:\Program Files (x86)\CMake\bin\cmake.exe"
set CMAKE_BIN_x64="C:\Program Files\CMake\bin\cmake.exe"
IF EXIST %CMAKE_BIN_x64% (
echo CMake 64-bit detected
set CMAKE_BIN=%CMAKE_BIN_x64%
) ELSE (
IF EXIST %CMAKE_BIN_x86% (
echo CMake 32-bit detected
set CMAKE_BIN=%CMAKE_BIN_x86%
) ELSE (
echo Cannot detect either %CMAKE_BIN_x86% or
echo %CMAKE_BIN_x64% make sure CMake is installed
EXIT /B 1
)
)
echo Using CMake at %CMAKE_BIN%
mkdir Ogre
cd Ogre
IF NOT EXIST ogredeps (
mkdir ogredeps
echo --- Cloning Ogredeps ---
hg clone https://bitbucket.org/cabalistic/ogredeps ogredeps
) ELSE (
echo --- Ogredeps repo detected. Cloning skipped ---
)
cd ogredeps
mkdir build
cd build
echo --- Building Ogredeps ---
%CMAKE_BIN% -G %GENERATOR% -A %PLATFORM% ..
%CMAKE_BIN% --build . --config Debug
%CMAKE_BIN% --build . --target install --config Debug
%CMAKE_BIN% --build . --config Release
%CMAKE_BIN% --build . --target install --config Release
cd ../../
IF NOT EXIST ogre-next (
echo --- Cloning Ogre master ---
git clone --branch %OGRE_BRANCH_NAME% https://github.com/OGRECave/ogre-next
)
cd ogre-next
IF NOT EXIST Dependencies (
mklink /D Dependencies ..\ogredeps\build\ogredeps
)
mkdir build
cd build
echo --- Running CMake configure ---
%CMAKE_BIN% -D OGRE_USE_BOOST=0 -D OGRE_CONFIG_THREAD_PROVIDER=0 -D OGRE_CONFIG_THREADS=0 -D OGRE_BUILD_COMPONENT_SCENE_FORMAT=1 -D OGRE_BUILD_SAMPLES2=1 -D OGRE_BUILD_TESTS=1 -D OGRE_DEPENDENCIES_DIR=..\..\ogredeps\build\ogredeps -G %GENERATOR% -A %PLATFORM% ..
echo --- Building Ogre (Debug) ---
%CMAKE_BIN% --build . --config Debug
%CMAKE_BIN% --build . --target install --config Debug
echo --- Building Ogre (Release) ---
%CMAKE_BIN% --build . --config Release
%CMAKE_BIN% --build . --target install --config Release
echo Done!
ENDLOCAL