0025114: CMake-based build tools for OCCT 7.0
[occt.git] / adm / templates / env.build.bat.in
CommitLineData
19286d7c 1echo off
2
3set "SCRIPTROOT=%~dp0"
4set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
5
6set "CASROOT=@CMAKE_SOURCE_DIR@"
7
8set "VCVER=@COMPILER@"
9set "ARCH=@COMPILER_BITNESS@"
10set "CASDEB=@BUILD_POSTFIX@"
11
12if not ["%1"] == [""] set "VCVER=%1"
13if not ["%2"] == [""] set "ARCH=%2"
14if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
15if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
16if /I ["%3"] == ["debug"] set "CASDEB=d"
17if /I ["%3"] == ["d"] set "CASDEB=d"
18
19if exist "%~dp0custom.bat" (
20 call "%~dp0custom.bat" %1 %2 %3
21)
22
23if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
24
25set "ORIGIN_PATH=%PATH%"
26
27if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
28if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
29if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
30if not ["%FREEIMAGEPLUS_DIR%"] == [""] set "PATH=%FREEIMAGEPLUS_DIR%;%PATH%"
31if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
32if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
33if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
34
35rem ----- Set path to 3rd party and OCCT libraries -----
36set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
37set "PATH=@CMAKE_BINARY_DIR@/%BIN_TAIL%;%PATH%"
38
39rem ----- Set envoronment variables used by OCCT -----
40set CSF_LANGUAGE=us
41set MMGT_CLEAR=1
42set CSF_EXCEPTION_PROMPT=1
43set "CSF_SHMessage=%CASROOT%\src\SHMessage"
44set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
45set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
46set "CSF_XSMessage=%CASROOT%\src\XSMessage"
47set "CSF_TObjMessage=%CASROOT%\src\TObj"
48set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
49set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
50set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
51set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
52set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
53set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
54set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
55set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
56set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
57set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
58set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
59
60rem Draw Harness special stuff
61if exist "%CASROOT%\src\DrawResources" (
62 set "DRAWHOME=%CASROOT%\src\DrawResources"
63 set "CSF_DrawPluginDefaults=%CASROOT%\src\DrawResources"
64
65 if exist "%CASROOT%\src\DrawResources\DrawDefault" (
66 set "DRAWDEFAULT=%CASROOT%\src\DrawResources\DrawDefault"
67 )
68)
69
70if exist "%CASROOT%\src\DrawResourcesProducts" (
71 set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
72)
73