Use gobjcopy on mac.

--HG--
branch : develop
This commit is contained in:
dismine 2014-10-04 09:55:52 +03:00
parent 11641de911
commit d066c6ed84
3 changed files with 33 additions and 9 deletions

View File

@ -253,7 +253,15 @@ INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer
DEPENDPATH += $${PWD}/../libs/vpropertyexplorer DEPENDPATH += $${PWD}/../libs/vpropertyexplorer
CONFIG(release, debug|release){ CONFIG(release, debug|release){
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 += objcopy --only-keep-debug $(TARGET) $(TARGET).debug &&
unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) && unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) &&
unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET) unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET)
}
} }

View File

@ -111,7 +111,15 @@ CONFIG(debug, debug|release){
DEFINES += QT_NO_DEBUG_OUTPUT DEFINES += QT_NO_DEBUG_OUTPUT
unix:QMAKE_CXXFLAGS_RELEASE += -g unix:QMAKE_CXXFLAGS_RELEASE += -g
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 += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug &&
unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && 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:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET)
}
} }

View File

@ -154,7 +154,15 @@ CONFIG(debug, debug|release){
DEFINES += QT_NO_DEBUG_OUTPUT DEFINES += QT_NO_DEBUG_OUTPUT
unix:QMAKE_CXXFLAGS_RELEASE += -g unix:QMAKE_CXXFLAGS_RELEASE += -g
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 += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug &&
unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) && 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:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET)
}
} }