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?
|
|
|
|
CONFIG += breakpad
|
|
|
|
CONFIG -= no_debug_info separate_debug_info
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
breakpad {
|
2011-07-05 14:15:52 +00:00
|
|
|
load(resolve_target)
|
2011-04-27 10:05:43 +00:00
|
|
|
win32 {
|
2011-07-05 14:15:52 +00:00
|
|
|
DEBUGFILENAME = $${QMAKE_RESOLVED_TARGET}
|
|
|
|
PDBFILENAME = $$replace(QMAKE_RESOLVED_TARGET, ...$, pdb)
|
2011-04-27 10:05:43 +00:00
|
|
|
DEBUGFILENAME ~= s,/,\\,
|
|
|
|
PDBFILENAME ~= s,/,\\,
|
|
|
|
QMAKE_CLEAN += $$PDBFILENAME # for the debug case it is hardcoded in qmake
|
|
|
|
} else {
|
2011-07-05 14:15:52 +00:00
|
|
|
DEBUGFILENAME = $$QMAKE_RESOLVED_TARGET
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PROJECTPATH = $$OUT_PWD
|
|
|
|
win32:PROJECTPATH ~= s,/,\\,
|
|
|
|
|
|
|
|
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)
|
|
|
|
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\")
|
|
|
|
}
|
|
|
|
|
|
|
|
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
|
|
|
|
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
|
|
|
|
|
|
|
|
# Let every project have a standard GNU `check' target
|
|
|
|
!contains(QMAKE_EXTRA_TARGETS, check) {
|
|
|
|
# `make check' should iterate through all subdirs
|
2011-11-14 13:38:38 +00:00
|
|
|
# (except those with no_default_target or no_check_target)
|
2011-04-27 10:05:43 +00:00
|
|
|
contains(TEMPLATE, subdirs) {
|
2011-08-11 01:53:10 +00:00
|
|
|
for(subdir, SUBDIRS) {
|
|
|
|
subdir_config=$$eval($${subdir}.CONFIG)
|
2011-11-14 13:38:38 +00:00
|
|
|
!contains(subdir_config, no_check_target):!contains(subdir_config, no_default_target):check.recurse += $$subdir
|
2011-08-11 01:53:10 +00:00
|
|
|
unset(subdir_config)
|
|
|
|
}
|
2011-11-14 13:38:38 +00:00
|
|
|
!isEmpty(check.recurse) {
|
|
|
|
# setup the recurse target only when there is to recurse into
|
|
|
|
check.CONFIG = recursive
|
|
|
|
check.recurse_target = check
|
|
|
|
}
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|
|
|
|
# `make check' should imply building the project
|
|
|
|
else {
|
|
|
|
check.depends = first
|
|
|
|
}
|
|
|
|
QMAKE_EXTRA_TARGETS += check
|
|
|
|
}
|
|
|
|
|
2012-05-07 11:54:52 +00:00
|
|
|
# Let every project have a 'docs' target
|
|
|
|
!contains(QMAKE_EXTRA_TARGETS, docs) {
|
|
|
|
contains(TEMPLATE, subdirs) {
|
|
|
|
# `make docs' should iterate through all subdirs
|
|
|
|
# (except those with no_default_target or no_docs_target)
|
|
|
|
!contains(CONFIG, no_docs_target):for(subdir, SUBDIRS) {
|
|
|
|
subdir_config = $$eval($${subdir}.CONFIG)
|
|
|
|
!contains(subdir_config, no_docs_target):!contains(subdir_config, no_default_target):docs.recurse += $$subdir
|
|
|
|
unset(subdir_config)
|
|
|
|
}
|
|
|
|
!isEmpty(docs.recurse) {
|
|
|
|
# setup the recurse target only when there is something to recurse into
|
|
|
|
docs.CONFIG = recursive
|
|
|
|
docs.recurse_target = docs
|
|
|
|
}
|
|
|
|
} 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-05-15 07:47:47 +00:00
|
|
|
!isEmpty(QMAKE_DOCS_INSTALLDIR):QMAKE_DOCS_OPTIONS += -installdir $$QMAKE_DOCS_INSTALLDIR
|
2012-05-07 11:54:52 +00:00
|
|
|
docs.commands += $$QDOC $$QMAKE_DOCS_OPTIONS $$QDOC_INDEX $$QMAKE_DOCS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QMAKE_EXTRA_TARGETS += docs
|
|
|
|
}
|