From 1485c29aaa84b01cdc7ebf0f599cd0a6fbbe5471 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Thu, 6 Dec 2012 20:01:12 -0800 Subject: [PATCH] Fixed QMAKE detection in build scripts --- tools/autobuild/build.sh | 4 ++-- tools/autobuild/detect_qmake.sh | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/autobuild/build.sh b/tools/autobuild/build.sh index 570b6bb72d..56ea2006e9 100644 --- a/tools/autobuild/build.sh +++ b/tools/autobuild/build.sh @@ -29,14 +29,14 @@ GetCPUCores() { BuildQt() { ( # set qmake path - PATH="$(PrintQmakePath):$PATH" || ( echo "ERROR: qmake was not found, please add it to your PATH or into the tools/autobuild/detect_qmake.sh"; exit 1 ) + QMAKE="$(PrintQmakePath)" || ( echo "ERROR: qmake was not found, please add it to your PATH or into the tools/autobuild/detect_qmake.sh"; exit 1 ) SHADOW_DIR="$1" MKSPEC="$2" QMAKE_PARAMS="$3" mkdir -p "$SHADOW_DIR" cd "$SHADOW_DIR" - qmake -r "$QMAKE_PARAMS" -spec "$MKSPEC" "$LOCAL_DIRNAME/../../omim.pro" + "$QMAKE" -r "$QMAKE_PARAMS" -spec "$MKSPEC" "$LOCAL_DIRNAME/../../omim.pro" # make clean > /dev/null || true make -j $(GetCPUCores) ) diff --git a/tools/autobuild/detect_qmake.sh b/tools/autobuild/detect_qmake.sh index 221bf185d8..856e1f77d2 100644 --- a/tools/autobuild/detect_qmake.sh +++ b/tools/autobuild/detect_qmake.sh @@ -1,7 +1,8 @@ # Add your path into this array KNOWN_QMAKE_PATHS=( \ - ~/QtSDK/Desktop/Qt/4.8.1/gcc/bin \ - /Developer/QtSDK/Desktop/Qt/4.8.1/gcc/bin \ + ~/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake \ + /Developer/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake \ + ~/Developer/Qt-4.8.4/bin/qmake \ ) # Prints path to directory with found qmake binary or prints nothing if not found @@ -12,7 +13,7 @@ PrintQmakePath() { if [ $? -ne 0 ]; then # qmake binary is not in the path, look for it in the given array for path in "${KNOWN_QMAKE_PATHS[@]}"; do - if [ -f "${path}/qmake" ]; then + if [ -f "${path}" ]; then echo "${path}" return 0 fi