Salome HOME
add salome_system to the list of dependencies for native builds...
[tools/sat_salome.git] / products / env_scripts / tk.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     # OP TEST
9     #env.set('TK_ROOT_DIR', prereq_dir)   # update for cmake
10     #env.set('TKHOME', prereq_dir)
11     env.set('TK_ROOT_DIR', env.get('TCL_ROOT_DIR'))
12     env.set('TKHOME', env.get('TCL_ROOT_DIR'))
13     root = env.get('TKHOME')
14
15     env.prepend('PATH', os.path.join(root, 'bin'))
16     
17     l = []
18     l.append(os.path.join(root, 'lib'))
19     l.append(os.path.join(root, 'lib', 'tk', env.get('TCL_SHORT_VERSION')))
20     #http://computer-programming-forum.com/57-tcl/1dfddc136afccb94.htm
21     #Tcl treats the contents of that variable as a list. Be happy, for you can now use drive letters on windows.
22     env.prepend('TKLIBPATH', l, sep=" ")
23
24     if not platform.system() == "Windows" :
25         env.prepend('LD_LIBRARY_PATH', os.path.join(root, 'lib'))
26     
27
28 def set_nativ_env(env):
29     env.set('TK_ROOT_DIR', '/usr')   # update for cmake
30     env.set('TKHOME', '/usr')