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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.22