From f9db9b9f0ac53c508096317d2c8c11e14cdb9df3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leonardo=20Fl=C3=B3rez-Valencia?= Date: Thu, 9 Nov 2017 10:41:00 -0500 Subject: [PATCH] ... --- config/install.sh | 70 +++++++++++++++++++++++---------------- config/install_ivq_mxe.sh | 2 +- 2 files changed, 43 insertions(+), 29 deletions(-) diff --git a/config/install.sh b/config/install.sh index cb96454..4be5c61 100755 --- a/config/install.sh +++ b/config/install.sh @@ -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$ diff --git a/config/install_ivq_mxe.sh b/config/install_ivq_mxe.sh index 656cce1..a1f74fe 100755 --- a/config/install_ivq_mxe.sh +++ b/config/install_ivq_mxe.sh @@ -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 -- 2.45.1