diff --git a/src/app/app.pro b/src/app/app.pro index ff1c73884..7e6b65a9e 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -146,6 +146,8 @@ CONFIG(debug, debug|release){ # Release DEFINES += QT_NO_DEBUG_OUTPUT + QMAKE_CXXFLAGS_RELEASE += -g + #local revision number for using in version HG_REV=$$system(hg parents --template '{rev}') isEmpty(HG_REV){ @@ -244,3 +246,9 @@ else:unix: LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvproper 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) +} diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index c60eb473a..e392e091e 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -106,4 +106,10 @@ CONFIG(debug, debug|release){ }else{ # Release DEFINES += QT_NO_DEBUG_OUTPUT + + 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) } diff --git a/src/libs/vpropertyexplorer/vpropertyexplorer.pro b/src/libs/vpropertyexplorer/vpropertyexplorer.pro index e2fea1fbc..79d3e2364 100644 --- a/src/libs/vpropertyexplorer/vpropertyexplorer.pro +++ b/src/libs/vpropertyexplorer/vpropertyexplorer.pro @@ -149,4 +149,10 @@ CONFIG(debug, debug|release){ }else{ # Release DEFINES += QT_NO_DEBUG_OUTPUT + + 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) }