0024884: expand the list of short compiler names in CMake meta-project
[occt.git] / adm / templates / env.sh.in
CommitLineData
a0726e55 1#!/bin/bash
ad211ad3 2
3aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
4
a0726e55 5if [ "${CASROOT}" == "" ]; then
6 export CASROOT="${aScriptPath}"
7fi
ad211ad3 8
32856b63 9# Read script arguments
10shopt -s nocasematch
11export CASDEB="@BUILD_SUFFIX@";
12if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
13if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
14shopt -u nocasematch
ad211ad3 15
32856b63 16export COMPILER="@COMPILER@"
17
18# ----- Set path to 3rd party and OCCT libraries -----
19anArch=`uname -m`
20if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
21 export ARCH="32";
22else
23 export ARCH="64";
24fi
25
26aSystem=`uname -s`
27if [ "$aSystem" == "Darwin" ]; then
28 export WOKSTATION="mac";
29 export ARCH="64";
30else
31 export WOKSTATION="lin";
32fi
33
34# ----- Set local settings -----
35if [ -e "${aScriptPath}/custom.sh" ]; then
36 source "${aScriptPath}/custom.sh" "${COMPILER}" "${WOKSTATION}${ARCH}" "${CASDEB}"
37fi
38
39THRDPARTY_PATH=""
ad211ad3 40if [ "$TCL_DIR" != "" ]; then
32856b63 41 THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
ad211ad3 42fi
a0726e55 43
a0726e55 44if [ "$FREETYPE_DIR" != "" ]; then
32856b63 45 THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
ad211ad3 46fi
a0726e55 47
ad211ad3 48if [ "$FREEIMAGE_DIR" != "" ]; then
32856b63 49 THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
ad211ad3 50fi
a0726e55 51
ad211ad3 52if [ "$GL2PS_DIR" != "" ]; then
32856b63 53 THRDPARTY_PATH="${GL2PS_DIR}:${THRDPARTY_PATH}"
ad211ad3 54fi
a0726e55 55
a0726e55 56if [ "$TBB_DIR" != "" ]; then
32856b63 57 THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
ad211ad3 58fi
59
32856b63 60BIN_PATH="${WOKSTATION}${ARCH}/${COMPILER}/bin${CASDEB}"
61LIBS_PATH="${WOKSTATION}${ARCH}/${COMPILER}/lib${CASDEB}"
62
85bcc072 63export PATH="${CASROOT}/${BIN_PATH}:${PATH}"
32856b63 64
65if [ "$LD_LIBRARY_PATH" != "" ]; then
85bcc072 66 export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
67else
68 export LD_LIBRARY_PATH="${CASROOT}/${LIBS_PATH}:${THRDPARTY_PATH}"
ad211ad3 69fi
70
32856b63 71if [ "$WOKSTATION" == "mac" ]; then
72 if [ "$DYLD_LIBRARY_PATH" != "" ]; then
73 export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
74 else
75 export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
76 fi
ad211ad3 77fi
78
79# ----- Set envoronment variables used by OCCT -----
80export CSF_LANGUAGE=us
81export MMGT_CLEAR=1
82export CSF_EXCEPTION_PROMPT=1
a0726e55 83export CSF_SHMessage="${CASROOT}/src/SHMessage"
84export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
85export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
86export CSF_XSMessage="${CASROOT}/src/XSMessage"
87export CSF_TObjMessage="${CASROOT}/src/TObj"
88export CSF_StandardDefaults="${CASROOT}/src/StdResource"
89export CSF_PluginDefaults="${CASROOT}/src/StdResource"
90export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
91export CSF_TObjDefaults="${CASROOT}/src/StdResource"
92export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
93export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
94export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
95export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
96export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
97export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
98export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
ad211ad3 99
100# Draw Harness special stuff
a0726e55 101if [ -e "${CASROOT}/src/DrawResources" ]; then
102 export DRAWHOME="${CASROOT}/src/DrawResources"
103 export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
104
105 if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
106 export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
ad211ad3 107 fi
108fi
109
a0726e55 110if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
111 export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
32856b63 112fi
113