build_type="$2"
shift
;;
+ -install_type)
+ install_type="$2"
+ shift
+ ;;
*)
# Do nothing
;;
## -- Check command line options
if \
[ -z "$prefix" ] || \
- [ -z "$cores" ] || \
[ -z "$build_type" ] ; then
- (>&2 echo "Usage: $0 -prefix [dir] -build_type [Release/Debug] -cores [n]")
+ (>&2 echo "Usage: $0 -prefix [dir] [-build_type [Release/Debug]] [-cores [n]] [-install_type [compile/install]]}")
exit 1
fi
-# ccmake=`find $prefix -type f -name "ccmake"`
-# qt5config=`find $prefix -type f -name "Qt5Config.cmake"`
-# use_vtk=`find $prefix -type f -name "UseVTK.cmake"`
-# use_itk=`find $prefix -type f -name "UseITK.cmake"`
-# cmake=`dirname $ccmake`/cmake
+if [ -z "$cores" ] ; then
+ cores="1"
+fi
+if [ -z "$build_type" ] ; then
+ build_type="Release"
+fi
+if [ -z "$install_type" ] ; then
+ install_type="install"
+fi
+
+cmake=`find $prefix -type f -name "cmake" | grep bin`
+qt5config=`find $prefix -type f -name "Qt5Config.cmake"`
+use_vtk=`find $prefix -type f -name "UseVTK.cmake"`
+use_itk=`find $prefix -type f -name "UseITK.cmake"`
-# ## -- Current dir
-# curr_dir=`pwd`
-# cd ..
+## -- Current dir
+curr_dir=`pwd`
+cd ..
-# ## -- Configure, build and install Qt5
-# mkdir -p build
-# cd build
-# $cmake \
-# -DCMAKE_BUILD_TYPE:STRING=$build_type \
-# -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-# -DcpPlugins_BUILD:BOOL=ON \
-# -DcpPlugins_BUILD_APPLICATIONS:BOOL=ON \
-# -DcpPlugins_BUILD_ivq:BOOL=ON \
-# -DcpPlugins_BUILD_tclap:BOOL=ON \
-# -DITK_DIR:PATH=`dirname $use_itk` \
-# -DVTK_DIR:PATH=`dirname $use_vtk` \
-# -DQt5_DIR:PATH=`dirname $qt5config` \
-# ..
-# make -s -j$cores -k
-# make -s -j -k install
+## -- Configure, build and install Qt5
+mkdir -p build
+cd build
+$cmake \
+ -DCMAKE_BUILD_TYPE:STRING=$build_type \
+ -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
+ -DcpPlugins_BUILD:BOOL=ON \
+ -DcpPlugins_BUILD_APPLICATIONS:BOOL=ON \
+ -DcpPlugins_BUILD_ivq:BOOL=ON \
+ -DcpPlugins_BUILD_tclap:BOOL=ON \
+ -DITK_DIR:PATH=`dirname $use_itk` \
+ -DVTK_DIR:PATH=`dirname $use_vtk` \
+ -DQt5_DIR:PATH=`dirname $qt5config` \
+ ..
+make -j$cores -k
+if [[ "$install_type" == 'install' ]] ; then
+ make -j -k install
+fi
-# ## -- End
-# cd $curr_dir
+## -- End
+cd $curr_dir
## eof - $RCSfile$