make.bat: Preliminary Visual Studio 2019 support.
[blender.git] / build_files / windows / parse_arguments.cmd
1 set BUILD_DIR=%BLENDER_DIR%..\build_windows
2 set BUILD_TYPE=Release
3 :argv_loop
4 if NOT "%1" == "" (
5
6         REM Help Message
7         if "%1" == "help" (
8                 set SHOW_HELP=1
9                 goto EOF
10         )
11         REM Build Types
12         if "%1" == "debug" (
13                 set BUILD_TYPE=Debug
14         REM Build Configurations
15         ) else if "%1" == "noge" (
16                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_GAMEENGINE=OFF -DWITH_PLAYER=OFF
17                 set BUILD_NGE=_noge
18         ) else if "%1" == "builddir" (
19                 set BUILD_DIR_OVERRRIDE="%BLENDER_DIR%..\%2"
20                 shift /1
21         ) else if "%1" == "with_tests" (
22                 set TESTS_CMAKE_ARGS=-DWITH_GTESTS=On
23         ) else if "%1" == "full" (
24                 set TARGET=Full
25                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
26                     -C"%BLENDER_DIR%\build_files\cmake\config\blender_full.cmake"
27         ) else if "%1" == "lite" (
28                 set TARGET=Lite
29                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_lite.cmake"
30         ) else if "%1" == "cycles" (
31                 set TARGET=Cycles
32                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\cycles_standalone.cmake"
33         ) else if "%1" == "headless" (
34                 set TARGET=Headless
35                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_headless.cmake"
36         ) else if "%1" == "bpy" (
37                 set TARGET=Bpy
38                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake"
39         ) else if "%1" == "clang" (
40                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
41                 set WITH_CLANG=1
42         ) else if "%1" == "release" (
43                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
44                 set TARGET=Release
45         ) else if "%1" == "asan" (
46                 set WITH_ASAN=1
47         ) else if "%1" == "x86" (
48                 set BUILD_ARCH=x86
49         ) else if "%1" == "x64" (
50                 set BUILD_ARCH=x64
51         ) else if "%1" == "2017" (
52                 set BUILD_VS_YEAR=2017
53         ) else if "%1" == "2017pre" (
54                 set BUILD_VS_YEAR=2017
55                 set VSWHERE_ARGS=-prerelease
56         ) else if "%1" == "2017b" (
57                 set BUILD_VS_YEAR=2017
58                 set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
59         ) else if "%1" == "2019" (
60                 set BUILD_VS_YEAR=2019
61         ) else if "%1" == "2019pre" (
62                 set BUILD_VS_YEAR=2019
63                 set VSWHERE_ARGS=-prerelease
64         ) else if "%1" == "2019b" (
65                 set BUILD_VS_YEAR=2019
66                 set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
67         ) else if "%1" == "2015" (
68                 set BUILD_VS_YEAR=2015
69         ) else if "%1" == "packagename" (
70                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
71                 shift /1
72         ) else if "%1" == "nobuild" (
73                 set NOBUILD=1
74         ) else if "%1" == "pydebug" (
75                 set WITH_PYDEBUG=1
76         ) else if "%1" == "showhash" (
77                 SET BUILD_SHOW_HASHES=1
78         REM Non-Build Commands
79         ) else if "%1" == "update" (
80                 SET BUILD_UPDATE=1
81         ) else if "%1" == "ninja" (
82                 SET BUILD_WITH_NINJA=1
83         ) else if "%1" == "clean" (
84                 set MUST_CLEAN=1
85         ) else if "%1" == "verbose" (
86                 set VERBOSE=1
87         ) else (
88                 echo Command "%1" unknown, aborting!
89                 exit /b 1
90         )
91         shift /1
92         goto argv_loop
93 )
94 :EOF
95 exit /b 0