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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5199 - (hide annotations) (download) (as text)
Fri Dec 14 12:47:28 2007 UTC (9 years, 10 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 13688 byte(s)
BUG: fix --release flag handling for libs and slicer3
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 pieper 4863 set ::KWWidgets_TAG "Slicer-3-0"
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 5199 if { ![info exists ::VTK_BUILD_TYPE] } {
113     # set a default if it hasn't already been specified
114     set ::VTK_BUILD_TYPE "Debug" ;# options: Release, RelWithDebInfo, Debug
115     }
116     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
117 pieper 376 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
118 pieper 400 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
119 pieper 435 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
120 pieper 376 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
121     set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
122     set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
123     set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
124     set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
125     set ::CMAKE_PATH $::SLICER_LIB/CMake-build
126     set ::SOV_BINARY_DIR ""
127     set ::XVNC_EXECUTABLE " "
128 hliu 3004 set ::IGSTK_DIR $::SLICER_LIB/IGSTK-build
129 pieper 376
130    
131 hliu 3004 # Options for building IGT modules in Slicer
132     set ::IGSTK "OFF"
133 hliu 3301 set ::NAVITRACK "OFF"
134 pieper 376
135 hliu 3301 # The absolute path and directory containing the navitrack library,
136     # for instance on linux the libNaviTrack.so
137     # set ::NAVITRACK_LIB_DIR /home/hliu/projects/navitrack/NaviTrack-build
138     set ::NAVITRACK_LIB_DIR ""
139 hliu 3004
140 hliu 3301 # The navitrack include directry, e.g.
141     # /home/hliu/projects/navitrack/NaviTrack/include
142     # set ::NAVITRACK_INC_DIR /home/hliu/projects/navitrack/NaviTrack/include
143     set ::NAVITRACK_INC_DIR ""
144 hliu 3004
145 pieper 376 switch $::tcl_platform(os) {
146     "SunOS" -
147     "Linux" {
148     set shared_lib_ext "so"
149     }
150     "Darwin" {
151     set shared_lib_ext "dylib"
152     }
153     "Windows NT" {
154     set shared_lib_ext "dll"
155     }
156     }
157    
158     # TODO: identify files for each platform
159    
160     switch $::tcl_platform(os) {
161     "SunOS" -
162     "Darwin" {
163     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
164    
165     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
166     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
167     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
168     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
169     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
170     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 ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
174     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
175     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     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
180     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
181     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
182 pieper 4775 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
183 hliu 3004
184 pieper 376 }
185     "Linux" {
186     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
187    
188     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
189     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
190     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
191     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
192     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
193     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
194     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
195 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
196 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
197     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
198     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     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
203     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
204     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
205 pieper 4775 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
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     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
218     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
219     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
220     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
221     set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
222 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
223 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
224     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
225     set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
226     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
227     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
228     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
229 pieper 3016 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
230 pieper 376 }
231     default {
232     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
233     exit
234     }
235     }
236    
237     # System dependent variables
238    
239     switch $::tcl_platform(os) {
240     "SunOS" {
241     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
242     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
243     set ::GENERATOR "Unix Makefiles"
244     set ::COMPILER_PATH "/local/os/bin"
245     set ::COMPILER "g++"
246     set ::CMAKE $::CMAKE_PATH/bin/cmake
247     set ::MAKE "gmake"
248     set ::SERIAL_MAKE "gmake"
249     }
250     "Linux" {
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 "/usr/bin"
255     set ::COMPILER "g++"
256     set ::CMAKE $::CMAKE_PATH/bin/cmake
257 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
258 pieper 883 set ::MAKE "make -j [expr $numCPUs * 2]"
259 pieper 376 set ::SERIAL_MAKE "make"
260     }
261     "Darwin" {
262     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
263     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
264     set ::GENERATOR "Unix Makefiles"
265     set ::COMPILER_PATH "/usr/bin"
266 hayes 933 set ::COMPILER "g++"
267 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
268     set ::MAKE make
269     set ::SERIAL_MAKE make
270     }
271     default {
272     # different windows machines say different things, so assume
273     # that if it doesn't match above it must be windows
274     # (VC7 is Visual C++ 7.0, also known as the .NET version)
275    
276    
277     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
278     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
279    
280     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
281    
282     set MSVC6 0
283     #
284     ## match this to the version of the compiler you have:
285     #
286    
287     ## for Visual Studio 6:
288     #set ::GENERATOR "Visual Studio 6"
289     #set ::MAKE "msdev"
290     #set ::COMPILER_PATH ""
291     #set MSVC6 1
292    
293     if {[info exists ::env(MSVC6)]} {
294     set ::MSVC6 $::env(MSVC6)
295     } else {
296     }
297    
298     ## for Visual Studio 7:
299     if {[info exists ::env(GENERATOR)]} {
300     set ::GENERATOR $::env(GENERATOR)
301     } else {
302     set ::GENERATOR "Visual Studio 7"
303     }
304    
305     if {[info exists ::env(MAKE)]} {
306     set ::MAKE $::env(MAKE)
307     } else {
308     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
309     }
310    
311     if {[info exists ::env(COMPILER_PATH)]} {
312     set ::COMPILER_PATH $::env(COMPILER_PATH)
313     } else {
314     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
315     }
316    
317     #
318     ## for Visual Studio 7.1:
319 pieper 917 # - automatically use newer if available
320 pieper 376 #
321     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
322     set ::GENERATOR "Visual Studio 7 .NET 2003"
323     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
324     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
325     }
326    
327 pieper 917 #
328     ## for Visual Studio 8
329     # - automatically use newest if available
330 pieper 1456 # - use full if available, otherwise express
331 pieper 4760 # - use the 64 bit version if available
332 pieper 917 #
333     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
334     set ::GENERATOR "Visual Studio 8 2005"
335     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
336     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
337     }
338    
339 pieper 1456
340     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
341     set ::GENERATOR "Visual Studio 8 2005"
342     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
343     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
344     }
345    
346 pieper 4690 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
347 pieper 4760 #set ::GENERATOR "Visual Studio 8 2005 Win64"
348     set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
349 pieper 4690 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
350     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
351     }
352    
353 pieper 376 set ::COMPILER "cl"
354     set ::SERIAL_MAKE $::MAKE
355     }
356     }
357    
358    

  ViewVC Help
Powered by ViewVC 1.1.22