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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22