3 echo "in ThirdParty-install-ITK.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/InsightToolkit*
72 rm -rf $binDir/InsightToolkit*
76 echo "we download new stuff"
77 if [ $OperatingSystem = "MacOS" ]
79 curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
80 # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
81 tar -xvf InsightToolkit-3.20.0.tar.gz
83 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
84 tar -xzvf InsightToolkit-3.20.0.tar.gz
87 if [ $buildType = "Debug" ]
94 # the following stupid test is used at debug time; Please don't remove!
98 libname=InsightToolkit-3.20.0
99 dirInstall=$binDir/$libname-Bin
100 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
104 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
105 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
106 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
107 cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D ITK_USE_REVIEW:BOOL=ON CMakeCache.txt
108 #uncomment following line if you want to use the bleeding edge of GDCM2!
109 #cmake -D ITK_USE_SYSTEM_GDCM:BOOL=ON CMakeCache.txt