diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2009-11-22 15:37:16 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2009-11-22 18:28:05 +0300 |
commit | e96809e15d44e36001e4474c128cffe362623a1a (patch) | |
tree | c7804e445098321fda8395b89f43080b6774287f /symbols.pri | |
parent | c365ac635217da1e1f3bcb7306ba614dbc5e3f1f (diff) |
Extract .dSYM debug symbols on Mac OS X when using CONFIG=symbols.
Diffstat (limited to 'symbols.pri')
-rw-r--r-- | symbols.pri | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/symbols.pri b/symbols.pri new file mode 100644 index 000000000..dfdab2078 --- /dev/null +++ b/symbols.pri @@ -0,0 +1,33 @@ +CONFIG(symbols):macx { + CONFIG(debug, debug|release) { + DSYM_DESTDIR = $${PWD}/debug + } + + CONFIG(release, debug|release) { + DSYM_DESTDIR = $${PWD}/release + } + + contains(TEMPLATE, 'app') { + DSYM_TARGET_FULLPATH = ${TARGET} + DSYM_OUT = $${DSYM_DESTDIR}/symbols/${QMAKE_TARGET}.dSYM + CONFIG(app_bundle) { + DSYM_OUT = $${DSYM_DESTDIR}/symbols/${QMAKE_TARGET}.app.dSYM + } + } + + contains(TEMPLATE, 'lib') { + DSYM_TARGET_FULLPATH = $${DESTDIR}/${TARGET} + DSYM_OUT = $${DSYM_DESTDIR}/symbols/${TARGET}.dSYM + } + + dsym.target = $${DSYM_OUT} + dsym.commands = $(MKDIR) $${DSYM_DESTDIR}/symbols/ && dsymutil $${DSYM_TARGET_FULLPATH} -o $${DSYM_OUT} + dsym.depends = $${DSYM_TARGET_FULLPATH} + dsym.CONFIG = recursive + QMAKE_EXTRA_TARGETS *= dsym + QMAKE_DISTCLEAN *= $${DSYM_OUT} + + !CONFIG(staticlib) { + ALL_DEPS += $${DSYM_OUT} + } +} |