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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6875 - (hide annotations) (download) (as text)
Tue May 27 14:23:56 2008 UTC (9 years, 4 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 14297 byte(s)
COMP: update to turn off python and  reflect new incr tcl and incr tk cmake files
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 barre 6777 set ::Slicer3_TAG "http://www.na-mic.org/svn/Slicer3/trunk"
76 pieper 6641 set ::CMAKE_TAG "CMake-2-6"
77 pieper 376 set ::TEEM_TAG "Teem-1-9-0-patches"
78 pieper 6641 set ::KWWidgets_TAG "HEAD"
79     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     set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython25.dylib
168     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python25
169 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
170 pieper 376 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
171     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
172 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
173 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
174     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
175     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
176     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
177 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
178 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
179 pieper 4775 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
180 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
181 hliu 3004
182 pieper 376 }
183     "Linux" {
184 pieper 5261 set ::VTK_BUILD_SUBDIR ""
185 pieper 376 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
186    
187     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
188 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
189     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
190 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
191     set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython25.so
192     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python25
193 pieper 376 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
194 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
195 pieper 376 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
196     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
197 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
198 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
199     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
200     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
201     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
202 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
203 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
204 pieper 4775 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
205 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
206 hliu 3004
207 pieper 376 }
208     "Windows NT" {
209     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
210    
211     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
212     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
213    
214     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
215     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
216     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
217 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
218 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/itcl3.2/itcl32.lib
219     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/itk3.2/itk32.lib
220 pieper 376 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
221 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python.exe
222     set ::PYTHON_LIB $::PYTHON_BIN_DIR/Libs/python25.lib
223     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
224 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
225 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
226 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
227     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
228     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
229     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
230 pieper 3016 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
231 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
232 pieper 376 }
233     default {
234     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
235     exit
236     }
237     }
238    
239     # System dependent variables
240    
241     switch $::tcl_platform(os) {
242     "SunOS" {
243 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
244     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
245 pieper 376 set ::GENERATOR "Unix Makefiles"
246     set ::COMPILER_PATH "/local/os/bin"
247     set ::COMPILER "g++"
248     set ::CMAKE $::CMAKE_PATH/bin/cmake
249     set ::MAKE "gmake"
250     set ::SERIAL_MAKE "gmake"
251     }
252     "Linux" {
253 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
254     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
255 pieper 376 set ::GENERATOR "Unix Makefiles"
256     set ::COMPILER_PATH "/usr/bin"
257     set ::COMPILER "g++"
258     set ::CMAKE $::CMAKE_PATH/bin/cmake
259 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
260 pieper 883 set ::MAKE "make -j [expr $numCPUs * 2]"
261 pieper 376 set ::SERIAL_MAKE "make"
262     }
263     "Darwin" {
264 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
265     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
266 pieper 376 set ::GENERATOR "Unix Makefiles"
267     set ::COMPILER_PATH "/usr/bin"
268 hayes 933 set ::COMPILER "g++"
269 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
270     set ::MAKE make
271     set ::SERIAL_MAKE make
272     }
273     default {
274     # different windows machines say different things, so assume
275     # that if it doesn't match above it must be windows
276     # (VC7 is Visual C++ 7.0, also known as the .NET version)
277    
278    
279 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
280     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
281 pieper 376
282     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
283    
284     set MSVC6 0
285     #
286     ## match this to the version of the compiler you have:
287     #
288    
289     ## for Visual Studio 6:
290     #set ::GENERATOR "Visual Studio 6"
291     #set ::MAKE "msdev"
292     #set ::COMPILER_PATH ""
293     #set MSVC6 1
294    
295     if {[info exists ::env(MSVC6)]} {
296     set ::MSVC6 $::env(MSVC6)
297     } else {
298     }
299    
300     ## for Visual Studio 7:
301     if {[info exists ::env(GENERATOR)]} {
302     set ::GENERATOR $::env(GENERATOR)
303     } else {
304     set ::GENERATOR "Visual Studio 7"
305     }
306    
307     if {[info exists ::env(MAKE)]} {
308     set ::MAKE $::env(MAKE)
309     } else {
310     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
311     }
312    
313     if {[info exists ::env(COMPILER_PATH)]} {
314     set ::COMPILER_PATH $::env(COMPILER_PATH)
315     } else {
316     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
317     }
318    
319     #
320     ## for Visual Studio 7.1:
321 pieper 917 # - automatically use newer if available
322 pieper 376 #
323     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
324     set ::GENERATOR "Visual Studio 7 .NET 2003"
325     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
326     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
327     }
328    
329 pieper 917 #
330     ## for Visual Studio 8
331     # - automatically use newest if available
332 pieper 1456 # - use full if available, otherwise express
333 pieper 4760 # - use the 64 bit version if available
334 pieper 917 #
335     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
336     set ::GENERATOR "Visual Studio 8 2005"
337     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
338     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
339     }
340    
341 pieper 1456
342     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
343     set ::GENERATOR "Visual Studio 8 2005"
344     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
345     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
346     }
347    
348 pieper 4690 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
349 pieper 4760 #set ::GENERATOR "Visual Studio 8 2005 Win64"
350     set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
351 pieper 4690 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
352     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
353     }
354 hayes 6440 #
355     ## for Visual Studio 9
356     if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
357 hayes 6442 set ::GENERATOR "Visual Studio 9 2008"
358 hayes 6440 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
359     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
360    
361     }
362 pieper 4690
363 pieper 376 set ::COMPILER "cl"
364     set ::SERIAL_MAKE $::MAKE
365     }
366     }
367    
368    

  ViewVC Help
Powered by ViewVC 1.1.22