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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6440 - (show annotations) (download) (as text)
Thu Apr 10 22:43:16 2008 UTC (9 years, 6 months ago) by hayes
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 14572 byte(s)
ENH: Settings for MSVS 9
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 set ::SLICERLIBCURL_TAG "HEAD"
90
91 # Set library, binary, etc. paths...
92
93 # if SLICER_LIB and SLICER_BUILD haven't been set,
94 # then assume they are in the 'standard' places next to the source tree
95 # (as created by getbuildtest.tcl
96 if { ![info exists ::SLICER_LIB] } {
97 set wd [pwd]
98 cd $::SLICER_HOME/../Slicer3-lib
99 set ::SLICER_LIB [pwd]
100 cd $wd
101 }
102 if { ![info exists ::SLICER_BUILD] } {
103 set wd [pwd]
104 cd $::SLICER_HOME/../Slicer3-build
105 set ::SLICER_BUILD [pwd]
106 cd $wd
107 }
108
109 set ::TEEM_SRC_DIR $::SLICER_LIB/teem
110 set ::TEEM_BUILD_DIR $::SLICER_LIB/teem-build
111 set ::VTK_DIR $::SLICER_LIB/VTK-build
112 set ::VTK_SRC_DIR $::SLICER_LIB/VTK
113 if { ![info exists ::VTK_BUILD_TYPE] } {
114 # set a default if it hasn't already been specified
115 set ::VTK_BUILD_TYPE "Debug" ;# options: Release, RelWithDebInfo, Debug
116 }
117 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
118 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
119 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
120 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
121 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
122 set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
123 set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
124 set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
125 set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
126 set ::CMAKE_PATH $::SLICER_LIB/CMake-build
127 set ::SOV_BINARY_DIR ""
128 set ::XVNC_EXECUTABLE " "
129 set ::IGSTK_DIR $::SLICER_LIB/IGSTK-build
130 set ::SLICERLIBCURL_SRC_DIR $::SLICER_LIB/cmcurl
131 set ::SLICERLIBCURL_BUILD_DIR $::SLICER_LIB/cmcurl-build
132
133
134 # Options for building IGT modules in Slicer
135 set ::IGSTK "OFF"
136 set ::NAVITRACK "OFF"
137
138 # The absolute path and directory containing the navitrack library,
139 # for instance on linux the libNaviTrack.so
140 # set ::NAVITRACK_LIB_DIR /home/hliu/projects/navitrack/NaviTrack-build
141 set ::NAVITRACK_LIB_DIR ""
142
143 # The navitrack include directry, e.g.
144 # /home/hliu/projects/navitrack/NaviTrack/include
145 # set ::NAVITRACK_INC_DIR /home/hliu/projects/navitrack/NaviTrack/include
146 set ::NAVITRACK_INC_DIR ""
147
148 switch $::tcl_platform(os) {
149 "SunOS" -
150 "Linux" {
151 set shared_lib_ext "so"
152 }
153 "Darwin" {
154 set shared_lib_ext "dylib"
155 }
156 "Windows NT" {
157 set shared_lib_ext "dll"
158 }
159 }
160
161 # TODO: identify files for each platform
162
163 switch $::tcl_platform(os) {
164 "SunOS" -
165 "Darwin" {
166 set ::VTK_BUILD_SUBDIR ""
167 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
168
169 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
170 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
171 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
172 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
173 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
174 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
175 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
176 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
177 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
178 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
179 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
180 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
181 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
182 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
183 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
184 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
185 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
186 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
187 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
188
189 }
190 "Linux" {
191 set ::VTK_BUILD_SUBDIR ""
192 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
193
194 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
195 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
196 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
197 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
198 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
199 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
200 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
201 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
202 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
203 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
204 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
205 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
206 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
207 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
208 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
209 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
210 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
211 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.$shared_lib_ext
212 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
213
214 }
215 "Windows NT" {
216 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
217
218 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
219 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
220
221 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
222 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
223 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
224 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
225 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
226 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
227 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
228 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
229 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
230 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
231 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
232 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
233 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
234 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
235 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
236 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
237 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
238 }
239 default {
240 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
241 exit
242 }
243 }
244
245 # System dependent variables
246
247 switch $::tcl_platform(os) {
248 "SunOS" {
249 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
250 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
251 set ::GENERATOR "Unix Makefiles"
252 set ::COMPILER_PATH "/local/os/bin"
253 set ::COMPILER "g++"
254 set ::CMAKE $::CMAKE_PATH/bin/cmake
255 set ::MAKE "gmake"
256 set ::SERIAL_MAKE "gmake"
257 }
258 "Linux" {
259 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
260 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
261 set ::GENERATOR "Unix Makefiles"
262 set ::COMPILER_PATH "/usr/bin"
263 set ::COMPILER "g++"
264 set ::CMAKE $::CMAKE_PATH/bin/cmake
265 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
266 set ::MAKE "make -j [expr $numCPUs * 2]"
267 set ::SERIAL_MAKE "make"
268 }
269 "Darwin" {
270 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
271 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
272 set ::GENERATOR "Unix Makefiles"
273 set ::COMPILER_PATH "/usr/bin"
274 set ::COMPILER "g++"
275 set ::CMAKE $::CMAKE_PATH/bin/cmake
276 set ::MAKE make
277 set ::SERIAL_MAKE make
278 }
279 default {
280 # different windows machines say different things, so assume
281 # that if it doesn't match above it must be windows
282 # (VC7 is Visual C++ 7.0, also known as the .NET version)
283
284
285 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
286 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
287
288 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
289
290 set MSVC6 0
291 #
292 ## match this to the version of the compiler you have:
293 #
294
295 ## for Visual Studio 6:
296 #set ::GENERATOR "Visual Studio 6"
297 #set ::MAKE "msdev"
298 #set ::COMPILER_PATH ""
299 #set MSVC6 1
300
301 if {[info exists ::env(MSVC6)]} {
302 set ::MSVC6 $::env(MSVC6)
303 } else {
304 }
305
306 ## for Visual Studio 7:
307 if {[info exists ::env(GENERATOR)]} {
308 set ::GENERATOR $::env(GENERATOR)
309 } else {
310 set ::GENERATOR "Visual Studio 7"
311 }
312
313 if {[info exists ::env(MAKE)]} {
314 set ::MAKE $::env(MAKE)
315 } else {
316 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
317 }
318
319 if {[info exists ::env(COMPILER_PATH)]} {
320 set ::COMPILER_PATH $::env(COMPILER_PATH)
321 } else {
322 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
323 }
324
325 #
326 ## for Visual Studio 7.1:
327 # - automatically use newer if available
328 #
329 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
330 set ::GENERATOR "Visual Studio 7 .NET 2003"
331 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
332 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
333 }
334
335 #
336 ## for Visual Studio 8
337 # - automatically use newest if available
338 # - use full if available, otherwise express
339 # - use the 64 bit version if available
340 #
341 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
342 set ::GENERATOR "Visual Studio 8 2005"
343 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
344 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
345 }
346
347
348 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
349 set ::GENERATOR "Visual Studio 8 2005"
350 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
351 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
352 }
353
354 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
355 #set ::GENERATOR "Visual Studio 8 2005 Win64"
356 set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
357 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
358 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
359 }
360 #
361 ## for Visual Studio 9
362 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
363 set ::GENERATOR "Visual Studio 8 2005"
364 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
365 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
366
367 }
368
369 set ::COMPILER "cl"
370 set ::SERIAL_MAKE $::MAKE
371 }
372 }
373
374

  ViewVC Help
Powered by ViewVC 1.1.22