Skip to content

Commit

Permalink
make documentation generation work in out-of-source builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaine committed Jan 7, 2015
1 parent 72137c8 commit d02bf24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/doc.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ windows {
}

# Build rules
docs.commands = $${DOXYFILTER} -g && $${DOXYFILTER}
docs.commands = $${DOXYFILTER} -g $${PWD} && $${DOXYFILTER}
docs.depends = $${TARGET}

QMAKE_CLEAN += Doxyfile doxygen_sqlite3.db
Expand Down
10 changes: 8 additions & 2 deletions doc/doxyfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char *argv[])

if (argc == 1)
return QProcess::execute("doxygen");
else if (argc != 2) {
else if (argc < 2) {
usage();
return 1;
}
Expand All @@ -68,14 +68,20 @@ int main(int argc, char *argv[])
}
QString code = QString::fromUtf8(process.readAll());

QString docDir = (argc > 2) ? (QString::fromLocal8Bit(argv[2]) + "/") : "";
QStringList docFiles = QStringList() << "index.doc" << "using.doc" << "xep.doc" << "../src";
for (int i = 0; i < docFiles.size(); ++i) {
docFiles[i] = docDir + docFiles[i];
}

// adjust Doxyfile
setField(code, "ALPHABETICAL_INDEX", "NO");
setField(code, "EXCLUDE_PATTERNS", "*/moc_* */mod_* */qdnslookup* */*_p.h */QXmppCodec.cpp */QXmppSasl.cpp");
setField(code, "FULL_PATH_NAMES", "NO");
setField(code, "HIDE_UNDOC_CLASSES", "YES");
setField(code, "GENERATE_LATEX", "NO");
setField(code, "HTML_TIMESTAMP", "NO");
setField(code, "INPUT", "index.doc using.doc xep.doc ../src");
setField(code, "INPUT", docFiles.join(" "));
setField(code, "INPUT_FILTER", QString::fromLocal8Bit(argv[0]));
setField(code, "PROJECT_NAME", "QXmpp");
setField(code, "PROJECT_NUMBER", QString("Version: %1.%2.%3").arg(
Expand Down

0 comments on commit d02bf24

Please sign in to comment.