1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # This software is governed by the CeCILL-B license under French law and
8 # abiding by the rules of distribution of free software. You can use,
9 # modify and/ or redistribute the software under the terms of the CeCILL-B
10 # license as circulated by CEA, CNRS and INRIA at the following URL
11 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
12 # or in the file LICENSE.txt.
14 # As a counterpart to the access to the source code and rights to copy,
15 # modify and redistribute granted by the license, users are provided only
16 # with a limited warranty and the software's author, the holder of the
17 # economic rights, and the successive licensors have only limited
20 # The fact that you are presently reading this means that you have had
21 # knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------
27 echo "in ThirdParty-install-ITK.sh, source " $PWD/scripts/CreaTools-configure.sh
28 if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
32 echo "==================================================="
35 echo "YOU NEED TO RUN 'Configure' (0) First !"
36 echo "==================================================="
41 echo $PWD/scripts/CreaTools-configure.sh
43 more $PWD/scripts/CreaTools-configure.sh
45 source $PWD/scripts/CreaTools-configure.sh
48 echo $PWD/scripts/CreaTools-configure.sh
49 echo --generationdir--
51 echo --docgeneration--
53 echo --installPrefix--
55 echo --installPrefixThird--
56 echo $installPrefixThird
63 # echo --sourcesFrom--
67 # echo --start_point--
73 sourcesDir=$generationdir/thirdparty_sources
74 binDir=$generationdir/thirdparty_bin
75 #EED itkfile=InsightToolkit-3.20.0.patchCreatis.tar.gz
77 if [ ! -e $generationdir ]
80 chown $loginUserName $generationdir
81 chgrp $loginGroupName $generationdir
84 if [ ! -e $sourcesDir ]
88 #chown $loginUserName:$loginGroupName $sourcesDir
89 chown $loginUserName $sourcesDir
90 chgrp $loginGroupName $sourcesDir
96 chown $loginUserName $binDir
97 chgrp $loginGroupName $binDir
100 echo "we remove old stuff"
101 if [ $ITKVersion = ITK3 ]
103 rm -rf $sourcesDir/InsightToolkit*
104 rm -rf $binDir/InsightToolkit*
106 rm -rf $sourcesDir/ITK*
111 echo "we download new stuff"
112 if [ $ITKVersion = ITK3 ]
115 #EED itkfile=InsightToolkit-3.20.0.patchCreatis.tar.gz
116 #EED libname=InsightToolkit-3.20.0
117 itkfile=InsightToolkit-3.20.1.tar.gz
118 libname=InsightToolkit-3.20.1
125 if [ $OperatingSystem = "MacOS" ]
127 curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
129 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/$itkfile
134 #fi # JPR ------------1
136 #if [ $buildType = "Debug" ]
143 # the following stupid test is used at debug time; Please don't remove!
148 dirInstall=$binDir/$libname-Bin
149 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
153 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
154 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
155 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
156 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
157 if [ $ITKVersion = ITK4 ]
159 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
161 #uncomment following line if you want to use the bleeding edge of GDCM2!
162 #cmake -D ITK_USE_SYSTEM_GDCM:BOOL=ON CMakeCache.txt