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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5261 - (show annotations) (download) (as text)
Tue Dec 18 22:20:44 2007 UTC (9 years, 10 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 13756 byte(s)
BUG: fix handling of subdirectory on non-windows platform when --release flag is not passed
1
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 set ::env(SLICER_HOME) $::SLICER_HOME
27 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 set ::SOLARIS "solaris8"
33 set ::LINUX "linux-x86"
34 set ::LINUX_64 "linux-x86_64"
35 set ::DARWIN "darwin-ppc"
36 set ::DARWIN_X86 "darwin-x86"
37 set ::WINDOWS "win32"
38
39 #
40 # set the default locations for the main components
41 #
42 switch $::tcl_platform(os) {
43 "SunOS" { set ::env(BUILD) $::SOLARIS }
44 "Linux" {
45 if {$::tcl_platform(machine) == "x86_64"} {
46 set ::env(BUILD) $::LINUX_64
47 } else {
48 set ::env(BUILD) $::LINUX
49 }
50 }
51 "Darwin" {
52 if {$::tcl_platform(machine) == "i386"} {
53 set ::env(BUILD) $::DARWIN_X86
54 } else {
55 set ::env(BUILD) $::DARWIN
56 }
57 }
58 default {
59 set ::env(BUILD) $::WINDOWS
60 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 #set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/branches/Slicer3.0-PreAHMBeta"
76 set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/trunk"
77 set ::CMAKE_TAG "CMake-2-4-2"
78 #set ::TEEM_TAG "HEAD"
79 set ::TEEM_TAG "Teem-1-9-0-patches"
80 set ::KWWidgets_TAG "Slicer-3-0"
81 set ::VTK_TAG "VTK-5-0"
82 set ::ITK_TAG ITK-3-4
83 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 set ::SANDBOX_TAG "http://svn.na-mic.org/svn/NAMICSandBox/branches/Slicer-2-6"
89
90 # Set library, binary, etc. paths...
91
92 # 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 cd $::SLICER_HOME/../Slicer3-lib
98 set ::SLICER_LIB [pwd]
99 cd $wd
100 }
101 if { ![info exists ::SLICER_BUILD] } {
102 set wd [pwd]
103 cd $::SLICER_HOME/../Slicer3-build
104 set ::SLICER_BUILD [pwd]
105 cd $wd
106 }
107
108 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 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 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
118 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
119 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
120 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 set ::IGSTK_DIR $::SLICER_LIB/IGSTK-build
129
130
131 # Options for building IGT modules in Slicer
132 set ::IGSTK "OFF"
133 set ::NAVITRACK "OFF"
134
135 # 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
140 # 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
145 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 ::VTK_BUILD_SUBDIR ""
164 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
165
166 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
167 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
168 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
169 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
170 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
171 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
172 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
173 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
174 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
175 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
176 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
177 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
178 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
179 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
180 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
181 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
182 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
183 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
184
185 }
186 "Linux" {
187 set ::VTK_BUILD_SUBDIR ""
188 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
189
190 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
191 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
192 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
193 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
194 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
195 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
196 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
197 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
198 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
199 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
200 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
201 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
202 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
203 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
204 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
205 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
206 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
207 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
208
209 }
210 "Windows NT" {
211 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
212
213 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
214 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
215
216 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
217 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
218 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
219 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
220 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
221 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
222 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
223 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
224 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
225 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
226 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
227 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
228 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
229 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
230 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
231 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
232 }
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 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
244 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
245 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 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
254 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
255 set ::GENERATOR "Unix Makefiles"
256 set ::COMPILER_PATH "/usr/bin"
257 set ::COMPILER "g++"
258 set ::CMAKE $::CMAKE_PATH/bin/cmake
259 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
260 set ::MAKE "make -j [expr $numCPUs * 2]"
261 set ::SERIAL_MAKE "make"
262 }
263 "Darwin" {
264 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
265 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
266 set ::GENERATOR "Unix Makefiles"
267 set ::COMPILER_PATH "/usr/bin"
268 set ::COMPILER "g++"
269 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 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
280 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
281
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 # - automatically use newer if available
322 #
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 #
330 ## for Visual Studio 8
331 # - automatically use newest if available
332 # - use full if available, otherwise express
333 # - use the 64 bit version if available
334 #
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
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 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
349 #set ::GENERATOR "Visual Studio 8 2005 Win64"
350 set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
351 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
355 set ::COMPILER "cl"
356 set ::SERIAL_MAKE $::MAKE
357 }
358 }
359
360

  ViewVC Help
Powered by ViewVC 1.1.22