/[Slicer3]/oldtrunk/slicer_variables.tcl
ViewVC logotype

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1573 - (show annotations) (download) (as text)
Mon Nov 13 21:57:18 2006 UTC (10 years, 11 months ago) by alexy
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 12414 byte(s)
ENH: changed to use Debug
1
2 #
3 # Note: this local vars file overrides sets the default environment for :
4 # Scripts/genlib.tcl -- make all the support libs
5 # Scripts/cmaker.tcl -- makes slicer code
6 # launch.tcl -- sets up the runtime env and starts slicer
7 # Scripts/tarup.tcl -- makes a tar.gz files with all the support files
8 #
9 # - use this file to set your local environment and then your change won't
10 # be overwritten when those files are updated through CVS
11 #
12
13
14 ## variables that are the same for all systems
15 set ::SLICER_DATA_ROOT ""
16
17 if {[info exists ::env(SLICER_HOME)]} {
18 # already set by the launcher
19 set ::SLICER_HOME $::env(SLICER_HOME)
20 } else {
21 # if sourcing this into cmaker, SLICER_HOME may not be set
22 # set the SLICER_HOME directory to the one in which this script resides
23 set cwd [pwd]
24 cd [file dirname [info script]]
25 set ::SLICER_HOME [pwd]
26 set ::env(SLICER_HOME) $::SLICER_HOME
27 cd $cwd
28 }
29
30 # set up variables for the OS Builds, to facilitate the move to solaris9
31 # - solaris can be solaris8 or solaris9
32 set ::SOLARIS "solaris8"
33 set ::LINUX "linux-x86"
34 set ::LINUX_64 "linux-x86_64"
35 set ::DARWIN "darwin-ppc"
36 set ::WINDOWS "win32"
37
38 #
39 # set the default locations for the main components
40 #
41 switch $::tcl_platform(os) {
42 "SunOS" { set ::env(BUILD) $::SOLARIS }
43 "Linux" {
44 if {$::tcl_platform(machine) == "x86_64"} {
45 set ::env(BUILD) $::LINUX_64
46 } else {
47 set ::env(BUILD) $::LINUX
48 }
49 }
50 "Darwin" { set ::env(BUILD) $::DARWIN }
51 default {
52 set ::env(BUILD) $::WINDOWS
53 set ::SLICER_HOME [file attributes $::SLICER_HOME -shortname]
54 set ::env(SLICER_HOME) $::SLICER_HOME
55 }
56 }
57
58 puts stderr "SLICER_HOME is $::SLICER_HOME"
59
60 # Choose which library versions you want to compile against. These
61 # shouldn't be changed between releases except for testing purposes.
62 # If you change them and Slicer breaks, you get to keep both pieces.
63 #
64 # When modifying these variables, make sure to make appropriate
65 # changes in the "Files to test if library has already been built"
66 # section below, or genlib will happily build the library again.
67
68 set ::CMAKE_TAG "CMake-2-4-2"
69 set ::TEEM_TAG "Teem-1-9-0-patches"
70 set ::KWWidgets_TAG "HEAD"
71 set ::VTK_TAG "VTK-5-0"
72 #set ::ITK_TAG "ITK-2-8"
73 set ::ITK_TAG HEAD
74 set ::TCL_TAG "core-8-4-6"
75 set ::TK_TAG "core-8-4-6"
76 set ::ITCL_TAG "itcl-3-2-1"
77 set ::IWIDGETS_TAG "iwidgets-4-0-1"
78 set ::BLT_TAG "blt24z"
79 set ::SANDBOX_TAG "http://svn.na-mic.org:8000/svn/NAMICSandBox/branches/Slicer-2-6"
80
81 # Set library, binary, etc. paths...
82
83 # if SLICER_LIB and SLICER_BUILD haven't been set,
84 # then assume they are in the 'standard' places next to the source tree
85 # (as created by getbuildtest.tcl
86 if { ![info exists ::SLICER_LIB] } {
87 set wd [pwd]
88 cd $::SLICER_HOME/../Slicer3-lib
89 set ::SLICER_LIB [pwd]
90 cd $wd
91 }
92 if { ![info exists ::SLICER_BUILD] } {
93 set wd [pwd]
94 cd $::SLICER_HOME/../Slicer3-build
95 set ::SLICER_BUILD [pwd]
96 cd $wd
97 }
98
99 set ::TEEM_SRC_DIR $::SLICER_LIB/teem
100 set ::TEEM_BUILD_DIR $::SLICER_LIB/teem-build
101 set ::VTK_DIR $::SLICER_LIB/VTK-build
102 set ::VTK_SRC_DIR $::SLICER_LIB/VTK
103 set ::VTK_BUILD_TYPE "Debug"
104 set ::VTK_BUILD_SUBDIR ""
105 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
106 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
107 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
108 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
109 set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
110 set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
111 set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
112 set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
113 set ::CMAKE_PATH $::SLICER_LIB/CMake-build
114 set ::SOV_BINARY_DIR ""
115 set ::XVNC_EXECUTABLE " "
116
117
118 # Files to test if library has already been built by genlib.tcl.
119
120 switch $::tcl_platform(os) {
121 "SunOS" -
122 "Linux" {
123 set shared_lib_ext "so"
124 }
125 "Darwin" {
126 set shared_lib_ext "dylib"
127 }
128 "Windows NT" {
129 set shared_lib_ext "dll"
130 }
131 }
132
133 # TODO: identify files for each platform
134
135 switch $::tcl_platform(os) {
136 "SunOS" -
137 "Darwin" {
138 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
139
140 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
141 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
142 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
143 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
144 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
145 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
146 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
147 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
148 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
149 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
150 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
151 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
152 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
153 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
154 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
155 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
156 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
157 }
158 "Linux" {
159 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
160
161 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
162 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
163 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
164 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
165 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
166 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
167 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
168 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
169 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
170 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
171 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
172 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
173 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
174 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
175 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
176 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
177 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
178 }
179 "Windows NT" {
180 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
181
182 #
183 ### Set your peferred build type:
184 #
185 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# good if you have the full (expensive) compiler
186 #set ::VTK_BUILD_TYPE Release ;# faster, but no debugging
187 #set ::VTK_BUILD_TYPE Debug ;# a good default
188 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# a good default
189 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
190 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
191
192 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
193 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
194 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
195 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
196 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
197 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
198 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
199 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
200 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
201 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
202 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
203 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
204 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
205 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
206 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
207
208 }
209 default {
210 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
211 exit
212 }
213 }
214
215 # System dependent variables
216
217 switch $::tcl_platform(os) {
218 "SunOS" {
219 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
220 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
221 set ::GENERATOR "Unix Makefiles"
222 set ::COMPILER_PATH "/local/os/bin"
223 set ::COMPILER "g++"
224 set ::CMAKE $::CMAKE_PATH/bin/cmake
225 set ::MAKE "gmake"
226 set ::SERIAL_MAKE "gmake"
227 }
228 "Linux" {
229 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
230 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
231 set ::GENERATOR "Unix Makefiles"
232 set ::COMPILER_PATH "/usr/bin"
233 set ::COMPILER "g++"
234 set ::CMAKE $::CMAKE_PATH/bin/cmake
235 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
236 set ::MAKE "make -j [expr $numCPUs * 2]"
237 puts "making with $::MAKE"
238 set ::SERIAL_MAKE "make"
239 }
240 "Darwin" {
241 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
242 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
243 set ::GENERATOR "Unix Makefiles"
244 set ::COMPILER_PATH "/usr/bin"
245 set ::COMPILER "g++"
246 set ::CMAKE $::CMAKE_PATH/bin/cmake
247 set ::MAKE make
248 set ::SERIAL_MAKE make
249 }
250 default {
251 # different windows machines say different things, so assume
252 # that if it doesn't match above it must be windows
253 # (VC7 is Visual C++ 7.0, also known as the .NET version)
254
255
256 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
257 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
258
259 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
260
261 set MSVC6 0
262 #
263 ## match this to the version of the compiler you have:
264 #
265
266 ## for Visual Studio 6:
267 #set ::GENERATOR "Visual Studio 6"
268 #set ::MAKE "msdev"
269 #set ::COMPILER_PATH ""
270 #set MSVC6 1
271
272 if {[info exists ::env(MSVC6)]} {
273 set ::MSVC6 $::env(MSVC6)
274 } else {
275 }
276
277 ## for Visual Studio 7:
278 if {[info exists ::env(GENERATOR)]} {
279 set ::GENERATOR $::env(GENERATOR)
280 } else {
281 set ::GENERATOR "Visual Studio 7"
282 }
283
284 if {[info exists ::env(MAKE)]} {
285 set ::MAKE $::env(MAKE)
286 } else {
287 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
288 }
289
290 if {[info exists ::env(COMPILER_PATH)]} {
291 set ::COMPILER_PATH $::env(COMPILER_PATH)
292 } else {
293 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
294 }
295
296 #
297 ## for Visual Studio 7.1:
298 # - automatically use newer if available
299 #
300 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
301 set ::GENERATOR "Visual Studio 7 .NET 2003"
302 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
303 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
304 }
305
306 #
307 ## for Visual Studio 8
308 # - automatically use newest if available
309 # - use full if available, otherwise express
310 #
311 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
312 set ::GENERATOR "Visual Studio 8 2005"
313 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
314 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
315 }
316
317
318 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
319 set ::GENERATOR "Visual Studio 8 2005"
320 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
321 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
322 }
323
324 set ::COMPILER "cl"
325 set ::SERIAL_MAKE $::MAKE
326 }
327 }
328
329

  ViewVC Help
Powered by ViewVC 1.1.22