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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3288 - (hide annotations) (download) (as text)
Fri Apr 27 18:36:22 2007 UTC (10 years, 5 months ago) by hliu
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 13500 byte(s)
BUG: fixed a wrong commit.
1 pieper 376
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 pieper 435 set ::env(SLICER_HOME) $::SLICER_HOME
27 pieper 376 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 pieper 435 set ::SOLARIS "solaris8"
33     set ::LINUX "linux-x86"
34     set ::LINUX_64 "linux-x86_64"
35     set ::DARWIN "darwin-ppc"
36 naucoin 2494 set ::DARWIN_X86 "darwin-x86"
37 pieper 435 set ::WINDOWS "win32"
38    
39 pieper 376 #
40     # set the default locations for the main components
41     #
42     switch $::tcl_platform(os) {
43 pieper 435 "SunOS" { set ::env(BUILD) $::SOLARIS }
44 pieper 376 "Linux" {
45     if {$::tcl_platform(machine) == "x86_64"} {
46 pieper 435 set ::env(BUILD) $::LINUX_64
47 pieper 376 } else {
48 pieper 435 set ::env(BUILD) $::LINUX
49 pieper 376 }
50     }
51 naucoin 2494 "Darwin" {
52 lauren 2510 if {$::tcl_platform(machine) == "i386"} {
53 naucoin 2494 set ::env(BUILD) $::DARWIN_X86
54     } else {
55     set ::env(BUILD) $::DARWIN
56     }
57     }
58 pieper 376 default {
59 pieper 435 set ::env(BUILD) $::WINDOWS
60 pieper 376 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 pieper 2143 #set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/branches/Slicer3.0-PreAHMBeta"
76 hliu 3288 set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/trunk"
77 pieper 879 set ::CMAKE_TAG "CMake-2-4-2"
78 pieper 3132 #set ::TEEM_TAG "HEAD"
79 pieper 376 set ::TEEM_TAG "Teem-1-9-0-patches"
80     set ::KWWidgets_TAG "HEAD"
81 pieper 1114 set ::VTK_TAG "VTK-5-0"
82 pieper 3132 set ::ITK_TAG ITK-3-2
83 pieper 376 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 pieper 2730 set ::SANDBOX_TAG "http://svn.na-mic.org/svn/NAMICSandBox/branches/Slicer-2-6"
89 pieper 376
90     # Set library, binary, etc. paths...
91    
92 pieper 433 # 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 pieper 435 cd $::SLICER_HOME/../Slicer3-lib
98     set ::SLICER_LIB [pwd]
99 pieper 433 cd $wd
100     }
101     if { ![info exists ::SLICER_BUILD] } {
102     set wd [pwd]
103 pieper 435 cd $::SLICER_HOME/../Slicer3-build
104     set ::SLICER_BUILD [pwd]
105 pieper 433 cd $wd
106     }
107    
108 pieper 376 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 alexy 1573 set ::VTK_BUILD_TYPE "Debug"
113 pieper 376 set ::VTK_BUILD_SUBDIR ""
114     set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
115 pieper 400 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
116 pieper 435 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
117 pieper 376 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 hliu 3004 set ::IGSTK_DIR $::SLICER_LIB/IGSTK-build
126 pieper 376
127    
128 hliu 3004 # Options for building IGT modules in Slicer
129     set ::IGSTK "OFF"
130     set ::OPENTRACKER "OFF"
131     # If the value of OPENTRACKER is "ON", you need to set the following variables:
132 pieper 376
133 hliu 3004 # ON: opentracker 1.3
134     # OFF: opentracker 2.0
135     set ::OT_VERSION "ON"
136    
137     # OT_LIB_DIR: the absolute path contains the OpenTracker library,
138     # e.g. libOpenTrakcer.so
139     # set ::OT_LIB_DIR /home/hliu/projects/splot-build/opentracker/lib/.libs/
140     set ::OT_LIB_DIR ""
141    
142     # OT_INC: the directory contains "OpenTracker.h" (opentracker 1.3) or
143     # "OpenTracker/OpenTracker.h" (opentracker 2.0)
144     # set ::OT_INC_DIR /home/hliu/projects/splot-build/opentracker/src
145     set ::OT_INC_DIR ""
146    
147    
148 pieper 376 switch $::tcl_platform(os) {
149     "SunOS" -
150     "Linux" {
151     set shared_lib_ext "so"
152     }
153     "Darwin" {
154     set shared_lib_ext "dylib"
155     }
156     "Windows NT" {
157     set shared_lib_ext "dll"
158     }
159     }
160    
161     # TODO: identify files for each platform
162    
163     switch $::tcl_platform(os) {
164     "SunOS" -
165     "Darwin" {
166     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
167    
168     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
169     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
170     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
171     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
172     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
173     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
174     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
175 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
176 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
177     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
178     set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
179     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
180     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
181     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
182     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
183     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
184     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
185 hliu 3004 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.so
186    
187 pieper 376 }
188     "Linux" {
189     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
190    
191     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
192     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
193     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
194     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
195     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
196     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
197     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
198 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
199 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
200     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
201     set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
202     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
203     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
204     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
205     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
206     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
207     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
208 hliu 3004 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.so
209    
210 pieper 376 }
211     "Windows NT" {
212     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
213    
214 pieper 1414 #
215     ### Set your peferred build type:
216     #
217     #set ::VTK_BUILD_TYPE RelWithDebInfo ;# good if you have the full (expensive) compiler
218     #set ::VTK_BUILD_TYPE Release ;# faster, but no debugging
219     #set ::VTK_BUILD_TYPE Debug ;# a good default
220 alexy 1573 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# a good default
221 pieper 376 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
222     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
223    
224     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
225     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
226     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
227     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
228     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
229     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
230     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
231     set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
232 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
233 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
234     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
235     set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
236     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
237     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
238     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
239 pieper 3016 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
240 pieper 376 }
241     default {
242     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
243     exit
244     }
245     }
246    
247     # System dependent variables
248    
249     switch $::tcl_platform(os) {
250     "SunOS" {
251     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
252     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
253     set ::GENERATOR "Unix Makefiles"
254     set ::COMPILER_PATH "/local/os/bin"
255     set ::COMPILER "g++"
256     set ::CMAKE $::CMAKE_PATH/bin/cmake
257     set ::MAKE "gmake"
258     set ::SERIAL_MAKE "gmake"
259     }
260     "Linux" {
261     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
262     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
263     set ::GENERATOR "Unix Makefiles"
264     set ::COMPILER_PATH "/usr/bin"
265     set ::COMPILER "g++"
266     set ::CMAKE $::CMAKE_PATH/bin/cmake
267 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
268 pieper 883 set ::MAKE "make -j [expr $numCPUs * 2]"
269 pieper 376 set ::SERIAL_MAKE "make"
270     }
271     "Darwin" {
272     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
273     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
274     set ::GENERATOR "Unix Makefiles"
275     set ::COMPILER_PATH "/usr/bin"
276 hayes 933 set ::COMPILER "g++"
277 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
278     set ::MAKE make
279     set ::SERIAL_MAKE make
280     }
281     default {
282     # different windows machines say different things, so assume
283     # that if it doesn't match above it must be windows
284     # (VC7 is Visual C++ 7.0, also known as the .NET version)
285    
286    
287     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
288     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
289    
290     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
291    
292     set MSVC6 0
293     #
294     ## match this to the version of the compiler you have:
295     #
296    
297     ## for Visual Studio 6:
298     #set ::GENERATOR "Visual Studio 6"
299     #set ::MAKE "msdev"
300     #set ::COMPILER_PATH ""
301     #set MSVC6 1
302    
303     if {[info exists ::env(MSVC6)]} {
304     set ::MSVC6 $::env(MSVC6)
305     } else {
306     }
307    
308     ## for Visual Studio 7:
309     if {[info exists ::env(GENERATOR)]} {
310     set ::GENERATOR $::env(GENERATOR)
311     } else {
312     set ::GENERATOR "Visual Studio 7"
313     }
314    
315     if {[info exists ::env(MAKE)]} {
316     set ::MAKE $::env(MAKE)
317     } else {
318     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
319     }
320    
321     if {[info exists ::env(COMPILER_PATH)]} {
322     set ::COMPILER_PATH $::env(COMPILER_PATH)
323     } else {
324     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
325     }
326    
327     #
328     ## for Visual Studio 7.1:
329 pieper 917 # - automatically use newer if available
330 pieper 376 #
331     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
332     set ::GENERATOR "Visual Studio 7 .NET 2003"
333     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
334     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
335     }
336    
337 pieper 917 #
338     ## for Visual Studio 8
339     # - automatically use newest if available
340 pieper 1456 # - use full if available, otherwise express
341 pieper 917 #
342     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
343     set ::GENERATOR "Visual Studio 8 2005"
344     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
345     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
346     }
347    
348 pieper 1456
349     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
350     set ::GENERATOR "Visual Studio 8 2005"
351     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
352     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
353     }
354    
355 pieper 376 set ::COMPILER "cl"
356     set ::SERIAL_MAKE $::MAKE
357     }
358     }
359    
360    

  ViewVC Help
Powered by ViewVC 1.1.22