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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13577 - (hide annotations) (download) (as text)
Tue Jun 1 17:52:10 2010 UTC (7 years, 4 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 27227 byte(s)
BUG: correctly specify OS version during test
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 lassoan 12069 # If ::LAUNCHER_REPORT_VTK_ERRORS is set to ON, then the launched
18     # process returns with error if VTK errors are found
19     # (this stricter checking is useful for test execution)
20     set ::LAUNCHER_REPORT_VTK_ERRORS "OFF"
21    
22 barre 6777 if {[info exists ::env(Slicer3_HOME)]} {
23 pieper 376 # already set by the launcher
24 barre 6777 set ::Slicer3_HOME $::env(Slicer3_HOME)
25 pieper 376 } else {
26 barre 6777 # if sourcing this into cmaker, Slicer3_HOME may not be set
27     # set the Slicer3_HOME directory to the one in which this script resides
28 pieper 376 set cwd [pwd]
29     cd [file dirname [info script]]
30 barre 6777 set ::Slicer3_HOME [pwd]
31     set ::env(Slicer3_HOME) $::Slicer3_HOME
32 pieper 376 cd $cwd
33     }
34    
35     # set up variables for the OS Builds, to facilitate the move to solaris9
36     # - solaris can be solaris8 or solaris9
37 pieper 435 set ::SOLARIS "solaris8"
38     set ::LINUX "linux-x86"
39     set ::LINUX_64 "linux-x86_64"
40     set ::DARWIN "darwin-ppc"
41 naucoin 2494 set ::DARWIN_X86 "darwin-x86"
42 pieper 435 set ::WINDOWS "win32"
43    
44 pieper 376 #
45     # set the default locations for the main components
46     #
47     switch $::tcl_platform(os) {
48 pieper 435 "SunOS" { set ::env(BUILD) $::SOLARIS }
49 pieper 376 "Linux" {
50     if {$::tcl_platform(machine) == "x86_64"} {
51 pieper 435 set ::env(BUILD) $::LINUX_64
52 pieper 376 } else {
53 pieper 435 set ::env(BUILD) $::LINUX
54 pieper 376 }
55     }
56 naucoin 2494 "Darwin" {
57 lauren 2510 if {$::tcl_platform(machine) == "i386"} {
58 naucoin 2494 set ::env(BUILD) $::DARWIN_X86
59     } else {
60     set ::env(BUILD) $::DARWIN
61     }
62     }
63 pieper 376 default {
64 pieper 435 set ::env(BUILD) $::WINDOWS
65 barre 6777 set ::Slicer3_HOME [file attributes $::Slicer3_HOME -shortname]
66     set ::env(Slicer3_HOME) $::Slicer3_HOME
67 pieper 376 }
68     }
69    
70 pieper 8971 puts "Slicer3_HOME is $::Slicer3_HOME"
71 pieper 376
72     # Choose which library versions you want to compile against. These
73     # shouldn't be changed between releases except for testing purposes.
74     # If you change them and Slicer breaks, you get to keep both pieces.
75     #
76     # When modifying these variables, make sure to make appropriate
77     # changes in the "Files to test if library has already been built"
78     # section below, or genlib will happily build the library again.
79    
80 pieper 10863 set ::Slicer3_TAG "http://svn.slicer.org/Slicer3/trunk"
81 partyd 10950 set ::CMAKE_TAG "CMake-2-8-0"
82 pieper 11425 set ::Teem_TAG http://teem.svn.sourceforge.net/svnroot/teem/teem/branches/Teem-1.11
83 pieper 12785 set ::KWWidgets_TAG "Slicer-3-6"
84 pieper 13523 set ::VTK_TAG "http://svn.github.com/pieper/SlicerVTK.git" ;# slicer's patched vtk 5.6
85 pieper 12851 set ::ITK_TAG ITK-3-18
86 hjohnson 10422 set ::PYTHON_TAG "http://svn.python.org/projects/python/branches/release26-maint"
87 pieper 12766 set ::PYTHON_REVISION 76651 ;# avoid windows manifest "fix"
88 pieper 7537 set ::BLAS_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/BLAS
89     set ::LAPACK_TAG http://svn.slicer.org/Slicer3-lib-mirrors/trunk/netlib/lapack-3.1.1
90 hjohnson 10422 set ::NUMPY_TAG "http://svn.scipy.org/svn/numpy/branches/1.3.x"
91 pieper 8881 set ::SCIPY_TAG "http://svn.scipy.org/svn/scipy/branches/0.7.x"
92 pieper 10443 #set ::BatchMake_TAG "BatchMake-1-2"
93 hjohnson 10422 set ::BatchMake_TAG "HEAD"
94 naucoin 6040 set ::SLICERLIBCURL_TAG "HEAD"
95 tokuda 8495 set ::OpenIGTLink_TAG "http://svn.na-mic.org/NAMICSandBox/branches/OpenIGTLink-1-0"
96 tokuda 13505 #set ::OpenCV_TAG http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.1/OpenCV-2.1.0.tar.bz2/download
97     set ::OpenCV_TAG https://code.ros.org/svn/opencv/tags/2.1/opencv
98 pieper 9316
99 pieper 7489 # set TCL_VERSION to "tcl" to get 8.4, otherwise use tcl85 get 8.5
100 pieper 9316 # set 8.5 for Solaris explicitly, because 8.4 complains
101     # when built 64 bit with gcc. Suncc/CC is fine, however.
102 pieper 10692 if {$tcl_platform(os) == "SunOS"} {
103     set ::TCL_VERSION tcl85
104     set ::TCL_MINOR_VERSION 5
105     } else {
106     set ::TCL_VERSION tcl
107     set ::TCL_MINOR_VERSION 4
108     }
109 pieper 376
110     # Set library, binary, etc. paths...
111    
112 davisb 7539 # if Slicer3_LIB and Slicer3_BUILD haven't been set, first check
113     # enviornment variables, then assume they are in the 'standard' places
114     # next to the source tree (as created by getbuildtest.tcl
115 barre 6777 if { ![info exists ::Slicer3_LIB] } {
116 davisb 7539 if { [info exists ::env(Slicer3_LIB)] } {
117     set ::Slicer3_LIB $::env(Slicer3_LIB)
118     } else {
119     set wd [pwd]
120     cd $::Slicer3_HOME/../Slicer3-lib
121     set ::Slicer3_LIB [pwd]
122     cd $wd
123     }
124 pieper 433 }
125 barre 6777 if { ![info exists ::Slicer3_BUILD] } {
126 davisb 7539 if { [info exists ::env(Slicer3_BUILD)] } {
127 davisb 7540 set ::Slicer3_BUILD $::env(Slicer3_BUILD)
128 davisb 7539 } else {
129     set wd [pwd]
130     cd $::Slicer3_HOME/../Slicer3-build
131     set ::Slicer3_BUILD [pwd]
132     cd $wd
133     }
134 pieper 433 }
135    
136 pieper 7799 set ::Teem_SRC_DIR $::Slicer3_LIB/teem
137     set ::Teem_BUILD_DIR $::Slicer3_LIB/teem-build
138 barre 6777 set ::VTK_DIR $::Slicer3_LIB/VTK-build
139     set ::VTK_SRC_DIR $::Slicer3_LIB/VTK
140 pieper 5199 if { ![info exists ::VTK_BUILD_TYPE] } {
141     # set a default if it hasn't already been specified
142     set ::VTK_BUILD_TYPE "Debug" ;# options: Release, RelWithDebInfo, Debug
143     }
144     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
145 pieper 376 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
146 barre 6777 set ::KWWidgets_BUILD_DIR $::Slicer3_LIB/KWWidgets-build
147     set ::KWWIDGETS_DIR $::Slicer3_LIB/KWWidgets
148     set ::ITK_BINARY_PATH $::Slicer3_LIB/Insight-build
149     set ::TCL_BIN_DIR $::Slicer3_LIB/tcl-build/bin
150     set ::TCL_LIB_DIR $::Slicer3_LIB/tcl-build/lib
151     set ::TCL_INCLUDE_DIR $::Slicer3_LIB/tcl-build/include
152 blezek 6869 set ::PYTHON_BIN_DIR $::Slicer3_LIB/python-build
153 barre 6777 set ::CMAKE_PATH $::Slicer3_LIB/CMake-build
154 pieper 376 set ::SOV_BINARY_DIR ""
155     set ::XVNC_EXECUTABLE " "
156 hliu 7835 set ::OpenIGTLink_DIR $::Slicer3_LIB/OpenIGTLink-build
157 hliu 10000 set ::OpenCV_DIR $::Slicer3_LIB/OpenCV-build
158 pieper 8442 set ::BatchMake_SRC_DIR $::Slicer3_LIB/BatchMake
159     set ::BatchMake_BUILD_DIR $::Slicer3_LIB/BatchMake-build
160 barre 6777 set ::SLICERLIBCURL_SRC_DIR $::Slicer3_LIB/cmcurl
161     set ::SLICERLIBCURL_BUILD_DIR $::Slicer3_LIB/cmcurl-build
162 pieper 376
163    
164 pieper 7911 # getbuildtest Option for build using system Python, should be "true" or "false"
165 blezek 7453 set ::USE_SYSTEM_PYTHON "false"
166 pieper 8632 # CMake option for Python, must be "OFF" on "ON", default is "ON"
167 pieper 12785 # - note: as of python 2.6 this can only be used on windows with VS 2008 professional
168 pieper 13573 # (this variable is forced to off later in this file if non-VS 2008 compiler is selected or non-XP version of windows is detected)
169 alexy 10624 set ::USE_PYTHON "ON"
170 pieper 8625
171 pieper 7556 # CMake option for numerical Python, only matters if Python is on
172 alexy 10624 set ::USE_NUMPY "ON"
173 pieper 7911 # getbuildtest option for SCIPY - also build support libraries (blas and lapack) needed for scipy
174     # - should be off except for experimentation (does not work on all plaftorms - requires fortran)
175     # - should be "true" or "false"
176     set ::USE_SCIPY "false"
177 hliu 7835 # CMake Option for using OpenIGTLink library. Must be "OFF" or "ON", default is "OFF"
178 hliu 8069 set ::USE_OPENIGTLINK "ON"
179 hliu 10000 # CMake Option for using OpenCV library. Must be "OFF" or "ON", default is "OFF"
180 hliu 10295 set ::USE_OPENCV "OFF"
181 hliu 7835
182 pieper 376 switch $::tcl_platform(os) {
183 pieper 7336 "SunOS" {
184     set shared_lib_ext "so"
185     }
186 pieper 376 "Linux" {
187     set shared_lib_ext "so"
188     }
189     "Darwin" {
190     set shared_lib_ext "dylib"
191     }
192     "Windows NT" {
193     set shared_lib_ext "dll"
194     }
195     }
196    
197     # TODO: identify files for each platform
198    
199     switch $::tcl_platform(os) {
200 pieper 7336 "SunOS" {
201     set ::VTK_BUILD_SUBDIR ""
202 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
203 pieper 7336
204     set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
205     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
206    
207 pieper 9316 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.5
208 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
209     error "need to define system python path for $::tcl_platform(os)"
210     }
211 pieper 7336 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
212 hjohnson 10422 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.so
213     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
214 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
215 hjohnson 10422 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
216     set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
217 pieper 9316 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.5
218     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.4/libitcl3.4.so
219 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
220 pieper 7336 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
221     set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
222 pieper 10163 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.so
223 pieper 9316 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.5.$shared_lib_ext
224     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.5.$shared_lib_ext
225     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.5
226 pieper 7336 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
227     set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
228     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
229 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
230 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
231 pieper 7336 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.$shared_lib_ext
232 pieper 9316 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
233     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish30
234 pieper 7489
235     # We need a workaround here, because gcc does not pick up libraries in /lib
236     # on Solaris.
237     # The bug, and it's resolution can be found here:
238     # http://bugs.opensolaris.org/view_bug.do?bug_id=6619485
239     set ::env(LDFLAGS) -L/lib
240 pieper 7336 }
241 pieper 376 "Darwin" {
242 pieper 5261 set ::VTK_BUILD_SUBDIR ""
243 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
244 pieper 376
245 pieper 10692 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.$::TCL_MINOR_VERSION
246     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.$::TCL_MINOR_VERSION
247 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
248     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
249 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
250     set ::PYTHON_BIN_DIR /usr
251     }
252 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
253 hjohnson 10422 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.dylib
254     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
255 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
256 hjohnson 10422 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
257     set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
258 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
259 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
260     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
261 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
262 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
263 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
264 hliu 10000 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.$shared_lib_ext
265 pieper 10692 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.$::TCL_MINOR_VERSION.$shared_lib_ext
266     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.$::TCL_MINOR_VERSION.$shared_lib_ext
267     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.$::TCL_MINOR_VERSION
268 pieper 376 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
269 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
270 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
271 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
272 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
273 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
274 hliu 3004
275 pieper 376 }
276     "Linux" {
277 pieper 5261 set ::VTK_BUILD_SUBDIR ""
278 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
279 pieper 376
280     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
281 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
282     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
283 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
284     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
285 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
286     error "need to define system python path for $::tcl_platform(os)"
287     }
288 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
289 hjohnson 10422 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.so
290     set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
291 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
292 hjohnson 10422 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
293     set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
294 pieper 376 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
295 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
296 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
297 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
298 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
299 hliu 10000 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.so
300 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
301     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
302     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
303     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
304 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
305 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
306 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
307 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
308 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
309 hliu 3004
310 pieper 376 }
311     "Windows NT" {
312     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
313    
314     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
315 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin/$::VTK_BUILD_TYPE
316 pieper 376
317     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
318     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
319     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
320 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
321 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/itcl3.2/itcl32.lib
322     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/itk3.2/itk32.lib
323 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
324     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
325 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu.exe
326 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
327     error "need to define system python path for $::tcl_platform(os)"
328     }
329 pieper 8625 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/PCbuild/python.exe
330 pieper 10437 set ::PYTHON_LIB $::PYTHON_BIN_DIR/PCbuild/python26.lib
331 pieper 8625
332 blezek 6869 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
333 pieper 8625
334 hjohnson 10422 set ::NETLIB_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
335 pieper 8625 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/site-packages/numpy/core/numeric.pyc
336 hjohnson 10422 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
337 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
338 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
339 hliu 10000 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/$::VTK_BUILD_TYPE/CV.lib
340 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
341     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
342     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
343     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
344 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/$::VTK_BUILD_TYPE/OpenIGTLink.lib
345 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/$::VTK_BUILD_TYPE/BatchMake.lib
346 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
347 pieper 376 }
348     default {
349     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
350     exit
351     }
352     }
353    
354     # System dependent variables
355    
356     switch $::tcl_platform(os) {
357 pieper 10163 "SunOS" {
358 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
359     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
360 pieper 376 set ::GENERATOR "Unix Makefiles"
361 pieper 9316 set have_compiler [info exists GETBUILDTEST(compiler)]
362     puts "have_compiler from GETBUILDTEST value: $have_compiler"
363     if {$have_compiler == 1} {
364     set GENLIB(compiler) $GETBUILDTEST(compiler)
365     } else {
366     set GETBUILDTEST(compiler) $GENLIB(compiler)
367     }
368     puts "slicer_variables.tcl: GENLIB(compiler): $::GENLIB(compiler) GETBUILDTEST(compiler): $::GETBUILDTEST(compiler)"
369     if {$GETBUILDTEST(compiler) == "suncc" || $GENLIB(compiler) == "suncc"} {
370     set ::COMPILER_PATH "/opt/SUNWspro/bin"
371     set ::COMPILER "CC"
372     set ::env(CC) cc
373     set ::env(CXX) CC
374     set ::FORTRAN_COMPILER "f90"
375 pieper 10443 set ::env(CXXFLAGS) "-library=stlport4"
376 pieper 9316 } else {
377     set ::env(CC) gcc
378     set ::env(CXX) g++
379     set ::COMPILER_PATH "/usr/sfw/bin"
380     set ::COMPILER "g++"
381     set ::FORTRAN_COMPILER "g77"
382 pieper 10443 set ::env(CXXFLAGS) ""
383 pieper 9316 }
384     # NOTE: the bellow flags will only work with gcc, and Studio 12 or newer.
385     # Earlier Studio versions do not accept the -m64 flag.
386     # If you're not using one of the two, you should check
387     # your compiler's manual for the existence of a similar flag.
388     set have_bitness [info exists GETBUILDTEST(bitness)]
389     if {$have_bitness == 1} {
390     set GENLIB(bitness) $GETBUILDTEST(bitness)
391     } else {
392     set GETBUILDTEST(bitness) $GENLIB(bitness)
393     }
394 pieper 10163 if {$::GETBUILDTEST(bitness) == "64" || $::GENLIB(bitness) == "64"} {
395    
396     # Due to bug 6223255 on Solaris 10 we need to explicitly set the runtime path
397     # for shared objects, because the linker will not find the 64 bit lib automatically.
398     # See the bellow link for more details:
399     # http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6223255
400     if {$tcl_platform(osVersion) == "5.10" && ($::GETBUILDTEST(bitness) == "64" || $::GENLIB(bitness) == "64")} {
401     set ::env(CFLAGS) -m64
402 pieper 10443 set ::env(CXXFLAGS) "$::env(CXXFLAGS) -m64"
403 pieper 10163 set ::env(LDFLAGS) "-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64"
404    
405     } else {
406     set ::env(CFLAGS) -m64
407 pieper 10443 set ::env(CXXFLAGS) "$::env(CXXFLAGS) -m64"
408 pieper 10163 set ::env(LDFLAGS) -m64
409     }
410 pieper 9316 } else {
411     set ::env(CFLAGS) ""
412 pieper 10443 set ::env(CXXFLAGS) $::env(CXXFLAGS)
413 pieper 9316 set ::env(LDFLAGS) ""
414     }
415     puts "slicer_variables.tcl: GENLIB(bitness): $::GENLIB(bitness) GETBUILDTEST(bitness): $::GETBUILDTEST(bitness)"
416 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
417 pieper 7336 set numCPUs [lindex [exec /usr/sbin/psrinfo | grep on-line | wc -l | tr -d ''] 0]
418     set ::MAKE "gmake -j[expr $numCPUs]"
419 pieper 376 set ::SERIAL_MAKE "gmake"
420     }
421     "Linux" {
422 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
423     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
424 pieper 376 set ::GENERATOR "Unix Makefiles"
425     set ::COMPILER_PATH "/usr/bin"
426     set ::COMPILER "g++"
427 pieper 7594 set ::FORTRAN_COMPILER "gfortran"
428 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
429 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
430 lorensen 8346 set ::MAKE "make -j [expr $numCPUs]"
431 pieper 376 set ::SERIAL_MAKE "make"
432     }
433     "Darwin" {
434 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
435     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
436 pieper 376 set ::GENERATOR "Unix Makefiles"
437     set ::COMPILER_PATH "/usr/bin"
438 hayes 933 set ::COMPILER "g++"
439 pieper 7560 set ::FORTRAN_COMPILER "gfortran"
440 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
441 pieper 10127 set numCPUs 1
442     catch { set numCPUs [lindex [exec /usr/sbin/system_profiler | grep "Total Number Of Cores"] end] }
443 hjohnson 11170 set ::MAKE "make -j [expr $numCPUs]"
444 pieper 376 set ::SERIAL_MAKE make
445     }
446     default {
447     # different windows machines say different things, so assume
448     # that if it doesn't match above it must be windows
449     # (VC7 is Visual C++ 7.0, also known as the .NET version)
450    
451    
452 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
453     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
454 pieper 376
455     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
456    
457     set MSVC6 0
458     #
459     ## match this to the version of the compiler you have:
460     #
461    
462     ## for Visual Studio 6:
463     #set ::GENERATOR "Visual Studio 6"
464     #set ::MAKE "msdev"
465     #set ::COMPILER_PATH ""
466     #set MSVC6 1
467    
468     if {[info exists ::env(MSVC6)]} {
469     set ::MSVC6 $::env(MSVC6)
470     } else {
471     }
472    
473     ## for Visual Studio 7:
474     if {[info exists ::env(GENERATOR)]} {
475     set ::GENERATOR $::env(GENERATOR)
476     } else {
477     set ::GENERATOR "Visual Studio 7"
478     }
479    
480     if {[info exists ::env(MAKE)]} {
481     set ::MAKE $::env(MAKE)
482     } else {
483 barre 9722 # The following line set a default value, hoping that it will be
484     # overriden later on as the script tries for different flavors
485     # of visual studio. Let's try a little harder by checking
486     # some environment variable (ultimately we should try poking
487     # in the Win32 registry).
488     if {[info exists ::env(VSINSTALLDIR)]} {
489 barre 9724 set ::MAKE [file join $::env(VSINSTALLDIR) "Common7/IDE/devenv.exe"]
490 barre 9722 } else {
491     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv.exe"
492     }
493 pieper 376 }
494    
495     if {[info exists ::env(COMPILER_PATH)]} {
496     set ::COMPILER_PATH $::env(COMPILER_PATH)
497     } else {
498 barre 9724 if {[info exists ::env(VSINSTALLDIR)]} {
499     set ::COMPILER_PATH [file join $::env(VSINSTALLDIR) "Common7/Vc7/bin"]
500     } else {
501     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
502     }
503 pieper 376 }
504    
505 barre 9727 if {[info exists ::env(MSSDK_PATH)]} {
506     set ::MSSDK_PATH $::env(MSSDK_PATH)
507     } else {
508     if {[info exists ::env(WindowsSdkDir)]} {
509     set ::MSSDK_PATH [file normalize $::env(WindowsSdkDir)]
510     } else {
511     set ::MSSDK_PATH "C:/Program\ Files/Microsoft\ SDKs/Windows/v6.0A"
512     }
513     }
514    
515 pieper 376 #
516     ## for Visual Studio 7.1:
517 pieper 917 # - automatically use newer if available
518 pieper 376 #
519     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
520     set ::GENERATOR "Visual Studio 7 .NET 2003"
521 pieper 9087 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv.exe"
522 pieper 376 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
523 pieper 8625 set ::MSSDK_PATH "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK"
524 pieper 376 }
525    
526 pieper 917 #
527     ## for Visual Studio 8
528     # - automatically use newest if available
529 pieper 1456 # - use full if available, otherwise express
530 pieper 4760 # - use the 64 bit version if available
531 pieper 917 #
532     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
533     set ::GENERATOR "Visual Studio 8 2005"
534     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
535     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
536 pieper 8633 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
537 pieper 917 }
538    
539 pieper 1456
540     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
541     set ::GENERATOR "Visual Studio 8 2005"
542     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
543     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
544 pieper 8633 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
545 pieper 1456 }
546    
547 pieper 4690 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
548 pieper 4760 #set ::GENERATOR "Visual Studio 8 2005 Win64"
549     set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
550 pieper 4690 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
551     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
552 pieper 11010 set ::MSSDK_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/SDK/v2.0"
553 pieper 4690 }
554 hayes 6440 #
555     ## for Visual Studio 9
556     if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
557 hayes 6442 set ::GENERATOR "Visual Studio 9 2008"
558 hayes 6440 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
559     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
560 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
561 hayes 6440 }
562 pieper 4690
563 pieper 7737 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
564     set ::GENERATOR "Visual Studio 9 2008"
565     set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
566     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
567 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
568 pieper 7737 }
569    
570 pieper 10861 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
571     set ::GENERATOR "Visual Studio 9 2008"
572     set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
573     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
574     set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
575     }
576 pieper 7737
577 pieper 10861
578 pieper 7379 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
579     set ::GENERATOR "Visual Studio 9 2008"
580     set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
581     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
582 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
583 pieper 7379 }
584    
585 pieper 376 set ::COMPILER "cl"
586     set ::SERIAL_MAKE $::MAKE
587 pieper 11703
588 pieper 13573 set windowsNotXP 0
589 pieper 13577 if { $::tcl_platform(os) == "Windows NT" } {
590 pieper 13573 if { [string index $::tcl_platform(osVersion) 0] != "5" } {
591     set windowsNotXP 1
592     }
593     }
594     if { ![string match "Visual Studio 9*" $::GENERATOR] ||
595     [string match "*Express*" $::MAKE] || $windowsNotXP } {
596 pieper 11703 if { $::USE_PYTHON == "ON" } {
597 pieper 13573 puts "\n\n\nWarning: Python can only be built on windows XP with Visual Studio 9 (2008) Professional for windows.\n\nSlicer will be built with Python turned off\n\n"
598 pieper 11703 set ::USE_PYTHON "OFF"
599     }
600     }
601 pieper 376 }
602     }
603    
604    
605 pieper 7556

  ViewVC Help
Powered by ViewVC 1.1.22