3 echo "in ThirdParty-install-VTK.sh, source " $PWD/scripts/CreaTools-configure.sh
4 if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
8 echo "==================================================="
11 echo "YOU NEED TO RUN 'Configure' (0) First !"
12 echo "==================================================="
18 source $PWD/scripts/CreaTools-configure.sh
21 echo $PWD/scripts/CreaTools-configure.sh
22 echo --generationdir--
24 echo --docgeneration--
26 echo --installPrefix--
28 echo --installPrefixThird--
29 echo $installPrefixThird
34 # echo --sourcesFrom--
38 # echo --start_point--
44 sourcesDir=$generationdir/thirdparty_sources
45 binDir=$generationdir/thirdparty_bin
47 if [ ! -e $generationdir ]
50 chown $loginUserName $generationdir
51 chgrp $loginGroupName $generationdir
54 if [ ! -e $sourcesDir ]
58 #chown $loginUserName:$loginGroupName $sourcesDir
59 chown $loginUserName $sourcesDir
60 chgrp $loginGroupName $sourcesDir
66 chown $loginUserName $binDir
67 chgrp $loginGroupName $binDir
70 echo "we remove old stuff"
71 rm -rf $sourcesDir/VTK*
72 rm -rf $sourcesDir/vtk*
77 echo "we download new stuff"
78 if [ $OperatingSystem = "MacOS" ]
80 curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz
81 # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
82 tar -xvf VTK-5.6.1.patchCreatis.tar.gz
84 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz
85 tar -xzvf VTK-5.6.1.patchCreatis.tar.gz
88 if [ $buildType = "Debug" ]
95 # the following stupid test is used at debug time; Please don't remove!
100 dirInstall=$binDir/$libname-Bin
101 export VTK_DIR=$installPrefixThird/lib/vtk-5.6/
103 echo "we prepare directories dirInstall " $dirInstall " VTK_DIR " $installPrefixThird/lib/vtk-5.6/
106 # See EED why we have to do this
107 if [ $OperatingSystem = "MacOS" ]
109 cmake -D CMAKE_CXX_COMPILER:FILE=/usr/bin/g++
111 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
112 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
113 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
115 if [ $OperatingSystem = "MacOS" ]
117 cmake -D BUILD_SHARE_LIBS:BOOL=ON -D VTK_USE_CARBON:BOOL=ON -D VTK_USE_COCOA:BOOL=OFF CMakeCache.txt
118 cmake -D VTK_USE_TCL:BOOL=OFF CMakeCache.txt
122 cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D VTK_USE_QT:BOOL=ON CMakeCache.txt