cmake: add doc target

This commit is contained in:
Hugues Delorme 2015-05-28 09:36:24 +02:00
parent ac0c7e2215
commit fcf5e1b5bd
4 changed files with 31 additions and 10 deletions

View File

@ -231,6 +231,19 @@ install(TARGETS gmio
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
# Add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.cmake
${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
add_custom_target(
doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
COMMENT "Generating API documentation with Doxygen" VERBATIM)
endif(DOXYGEN_FOUND)
# Examples:
# cmake ../.. -DCMAKE_INSTALL_PREFIX=../../gcc-linux64 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_POSTFIX=.debug
# cmake ../.. -DCMAKE_INSTALL_PREFIX=../../gcc-linux64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_RELEASE_POSTFIX=.release

View File

@ -26,13 +26,13 @@ DOXYFILE_ENCODING = UTF-8
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
PROJECT_NAME = GeomIO (Geometry Input/Output) Library
PROJECT_NAME = gmio
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.1.0
PROJECT_NUMBER = @GMIO_VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
@ -128,7 +128,7 @@ FULL_PATH_NAMES = YES
# If left blank the directory from which doxygen is run is used as the
# path to strip.
STRIP_FROM_PATH = ../src
STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR@/src
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
# the path mentioned in the documentation of a class, which tells
@ -249,7 +249,7 @@ EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
USE_MDFILE_AS_MAINPAGE = ../README.md
USE_MDFILE_AS_MAINPAGE = @CMAKE_CURRENT_SOURCE_DIR@/README.md
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should
@ -641,8 +641,8 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = ../README.md \
../src
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/README.md \
@CMAKE_CURRENT_SOURCE_DIR@/src
# 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
@ -675,7 +675,7 @@ RECURSIVE = YES
# run.
EXCLUDE = \
../src/gmio_support/support_global.h \
@CMAKE_CURRENT_SOURCE_DIR@/src/gmio_support/support_global.h \
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
@ -1484,6 +1484,8 @@ PREDEFINED = GMIO_LIB_EXPORT= \
GMIO_HAVE_STDINT_H=1 \
GMIO_C_LINKAGE_BEGIN= \
GMIO_C_LINKAGE_END= \
QT_BEGIN_NAMESPACE= \
QT_END_NAMESPACE= \
DOXYGEN
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then

View File

@ -33,12 +33,12 @@ struct gmio_stl_write_options
* If set to \c GMIO_TRUE then :
* \li for STL ASCII format, <tt>"solid <name>"</tt> and
* <tt>"endsolid"</tt> will no be written to output stream
* \li for STL binary format, the 80 bytes header followed bt the mesh
* \li for STL binary format, the 80 bytes header followed by the mesh
* facet count (4bytes) will no be written to output stream
*/
gmio_bool_t stl_write_triangles_only;
/*! Name of the solid to appear in "solid <name> \n facet normal ..."
/*! Name of the solid to appear in <tt>solid <name> facet normal ...</tt>
*
* Option useful only with STL ascii format (GMIO_STL_FORMAT_ASCII).
*

View File

@ -30,6 +30,12 @@ QT_END_NAMESPACE
/*! Returns a gmio_stream for \c QIODevice* (cookie will hold \p device) */
GMIO_LIBSUPPORT_EXPORT
gmio_stream_t gmio_stream_qiodevice(QT_PREPEND_NAMESPACE(QIODevice)* device);
gmio_stream_t gmio_stream_qiodevice(
#ifndef DOXYGEN
QT_PREPEND_NAMESPACE(QIODevice)* device
#else
QIODevice* device
#endif /* !DOXYGEN */
);
#endif /* GMIO_SUPPORT_STREAM_QT_H */