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