74fbe7f8d525204ed6e7bff227a1693c4600f5d4
[occt.git] / src / OS / Visualization.tcl
1 # Copyright (c) 1999-2014 OPEN CASCADE SAS
2 #
3 # This file is part of Open CASCADE Technology software library.
4 #
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License version 2.1 as published
7 # by the Free Software Foundation, with special exception defined in the file
8 # OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 # distribution for complete text of the license and disclaimer of any warranty.
10 #
11 # Alternatively, this file may be used under the terms of Open CASCADE
12 # commercial license or contractual agreement.
13
14 ;#
15 ;# Liste des toolkits WOK sous forme de full path
16 ;# 
17 proc Visualization:toolkits { } {
18     set aResult [list TKService \
19                      TKV3d \
20                      TKOpenGl \
21                      TKMeshVS \
22                      TKVoxel]
23
24     if { [info exists ::env(HAVE_VTK)] && "$::env(HAVE_VTK)" == "true" } {
25       lappend aResult "TKIVtk"
26     }
27
28     if { "$::tcl_platform(platform)" == "windows" } {
29       if { [info exists ::env(HAVE_D3D)] && "$::env(HAVE_D3D)" == "true" } {
30         lappend aResult "TKD3DHost"
31       } elseif { [info exists ::env(VCVER)] && "$::env(VCVER)" != "vc8" && "$::env(VCVER)" != "vc9" && "$::env(VCVER)" != "vc10" } {
32         lappend aResult "TKD3DHost"
33       }
34     }
35
36     return $aResult
37 }
38 ;#
39 ;# Autres UDs a prendre.
40 ;#
41 proc Visualization:ressources { } {
42     return [list \
43            [list both r Textures {}] \
44            [list both r Shaders {}] \
45             ]
46 }
47 ;#
48 ;# Nom du module 
49 ;#
50 proc Visualization:name { } {
51     return Visualization
52 }
53 proc Visualization:alias { } {
54     return VIS
55 }
56 proc Visualization:depends { } {
57     return [list ModelingAlgorithms]
58 }
59
60 proc Visualization:acdepends { } {
61     set aList [list X11 GL FREETYPE]
62
63     if { [info exists ::env(HAVE_VTK)] && "$::env(HAVE_VTK)" == "true" } {
64       lappend aList "VTK"
65     }
66
67     return $aList
68 }
69
70 ;#
71 ;# Pre-requis pour la compilation ( -I ... )
72 ;# Returns a list of directory that should be used in -I directives
73 ;# while compiling c or c++ files.
74 ;#
75 proc Visualization:CompileWith {} {
76     
77     set l {}
78     switch -- [OS:os] {
79         HP-UX {
80         }
81         Linux {
82             lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
83             lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux"
84             lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
85            lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" 
86         }
87         SunOS {
88             lappend l "\$OPENWINHOME/include"
89             lappend l "/usr/openwin/include/X11"
90             lappend l "/usr/dt/include"
91             lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
92             lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
93             lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
94             lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
95         }
96         IRIX {
97             lappend l /usr/include/CC
98         }
99
100     }
101     return $l
102 }
103 ;#
104 ;# Pre-requis pour la compilation ( -L ... )
105 ;# Returns a list of directory that should be used in -L directives
106 ;# while creating shareable.
107 ;#
108 proc Visualization:LinksoWith { } {
109     
110     set l {}
111     switch -- [OS:os] {
112         HP-UX {
113         }
114         Linux {
115             lappend l /usr/X11R6/lib
116         }
117         SunOS {
118             lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
119             lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk"
120             lappend l /usr/openwin/lib
121         }
122         IRIX {
123             lappend l /usr/lib32 
124         }
125
126     }
127     return $l
128 }
129 ;#
130 ;# Returns a list of exported features.
131 ;# source : Source files
132 ;# runtime: Shareables
133 ;# wokadm : WOK admin files
134 ;# api    : Public include files
135 ;#
136 proc Visualization:Export { } {
137     return [list source runtime wokadm api]
138 }