Added cmake doc target

Do not use doxygen directly. Often cmake build out-of-source.
So it usefult to have doc make target. It is required to generate
documentation for generating header file (qca_version.h) which places
in build tree.
This commit is contained in:
Ivan Romanov 2014-01-03 15:34:53 +06:00
parent 5bfb2dc9bf
commit 8098fc925f
3 changed files with 38 additions and 27 deletions

View File

@ -17,6 +17,8 @@ option(BUILD_TOOLS "Compile mozcerts and qcatool" ON)
set(BUILD_PLUGINS "auto" CACHE STRING "Plugins for building (also possible values: none, all and auto)") set(BUILD_PLUGINS "auto" CACHE STRING "Plugins for building (also possible values: none, all and auto)")
option(SHARED_LIBRARY "Build shared library" ON) option(SHARED_LIBRARY "Build shared library" ON)
find_package(Doxygen)
string(TOLOWER "${BUILD_PLUGINS}" BUILD_PLUGINS) string(TOLOWER "${BUILD_PLUGINS}" BUILD_PLUGINS)
if(NOT BUILD_PLUGINS) if(NOT BUILD_PLUGINS)
set(BUILD_PLUGINS "none") set(BUILD_PLUGINS "none")
@ -271,6 +273,14 @@ if(BUILD_TOOLS)
add_subdirectory(tools) add_subdirectory(tools)
endif(BUILD_TOOLS) endif(BUILD_TOOLS)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_SOURCE_DIR}/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM)
endif(DOXYGEN_FOUND)
# /usr/local is traditional path for installing apps on POSIX-systems. # /usr/local is traditional path for installing apps on POSIX-systems.
# I consciously break this. Qt by default looks plugins and features only in # I consciously break this. Qt by default looks plugins and features only in
# own directory. So by default install libs in Qt prefix it is a best choice. # own directory. So by default install libs in Qt prefix it is a best choice.

View File

@ -462,9 +462,10 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = examples \ INPUT = @CMAKE_SOURCE_DIR@/examples \
. \ @CMAKE_SOURCE_DIR@ \
include/QtCrypto @CMAKE_SOURCE_DIR@/include/QtCrypto \
@CMAKE_BINARY_DIR@/qca_version.h
# This tag can be used to specify the character encoding of the source files that # This tag can be used to specify the character encoding of the source files that
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
@ -494,7 +495,7 @@ RECURSIVE = NO
# excluded from the INPUT source files. This way you can easily exclude a # excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag. # subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = EXCLUDE = @CMAKE_BINARY_DIR@/import_plugins.h
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded # directories that are symbolic links (a Unix filesystem feature) are excluded
@ -526,27 +527,27 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see # directories that contain example code fragments that are included (see
# the \include command). # the \include command).
EXAMPLE_PATH = examples/aes-cmac \ EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/examples/aes-cmac \
examples/base64test \ @CMAKE_SOURCE_DIR@/examples/base64test \
examples/certtest \ @CMAKE_SOURCE_DIR@/examples/certtest \
examples/ciphertest \ @CMAKE_SOURCE_DIR@/examples/ciphertest \
examples/cms \ @CMAKE_SOURCE_DIR@/examples/cms \
examples/cmssigner \ @CMAKE_SOURCE_DIR@/examples/cmssigner \
examples/eventhandlerdemo \ @CMAKE_SOURCE_DIR@/examples/eventhandlerdemo \
examples/hashtest \ @CMAKE_SOURCE_DIR@/examples/hashtest \
examples/hextest \ @CMAKE_SOURCE_DIR@/examples/hextest \
examples/keyloader \ @CMAKE_SOURCE_DIR@/examples/keyloader \
examples/mactest \ @CMAKE_SOURCE_DIR@/examples/mactest \
examples/md5crypt \ @CMAKE_SOURCE_DIR@/examples/md5crypt \
examples/providertest \ @CMAKE_SOURCE_DIR@/examples/providertest \
examples/publickeyexample \ @CMAKE_SOURCE_DIR@/examples/publickeyexample \
examples/randomtest \ @CMAKE_SOURCE_DIR@/examples/randomtest \
examples/rsatest \ @CMAKE_SOURCE_DIR@/examples/rsatest \
examples/saslclient \ @CMAKE_SOURCE_DIR@/examples/saslclient \
examples/saslserver \ @CMAKE_SOURCE_DIR@/examples/saslserver \
examples/ssltest \ @CMAKE_SOURCE_DIR@/examples/ssltest \
examples/sslservtest \ @CMAKE_SOURCE_DIR@/examples/sslservtest \
examples/tlssocket @CMAKE_SOURCE_DIR@/examples/tlssocket
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@ -1098,7 +1099,7 @@ SKIP_FUNCTION_MACROS = YES
# If a tag file is not located in the directory in which doxygen # If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here. # is run, you must also specify the path to the tagfile here.
TAGFILES = src/qt.tag TAGFILES = @CMAKE_SOURCE_DIR@/src/qt.tag
# When a file name is specified after GENERATE_TAGFILE, doxygen will create # When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads. # a tag file that is based on the input files it reads.

View File

@ -57,7 +57,7 @@
#define QCA_VERSION_STR "@QCA_LIB_VERSION_STRING@" #define QCA_VERSION_STR "@QCA_LIB_VERSION_STRING@"
/** /**
Can be used like #if (QCA_VERSION >= QCA_VERSION_CHECK(2, 0, 3)) Can be used like #if (QCA_VERSION >= %QCA_VERSION_CHECK(2, 0, 3))
\param major part of the version \param major part of the version
\param minor part of the version \param minor part of the version