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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9838 - (hide annotations) (download) (as text)
Thu Jul 2 16:29:55 2009 UTC (8 years, 3 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 24384 byte(s)
BUG: commit Attila's fix for typo
1 pieper 376
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 barre 6777 set ::Slicer3_DATA_ROOT ""
16 pieper 376
17 barre 6777 if {[info exists ::env(Slicer3_HOME)]} {
18 pieper 376 # already set by the launcher
19 barre 6777 set ::Slicer3_HOME $::env(Slicer3_HOME)
20 pieper 376 } else {
21 barre 6777 # 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 pieper 376 set cwd [pwd]
24     cd [file dirname [info script]]
25 barre 6777 set ::Slicer3_HOME [pwd]
26     set ::env(Slicer3_HOME) $::Slicer3_HOME
27 pieper 376 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 pieper 435 set ::SOLARIS "solaris8"
33     set ::LINUX "linux-x86"
34     set ::LINUX_64 "linux-x86_64"
35     set ::DARWIN "darwin-ppc"
36 naucoin 2494 set ::DARWIN_X86 "darwin-x86"
37 pieper 435 set ::WINDOWS "win32"
38    
39 pieper 376 #
40     # set the default locations for the main components
41     #
42     switch $::tcl_platform(os) {
43 pieper 435 "SunOS" { set ::env(BUILD) $::SOLARIS }
44 pieper 376 "Linux" {
45     if {$::tcl_platform(machine) == "x86_64"} {
46 pieper 435 set ::env(BUILD) $::LINUX_64
47 pieper 376 } else {
48 pieper 435 set ::env(BUILD) $::LINUX
49 pieper 376 }
50     }
51 naucoin 2494 "Darwin" {
52 lauren 2510 if {$::tcl_platform(machine) == "i386"} {
53 naucoin 2494 set ::env(BUILD) $::DARWIN_X86
54     } else {
55     set ::env(BUILD) $::DARWIN
56     }
57     }
58 pieper 376 default {
59 pieper 435 set ::env(BUILD) $::WINDOWS
60 barre 6777 set ::Slicer3_HOME [file attributes $::Slicer3_HOME -shortname]
61     set ::env(Slicer3_HOME) $::Slicer3_HOME
62 pieper 376 }
63     }
64    
65 pieper 8971 puts "Slicer3_HOME is $::Slicer3_HOME"
66 pieper 376
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 hayes 7173 set ::Slicer3_TAG "http://svn.slicer.org/Slicer3/trunk"
76 pieper 6641 set ::CMAKE_TAG "CMake-2-6"
77 pieper 8506 set ::Teem_TAG http://teem.svn.sourceforge.net/svnroot/teem/teem/tags/1.10.0
78 pieper 8631 set ::KWWidgets_TAG "Slicer-3-4"
79 pieper 6641 set ::VTK_TAG "VTK-5-2"
80 hjohnson 9801 set ::ITK_TAG ITK-3-14
81 blezek 6869 set ::PYTHON_TAG "http://svn.python.org/projects/python/branches/release25-maint"
82 pieper 7537 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 pieper 7488 #set ::NUMPY_TAG "http://svn.scipy.org/svn/numpy/trunk"
85 pieper 8881 set ::NUMPY_TAG "http://svn.scipy.org/svn/numpy/branches/1.2.x"
86 pieper 7488 #set ::SCIPY_TAG "http://svn.scipy.org/svn/scipy/trunk"
87 pieper 8881 set ::SCIPY_TAG "http://svn.scipy.org/svn/scipy/branches/0.7.x"
88 finetjul 9051 set ::BatchMake_TAG "BatchMake-1-2"
89 naucoin 6040 set ::SLICERLIBCURL_TAG "HEAD"
90 tokuda 8495 set ::OpenIGTLink_TAG "http://svn.na-mic.org/NAMICSandBox/branches/OpenIGTLink-1-0"
91 pieper 9316
92 pieper 7489 # set TCL_VERSION to "tcl" to get 8.4, otherwise use tcl85 get 8.5
93 pieper 9316 # 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 pieper 376
101     # Set library, binary, etc. paths...
102    
103 davisb 7539 # 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 barre 6777 if { ![info exists ::Slicer3_LIB] } {
107 davisb 7539 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 pieper 433 }
116 barre 6777 if { ![info exists ::Slicer3_BUILD] } {
117 davisb 7539 if { [info exists ::env(Slicer3_BUILD)] } {
118 davisb 7540 set ::Slicer3_BUILD $::env(Slicer3_BUILD)
119 davisb 7539 } else {
120     set wd [pwd]
121     cd $::Slicer3_HOME/../Slicer3-build
122     set ::Slicer3_BUILD [pwd]
123     cd $wd
124     }
125 pieper 433 }
126    
127 pieper 7799 set ::Teem_SRC_DIR $::Slicer3_LIB/teem
128     set ::Teem_BUILD_DIR $::Slicer3_LIB/teem-build
129 barre 6777 set ::VTK_DIR $::Slicer3_LIB/VTK-build
130     set ::VTK_SRC_DIR $::Slicer3_LIB/VTK
131 pieper 5199 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 pieper 376 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
137 barre 6777 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 blezek 6869 set ::PYTHON_BIN_DIR $::Slicer3_LIB/python-build
144 barre 6777 set ::CMAKE_PATH $::Slicer3_LIB/CMake-build
145 pieper 376 set ::SOV_BINARY_DIR ""
146     set ::XVNC_EXECUTABLE " "
147 hliu 7835 set ::OpenIGTLink_DIR $::Slicer3_LIB/OpenIGTLink-build
148 pieper 8442 set ::BatchMake_SRC_DIR $::Slicer3_LIB/BatchMake
149     set ::BatchMake_BUILD_DIR $::Slicer3_LIB/BatchMake-build
150 barre 6777 set ::SLICERLIBCURL_SRC_DIR $::Slicer3_LIB/cmcurl
151     set ::SLICERLIBCURL_BUILD_DIR $::Slicer3_LIB/cmcurl-build
152 pieper 376
153    
154 pieper 7911 # getbuildtest Option for build using system Python, should be "true" or "false"
155 blezek 7453 set ::USE_SYSTEM_PYTHON "false"
156 pieper 8632 # CMake option for Python, must be "OFF" on "ON", default is "ON"
157     set ::USE_PYTHON "ON"
158 pieper 8625
159 pieper 7556 # CMake option for numerical Python, only matters if Python is on
160 pieper 8727 set ::USE_NUMPY "ON"
161 pieper 7911 # 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 hliu 7835 # CMake Option for using OpenIGTLink library. Must be "OFF" or "ON", default is "OFF"
166 hliu 8069 set ::USE_OPENIGTLINK "ON"
167 hliu 7835
168 pieper 7447
169 pieper 376 switch $::tcl_platform(os) {
170 pieper 7336 "SunOS" {
171     set shared_lib_ext "so"
172     }
173 pieper 376 "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 pieper 7336 "SunOS" {
188     set ::VTK_BUILD_SUBDIR ""
189 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
190 pieper 7336
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 pieper 9316 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.5
195 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
196     error "need to define system python path for $::tcl_platform(os)"
197     }
198 pieper 7336 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
199 pieper 8109 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.so
200     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
201 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
202 pieper 7390 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 pieper 9316 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.5
205     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.4/libitcl3.4.so
206 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
207 pieper 7336 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
208     set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
209 pieper 9316 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 pieper 7336 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 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
216 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
217 pieper 7336 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.$shared_lib_ext
218 pieper 9316 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
219     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish30
220 pieper 7489
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 pieper 7336 }
227 pieper 376 "Darwin" {
228 pieper 5261 set ::VTK_BUILD_SUBDIR ""
229 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
230 pieper 376
231     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
232     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
233 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
234     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
235 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
236     set ::PYTHON_BIN_DIR /usr
237     }
238 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
239 blezek 6909 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.dylib
240     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
241 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
242 pieper 7390 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 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
245 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
246     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
247 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
248 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
249 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
250 pieper 376 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 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
255 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
256 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
257 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
258 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
259 hliu 3004
260 pieper 376 }
261     "Linux" {
262 pieper 5261 set ::VTK_BUILD_SUBDIR ""
263 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
264 pieper 376
265     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
266 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
267     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
268 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
269     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
270 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
271     error "need to define system python path for $::tcl_platform(os)"
272     }
273 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
274 blezek 6909 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.5.so
275     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.5
276 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
277 pieper 7390 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 pieper 376 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
280 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
281 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
282 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
283 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
284 pieper 376 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 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
289 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
290 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
291 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
292 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
293 hliu 3004
294 pieper 376 }
295     "Windows NT" {
296     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
297    
298     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
299 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin/$::VTK_BUILD_TYPE
300 pieper 376
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 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
305 pieper 6875 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 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
308     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
309 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu.exe
310 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
311     error "need to define system python path for $::tcl_platform(os)"
312     }
313 pieper 8625 #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 blezek 6869 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
319 pieper 8625
320 pieper 7537 set ::NETLIB_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/numpy/core/numeric.pyc
321 pieper 8625 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/site-packages/numpy/core/numeric.pyc
322 pieper 7390 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.5/site-packages/scipy/version.pyc
323 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
324 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
325 pieper 376 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 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/$::VTK_BUILD_TYPE/OpenIGTLink.lib
330 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/$::VTK_BUILD_TYPE/BatchMake.lib
331 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
332 pieper 376 }
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 barre 6777 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 pieper 376 set ::GENERATOR "Unix Makefiles"
346 pieper 9316 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 pieper 9838 set ::env(CXXFLAGS) ""
384 pieper 9316 set ::env(LDFLAGS) ""
385     }
386     puts "slicer_variables.tcl: GENLIB(bitness): $::GENLIB(bitness) GETBUILDTEST(bitness): $::GETBUILDTEST(bitness)"
387 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
388 pieper 7336 set numCPUs [lindex [exec /usr/sbin/psrinfo | grep on-line | wc -l | tr -d ''] 0]
389     set ::MAKE "gmake -j[expr $numCPUs]"
390 pieper 376 set ::SERIAL_MAKE "gmake"
391     }
392     "Linux" {
393 barre 6777 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 pieper 376 set ::GENERATOR "Unix Makefiles"
396     set ::COMPILER_PATH "/usr/bin"
397     set ::COMPILER "g++"
398 pieper 7594 set ::FORTRAN_COMPILER "gfortran"
399 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
400 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
401 lorensen 8346 set ::MAKE "make -j [expr $numCPUs]"
402 pieper 376 set ::SERIAL_MAKE "make"
403     }
404     "Darwin" {
405 barre 6777 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 pieper 376 set ::GENERATOR "Unix Makefiles"
408     set ::COMPILER_PATH "/usr/bin"
409 hayes 933 set ::COMPILER "g++"
410 pieper 7560 set ::FORTRAN_COMPILER "gfortran"
411 pieper 376 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 barre 6777 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 pieper 376
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 barre 9722 # 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 barre 9724 set ::MAKE [file join $::env(VSINSTALLDIR) "Common7/IDE/devenv.exe"]
459 barre 9722 } else {
460     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv.exe"
461     }
462 pieper 376 }
463    
464     if {[info exists ::env(COMPILER_PATH)]} {
465     set ::COMPILER_PATH $::env(COMPILER_PATH)
466     } else {
467 barre 9724 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 pieper 376 }
473    
474 barre 9727 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 pieper 376 #
485     ## for Visual Studio 7.1:
486 pieper 917 # - automatically use newer if available
487 pieper 376 #
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 pieper 9087 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv.exe"
491 pieper 376 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
492 pieper 8625 set ::MSSDK_PATH "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK"
493 pieper 376 }
494    
495 pieper 917 #
496     ## for Visual Studio 8
497     # - automatically use newest if available
498 pieper 1456 # - use full if available, otherwise express
499 pieper 4760 # - use the 64 bit version if available
500 pieper 917 #
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 pieper 8633 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
506 pieper 917 }
507    
508 pieper 1456
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 pieper 8633 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
514 pieper 1456 }
515    
516 pieper 4690 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
517 pieper 4760 #set ::GENERATOR "Visual Studio 8 2005 Win64"
518     set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
519 pieper 4690 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 pieper 8633 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 pieper 4690 }
523 hayes 6440 #
524     ## for Visual Studio 9
525     if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
526 hayes 6442 set ::GENERATOR "Visual Studio 9 2008"
527 hayes 6440 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 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
530 hayes 6440 }
531 pieper 4690
532 pieper 7737 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 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
537 pieper 7737 }
538    
539    
540 pieper 7379 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 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
545 pieper 7379 }
546    
547 pieper 376 set ::COMPILER "cl"
548     set ::SERIAL_MAKE $::MAKE
549     }
550     }
551    
552    
553 pieper 7556

  ViewVC Help
Powered by ViewVC 1.1.22