Welcome to mirror list, hosted at ThFree Co, Russian Federation.

detect_qmake.sh « autobuild « tools - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c56fb9ca06a6fc2afd1f40b53cafef620e0f2147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Add your path into this array
KNOWN_QMAKE_PATHS=( \
  /Users/Alex/QtSDK/Desktop/Qt/4.8.1/gcc/bin \
  /Users/siarheirachytski/QtSDK/Desktop/Qt/474/gcc/bin \
  /Developer/QtSDK/Desktop/Qt/4.8.0/gcc/bin \
)

# Prints path to directory with found qmake binary or prints nothing if not found
# Returns 1 in case of not found and 0 in case of success
PrintQmakePath() {
  local QMAKE_PATH
  QMAKE_PATH=$(which qmake)
  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
        echo "${path}"
        return 0
      fi
    done
  else
    echo "${QMAKE_PATH}"
    return 0
  fi
  # Not found
  return 1
}