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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22