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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6928 - (show annotations) (download) (as text)
Thu May 29 22:43:33 2008 UTC (9 years, 4 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 14307 byte(s)
COMP: switch to fixed version of kwwidgets in preparation for release
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 ::Slicer3_DATA_ROOT ""
16
17 if {[info exists ::env(Slicer3_HOME)]} {
18 # already set by the launcher
19 set ::Slicer3_HOME $::env(Slicer3_HOME)
20 } else {
21 # 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 set cwd [pwd]
24 cd [file dirname [info script]]
25 set ::Slicer3_HOME [pwd]
26 set ::env(Slicer3_HOME) $::Slicer3_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 ::Slicer3_HOME [file attributes $::Slicer3_HOME -shortname]
61 set ::env(Slicer3_HOME) $::Slicer3_HOME
62 }
63 }
64
65 puts stderr "Slicer3_HOME is $::Slicer3_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 ::Slicer3_TAG "http://www.na-mic.org/svn/Slicer3/trunk"
76 set ::CMAKE_TAG "CMake-2-6"
77 set ::TEEM_TAG "Teem-1-9-0-patches"
78 set ::KWWidgets_TAG "Slicer-3-2"
79 set ::VTK_TAG "VTK-5-2"
80 set ::ITK_TAG ITK-3-6
81 set ::PYTHON_TAG "http://svn.python.org/projects/python/branches/release25-maint"
82 set ::SLICERLIBCURL_TAG "HEAD"
83
84 # Set library, binary, etc. paths...
85
86 # if Slicer3_LIB and Slicer3_BUILD haven't been set,
87 # then assume they are in the 'standard' places next to the source tree
88 # (as created by getbuildtest.tcl
89 if { ![info exists ::Slicer3_LIB] } {
90 set wd [pwd]
91 cd $::Slicer3_HOME/../Slicer3-lib
92 set ::Slicer3_LIB [pwd]
93 cd $wd
94 }
95 if { ![info exists ::Slicer3_BUILD] } {
96 set wd [pwd]
97 cd $::Slicer3_HOME/../Slicer3-build
98 set ::Slicer3_BUILD [pwd]
99 cd $wd
100 }
101
102 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 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 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
112 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 set ::PYTHON_BIN_DIR $::Slicer3_LIB/python-build
119 set ::CMAKE_PATH $::Slicer3_LIB/CMake-build
120 set ::SOV_BINARY_DIR ""
121 set ::XVNC_EXECUTABLE " "
122 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
126
127 # Options for building IGT modules in Slicer
128 set ::IGSTK "OFF"
129 set ::NAVITRACK "OFF"
130
131 # 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
136 # 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
141 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 set ::VTK_BUILD_SUBDIR ""
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 ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
165 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
166 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
167 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.dylib
168 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
169 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
170 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
171 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
172 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
173 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 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
178 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
179 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
180 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
181
182 }
183 "Linux" {
184 set ::VTK_BUILD_SUBDIR ""
185 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
186
187 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
188 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
189 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
190 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
191 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.so
192 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
193 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
194 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
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 ::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 $::Slicer3_HOME/tkEventPatch.diff
203 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
204 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
205 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
206
207 }
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/itclConfig.sh
218 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 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
221 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 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
225 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
226 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 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
231 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.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 $::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 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 $::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 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 $::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 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 $::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
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 ## for Visual Studio 9
356 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
357 set ::GENERATOR "Visual Studio 9 2008"
358 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
363 set ::COMPILER "cl"
364 set ::SERIAL_MAKE $::MAKE
365 }
366 }
367
368

  ViewVC Help
Powered by ViewVC 1.1.22