scriptDir=$PWD
sourcesDir=$generationdir/thirdparty_sources
binDir=$generationdir/thirdparty_bin
+#EED itkfile=InsightToolkit-3.20.0.patchCreatis.tar.gz
if [ ! -e $generationdir ]
then
fi
echo "we remove old stuff"
- rm -rf $sourcesDir/InsightToolkit*
- rm -rf $binDir/InsightToolkit*
-
+ if [ $ITKVersion = ITK3 ]
+ then
+ rm -rf $sourcesDir/InsightToolkit*
+ rm -rf $binDir/InsightToolkit*
+ else
+ rm -rf $sourcesDir/ITK*
+ rm -rf $binDir/ITKt*
+ fi
cd $sourcesDir
echo "we download new stuff"
- if [ $OperatingSystem = "MacOS" ]
- then
- curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
- # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
- tar -xvf InsightToolkit-3.20.0.tar.gz
- else
- wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
- tar -xzvf InsightToolkit-3.20.0.tar.gz
- fi
+ if [ $ITKVersion = ITK3 ]
+ then
+ # deal with ITK3
+ #EED itkfile=InsightToolkit-3.20.0.patchCreatis.tar.gz
+ #EED libname=InsightToolkit-3.20.0
+ itkfile=InsightToolkit-3.20.1.tar.gz
+ libname=InsightToolkit-3.20.1
+ else
+ # deal with ITK4
+ itkfile=ITK4.0.tgz
+ libname=ITK
+ fi
+
+ if [ $OperatingSystem = "MacOS" ]
+ then
+ curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
+ else
+ wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
+ fi
+ tar -xzvf $itkfile
+
+
+#fi # JPR ------------1
if [ $buildType = "Debug" ]
then
#if [ true = false ]
if [ true = true ]
then
- libname=InsightToolkit-3.20.0
+
dirInstall=$binDir/$libname-Bin
export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
mkdir $dirInstall
##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
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
+ if [ $ITKVersion = ITK4 ]
+ then
+ 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
+ fi
#uncomment following line if you want to use the bleeding edge of GDCM2!
#cmake -D ITK_USE_SYSTEM_GDCM:BOOL=ON CMakeCache.txt
cmake CMakeCache.txt