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 "==================================================="
17 echo $PWD/scripts/CreaTools-configure.sh
19 more $PWD/scripts/CreaTools-configure.sh
21 source $PWD/scripts/CreaTools-configure.sh
24 echo $PWD/scripts/CreaTools-configure.sh
25 echo --generationdir--
27 echo --docgeneration--
29 echo --installPrefix--
31 echo --installPrefixThird--
32 echo $installPrefixThird
39 # echo --sourcesFrom--
43 # echo --start_point--
49 sourcesDir=$generationdir/thirdparty_sources
50 binDir=$generationdir/thirdparty_bin
51 itkfile=InsightToolkit-3.20.0.patchCreatis.tar.gz
53 if [ ! -e $generationdir ]
56 chown $loginUserName $generationdir
57 chgrp $loginGroupName $generationdir
60 if [ ! -e $sourcesDir ]
64 #chown $loginUserName:$loginGroupName $sourcesDir
65 chown $loginUserName $sourcesDir
66 chgrp $loginGroupName $sourcesDir
72 chown $loginUserName $binDir
73 chgrp $loginGroupName $binDir
76 echo "we remove old stuff"
77 if [ $ITKVersion = ITK3 ]
79 rm -rf $sourcesDir/InsightToolkit*
80 rm -rf $binDir/InsightToolkit*
82 rm -rf $sourcesDir/ITK*
87 echo "we download new stuff"
88 if [ $ITKVersion = ITK3 ]
91 itkfile=InsightToolkit-3.20.0.patchCreatis.tar.gz
92 libname=InsightToolkit-3.20.0
99 if [ $OperatingSystem = "MacOS" ]
101 curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
103 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
108 #fi # JPR ------------1
110 if [ $buildType = "Debug" ]
117 # the following stupid test is used at debug time; Please don't remove!
122 dirInstall=$binDir/$libname-Bin
123 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
127 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
128 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
129 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
130 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
131 if [ $ITKVersion = ITK4 ]
133 cmake -D ITKV3_COMPATIBILITY:BOOL=ON -D ITKGroup_Nonunit:BOOL=ON -D ITKGroup_IO:BOOL=ON -D Module_ITK-Deprecated:BOOL=ON -D Module_ITK-Review:BOOL=ON CMakeCache.txt
135 #uncomment following line if you want to use the bleeding edge of GDCM2!
136 #cmake -D ITK_USE_SYSTEM_GDCM:BOOL=ON CMakeCache.txt