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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14285 - (hide annotations) (download) (as text)
Thu Jul 22 03:05:56 2010 UTC (7 years, 3 months ago) by blezek
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 27472 byte(s)
ENH: Added support for FilteredTractography.

Added a stand-alone version of weave.  This allows the FilteredTractography plugin to be built once for users, without requiring a compiler to be installed on the system.  Tested for the moment on Mac, next stop Windows and Linux.

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 fedorov 14211 set ::ITK_TAG ITK-3-20
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 13686 set ::OpenIGTLink_TAG "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink"
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 blezek 14285 set ::PYTHON_EXECUTABLE $::PYTHON_BIN_DIR/bin/python
214 hjohnson 10422 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
215 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
216 hjohnson 10422 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
217     set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
218 pieper 9316 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.5
219     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.4/libitcl3.4.so
220 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
221 pieper 7336 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
222     set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
223 pieper 10163 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.so
224 pieper 9316 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.5.$shared_lib_ext
225     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.5.$shared_lib_ext
226     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.5
227 pieper 7336 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
228     set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
229     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
230 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
231 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
232 pieper 7336 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.$shared_lib_ext
233 pieper 9316 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
234     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish30
235 pieper 7489
236     # We need a workaround here, because gcc does not pick up libraries in /lib
237     # on Solaris.
238     # The bug, and it's resolution can be found here:
239     # http://bugs.opensolaris.org/view_bug.do?bug_id=6619485
240     set ::env(LDFLAGS) -L/lib
241 pieper 7336 }
242 pieper 376 "Darwin" {
243 pieper 5261 set ::VTK_BUILD_SUBDIR ""
244 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
245 pieper 376
246 pieper 10692 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.$::TCL_MINOR_VERSION
247     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.$::TCL_MINOR_VERSION
248 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.dylib
249     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.dylib
250 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
251     set ::PYTHON_BIN_DIR /usr
252     }
253 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
254 hjohnson 10422 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.dylib
255 blezek 14285 set ::PYTHON_EXECUTABLE $::PYTHON_BIN_DIR/bin/python
256 hjohnson 10422 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
257 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
258 hjohnson 10422 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
259     set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
260 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.dylib
261 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
262     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
263 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
264 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
265 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
266 hliu 10000 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.$shared_lib_ext
267 pieper 10692 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.$::TCL_MINOR_VERSION.$shared_lib_ext
268     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.$::TCL_MINOR_VERSION.$shared_lib_ext
269     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.$::TCL_MINOR_VERSION
270 pieper 376 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
271 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
272 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
273 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
274 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
275 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
276 hliu 3004
277 pieper 376 }
278     "Linux" {
279 pieper 5261 set ::VTK_BUILD_SUBDIR ""
280 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin
281 pieper 376
282     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
283 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/libitcl3.2.so
284     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/libitk3.2.so
285 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
286     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
287 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
288     error "need to define system python path for $::tcl_platform(os)"
289     }
290 blezek 6869 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/bin/python
291 hjohnson 10422 set ::PYTHON_LIB $::PYTHON_BIN_DIR/lib/libpython2.6.so
292 blezek 14285 set ::PYTHON_EXECUTABLE $::PYTHON_BIN_DIR/bin/python
293 hjohnson 10422 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include/python2.6
294 pieper 7537 set ::NETLIB_TEST_FILE $::Slicer3_LIB/netlib-build/BLAS-build/libblas.a
295 hjohnson 10422 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
296     set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
297 pieper 376 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
298 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitcl3.2.so
299 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu
300 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
301 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
302 hliu 10000 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/libcv.so
303 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
304     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
305     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
306     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
307 barre 6777 set ::TK_EVENT_PATCH $::Slicer3_HOME/tkEventPatch.diff
308 pieper 376 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
309 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/libOpenIGTLink.$shared_lib_ext
310 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/BatchMake
311 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/libslicerlibcurl.a
312 hliu 3004
313 pieper 376 }
314     "Windows NT" {
315     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
316    
317     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
318 pieper 7799 set ::Teem_BIN_DIR $::Teem_BUILD_DIR/bin/$::VTK_BUILD_TYPE
319 pieper 376
320     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
321     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
322     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
323 pieper 6641 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itclConfig.sh
324 pieper 6875 set ::INCR_TCL_LIB $::TCL_LIB_DIR/lib/itcl3.2/itcl32.lib
325     set ::INCR_TK_LIB $::TCL_LIB_DIR/lib/itk3.2/itk32.lib
326 naucoin 7113 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
327     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
328 pieper 7799 set ::Teem_TEST_FILE $::Teem_BIN_DIR/unu.exe
329 pieper 7447 if { $::USE_SYSTEM_PYTHON } {
330     error "need to define system python path for $::tcl_platform(os)"
331     }
332 pieper 8625 set ::PYTHON_TEST_FILE $::PYTHON_BIN_DIR/PCbuild/python.exe
333 pieper 10437 set ::PYTHON_LIB $::PYTHON_BIN_DIR/PCbuild/python26.lib
334 blezek 14285 set ::PYTHON_EXECUTABLE $::PYTHON_BIN_DIR/PCbuild/python.exe
335 pieper 8625
336 blezek 6869 set ::PYTHON_INCLUDE $::PYTHON_BIN_DIR/include
337 pieper 8625
338 hjohnson 10422 set ::NETLIB_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/numpy/core/numeric.pyc
339 pieper 8625 set ::NUMPY_TEST_FILE $::PYTHON_BIN_DIR/lib/site-packages/numpy/core/numeric.pyc
340 hjohnson 10422 set ::SCIPY_TEST_FILE $::PYTHON_BIN_DIR/lib/python2.6/site-packages/scipy/version.pyc
341 pieper 376 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
342 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
343 hliu 10000 set ::OpenCV_TEST_FILE $::OpenCV_DIR/lib/$::VTK_BUILD_TYPE/CV.lib
344 pieper 376 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
345     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
346     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
347     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
348 hliu 7835 set ::OPENIGTLINK_TEST_FILE $::OpenIGTLink_DIR/bin/$::VTK_BUILD_TYPE/OpenIGTLink.lib
349 pieper 8442 set ::BatchMake_TEST_FILE $::BatchMake_BUILD_DIR/bin/$::VTK_BUILD_TYPE/BatchMake.lib
350 naucoin 6040 set ::SLICERLIBCURL_TEST_FILE $::SLICERLIBCURL_BUILD_DIR/bin/$::VTK_BUILD_TYPE/slicerlibcurl.lib
351 pieper 376 }
352     default {
353     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
354     exit
355     }
356     }
357    
358     # System dependent variables
359    
360     switch $::tcl_platform(os) {
361 pieper 10163 "SunOS" {
362 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
363     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
364 pieper 376 set ::GENERATOR "Unix Makefiles"
365 pieper 9316 set have_compiler [info exists GETBUILDTEST(compiler)]
366     puts "have_compiler from GETBUILDTEST value: $have_compiler"
367     if {$have_compiler == 1} {
368     set GENLIB(compiler) $GETBUILDTEST(compiler)
369     } else {
370     set GETBUILDTEST(compiler) $GENLIB(compiler)
371     }
372     puts "slicer_variables.tcl: GENLIB(compiler): $::GENLIB(compiler) GETBUILDTEST(compiler): $::GETBUILDTEST(compiler)"
373     if {$GETBUILDTEST(compiler) == "suncc" || $GENLIB(compiler) == "suncc"} {
374     set ::COMPILER_PATH "/opt/SUNWspro/bin"
375     set ::COMPILER "CC"
376     set ::env(CC) cc
377     set ::env(CXX) CC
378     set ::FORTRAN_COMPILER "f90"
379 pieper 10443 set ::env(CXXFLAGS) "-library=stlport4"
380 pieper 9316 } else {
381     set ::env(CC) gcc
382     set ::env(CXX) g++
383     set ::COMPILER_PATH "/usr/sfw/bin"
384     set ::COMPILER "g++"
385     set ::FORTRAN_COMPILER "g77"
386 pieper 10443 set ::env(CXXFLAGS) ""
387 pieper 9316 }
388     # NOTE: the bellow flags will only work with gcc, and Studio 12 or newer.
389     # Earlier Studio versions do not accept the -m64 flag.
390     # If you're not using one of the two, you should check
391     # your compiler's manual for the existence of a similar flag.
392     set have_bitness [info exists GETBUILDTEST(bitness)]
393     if {$have_bitness == 1} {
394     set GENLIB(bitness) $GETBUILDTEST(bitness)
395     } else {
396     set GETBUILDTEST(bitness) $GENLIB(bitness)
397     }
398 pieper 10163 if {$::GETBUILDTEST(bitness) == "64" || $::GENLIB(bitness) == "64"} {
399    
400     # Due to bug 6223255 on Solaris 10 we need to explicitly set the runtime path
401     # for shared objects, because the linker will not find the 64 bit lib automatically.
402     # See the bellow link for more details:
403     # http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6223255
404     if {$tcl_platform(osVersion) == "5.10" && ($::GETBUILDTEST(bitness) == "64" || $::GENLIB(bitness) == "64")} {
405     set ::env(CFLAGS) -m64
406 pieper 10443 set ::env(CXXFLAGS) "$::env(CXXFLAGS) -m64"
407 pieper 10163 set ::env(LDFLAGS) "-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64"
408    
409     } else {
410     set ::env(CFLAGS) -m64
411 pieper 10443 set ::env(CXXFLAGS) "$::env(CXXFLAGS) -m64"
412 pieper 10163 set ::env(LDFLAGS) -m64
413     }
414 pieper 9316 } else {
415     set ::env(CFLAGS) ""
416 pieper 10443 set ::env(CXXFLAGS) $::env(CXXFLAGS)
417 pieper 9316 set ::env(LDFLAGS) ""
418     }
419     puts "slicer_variables.tcl: GENLIB(bitness): $::GENLIB(bitness) GETBUILDTEST(bitness): $::GETBUILDTEST(bitness)"
420 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
421 pieper 7336 set numCPUs [lindex [exec /usr/sbin/psrinfo | grep on-line | wc -l | tr -d ''] 0]
422     set ::MAKE "gmake -j[expr $numCPUs]"
423 pieper 376 set ::SERIAL_MAKE "gmake"
424     }
425     "Linux" {
426 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
427     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
428 pieper 376 set ::GENERATOR "Unix Makefiles"
429     set ::COMPILER_PATH "/usr/bin"
430     set ::COMPILER "g++"
431 pieper 7594 set ::FORTRAN_COMPILER "gfortran"
432 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
433 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
434 lorensen 8346 set ::MAKE "make -j [expr $numCPUs]"
435 pieper 376 set ::SERIAL_MAKE "make"
436     }
437     "Darwin" {
438 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
439     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
440 pieper 376 set ::GENERATOR "Unix Makefiles"
441     set ::COMPILER_PATH "/usr/bin"
442 hayes 933 set ::COMPILER "g++"
443 pieper 7560 set ::FORTRAN_COMPILER "gfortran"
444 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
445 pieper 10127 set numCPUs 1
446     catch { set numCPUs [lindex [exec /usr/sbin/system_profiler | grep "Total Number Of Cores"] end] }
447 hjohnson 11170 set ::MAKE "make -j [expr $numCPUs]"
448 pieper 376 set ::SERIAL_MAKE make
449     }
450     default {
451     # different windows machines say different things, so assume
452     # that if it doesn't match above it must be windows
453     # (VC7 is Visual C++ 7.0, also known as the .NET version)
454    
455    
456 barre 6777 set ::VTKSLICERBASE_BUILD_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
457     set ::VTKSLICERBASE_BUILD_TCL_LIB $::Slicer3_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
458 pieper 376
459     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
460    
461     set MSVC6 0
462     #
463     ## match this to the version of the compiler you have:
464     #
465    
466     ## for Visual Studio 6:
467     #set ::GENERATOR "Visual Studio 6"
468     #set ::MAKE "msdev"
469     #set ::COMPILER_PATH ""
470     #set MSVC6 1
471    
472     if {[info exists ::env(MSVC6)]} {
473     set ::MSVC6 $::env(MSVC6)
474     } else {
475     }
476    
477     ## for Visual Studio 7:
478     if {[info exists ::env(GENERATOR)]} {
479     set ::GENERATOR $::env(GENERATOR)
480     } else {
481     set ::GENERATOR "Visual Studio 7"
482     }
483    
484     if {[info exists ::env(MAKE)]} {
485     set ::MAKE $::env(MAKE)
486     } else {
487 barre 9722 # The following line set a default value, hoping that it will be
488     # overriden later on as the script tries for different flavors
489     # of visual studio. Let's try a little harder by checking
490     # some environment variable (ultimately we should try poking
491     # in the Win32 registry).
492     if {[info exists ::env(VSINSTALLDIR)]} {
493 barre 9724 set ::MAKE [file join $::env(VSINSTALLDIR) "Common7/IDE/devenv.exe"]
494 barre 9722 } else {
495     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv.exe"
496     }
497 pieper 376 }
498    
499     if {[info exists ::env(COMPILER_PATH)]} {
500     set ::COMPILER_PATH $::env(COMPILER_PATH)
501     } else {
502 barre 9724 if {[info exists ::env(VSINSTALLDIR)]} {
503     set ::COMPILER_PATH [file join $::env(VSINSTALLDIR) "Common7/Vc7/bin"]
504     } else {
505     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
506     }
507 pieper 376 }
508    
509 barre 9727 if {[info exists ::env(MSSDK_PATH)]} {
510     set ::MSSDK_PATH $::env(MSSDK_PATH)
511     } else {
512     if {[info exists ::env(WindowsSdkDir)]} {
513     set ::MSSDK_PATH [file normalize $::env(WindowsSdkDir)]
514     } else {
515     set ::MSSDK_PATH "C:/Program\ Files/Microsoft\ SDKs/Windows/v6.0A"
516     }
517     }
518    
519 pieper 376 #
520     ## for Visual Studio 7.1:
521 pieper 917 # - automatically use newer if available
522 pieper 376 #
523     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
524     set ::GENERATOR "Visual Studio 7 .NET 2003"
525 pieper 9087 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv.exe"
526 pieper 376 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
527 pieper 8625 set ::MSSDK_PATH "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK"
528 pieper 376 }
529    
530 pieper 917 #
531     ## for Visual Studio 8
532     # - automatically use newest if available
533 pieper 1456 # - use full if available, otherwise express
534 pieper 4760 # - use the 64 bit version if available
535 pieper 917 #
536     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
537     set ::GENERATOR "Visual Studio 8 2005"
538     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
539     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
540 pieper 8633 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
541 pieper 917 }
542    
543 pieper 1456
544     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
545     set ::GENERATOR "Visual Studio 8 2005"
546     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
547     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
548 pieper 8633 set ::MSSDK_PATH "C:\Program Files\Microsoft Platform SDK"
549 pieper 1456 }
550    
551 pieper 4690 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
552 pieper 4760 #set ::GENERATOR "Visual Studio 8 2005 Win64"
553     set ::GENERATOR "Visual Studio 8 2005" ;# do NOT use the 64 bit target
554 pieper 4690 set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
555     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin"
556 pieper 11010 set ::MSSDK_PATH "c:/Program Files (x86)/Microsoft Visual Studio 8/SDK/v2.0"
557 pieper 4690 }
558 hayes 6440 #
559     ## for Visual Studio 9
560     if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
561 hayes 6442 set ::GENERATOR "Visual Studio 9 2008"
562 hayes 6440 set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
563     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
564 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
565 hayes 6440 }
566 pieper 4690
567 pieper 7737 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
568     set ::GENERATOR "Visual Studio 9 2008"
569     set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
570     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
571 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
572 pieper 7737 }
573    
574 pieper 10861 if { [file exists "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"] } {
575     set ::GENERATOR "Visual Studio 9 2008"
576     set ::MAKE "c:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
577     set ::COMPILER_PATH "c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
578     set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
579     }
580 pieper 7737
581 pieper 10861
582 pieper 7379 if { [file exists "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"] } {
583     set ::GENERATOR "Visual Studio 9 2008"
584     set ::MAKE "c:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe"
585     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
586 pieper 8625 set ::MSSDK_PATH "c:/Program Files/Microsoft SDKs/Windows/v6.0A"
587 pieper 7379 }
588    
589 pieper 376 set ::COMPILER "cl"
590     set ::SERIAL_MAKE $::MAKE
591 pieper 11703
592 pieper 13573 set windowsNotXP 0
593 pieper 13577 if { $::tcl_platform(os) == "Windows NT" } {
594 pieper 13573 if { [string index $::tcl_platform(osVersion) 0] != "5" } {
595     set windowsNotXP 1
596     }
597     }
598     if { ![string match "Visual Studio 9*" $::GENERATOR] ||
599     [string match "*Express*" $::MAKE] || $windowsNotXP } {
600 pieper 11703 if { $::USE_PYTHON == "ON" } {
601 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"
602 pieper 11703 set ::USE_PYTHON "OFF"
603     }
604     }
605 pieper 376 }
606     }
607    
608    
609 pieper 7556

  ViewVC Help
Powered by ViewVC 1.1.22