-# %1 is the binary folder %2 is the binary folder crea %3 is the binaryfolder bbtk
-currentdir=`pwd`
-#set currentdir=%currentdir:\=/%
+#!/bin/sh
-cd $1
-cmake -D crea_DIR:PATH=$currentdir$2 -D BUILD_BBTK_PACKAGE_creaImageIO:BOOL=ON -D creaImageIO_DOC:BOOL=ON -D creaBruker_DIR:PATH=$currentdir$4 -D USE_GDCM:BOOL=ON CMakeCache.txt
-cmake -D BBTK_DIR:PATH=$currentdir$3 CMakeCache.txt
+# $1 : bbtk
+# $2 : generationdir
+# $3 : ON/OFF (generate doc)
+
+currentdir=$2
+binfolder=$2/tmpCreaTools_INSTALL/$1Bin
+cd $binfolder
+
+cmake -D BBTK_DIR:PATH=$currentdir/tmpCreaTools_INSTALL/bbtkBin -D crea_DIR:PATH=$currentdir/tmpCreaTools_INSTALL/creaBin -D BUILD_BBTK_PACKAGE_creaImageIO:BOOL=ON -D creaImageIO_DOC:BOOL=$3 CMakeCache.txt
+cmake -D BUILD_BBTK_PACKAGE_creaImageIO_DOXYGEN_DOC:BOOL=$3 CMakeCache.txt
+
+#cmake -D crea_DIR:PATH=$currentdir$2 -D BUILD_BBTK_PACKAGE_creaImageIO:BOOL=ON -D creaImageIO_DOC:BOOL=ON -D creaBruker_DIR:PATH=$currentdir$4 -D USE_GDCM:BOOL=ON CMakeCache.txt
+#cmake -D BBTK_DIR:PATH=$currentdir$3 CMakeCache.txt
cd ..