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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7379 - (show annotations) (download) (as text)
Fri Aug 1 14:04:19 2008 UTC (9 years, 2 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 16588 byte(s)
COMP: add visual studio 9 as an build option (assumes standard install location)
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://svn.slicer.org/Slicer3/trunk"
76 set ::CMAKE_TAG "CMake-2-6"
77 set ::TEEM_TAG "Teem-1-9-0-patches"
78 set ::KWWidgets_TAG "HEAD"
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 set shared_lib_ext "so"
144 }
145 "Linux" {
146 set shared_lib_ext "so"
147 }
148 "Darwin" {
149 set shared_lib_ext "dylib"
150 }
151 "Windows NT" {
152 set shared_lib_ext "dll"
153 }
154 }
155
156 # TODO: identify files for each platform
157
158 switch $::tcl_platform(os) {
159 "SunOS" {
160 set ::VTK_BUILD_SUBDIR ""
161 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
162
163 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
164 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
165
166 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
167 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
168 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython25.so
169 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python25
170 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
171 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
172 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
173 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
174 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
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 $::Slicer3_HOME/tkEventPatch.diff
180 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
181 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
182 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.$shared_lib_ext
183 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
184 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
185 }
186 "Darwin" {
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 ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
193 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
194 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
195 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.dylib
196 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
197 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
198 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
199 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
200 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
201 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
202 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
203 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
204 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
205 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
206 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
207 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
208 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
209 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
210 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
211
212 }
213 "Linux" {
214 set ::VTK_BUILD_SUBDIR ""
215 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
216
217 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
218 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
219 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
220 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
221 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
222 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
223 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.so
224 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
225 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
226 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
227 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
228 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
229 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
230 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
231 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
232 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
233 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
234 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
235 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
236 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
237 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
238
239 }
240 "Windows NT" {
241 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
242
243 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
244 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
245
246 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
247 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
248 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
249 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
250 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/itcl3.2/itcl32.lib
251 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/itk3.2/itk32.lib
252 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
253 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
254 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
255 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python.exe
256 set ::PYTHON_LIB $::PYTHON_BIN_DIR/Libs/python25.lib
257 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
258 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
259 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
260 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
261 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
262 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
263 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
264 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
265 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
266 }
267 default {
268 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
269 exit
270 }
271 }
272
273 # System dependent variables
274
275 switch $::tcl_platform(os) {
276 "SunOS" {
277 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
278 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
279 set ::GENERATOR "Unix Makefiles"
280 set ::COMPILER_PATH "/usr/sfw/bin"
281 set ::COMPILER "g++"
282 set ::CMAKE $::CMAKE_PATH/bin/cmake
283 set numCPUs [lindex [exec /usr/sbin/psrinfo | grep on-line | wc -l | tr -d ''] 0]
284 set ::MAKE "gmake -j[expr $numCPUs]"
285 set ::SERIAL_MAKE "gmake"
286 }
287 "Linux" {
288 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
289 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
290 set ::GENERATOR "Unix Makefiles"
291 set ::COMPILER_PATH "/usr/bin"
292 set ::COMPILER "g++"
293 set ::CMAKE $::CMAKE_PATH/bin/cmake
294 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
295 set ::MAKE "make -j [expr $numCPUs * 2]"
296 set ::SERIAL_MAKE "make"
297 }
298 "Darwin" {
299 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
300 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
301 set ::GENERATOR "Unix Makefiles"
302 set ::COMPILER_PATH "/usr/bin"
303 set ::COMPILER "g++"
304 set ::CMAKE $::CMAKE_PATH/bin/cmake
305 set ::MAKE make
306 set ::SERIAL_MAKE make
307 }
308 default {
309 # different windows machines say different things, so assume
310 # that if it doesn't match above it must be windows
311 # (VC7 is Visual C++ 7.0, also known as the .NET version)
312
313
314 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
315 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
316
317 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
318
319 set MSVC6 0
320 #
321 ## match this to the version of the compiler you have:
322 #
323
324 ## for Visual Studio 6:
325 #set ::GENERATOR "Visual Studio 6"
326 #set ::MAKE "msdev"
327 #set ::COMPILER_PATH ""
328 #set MSVC6 1
329
330 if {[info exists ::env(MSVC6)]} {
331 set ::MSVC6 $::env(MSVC6)
332 } else {
333 }
334
335 ## for Visual Studio 7:
336 if {[info exists ::env(GENERATOR)]} {
337 set ::GENERATOR $::env(GENERATOR)
338 } else {
339 set ::GENERATOR "Visual Studio 7"
340 }
341
342 if {[info exists ::env(MAKE)]} {
343 set ::MAKE $::env(MAKE)
344 } else {
345 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
346 }
347
348 if {[info exists ::env(COMPILER_PATH)]} {
349 set ::COMPILER_PATH $::env(COMPILER_PATH)
350 } else {
351 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
352 }
353
354 #
355 ## for Visual Studio 7.1:
356 # - automatically use newer if available
357 #
358 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
359 set ::GENERATOR "Visual Studio 7 .NET 2003"
360 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
361 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
362 }
363
364 #
365 ## for Visual Studio 8
366 # - automatically use newest if available
367 # - use full if available, otherwise express
368 # - use the 64 bit version if available
369 #
370 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
371 set ::GENERATOR "Visual Studio 8 2005"
372 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
373 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
374 }
375
376
377 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
378 set ::GENERATOR "Visual Studio 8 2005"
379 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
380 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
381 }
382
383 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
384 #set ::GENERATOR "Visual Studio 8 2005 Win64"
385 set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
386 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
387 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
388 }
389 #
390 ## for Visual Studio 9
391 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
392 set ::GENERATOR "Visual Studio 9 2008"
393 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
394 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
395
396 }
397
398 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
399 set ::GENERATOR "Visual Studio 9 2008"
400 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
401 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
402 }
403
404 set ::COMPILER "cl"
405 set ::SERIAL_MAKE $::MAKE
406 }
407 }
408
409

  ViewVC Help
Powered by ViewVC 1.1.22