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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4760 - (hide annotations) (download) (as text)
Thu Nov 1 18:46:34 2007 UTC (9 years, 11 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 13541 byte(s)
STYLE: add comment to call out that we are not using the 64 bit build target yet (not supported yet in cmake for VTK)
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 4722 set ::ITK_TAG ITK-3-4
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 pieper 3390 set ::VTK_BUILD_TYPE "Debug" ;# options: Release, RelWithDebInfo, 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 hliu 3301 set ::NAVITRACK "OFF"
131 pieper 376
132 hliu 3301 # 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 hliu 3004
137 hliu 3301 # 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 hliu 3004
142 pieper 376 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 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
170 pieper 376 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 hliu 3004 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.so
180    
181 pieper 376 }
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 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
193 pieper 376 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 hliu 3004 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.so
203    
204 pieper 376 }
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 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
220 pieper 376 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 pieper 3016 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
227 pieper 376 }
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 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
255 pieper 883 set ::MAKE "make -j [expr $numCPUs * 2]"
256 pieper 376 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 hayes 933 set ::COMPILER "g++"
264 pieper 376 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 pieper 917 # - automatically use newer if available
317 pieper 376 #
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 pieper 917 #
325     ## for Visual Studio 8
326     # - automatically use newest if available
327 pieper 1456 # - use full if available, otherwise express
328 pieper 4760 # - use the 64 bit version if available
329 pieper 917 #
330     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
331     set ::GENERATOR "Visual Studio 8 2005"
332     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
333     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
334     }
335    
336 pieper 1456
337     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
338     set ::GENERATOR "Visual Studio 8 2005"
339     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
340     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
341     }
342    
343 pieper 4690 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
344 pieper 4760 #set ::GENERATOR "Visual Studio 8 2005 Win64"
345     set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
346 pieper 4690 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
347     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
348     }
349    
350 pieper 376 set ::COMPILER "cl"
351     set ::SERIAL_MAKE $::MAKE
352     }
353     }
354    
355    

  ViewVC Help
Powered by ViewVC 1.1.22