From d066c6ed84dfd46e2bb9aee632b09229b6c3113e Mon Sep 17 00:00:00 2001 From: dismine Date: Sat, 4 Oct 2014 09:55:52 +0300 Subject: [PATCH] Use gobjcopy on mac. --HG-- branch : develop --- src/app/app.pro | 14 +++++++++++--- src/libs/qmuparser/qmuparser.pro | 14 +++++++++++--- src/libs/vpropertyexplorer/vpropertyexplorer.pro | 14 +++++++++++--- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/app/app.pro b/src/app/app.pro index 786622715..084bd66dd 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -253,7 +253,15 @@ INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer DEPENDPATH += $${PWD}/../libs/vpropertyexplorer CONFIG(release, debug|release){ - unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(TARGET) $(TARGET).debug && - unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) && - unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET) + unix:macx{ + # On Mac + QMAKE_POST_LINK += gobjcopy --only-keep-debug $(TARGET) $(TARGET).debug && + QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) && + QMAKE_POST_LINK += gobjcopy --add-gnu-debuglink $(TARGET).debug $(TARGET) + } else { + # On Linux + unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(TARGET) $(TARGET).debug && + unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) && + unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET) + } } diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index f2c42b42f..87dc3e3c7 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -111,7 +111,15 @@ CONFIG(debug, debug|release){ DEFINES += QT_NO_DEBUG_OUTPUT unix:QMAKE_CXXFLAGS_RELEASE += -g - unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug && - unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && - unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET) + unix:macx{ + # On Mac + QMAKE_POST_LINK += gobjcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug && + QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && + QMAKE_POST_LINK += gobjcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET) + } else { + # On Linux + unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug && + unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && + unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET) + } } diff --git a/src/libs/vpropertyexplorer/vpropertyexplorer.pro b/src/libs/vpropertyexplorer/vpropertyexplorer.pro index cea6e669f..7672a4d40 100644 --- a/src/libs/vpropertyexplorer/vpropertyexplorer.pro +++ b/src/libs/vpropertyexplorer/vpropertyexplorer.pro @@ -154,7 +154,15 @@ CONFIG(debug, debug|release){ DEFINES += QT_NO_DEBUG_OUTPUT unix:QMAKE_CXXFLAGS_RELEASE += -g - unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug && - unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && - unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET) + unix:macx{ + # On Mac + QMAKE_POST_LINK += gobjcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug && + QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && + QMAKE_POST_LINK += gobjcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET) + } else { + # On Linux + unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug && + unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && + unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET) + } }