2012-04-10 12:18:20 +00:00
|
|
|
contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
|
|
|
|
|
2012-04-03 17:27:55 +00:00
|
|
|
!have_target:!force_qt: CONFIG -= qt
|
|
|
|
|
2012-05-30 10:09:00 +00:00
|
|
|
!shared:!dll:!static:!staticlib {
|
|
|
|
contains(QT_CONFIG, static): CONFIG += static
|
|
|
|
else: CONFIG += shared
|
|
|
|
}
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
|
|
|
|
!isEmpty(QT_BREAKPAD_ROOT_PATH): \ # quick test first whether requested ...
|
2012-04-10 12:18:20 +00:00
|
|
|
!staticlib:!static:CONFIG(release, debug|release):have_target: \ # is it applicable?
|
2011-04-27 10:05:43 +00:00
|
|
|
!contains(TARGET, .*phony_target.*): \ # monster hack, you don't really see this here, right? ;)
|
|
|
|
system($$QT_BREAKPAD_ROOT_PATH/qtbreakpadsymbols --breakpad-exists) { # do we really have it?
|
2012-08-07 20:22:38 +00:00
|
|
|
CONFIG += breakpad force_debug_info
|
2011-04-27 10:05:43 +00:00
|
|
|
CONFIG -= no_debug_info separate_debug_info
|
2012-08-07 20:22:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
force_debug_info {
|
2011-04-27 10:05:43 +00:00
|
|
|
QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
|
|
|
|
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
|
|
|
|
QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
|
|
|
|
}
|
|
|
|
|
|
|
|
CONFIG(debug, debug|release):load(debug)
|
|
|
|
else:load(release)
|
|
|
|
debug_and_release:load(debug_and_release)
|
|
|
|
incredibuild_xge {
|
|
|
|
CONFIG -= incredibuild_xge
|
|
|
|
CONFIG = incredibuild_xge $$CONFIG
|
|
|
|
}
|
|
|
|
|
2012-08-07 20:22:38 +00:00
|
|
|
force_debug_info:win32 {
|
2011-07-05 14:15:52 +00:00
|
|
|
load(resolve_target)
|
2012-08-07 20:22:38 +00:00
|
|
|
QMAKE_CLEAN += $$replace(QMAKE_RESOLVED_TARGET, ...$, pdb) # for the debug case it is hardcoded in qmake
|
|
|
|
}
|
2012-07-12 09:16:53 +00:00
|
|
|
|
2012-08-07 20:22:38 +00:00
|
|
|
breakpad {
|
|
|
|
load(resolve_target)
|
2012-07-25 08:51:44 +00:00
|
|
|
DEBUGFILENAME = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET))
|
|
|
|
PROJECTPATH = $$shell_quote($$shell_path($$OUT_PWD))
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)
|
2012-07-12 09:16:53 +00:00
|
|
|
QMAKE_POST_LINK = $$QMAKE_POST_LINK$$quote($${QT_BREAKPAD_ROOT_PATH}$${QMAKE_DIR_SEP}qtbreakpadsymbols $$DEBUGFILENAME $$PROJECTPATH)
|
|
|
|
!isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote($$QMAKE_STRIP $$DEBUGFILENAME)
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
|
|
|
|
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
|
|
|
|
|
|
|
|
# Let every project have a standard GNU `check' target
|
|
|
|
!contains(QMAKE_EXTRA_TARGETS, check) {
|
2012-10-17 12:13:19 +00:00
|
|
|
contains(TEMPLATE, subdirs): \
|
|
|
|
prepareRecursiveTarget(check)
|
|
|
|
else: \
|
|
|
|
check.depends = first # `make check' implies build
|
2011-04-27 10:05:43 +00:00
|
|
|
QMAKE_EXTRA_TARGETS += check
|
|
|
|
}
|
|
|
|
|
2012-05-07 11:54:52 +00:00
|
|
|
!contains(QMAKE_EXTRA_TARGETS, docs) {
|
|
|
|
contains(TEMPLATE, subdirs) {
|
2012-10-22 10:17:19 +00:00
|
|
|
prepare_docs {
|
|
|
|
prepareRecursiveTarget(prepare_docs)
|
|
|
|
prepareRecursiveTarget(generate_docs)
|
|
|
|
docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
|
|
|
|
} else {
|
|
|
|
prepareRecursiveTarget(docs)
|
|
|
|
}
|
2012-05-07 11:54:52 +00:00
|
|
|
} else {
|
|
|
|
# apps and libs only generate docs if QMAKE_DOCS is set
|
|
|
|
!isEmpty(QMAKE_DOCS) {
|
|
|
|
!exists($$QMAKE_DOCS):error("Cannot find documentation specification file $$QMAKE_DOCS")
|
|
|
|
qtPrepareTool(QDOC, qdoc)
|
|
|
|
for(index, QMAKE_DOCS_INDEX):QDOC_INDEX += -indexdir $$index
|
2012-10-08 15:19:14 +00:00
|
|
|
!isEmpty(QMAKE_DOCS_OUTPUTDIR):QMAKE_DOCS_OPTIONS += -outputdir $$QMAKE_DOCS_OUTPUTDIR
|
2012-05-15 07:47:47 +00:00
|
|
|
!isEmpty(QMAKE_DOCS_INSTALLDIR):QMAKE_DOCS_OPTIONS += -installdir $$QMAKE_DOCS_INSTALLDIR
|
2012-10-22 10:17:19 +00:00
|
|
|
doc_command = $$QDOC $$QMAKE_DOCS_OPTIONS $$QDOC_INDEX $$QMAKE_DOCS
|
|
|
|
|
|
|
|
prepare_docs {
|
|
|
|
prepare_docs.commands += $$doc_command -prepare -no-link-errors
|
|
|
|
generate_docs.commands += $$doc_command -generate
|
|
|
|
docs.depends += generate_docs
|
|
|
|
} else {
|
|
|
|
docs.commands += $$doc_command
|
|
|
|
}
|
2012-05-07 11:54:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
QMAKE_EXTRA_TARGETS += docs
|
2012-10-22 10:17:19 +00:00
|
|
|
prepare_docs: QMAKE_EXTRA_TARGETS += prepare_docs generate_docs
|
2012-05-07 11:54:52 +00:00
|
|
|
}
|
2012-10-17 13:08:39 +00:00
|
|
|
|
|
|
|
!contains(QMAKE_EXTRA_TARGETS, install_docs) {
|
|
|
|
contains(TEMPLATE, subdirs) {
|
|
|
|
prepareRecursiveTarget(install_docs)
|
|
|
|
prepareRecursiveTarget(uninstall_docs)
|
|
|
|
}
|
|
|
|
QMAKE_EXTRA_TARGETS += install_docs uninstall_docs
|
|
|
|
}
|