forked from cocos-creator/test-gfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
executable file
·60 lines (52 loc) · 1.36 KB
/
build.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
@echo off
echo Specify the generator for this project
echo 1.Visual Studio 2017
echo 2.Visual Studio 2017 x64
echo 3.Android armv7a (NMake Makefiles)
echo 4.Android x86 (NMake Makefiles)
set /p a=select:
if %a%==1 goto vs15
if %a%==2 goto vs15_x64
if %a%==3 goto android_armv7a_nmake
if %a%==4 goto android_x86_nmake
:vs15
mkdir Build.vs15
cmake -E chdir Build.vs15 cmake -G "Visual Studio 15 2017" ^
-DMSVC=1 ^
..
goto end
:vs15_x64
mkdir Build.vs15x64
cmake -E chdir Build.vs15x64 cmake -G "Visual Studio 15 2017 Win64" ^
-DMSVC=1 ^
-DCPUX64=1 ^
..
goto end
:android_armv7a_nmake
mkdir Build.armv7a
cmake -E chdir Build.armv7a cmake -G "NMake Makefiles" ^
-DANDROID=1 ^
-DCMAKE_TOOLCHAIN_FILE=External/cmake/android.toolchain.cmake ^
-DCMAKE_BUILD_TYPE=None ^
-DANDROID_TOOLCHAIN_NAME=llvm ^
-DCMAKE_ANDROID_STL_TYPE=c++_static ^
-DCMAKE_ANDROID_ARCH=armv7-a ^
-DCMAKE_ANDROID_RTTI=OFF ^
-DANDROID_NATIVE_API_LEVEL=14 ^
..
goto end
:android_x86_nmake
mkdir Build.x86
cmake -E chdir Build.x86 cmake -G "NMake Makefiles" ^
-DANDROID=1 ^
-DCMAKE_TOOLCHAIN_FILE=External/cmake/android.toolchain.cmake ^
-DCMAKE_BUILD_TYPE=None ^
-DANDROID_TOOLCHAIN_NAME=llvm ^
-DCMAKE_ANDROID_STL_TYPE=c++_static ^
-DCMAKE_ANDROID_ARCH=x86 ^
-DCMAKE_ANDROID_RTTI=OFF ^
-DANDROID_NATIVE_API_LEVEL=14 ^
..
goto end
:end
pause