Salome HOME
C3PO: requires mpi4py
[tools/sat_salome.git] / products / env_scripts / tcl.py
1 #!/usr/bin/env python
2 #-*- coding:utf-8 -*-
3
4 import os.path
5 import platform
6
7 def set_env(env, prereq_dir, version):
8     env.set('TCL_ROOT_DIR', prereq_dir) # update for cmake
9     env.set('TCLHOME', prereq_dir)
10
11     env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
12     env.prepend('INCLUDE', os.path.join(prereq_dir, 'include'))
13     env.set('TCL_SHORT_VERSION', version[:version.rfind('.')])
14
15     l = []
16     l.append(os.path.join(prereq_dir, 'lib'))
17     l.append(os.path.join(prereq_dir, 'lib', 'tcl', env.get('TCL_SHORT_VERSION')))
18     #http://computer-programming-forum.com/57-tcl/1dfddc136afccb94.htm
19     #Tcl treats the contents of that variable as a list. Be happy, for you can now use drive letters on windows.
20     env.prepend('TCLLIBPATH', l, sep=" ")
21
22     if not platform.system() == "Windows" :
23         env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib'))
24
25 def set_nativ_env(env):
26     env.set('TCL_ROOT_DIR', '/usr') # update for cmake
27     env.set('TCLHOME', '/usr')