]> Creatis software - cpPlugins.git/blobdiff - third_party_installers/cpPlugins_Install_VTK.sh
...
[cpPlugins.git] / third_party_installers / cpPlugins_Install_VTK.sh
index 0812809a93ab0b6645a0308785c2fa8980f99749..d5e99585709c8d9198205c3d286b96cd0a046a5a 100755 (executable)
@@ -20,7 +20,6 @@ function abspath()
 
 ## Some configuration variables
 number_of_processes="-j4"
-comp_type=Debug
 
 ## Locate cmake executable
 cmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin")
@@ -61,7 +60,7 @@ if [ ! -x $qmake_exec ]; then
 fi
 
 ## Check input parameters and process inputs (if needed)
-if [ "$#" -eq 1 ]; then
+if [ "$#" -eq 2 ]; then
     valid_extensions=("zip" "tar" "tar.gz" "tar.bz2")
     actual_ext=""
     for ext in ${valid_extensions[@]}; do
@@ -98,11 +97,13 @@ if [ "$#" -eq 1 ]; then
         exit 1
     fi
     echo "done!"
-elif [ "$#" -eq 2 ]; then
+    build_type=$2
+elif [ "$#" -eq 3 ]; then
     source_dir=`dirname $1`
     build_dir=`dirname $2`
+    build_type=$3
 else
-    echo "Usage: [vtk_package] or [vtk_source_dir vtk_build_dir]" 
+    echo "Usage: [vtk_package] or [vtk_source_dir vtk_build_dir] [build_type]
 fi
 
 echo "Given source dir : \"$source_dir\""
@@ -117,7 +118,7 @@ $cmake_exec \
     -DBUILD_SHARED_LIBS:BOOL=ON \
     -DBUILD_TESTING:BOOL=OFF \
     -DQT_QMAKE_EXECUTABLE:PATH=$qmake_exec \
-    -DCMAKE_BUILD_TYPE:STRING=$comp_type \
+    -DCMAKE_BUILD_TYPE:STRING=$build_type \
     -DModule_vtkGUISupportQt:BOOL=ON \
     -DModule_vtkGUISupportQtOpenGL:BOOL=ON \
     -DModule_vtkGUISupportQtSQL:BOOL=OFF \