api.pro 2.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TEMPLATE = app
TARGET = apidoc
CONFIG -= qt
QT =
LIBS =
macx:CONFIG -= app_bundle

isEmpty(vcproj) {
    QMAKE_LINK = @: IGNORE THIS LINE
    OBJECTS_DIR =
    win32:CONFIG -= embed_manifest_exe
} else {
    CONFIG += console
    PHONY_DEPS = .
    phony_src.input = PHONY_DEPS
    phony_src.output = phony.c
    phony_src.variable_out = GENERATED_SOURCES
    phony_src.commands = echo int main() { return 0; } > phony.c
    phony_src.name = CREATE phony.c
    phony_src.CONFIG += combine
    QMAKE_EXTRA_COMPILERS += phony_src
}

24
25
26
27
28
include(../../qtcreator.pri)
QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)

VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )
29

30
srcdir = $$cleanPath($$PWD/..)
31
equals(QMAKE_DIR_SEP, /) {   # unix, mingw+msys
32
    QDOC = SRCDIR=$$srcdir OUTDIR=$$OUT_PWD/html QTC_VERSION=$$QTCREATOR_VERSION QTC_VERSION_TAG=$$VERSION_TAG $$QDOC_BIN
33
34
} else:win32-g++* {   # just mingw
    # The lack of spaces in front of the && is necessary!
35
    QDOC = set SRCDIR=$$srcdir&& set OUTDIR=$$OUT_PWD/html&& set QTC_VERSION=$$QTCREATOR_VERSION&& set QTC_VERSION_TAG=$$VERSION_TAG&& $$QDOC_BIN
36
} else {   # nmake
37
    QDOC = set SRCDIR=$$srcdir $$escape_expand(\\n\\t) \
38
           set OUTDIR=$$OUT_PWD/html $$escape_expand(\\n\\t) \
39
40
           set QTC_VERSION=$$QTCREATOR_VERSION $$escape_expand(\\n\\t) \
           set QTC_VERSION_TAG=$$VERSION_TAG $$escape_expand(\\n\\t) \
41
42
43
           $$QDOC_BIN
}

44
HELP_FILES     = $$PWD/qtcreator-dev.qdocconf
45
HELP_DEP_FILES = $$PWD/qtcreator-api.qdoc \
con's avatar
con committed
46
                 $$PWD/coding-style.qdoc \
47
                 $$PWD/external-tool-spec.qdoc \
48
                 $$PWD/qtcreator-dev.qdoc \
49
                 $$PWD/qtcreator-dev-wizards.qdoc \
50
                 $$PWD/qtcreator-dev.qdocconf
51
52
53
54
55
56
57
58
59
60

docs.name = CREATE API DOC
docs.input = HELP_FILES
docs.output = $$OUT_PWD/index.html
docs.depends = $$HELP_DEP_FILES
win32:docs.commands = $$QDOC \"${QMAKE_FILE_IN}\"
unix:docs.commands = $$QDOC ${QMAKE_FILE_IN}
docs.CONFIG += no_link
isEmpty(vcproj):docs.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += docs