diff --git a/qtcreator.pro b/qtcreator.pro
index 09b416cb5737eb4acda24318781c3057d4dab79d..39df9754b7d995515a3f9e621e02925e8c11cf3b 100644
--- a/qtcreator.pro
+++ b/qtcreator.pro
@@ -25,6 +25,8 @@ macx {
         -executable="$${APPBUNDLE}/Contents/MacOS/qmlprofiler"
     deployqt.depends = default
     bindist.commands = 7z a -mx9 $$OUT_PWD/qtcreator$(INSTALL_POSTFIX).7z "$$OUT_PWD/bin/Qt Creator.app/"
+    dmg.commands = $$PWD/scripts/makedmg.sh $$OUT_PWD/bin qt-creator$(INSTALL_POSTFIX).dmg
+    QMAKE_EXTRA_TARGETS += dmg
 } else {
     deployqt.commands = $$PWD/scripts/deployqt.py -i $(INSTALL_ROOT)
     win32:deployqt.commands ~= s,/,\\\\,g
diff --git a/scripts/makedmg.sh b/scripts/makedmg.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f9e877ef642cd13de3d62728261e72e64f6d87f8
--- /dev/null
+++ b/scripts/makedmg.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+[ $# -lt 2 ] && echo "Usage: $(basename $0) <folder> <name.dmg>" && exit 2
+[ $(uname -s) != "Darwin" ] && echo "Run this script on Mac OS X" && exit 2;
+sourceFolder="$1"
+intermediateFolder=$(mktemp -d "/tmp/packagedir.XXXXX")
+finalDMGName="$2"
+title="Qt Creator"
+
+echo Preparing image artifacts...
+cp -a "${sourceFolder}/" "${intermediateFolder}"
+ln -s /Applications "${intermediateFolder}"
+cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt"
+echo Creating image...
+hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub
+
+# clean up
+rm -rf "${intermediateFolder}"