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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7221 - (hide annotations) (download) (as text)
Fri Jun 27 15:43:10 2008 UTC (9 years, 3 months ago) by naucoin
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 14681 byte(s)
BUG: slicer3 trunk needs to build against kwwidgets head
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 barre 6777 set ::Slicer3_DATA_ROOT ""
16 pieper 376
17 barre 6777 if {[info exists ::env(Slicer3_HOME)]} {
18 pieper 376 # already set by the launcher
19 barre 6777 set ::Slicer3_HOME $::env(Slicer3_HOME)
20 pieper 376 } else {
21 barre 6777 # if sourcing this into cmaker, Slicer3_HOME may not be set
22     # set the Slicer3_HOME directory to the one in which this script resides
23 pieper 376 set cwd [pwd]
24     cd [file dirname [info script]]
25 barre 6777 set ::Slicer3_HOME [pwd]
26     set ::env(Slicer3_HOME) $::Slicer3_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 barre 6777 set ::Slicer3_HOME [file attributes $::Slicer3_HOME -shortname]
61     set ::env(Slicer3_HOME) $::Slicer3_HOME
62 pieper 376 }
63     }
64    
65 barre 6777 puts stderr "Slicer3_HOME is $::Slicer3_HOME"
66 pieper 376
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 hayes 7173 set ::Slicer3_TAG "http://svn.slicer.org/Slicer3/trunk"
76 pieper 6641 set ::CMAKE_TAG "CMake-2-6"
77 pieper 376 set ::TEEM_TAG "Teem-1-9-0-patches"
78 naucoin 7221 set ::KWWidgets_TAG "HEAD"
79 pieper 6641 set ::VTK_TAG "VTK-5-2"
80     set ::ITK_TAG ITK-3-6
81 blezek 6869 set ::PYTHON_TAG "http://svn.python.org/projects/python/branches/release25-maint"
82 naucoin 6040 set ::SLICERLIBCURL_TAG "HEAD"
83 pieper 376
84     # Set library, binary, etc. paths...
85    
86 barre 6777 # if Slicer3_LIB and Slicer3_BUILD haven't been set,
87 pieper 433 # then assume they are in the 'standard' places next to the source tree
88     # (as created by getbuildtest.tcl
89 barre 6777 if { ![info exists ::Slicer3_LIB] } {
90 pieper 433 set wd [pwd]
91 barre 6777 cd $::Slicer3_HOME/../Slicer3-lib
92     set ::Slicer3_LIB [pwd]
93 pieper 433 cd $wd
94     }
95 barre 6777 if { ![info exists ::Slicer3_BUILD] } {
96 pieper 433 set wd [pwd]
97 barre 6777 cd $::Slicer3_HOME/../Slicer3-build
98     set ::Slicer3_BUILD [pwd]
99 pieper 433 cd $wd
100     }
101    
102 barre 6777 set ::TEEM_SRC_DIR $::Slicer3_LIB/teem
103     set ::TEEM_BUILD_DIR $::Slicer3_LIB/teem-build
104     set ::VTK_DIR $::Slicer3_LIB/VTK-build
105     set ::VTK_SRC_DIR $::Slicer3_LIB/VTK
106 pieper 5199 if { ![info exists ::VTK_BUILD_TYPE] } {
107     # set a default if it hasn't already been specified
108     set ::VTK_BUILD_TYPE "Debug" ;# options: Release, RelWithDebInfo, Debug
109     }
110     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
111 pieper 376 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
112 barre 6777 set ::KWWidgets_BUILD_DIR $::Slicer3_LIB/KWWidgets-build
113     set ::KWWIDGETS_DIR $::Slicer3_LIB/KWWidgets
114     set ::ITK_BINARY_PATH $::Slicer3_LIB/Insight-build
115     set ::TCL_BIN_DIR $::Slicer3_LIB/tcl-build/bin
116     set ::TCL_LIB_DIR $::Slicer3_LIB/tcl-build/lib
117     set ::TCL_INCLUDE_DIR $::Slicer3_LIB/tcl-build/include
118 blezek 6869 set ::PYTHON_BIN_DIR $::Slicer3_LIB/python-build
119 barre 6777 set ::CMAKE_PATH $::Slicer3_LIB/CMake-build
120 pieper 376 set ::SOV_BINARY_DIR ""
121     set ::XVNC_EXECUTABLE " "
122 barre 6777 set ::IGSTK_DIR $::Slicer3_LIB/IGSTK-build
123     set ::SLICERLIBCURL_SRC_DIR $::Slicer3_LIB/cmcurl
124     set ::SLICERLIBCURL_BUILD_DIR $::Slicer3_LIB/cmcurl-build
125 pieper 376
126    
127 hliu 3004 # Options for building IGT modules in Slicer
128     set ::IGSTK "OFF"
129 hliu 3301 set ::NAVITRACK "OFF"
130 pieper 376
131 hliu 3301 # The absolute path and directory containing the navitrack library,
132     # for instance on linux the libNaviTrack.so
133     # set ::NAVITRACK_LIB_DIR /home/hliu/projects/navitrack/NaviTrack-build
134     set ::NAVITRACK_LIB_DIR ""
135 hliu 3004
136 hliu 3301 # The navitrack include directry, e.g.
137     # /home/hliu/projects/navitrack/NaviTrack/include
138     # set ::NAVITRACK_INC_DIR /home/hliu/projects/navitrack/NaviTrack/include
139     set ::NAVITRACK_INC_DIR ""
140 hliu 3004
141 pieper 376 switch $::tcl_platform(os) {
142     "SunOS" -
143     "Linux" {
144     set shared_lib_ext "so"
145     }
146     "Darwin" {
147     set shared_lib_ext "dylib"
148     }
149     "Windows NT" {
150     set shared_lib_ext "dll"
151     }
152     }
153    
154     # TODO: identify files for each platform
155    
156     switch $::tcl_platform(os) {
157     "SunOS" -
158     "Darwin" {
159 pieper 5261 set ::VTK_BUILD_SUBDIR ""
160 pieper 376 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 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
165     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
166 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
167 blezek 6909 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.dylib
168     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
169 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
170 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
171     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
172 pieper 376 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
173     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
174 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
175 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
176     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
177     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
178     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
179 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
180 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
181 pieper 4775 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
182 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
183 hliu 3004
184 pieper 376 }
185     "Linux" {
186 pieper 5261 set ::VTK_BUILD_SUBDIR ""
187 pieper 376 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
188    
189     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
190 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
191     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
192 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
193     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
194 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
195 blezek 6909 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.so
196     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
197 pieper 376 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
198 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
199 pieper 376 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
200     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
201 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
202 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
203     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
204     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
205     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
206 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
207 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
208 pieper 4775 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
209 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
210 hliu 3004
211 pieper 376 }
212     "Windows NT" {
213     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
214    
215     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
216     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
217    
218     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
219     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
220     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
221 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
222 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/itcl3.2/itcl32.lib
223     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/itk3.2/itk32.lib
224 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
225     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
226 pieper 376 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
227 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python.exe
228     set ::PYTHON_LIB $::PYTHON_BIN_DIR/Libs/python25.lib
229     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
230 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
231 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
232 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
233     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
234     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
235     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
236 pieper 3016 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
237 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
238 pieper 376 }
239     default {
240     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
241     exit
242     }
243     }
244    
245     # System dependent variables
246    
247     switch $::tcl_platform(os) {
248     "SunOS" {
249 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
250     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
251 pieper 376 set ::GENERATOR "Unix Makefiles"
252     set ::COMPILER_PATH "/local/os/bin"
253     set ::COMPILER "g++"
254     set ::CMAKE $::CMAKE_PATH/bin/cmake
255     set ::MAKE "gmake"
256     set ::SERIAL_MAKE "gmake"
257     }
258     "Linux" {
259 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
260     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
261 pieper 376 set ::GENERATOR "Unix Makefiles"
262     set ::COMPILER_PATH "/usr/bin"
263     set ::COMPILER "g++"
264     set ::CMAKE $::CMAKE_PATH/bin/cmake
265 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
266 pieper 883 set ::MAKE "make -j [expr $numCPUs * 2]"
267 pieper 376 set ::SERIAL_MAKE "make"
268     }
269     "Darwin" {
270 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
271     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
272 pieper 376 set ::GENERATOR "Unix Makefiles"
273     set ::COMPILER_PATH "/usr/bin"
274 hayes 933 set ::COMPILER "g++"
275 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
276     set ::MAKE make
277     set ::SERIAL_MAKE make
278     }
279     default {
280     # different windows machines say different things, so assume
281     # that if it doesn't match above it must be windows
282     # (VC7 is Visual C++ 7.0, also known as the .NET version)
283    
284    
285 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
286     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
287 pieper 376
288     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
289    
290     set MSVC6 0
291     #
292     ## match this to the version of the compiler you have:
293     #
294    
295     ## for Visual Studio 6:
296     #set ::GENERATOR "Visual Studio 6"
297     #set ::MAKE "msdev"
298     #set ::COMPILER_PATH ""
299     #set MSVC6 1
300    
301     if {[info exists ::env(MSVC6)]} {
302     set ::MSVC6 $::env(MSVC6)
303     } else {
304     }
305    
306     ## for Visual Studio 7:
307     if {[info exists ::env(GENERATOR)]} {
308     set ::GENERATOR $::env(GENERATOR)
309     } else {
310     set ::GENERATOR "Visual Studio 7"
311     }
312    
313     if {[info exists ::env(MAKE)]} {
314     set ::MAKE $::env(MAKE)
315     } else {
316     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
317     }
318    
319     if {[info exists ::env(COMPILER_PATH)]} {
320     set ::COMPILER_PATH $::env(COMPILER_PATH)
321     } else {
322     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
323     }
324    
325     #
326     ## for Visual Studio 7.1:
327 pieper 917 # - automatically use newer if available
328 pieper 376 #
329     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
330     set ::GENERATOR "Visual Studio 7 .NET 2003"
331     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
332     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
333     }
334    
335 pieper 917 #
336     ## for Visual Studio 8
337     # - automatically use newest if available
338 pieper 1456 # - use full if available, otherwise express
339 pieper 4760 # - use the 64 bit version if available
340 pieper 917 #
341     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
342     set ::GENERATOR "Visual Studio 8 2005"
343     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
344     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
345     }
346    
347 pieper 1456
348     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
349     set ::GENERATOR "Visual Studio 8 2005"
350     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
351     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
352     }
353    
354 pieper 4690 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
355 pieper 4760 #set ::GENERATOR "Visual Studio 8 2005 Win64"
356     set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
357 pieper 4690 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
358     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
359     }
360 hayes 6440 #
361     ## for Visual Studio 9
362     if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
363 hayes 6442 set ::GENERATOR "Visual Studio 9 2008"
364 hayes 6440 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
365     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
366    
367     }
368 pieper 4690
369 pieper 376 set ::COMPILER "cl"
370     set ::SERIAL_MAKE $::MAKE
371     }
372     }
373    
374    

  ViewVC Help
Powered by ViewVC 1.1.22