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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22