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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9727 - (show annotations) (download) (as text)
Thu Jun 18 16:33:30 2009 UTC (8 years, 4 months ago) by barre
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 24383 byte(s)
ENH: ugh. no SDK path?
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 "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 http://teem.svn.sourceforge.net/svnroot/teem/teem/tags/1.10.0
78 set ::KWWidgets_TAG "Slicer-3-4"
79 set ::VTK_TAG "VTK-5-2"
80 set ::ITK_TAG ITK-3-10
81 set ::PYTHON_TAG "http://svn.python.org/projects/python/branches/release25-maint"
82 set ::BLAS_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/BLAS
83 set ::LAPACK_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/lapack-3.1.1
84 #set ::NUMPY_TAG "http://svn.scipy.org/svn/numpy/trunk"
85 set ::NUMPY_TAG "http://svn.scipy.org/svn/numpy/branches/1.2.x"
86 #set ::SCIPY_TAG "http://svn.scipy.org/svn/scipy/trunk"
87 set ::SCIPY_TAG "http://svn.scipy.org/svn/scipy/branches/0.7.x"
88 set ::BatchMake_TAG "BatchMake-1-2"
89 set ::SLICERLIBCURL_TAG "HEAD"
90 set ::OpenIGTLink_TAG "http://svn.na-mic.org/NAMICSandBox/branches/OpenIGTLink-1-0"
91
92 # set TCL_VERSION to "tcl" to get 8.4, otherwise use tcl85 get 8.5
93 # set 8.5 for Solaris explicitly, because 8.4 complains
94 # when built 64 bit with gcc. Suncc/CC is fine, however.
95 if {$tcl_platform(os) == "SunOS"} {
96 set ::TCL_VERSION tcl85
97 } else {
98 set ::TCL_VERSION tcl
99 }
100
101 # Set library, binary, etc. paths...
102
103 # if Slicer3_LIB and Slicer3_BUILD haven't been set, first check
104 # enviornment variables, then assume they are in the 'standard' places
105 # next to the source tree (as created by getbuildtest.tcl
106 if { ![info exists ::Slicer3_LIB] } {
107 if { [info exists ::env(Slicer3_LIB)] } {
108 set ::Slicer3_LIB $::env(Slicer3_LIB)
109 } else {
110 set wd [pwd]
111 cd $::Slicer3_HOME/../Slicer3-lib
112 set ::Slicer3_LIB [pwd]
113 cd $wd
114 }
115 }
116 if { ![info exists ::Slicer3_BUILD] } {
117 if { [info exists ::env(Slicer3_BUILD)] } {
118 set ::Slicer3_BUILD $::env(Slicer3_BUILD)
119 } else {
120 set wd [pwd]
121 cd $::Slicer3_HOME/../Slicer3-build
122 set ::Slicer3_BUILD [pwd]
123 cd $wd
124 }
125 }
126
127 set ::Teem_SRC_DIR $::Slicer3_LIB/teem
128 set ::Teem_BUILD_DIR $::Slicer3_LIB/teem-build
129 set ::VTK_DIR $::Slicer3_LIB/VTK-build
130 set ::VTK_SRC_DIR $::Slicer3_LIB/VTK
131 if { ![info exists ::VTK_BUILD_TYPE] } {
132 # set a default if it hasn't already been specified
133 set ::VTK_BUILD_TYPE "Debug" ;# options: Release, RelWithDebInfo, Debug
134 }
135 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
136 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
137 set ::KWWidgets_BUILD_DIR $::Slicer3_LIB/KWWidgets-build
138 set ::KWWIDGETS_DIR $::Slicer3_LIB/KWWidgets
139 set ::ITK_BINARY_PATH $::Slicer3_LIB/Insight-build
140 set ::TCL_BIN_DIR $::Slicer3_LIB/tcl-build/bin
141 set ::TCL_LIB_DIR $::Slicer3_LIB/tcl-build/lib
142 set ::TCL_INCLUDE_DIR $::Slicer3_LIB/tcl-build/include
143 set ::PYTHON_BIN_DIR $::Slicer3_LIB/python-build
144 set ::CMAKE_PATH $::Slicer3_LIB/CMake-build
145 set ::SOV_BINARY_DIR ""
146 set ::XVNC_EXECUTABLE " "
147 set ::OpenIGTLink_DIR $::Slicer3_LIB/OpenIGTLink-build
148 set ::BatchMake_SRC_DIR $::Slicer3_LIB/BatchMake
149 set ::BatchMake_BUILD_DIR $::Slicer3_LIB/BatchMake-build
150 set ::SLICERLIBCURL_SRC_DIR $::Slicer3_LIB/cmcurl
151 set ::SLICERLIBCURL_BUILD_DIR $::Slicer3_LIB/cmcurl-build
152
153
154 # getbuildtest Option for build using system Python, should be "true" or "false"
155 set ::USE_SYSTEM_PYTHON "false"
156 # CMake option for Python, must be "OFF" on "ON", default is "ON"
157 set ::USE_PYTHON "ON"
158
159 # CMake option for numerical Python, only matters if Python is on
160 set ::USE_NUMPY "ON"
161 # getbuildtest option for SCIPY - also build support libraries (blas and lapack) needed for scipy
162 # - should be off except for experimentation (does not work on all plaftorms - requires fortran)
163 # - should be "true" or "false"
164 set ::USE_SCIPY "false"
165 # CMake Option for using OpenIGTLink library. Must be "OFF" or "ON", default is "OFF"
166 set ::USE_OPENIGTLINK "ON"
167
168
169 switch $::tcl_platform(os) {
170 "SunOS" {
171 set shared_lib_ext "so"
172 }
173 "Linux" {
174 set shared_lib_ext "so"
175 }
176 "Darwin" {
177 set shared_lib_ext "dylib"
178 }
179 "Windows NT" {
180 set shared_lib_ext "dll"
181 }
182 }
183
184 # TODO: identify files for each platform
185
186 switch $::tcl_platform(os) {
187 "SunOS" {
188 set ::VTK_BUILD_SUBDIR ""
189 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
190
191 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
192 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
193
194 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.5
195 if { $::USE_SYSTEM_PYTHON } {
196 error "need to define system python path for $::tcl_platform(os)"
197 }
198 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
199 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.so
200 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
201 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
202 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/numpy/core/numeric.pyc
203 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/scipy/version.pyc
204 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.5
205 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.4/libitcl3.4.so
206 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
207 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
208 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
209 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.5.$shared_lib_ext
210 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.5.$shared_lib_ext
211 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.5
212 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
213 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
214 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
215 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
216 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
217 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.$shared_lib_ext
218 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
219 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish30
220
221 # We need a workaround here, because gcc does not pick up libraries in /lib
222 # on Solaris.
223 # The bug, and it's resolution can be found here:
224 # http://bugs.opensolaris.org/view_bug.do?bug_id=6619485
225 set ::env(LDFLAGS) -L/lib
226 }
227 "Darwin" {
228 set ::VTK_BUILD_SUBDIR ""
229 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
230
231 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
232 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
233 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
234 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
235 if { $::USE_SYSTEM_PYTHON } {
236 set ::PYTHON_BIN_DIR /usr
237 }
238 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
239 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.dylib
240 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
241 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
242 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/numpy/core/numeric.pyc
243 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/scipy/version.pyc
244 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
245 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
246 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
247 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
248 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
249 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
250 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
251 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
252 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
253 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
254 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
255 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
256 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
257 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
258 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
259
260 }
261 "Linux" {
262 set ::VTK_BUILD_SUBDIR ""
263 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
264
265 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
266 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
267 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
268 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
269 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
270 if { $::USE_SYSTEM_PYTHON } {
271 error "need to define system python path for $::tcl_platform(os)"
272 }
273 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
274 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.so
275 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
276 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
277 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/numpy/core/numeric.pyc
278 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/scipy/version.pyc
279 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
280 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
281 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
282 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
283 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
284 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
285 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
286 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
287 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
288 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
289 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
290 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
291 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
292 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
293
294 }
295 "Windows NT" {
296 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
297
298 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
299 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin/$::VTK_BUILD_TYPE
300
301 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
302 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
303 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
304 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
305 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/itcl3.2/itcl32.lib
306 set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/itk3.2/itk32.lib
307 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
308 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
309 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu.exe
310 if { $::USE_SYSTEM_PYTHON } {
311 error "need to define system python path for $::tcl_platform(os)"
312 }
313 #set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python.exe
314 #set ::PYTHON_LIB $::PYTHON_BIN_DIR/Libs/python25.lib
315 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/PCbuild/python.exe
316 set ::PYTHON_LIB $::PYTHON_BIN_DIR/PCbuild/python25.lib
317
318 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
319
320 set ::NETLIB_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/numpy/core/numeric.pyc
321 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/site-packages/numpy/core/numeric.pyc
322 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/scipy/version.pyc
323 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
324 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
325 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
326 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
327 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
328 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
329 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/$::VTK_BUILD_TYPE/OpenIGTLink.lib
330 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/$::VTK_BUILD_TYPE/BatchMake.lib
331 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
332 }
333 default {
334 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
335 exit
336 }
337 }
338
339 # System dependent variables
340
341 switch $::tcl_platform(os) {
342 "SunOS" {
343 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
344 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
345 set ::GENERATOR "Unix Makefiles"
346 set have_compiler [info exists GETBUILDTEST(compiler)]
347 puts "have_compiler from GETBUILDTEST value: $have_compiler"
348 if {$have_compiler == 1} {
349 set GENLIB(compiler) $GETBUILDTEST(compiler)
350 } else {
351 set GETBUILDTEST(compiler) $GENLIB(compiler)
352 }
353 puts "slicer_variables.tcl: GENLIB(compiler): $::GENLIB(compiler) GETBUILDTEST(compiler): $::GETBUILDTEST(compiler)"
354 if {$GETBUILDTEST(compiler) == "suncc" || $GENLIB(compiler) == "suncc"} {
355 set ::COMPILER_PATH "/opt/SUNWspro/bin"
356 set ::COMPILER "CC"
357 set ::env(CC) cc
358 set ::env(CXX) CC
359 set ::FORTRAN_COMPILER "f90"
360 } else {
361 set ::env(CC) gcc
362 set ::env(CXX) g++
363 set ::COMPILER_PATH "/usr/sfw/bin"
364 set ::COMPILER "g++"
365 set ::FORTRAN_COMPILER "g77"
366 }
367 # NOTE: the bellow flags will only work with gcc, and Studio 12 or newer.
368 # Earlier Studio versions do not accept the -m64 flag.
369 # If you're not using one of the two, you should check
370 # your compiler's manual for the existence of a similar flag.
371 set have_bitness [info exists GETBUILDTEST(bitness)]
372 if {$have_bitness == 1} {
373 set GENLIB(bitness) $GETBUILDTEST(bitness)
374 } else {
375 set GETBUILDTEST(bitness) $GENLIB(bitness)
376 }
377 if {$GETBUILDTEST(bitness) == "64" || $GENLIB(bitness) == "64"} {
378 set ::env(CFLAGS) -m64
379 set ::env(CXXFLAGS) -m64
380 set ::env(LDFLAGS) -m64
381 } else {
382 set ::env(CFLAGS) ""
383 set ::env(CXXFLGS) ""
384 set ::env(LDFLAGS) ""
385 }
386 puts "slicer_variables.tcl: GENLIB(bitness): $::GENLIB(bitness) GETBUILDTEST(bitness): $::GETBUILDTEST(bitness)"
387 set ::CMAKE $::CMAKE_PATH/bin/cmake
388 set numCPUs [lindex [exec /usr/sbin/psrinfo | grep on-line | wc -l | tr -d ''] 0]
389 set ::MAKE "gmake -j[expr $numCPUs]"
390 set ::SERIAL_MAKE "gmake"
391 }
392 "Linux" {
393 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
394 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
395 set ::GENERATOR "Unix Makefiles"
396 set ::COMPILER_PATH "/usr/bin"
397 set ::COMPILER "g++"
398 set ::FORTRAN_COMPILER "gfortran"
399 set ::CMAKE $::CMAKE_PATH/bin/cmake
400 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
401 set ::MAKE "make -j [expr $numCPUs]"
402 set ::SERIAL_MAKE "make"
403 }
404 "Darwin" {
405 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
406 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
407 set ::GENERATOR "Unix Makefiles"
408 set ::COMPILER_PATH "/usr/bin"
409 set ::COMPILER "g++"
410 set ::FORTRAN_COMPILER "gfortran"
411 set ::CMAKE $::CMAKE_PATH/bin/cmake
412 set ::MAKE make
413 set ::SERIAL_MAKE make
414 }
415 default {
416 # different windows machines say different things, so assume
417 # that if it doesn't match above it must be windows
418 # (VC7 is Visual C++ 7.0, also known as the .NET version)
419
420
421 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
422 set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
423
424 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
425
426 set MSVC6 0
427 #
428 ## match this to the version of the compiler you have:
429 #
430
431 ## for Visual Studio 6:
432 #set ::GENERATOR "Visual Studio 6"
433 #set ::MAKE "msdev"
434 #set ::COMPILER_PATH ""
435 #set MSVC6 1
436
437 if {[info exists ::env(MSVC6)]} {
438 set ::MSVC6 $::env(MSVC6)
439 } else {
440 }
441
442 ## for Visual Studio 7:
443 if {[info exists ::env(GENERATOR)]} {
444 set ::GENERATOR $::env(GENERATOR)
445 } else {
446 set ::GENERATOR "Visual Studio 7"
447 }
448
449 if {[info exists ::env(MAKE)]} {
450 set ::MAKE $::env(MAKE)
451 } else {
452 # The following line set a default value, hoping that it will be
453 # overriden later on as the script tries for different flavors
454 # of visual studio. Let's try a little harder by checking
455 # some environment variable (ultimately we should try poking
456 # in the Win32 registry).
457 if {[info exists ::env(VSINSTALLDIR)]} {
458 set ::MAKE [file join $::env(VSINSTALLDIR) "Common7/IDE/devenv.exe"]
459 } else {
460 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv.exe"
461 }
462 }
463
464 if {[info exists ::env(COMPILER_PATH)]} {
465 set ::COMPILER_PATH $::env(COMPILER_PATH)
466 } else {
467 if {[info exists ::env(VSINSTALLDIR)]} {
468 set ::COMPILER_PATH [file join $::env(VSINSTALLDIR) "Common7/Vc7/bin"]
469 } else {
470 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
471 }
472 }
473
474 if {[info exists ::env(MSSDK_PATH)]} {
475 set ::MSSDK_PATH $::env(MSSDK_PATH)
476 } else {
477 if {[info exists ::env(WindowsSdkDir)]} {
478 set ::MSSDK_PATH [file normalize $::env(WindowsSdkDir)]
479 } else {
480 set ::MSSDK_PATH "C:/Program\ Files/Microsoft\ SDKs/Windows/v6.0A"
481 }
482 }
483
484 #
485 ## for Visual Studio 7.1:
486 # - automatically use newer if available
487 #
488 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
489 set ::GENERATOR "Visual Studio 7 .NET 2003"
490 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv.exe"
491 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
492 set ::MSSDK_PATH "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK"
493 }
494
495 #
496 ## for Visual Studio 8
497 # - automatically use newest if available
498 # - use full if available, otherwise express
499 # - use the 64 bit version if available
500 #
501 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
502 set ::GENERATOR "Visual Studio 8 2005"
503 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
504 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
505 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
506 }
507
508
509 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
510 set ::GENERATOR "Visual Studio 8 2005"
511 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
512 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
513 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
514 }
515
516 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
517 #set ::GENERATOR "Visual Studio 8 2005 Win64"
518 set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
519 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
520 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
521 error "*****\n MSSDK_PATH value not known for this compiler - \nLook at settings for other Visual Studio 2005 configuration for possible locations of the SDK include and library files. \ncontact slicer-devel@bwh.harvard.edu for more instructions or to report correct path for this compiler."
522 }
523 #
524 ## for Visual Studio 9
525 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
526 set ::GENERATOR "Visual Studio 9 2008"
527 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
528 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
529 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
530 }
531
532 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
533 set ::GENERATOR "Visual Studio 9 2008"
534 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
535 set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
536 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
537 }
538
539
540 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
541 set ::GENERATOR "Visual Studio 9 2008"
542 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
543 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
544 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
545 }
546
547 set ::COMPILER "cl"
548 set ::SERIAL_MAKE $::MAKE
549 }
550 }
551
552
553

  ViewVC Help
Powered by ViewVC 1.1.22