From d1bb751a38b70268f208998ce817b549e07a2cf5 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 23 May 2013 22:42:16 +0200 Subject: introduce no_app_bundle.pri - it tries to copy the needed qt_menu.nib dir Change-Id: I04fe564f62e16847a417e47c9a0719c043c1f027 Reviewed-by: Karsten Heimrich --- no_app_bundle.pri | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 no_app_bundle.pri (limited to 'no_app_bundle.pri') diff --git a/no_app_bundle.pri b/no_app_bundle.pri new file mode 100644 index 000000000..631317193 --- /dev/null +++ b/no_app_bundle.pri @@ -0,0 +1,28 @@ +!isEmpty(NO_APP_BUNDLE_PRI_INCLUDED) { + error("no_app_bundle.pri already included") +} +NO_APP_BUNDLE_PRI_INCLUDED = 1 + +equals(TEMPLATE, app):CONFIG -= app_bundle + +isEqual(QT_MAJOR_VERSION, 4):static:contains(QT, gui) { + isEmpty(DESTDIR) { + MY_DEST_DIR=$$OUT_PWD + } else { + MY_DEST_DIR=$$DESTDIR + } + + !exists($$(MY_DEST_DIR)/qt_menu.nib) { + # try to get the qt_menu.nib path from the environment variable + isEmpty(QT_MENU_NIB_DIR): QT_MENU_NIB_DIR = $$(QT_MENU_NIB_DIR) + + # everything which has not the IFW_APP_PATH as target can try to copy it from there + exists($$IFW_APP_PATH/qt_menu.nib):QT_MENU_NIB_DIR=$$IFW_APP_PATH/qt_menu.nib + + isEmpty(QT_MENU_NIB_DIR) { + warning(Please call qmake with QT_MENU_NIB_DIR=/src/gui/mac/qt_menu.nib) + } else { + system($$QMAKE_COPY -r $$quote($$QT_MENU_NIB_DIR) $$quote($$MY_DEST_DIR)) + } + } +} -- cgit v1.2.3