From 61e3822e163752c855f99d860b48f195de0b522d Mon Sep 17 00:00:00 2001
From: Don Gagne <don@thegagnes.com>
Date: Wed, 6 Aug 2014 12:38:12 -0700
Subject: [PATCH] Run macdeployqt from same dir as qmake

Handles case where multiple versions of QT are installed on machine.
---
 QGCInstaller.pri | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/QGCInstaller.pri b/QGCInstaller.pri
index fb99cda..72c19f4 100644
--- a/QGCInstaller.pri
+++ b/QGCInstaller.pri
@@ -19,7 +19,7 @@
 
 installer {
     MacBuild {
-        QMAKE_POST_LINK += && macdeployqt $${DESTDIR}/qgroundcontrol.app -dmg
+        QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt $${DESTDIR}/qgroundcontrol.app -dmg
     }
     
     WindowsBuild {