From: Leonardo Florez-Valencia Date: Mon, 25 Apr 2016 17:25:43 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~175 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9f75caae13f5f233625b434b5f98a77f502ae4fa;p=cpPlugins.git ... --- diff --git a/third_party_installers/cpPlugins_Install_ITK.sh b/third_party_installers/cpPlugins_Install_ITK.sh index 8af7e09..baf70eb 100755 --- a/third_party_installers/cpPlugins_Install_ITK.sh +++ b/third_party_installers/cpPlugins_Install_ITK.sh @@ -5,13 +5,20 @@ number_of_processes="-j4" comp_type=Debug ## Locate cmake executable -cmake_exec="/usr/bin/cmake" -if [ ! -x $cmake_exec ]; then - cmake_exec="/usr/local/bin/cmake" -fi -if [ ! -x $cmake_exec ]; then - cmake_exec="${HOME}/local/bin/cmake" -fi +cmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") +cmake_exec="" +cmake_ver="" +for loc in ${cmake_locations[@]}; do + cmake_file="$loc/cmake" + if [ -x $cmake_file ]; then + str=`$cmake_file --version | grep version` + version=${str:14} + if [ "$cmake_ver" \< "$version" ]; then + cmake_ver=$version + cmake_exec=$cmake_file + fi + fi +done if [ ! -x $cmake_exec ]; then echo "$0: modify this script to put the correct location of cmake." exit 1 diff --git a/third_party_installers/cpPlugins_Install_QT4.sh b/third_party_installers/cpPlugins_Install_QT4.sh index 7f761cf..a80a12d 100755 --- a/third_party_installers/cpPlugins_Install_QT4.sh +++ b/third_party_installers/cpPlugins_Install_QT4.sh @@ -2,8 +2,12 @@ ## Some configuration variables number_of_processes="-j4" -comp_type=-debug-and-release -# particular_options=-no-framework +comp_type=-debug +platform=`uname` +particular_options="" +if [ "$platform" == "Darwin" ]; then + particular_options=-no-framework +fi ## Check input parameters and process inputs (if needed) if [ "$#" -eq 1 ]; then diff --git a/third_party_installers/cpPlugins_Install_VTK.sh b/third_party_installers/cpPlugins_Install_VTK.sh index a1ed2fc..7cce532 100755 --- a/third_party_installers/cpPlugins_Install_VTK.sh +++ b/third_party_installers/cpPlugins_Install_VTK.sh @@ -5,81 +5,42 @@ number_of_processes="-j4" comp_type=Debug ## Locate cmake executable -cmake_exec="/usr/bin/cmake" -if [ ! -x $cmake_exec ]; then - cmake_exec="/usr/local/bin/cmake" -fi -if [ ! -x $cmake_exec ]; then - cmake_exec="${HOME}/local/bin/cmake" -fi +cmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") +cmake_exec="" +cmake_ver="" +for loc in ${cmake_locations[@]}; do + cmake_file="$loc/cmake" + if [ -x $cmake_file ]; then + str=`$cmake_file --version | grep version` + version=${str:14} + if [ "$cmake_ver" \< "$version" ]; then + cmake_ver=$version + cmake_exec=$cmake_file + fi + fi +done if [ ! -x $cmake_exec ]; then echo "$0: modify this script to put the correct location of cmake." exit 1 fi ## Locate qmake executable -qmake_dirs=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") +qmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") qmake_exec="" -for dir in ${qmake_dirs[@]}; do - echo $dir +for loc in ${qmake_locations[@]}; do + qmake_file="$loc/qmake" + if [ -x $qmake_file ]; then + str=`$qmake_file --version | grep Using\ Qt\ version` + version=`expr substr "$str" 18 3` + if [ "$version" == "4.8" ]; then + qmake_exec=$qmake_file + fi + fi done - - -# qmake_exec="/usr/bin/qmake" -# number="0" -# if [ -x $qmake_exec ]; then -# version=`$qmake_exec --version | grep Using\ Qt\ version` -# number=`expr substr "$version" 18 1` -# else -# qmake_exec="" -# fi -# if [ "$number" -ne "4" ]; then -# qmake_exec="" -# fi -# echo 1$qmake_exec - -# if [ "x$qmake_exec" != "x" ]; then -# qmake_exec="/usr/local/bin/qmake" -# if [ ! -x $qmake_exec ]; then -# number="0" -# if [ -x $qmake_exec ]; then -# version=`$qmake_exec --version | grep Using\ Qt\ version` -# number=`expr substr "$version" 18 1` -# fi -# if [ "$number" -ne "4" ]; then -# qmake_exec="" -# fi -# else -# qmake_exec="" -# fi -# else -# qmake_exec="" -# fi -# if [ "x$qmake_exec" != "x" ]; then -# qmake_exec="${HOME}/local/bin/qmake" -# if [ ! -x $qmake_exec ]; then -# number="0" -# if [ -x $qmake_exec ]; then -# version=`$qmake_exec --version | grep Using\ Qt\ version` -# number=`expr substr "$version" 18 1` -# fi -# echo $number -# if [ "$number" -ne "4" ]; then -# qmake_exec="" -# fi -# else -# qmake_exec="" -# fi -# else -# qmake_exec="" -# fi -# if [ ! -x $qmake_exec ]; then -# echo "$0: modify this script to put the correct location of qmake." -# exit 1 -# fi -# echo $qmake_exec - -exit 1 +if [ ! -x $qmake_exec ]; then + echo "$0: modify this script to put the correct location of qmake." + exit 1 +fi ## Check input parameters and process inputs (if needed) if [ "$#" -eq 1 ]; then