]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Thu, 9 Nov 2017 15:41:00 +0000 (10:41 -0500)
committerLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Thu, 9 Nov 2017 15:41:00 +0000 (10:41 -0500)
config/install.sh
config/install_ivq_mxe.sh

index cb96454fe07cdf31d0526acde6b92a2bff931ab9..4be5c6165e348c6d26d98acca61280d5ac409d26 100755 (executable)
@@ -16,6 +16,10 @@ while [[ "$#" -gt 1 ]]; do
         build_type="$2"
         shift
         ;;
+        -install_type)
+        install_type="$2"
+        shift
+        ;;
         *)
         # Do nothing
         ;;
@@ -26,40 +30,50 @@ done
 ## -- 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$
index 656cce106bba02335b9a6901b7e78ad5f27dc998..a1f74fec5c9a1dbd17f30b71d5add024b732b321 100755 (executable)
@@ -41,7 +41,7 @@ cd $prefix/mxe
 echo "MXE_TARGETS := x86_64-w64-mingw32.shared" > settings.mk
 
 ## -- Compile all
-make -j$cores -k qtbase vtk itk nsis
+make -j$cores -k boost qtbase vtk itk
 
 ## -- End
 cd $curr_dir