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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22