Fix WOK extraction when environment variable HAVE_VTK is not defined
[occt.git] / src / OS / Visualization.tcl
CommitLineData
973c2be1 1# Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2#
973c2be1 3# This file is part of Open CASCADE Technology software library.
b311480e 4#
d5f74e42 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
973c2be1 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.
b311480e 10#
973c2be1 11# Alternatively, this file may be used under the terms of Open CASCADE
12# commercial license or contractual agreement.
b311480e 13
7fd59977 14;#
15;# Liste des toolkits WOK sous forme de full path
16;#
17proc Visualization:toolkits { } {
913a4c4a 18 set aResult [list TKService \
19 TKV3d \
20 TKOpenGl \
21 TKMeshVS \
22 TKNIS \
23 TKVoxel]
24
53c888d1 25 if { [info exists ::env(HAVE_VTK)] && "$::env(HAVE_VTK)" == "true" } {
913a4c4a 26 lappend aResult "TKIVtk"
27 }
28
29 return $aResult
7fd59977 30}
31;#
32;# Autres UDs a prendre.
33;#
34proc Visualization:ressources { } {
35 return [list \
7fd59977 36 [list both r Textures {}] \
4058ef10 37 [list both r Shaders {}] \
7fd59977 38 ]
39}
40;#
41;# Nom du module
42;#
43proc Visualization:name { } {
44 return Visualization
45}
46proc Visualization:alias { } {
47 return VIS
48}
49proc Visualization:depends { } {
50 return [list ModelingAlgorithms]
51}
046fed1e 52
53proc Visualization:acdepends { } {
7cf07fa5 54 set aList [list X11 GL FREETYPE]
55
53c888d1 56 if { [info exists ::env(HAVE_VTK)] && "$::env(HAVE_VTK)" == "true" } {
7cf07fa5 57 lappend aList "VTK"
58 }
59
60 return $aList
046fed1e 61}
62
7fd59977 63;#
64;# Pre-requis pour la compilation ( -I ... )
65;# Returns a list of directory that should be used in -I directives
66;# while compiling c or c++ files.
67;#
68proc Visualization:CompileWith {} {
69
70 set l {}
71 switch -- [OS:os] {
72 HP-UX {
73 }
74 Linux {
75 lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
76 lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux"
77 lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
78 lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]"
79 }
80 SunOS {
81 lappend l "\$OPENWINHOME/include"
82 lappend l "/usr/openwin/include/X11"
83 lappend l "/usr/dt/include"
84 lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]"
85 lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include"
86 lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris"
87 lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include"
88 }
89 IRIX {
90 lappend l /usr/include/CC
91 }
92
93 }
94 return $l
95}
96;#
97;# Pre-requis pour la compilation ( -L ... )
98;# Returns a list of directory that should be used in -L directives
99;# while creating shareable.
100;#
101proc Visualization:LinksoWith { } {
102
103 set l {}
104 switch -- [OS:os] {
105 HP-UX {
106 }
107 Linux {
108 lappend l /usr/X11R6/lib
109 }
110 SunOS {
111 lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl"
112 lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk"
113 lappend l /usr/openwin/lib
114 }
115 IRIX {
116 lappend l /usr/lib32
117 }
118
119 }
120 return $l
121}
122;#
123;# Returns a list of exported features.
124;# source : Source files
125;# runtime: Shareables
126;# wokadm : WOK admin files
127;# api : Public include files
128;#
129proc Visualization:Export { } {
130 return [list source runtime wokadm api]
131}