-currentdir=`pwd`
-dirInstall=$currentdir/tmpCreaTools_INSTALL/$1
+currentdir=$3
+
+dirInstall=$3/tmpCreaTools_INSTALL/$1
+
+echo dirInstall
+echo $dirInstall
+
+# needed later
mkdir $2
+
cd $2
-cmake -G"Unix Makefiles" -H$currentdir/$1 -B$currentdir/$2
+
+cmake -G"Unix Makefiles" -H$currentdir/$1 -B$2
+
cmake -D INCLUDE_CTEST:BOOL=ON -D CMAKE_INSTALL_PREFIX:PATH=$dirInstall CMakeCache.txt
-cd ..
+#echo "only for misinstalled vtk"
+#cmake -D INCLUDE_CTEST:BOOL=ON -D CMAKE_INSTALL_PREFIX:PATH=$dirInstall -D VTK_DIR:PATH=/usr/local/lib/vtk-5.4 CMakeCache.txt
+cd ..