Subdiv: Use nested namespaces and static for opensubdiv module
[blender.git] / make.bat
blobaee1876a0c11e06109711c808636d6c6f8ae2247
1 @echo off
2 REM This batch file does an out-of-source CMake build in ../build_windows
3 REM This is for users who like to configure & build Blender with a single command.
4 setlocal EnableDelayedExpansion
5 setlocal ENABLEEXTENSIONS
6 set BLENDER_DIR=%~dp0
8 call "%BLENDER_DIR%\build_files\windows\reset_variables.cmd"
10 call "%BLENDER_DIR%\build_files\windows\check_spaces_in_path.cmd"
11 if errorlevel 1 goto EOF
13 call "%BLENDER_DIR%\build_files\windows\parse_arguments.cmd" %*
14 if errorlevel 1 goto EOF
16 call "%BLENDER_DIR%\build_files\windows\find_dependencies.cmd"
17 if errorlevel 1 goto EOF
19 REM if it is one of the convenience targets and BLENDER_BIN is set
20 REM skip compiler detection
21 if "%ICONS%%ICONS_GEOM%%DOC_PY%" == "1" (
22         if EXIST "%BLENDER_BIN%" (
23                 goto convenience_targets
24         )
27 if "%BUILD_SHOW_HASHES%" == "1" (
28         call "%BLENDER_DIR%\build_files\windows\show_hashes.cmd"
29         goto EOF
32 if "%SHOW_HELP%" == "1" (
33         call "%BLENDER_DIR%\build_files\windows\show_help.cmd"
34         goto EOF
37 if "%FORMAT%" == "1" (
38         call "%BLENDER_DIR%\build_files\windows\format.cmd"
39         goto EOF
42 call "%BLENDER_DIR%\build_files\windows\detect_architecture.cmd"
43 if errorlevel 1 goto EOF
45 if "%BUILD_VS_YEAR%" == "" (
46         call "%BLENDER_DIR%\build_files\windows\autodetect_msvc.cmd"
47         if errorlevel 1 (
48                 echo Visual Studio not found ^(try with the 'verbose' switch for more information^)
49                 goto EOF
50         )
51 ) else (
52         call "%BLENDER_DIR%\build_files\windows\detect_msvc%BUILD_VS_YEAR%.cmd"
53         if errorlevel 1 (
54                 echo Visual Studio %BUILD_VS_YEAR% not found ^(try with the 'verbose' switch for more information^)
55                 goto EOF
56         )
59 if "%BUILD_UPDATE%" == "1" (
60         REM First see if the SVN libs are there and check them out if they are not.
61         call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
62         if errorlevel 1 goto EOF
63         if "%BUILD_UPDATE_SVN%" == "1" (
64                 REM Then update SVN platform libraries, since updating python while python is
65                 REM running tends to be problematic. The python script that update_sources
66                 REM calls later on may still try to switch branches and run into trouble,
67                 REM but for *most* people this will side step the problem.
68                 call "%BLENDER_DIR%\build_files\windows\lib_update.cmd"
69         )
70         REM Finally call the python script shared between all platforms that updates git
71         REM and does any other SVN work like update the tests or branch switches
72         REM if required.
73         call "%BLENDER_DIR%\build_files\windows\update_sources.cmd"
74         goto EOF
77 call "%BLENDER_DIR%\build_files\windows\set_build_dir.cmd"
79 :convenience_targets
81 if "%ICONS%" == "1" (
82         call "%BLENDER_DIR%\build_files\windows\icons.cmd"
83         goto EOF
86 if "%ICONS_GEOM%" == "1" (
87         call "%BLENDER_DIR%\build_files\windows\icons_geom.cmd"
88         goto EOF
91 if "%DOC_PY%" == "1" (
92         call "%BLENDER_DIR%\build_files\windows\doc_py.cmd"
93         goto EOF
96 if "%CMAKE%" == "" (
97         echo Cmake not found in path, required for building, exiting...
98         exit /b 1
101 echo Building blender with VS%BUILD_VS_YEAR% for %BUILD_ARCH% in %BUILD_DIR%
103 call "%BLENDER_DIR%\build_files\windows\check_libraries.cmd"
104 if errorlevel 1 goto EOF
106 if "%TEST%" == "1" (
107         call "%BLENDER_DIR%\build_files\windows\test.cmd"
108         goto EOF
111 if "%BUILD_WITH_NINJA%" == "" (
112         call "%BLENDER_DIR%\build_files\windows\configure_msbuild.cmd"
113         if errorlevel 1 goto EOF
115         call "%BLENDER_DIR%\build_files\windows\build_msbuild.cmd"
116         if errorlevel 1 goto EOF
117 ) else (
118         call "%BLENDER_DIR%\build_files\windows\configure_ninja.cmd"
119         if errorlevel 1 goto EOF
121         call "%BLENDER_DIR%\build_files\windows\build_ninja.cmd"
122         if errorlevel 1 goto EOF
125 :EOF
126 if errorlevel 1 exit /b %errorlevel%