mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
fixed and simplified generation of doxygen docs with qmake
This commit is contained in:
1902
docs/Doxyfile.qmake
Normal file
1902
docs/Doxyfile.qmake
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,49 +1,21 @@
|
||||
# Copyright (C) 2013 VATSIM community / contributors
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||
#
|
||||
# Black magic to get qmake to generate a build target to process the file
|
||||
# Doxyfile.cmake.in and then invoke doxygen.
|
||||
|
||||
TEMPLATE = lib
|
||||
CONFIG += staticlib
|
||||
CONFIG -= qt
|
||||
|
||||
COPY_FILES += qconfigure.pl
|
||||
CONFIGURE_IN += Doxyfile.cmake.in
|
||||
DOXYFILE = Doxyfile
|
||||
|
||||
defineReplace(qconfigureReplace) {
|
||||
file = $$1
|
||||
file = $$basename(file)
|
||||
file = $$replace(file, .cmake.in, )
|
||||
return($$file)
|
||||
}
|
||||
|
||||
win32: copy.commands = copy ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
||||
else: copy.commands = cp ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
||||
copy.CONFIG = no_link
|
||||
copy.input = COPY_FILES
|
||||
copy.output = ${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
|
||||
copy.name = COPY
|
||||
QMAKE_EXTRA_COMPILERS += copy
|
||||
|
||||
qconfigure.commands = perl qconfigure.pl ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} \
|
||||
CMAKE_CURRENT_BINARY_DIR=$$OUT_PWD \
|
||||
CMAKE_CURRENT_SOURCE_DIR=$$PWD
|
||||
qconfigure.CONFIG = no_link
|
||||
qconfigure.depends = qconfigure.pl
|
||||
qconfigure.input = CONFIGURE_IN
|
||||
qconfigure.name = QCONFIGURE
|
||||
qconfigure.output_function = qconfigureReplace
|
||||
QMAKE_EXTRA_COMPILERS += qconfigure
|
||||
DOXYFILE = Doxyfile.qmake
|
||||
|
||||
DOXY_INPUT = .
|
||||
doxy.commands = doxygen $$DOXYFILE
|
||||
doxy.CONFIG = no_link
|
||||
doxy.depends = $$DOXYFILE
|
||||
win32:!win32-g++ {
|
||||
doxy.commands = set DOXY_SRC_ROOT=$$PWD\\..\\src & \
|
||||
doxygen $$PWD\\$$DOXYFILE
|
||||
}
|
||||
else {
|
||||
doxy.commands = DOXY_SRC_ROOT="$$PWD/../src" \
|
||||
doxygen $$PWD/$$DOXYFILE
|
||||
}
|
||||
doxy.CONFIG = no_link target_predeps
|
||||
doxy.depends = $$PWD/$$DOXYFILE
|
||||
doxy.input = DOXY_INPUT
|
||||
doxy.name = DOXY
|
||||
doxy.output = .nothing
|
||||
doxy.output = html/index.html
|
||||
QMAKE_EXTRA_COMPILERS += doxy
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright (C) 2013 VATSIM community / contributors
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||
#
|
||||
# Script used by the qmake project file doxygen.pro to process the file
|
||||
# Doxyfile.cmake.in
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
die "not enough arguments\n" if @ARGV < 2;
|
||||
|
||||
my ($infile, $outfile, @vars) = @ARGV;
|
||||
|
||||
my %vars;
|
||||
for my $line (@vars)
|
||||
{
|
||||
my ($var, $val) = split '=', $line;
|
||||
$vars{$var} = $val;
|
||||
|
||||
die "missing '=' in parameter\n" unless defined $val;
|
||||
}
|
||||
|
||||
$infile =~ s.\\./.g;
|
||||
$outfile =~ s.\\./.g;
|
||||
|
||||
open my $in, '<', $infile or die "couldn't read from $infile\n";
|
||||
open my $out, '>', $outfile or die "couldn't write to $outfile\n";
|
||||
|
||||
while (defined(my $line = <$in>))
|
||||
{
|
||||
for my $var (keys %vars)
|
||||
{
|
||||
$line =~ s.\@$var\@.$vars{$var}.g;
|
||||
}
|
||||
print $out $line;
|
||||
}
|
||||
|
||||
close $in;
|
||||
close $out;
|
||||
Reference in New Issue
Block a user