1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-13 16:56:52 +00:00

Improve doxygen handling. Added two new targets: 'make pdfmanual' will create a manual at docs/GNSS-SDR_manual.pdf, and 'make doc-clean' will clean the documentation.

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@315 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Carles Fernandez 2013-01-17 01:47:13 +00:00
parent 67987a06dd
commit a66f4df4bc
2 changed files with 40 additions and 14 deletions

View File

@ -225,19 +225,45 @@ list(APPEND CMAKE_CXX_FLAGS ${GCC_GPERFTOOLS_FLAGS})
find_package(Doxygen) find_package(Doxygen)
if(DOXYGEN_FOUND) if(DOXYGEN_FOUND)
message( "Doxygen found. You can build the documentation with 'make doc'." ) message( "Doxygen found.")
message( "When done, point your browser to ${CMAKE_SOURCE_DIR}/html/index.html") message(STATUS "You can build the documentation with 'make doc'." )
set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) message(STATUS "When done, point your browser to ${CMAKE_SOURCE_DIR}/html/index.html")
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) set(HAVE_DOT ${DOXYGEN_DOT_FOUND})
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir)
configure_file(${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.in file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir)
${CMAKE_SOURCE_DIR}/docs/Doxyfile find_package(LATEX)
@ONLY) if (PDFLATEX_COMPILER)
add_custom_target(doc set(GENERATE_PDF_DOCUMENTATION "YES")
${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/docs/Doxyfile else(PDFLATEX_COMPILER)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} set(GENERATE_PDF_DOCUMENTATION "NO")
COMMENT "Generating API documentation with Doxygen." VERBATIM endif(PDFLATEX_COMPILER)
) configure_file(${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.in
${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile
@ONLY
)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen." VERBATIM
)
if(LATEX_COMPILER)
message(STATUS "'make pdfmanual' will generate a manual at ${CMAKE_SOURCE_DIR}/docs/GNSS-SDR_manual.pdf")
add_custom_target(pdfmanual
COMMAND ${CMAKE_MAKE_PROGRAM}
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ${CMAKE_SOURCE_DIR}/docs/GNSS-SDR_manual.pdf
COMMAND ${CMAKE_MAKE_PROGRAM} clean
DEPENDS doc
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/latex
COMMENT "Generating PDF manual with Doxygen." VERBATIM
)
endif(LATEX_COMPILER)
message(STATUS "'make doc-clean' will clean the documentation.")
add_custom_target(doc-clean
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_SOURCE_DIR}/docs/html
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_SOURCE_DIR}/docs/latex
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_SOURCE_DIR}/docs/GNSS-SDR_manual.pdf
COMMENT "Cleaning documentation." VERBATIM
)
else(DOXYGEN_FOUND) else(DOXYGEN_FOUND)
message( "Doxygen has not been found in your system.") message( "Doxygen has not been found in your system.")
message( "You can get nice code documentation by using it!") message( "You can get nice code documentation by using it!")

View File

@ -1136,7 +1136,7 @@ SERVER_BASED_SEARCH = NO
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output. # generate Latex output.
GENERATE_LATEX = YES GENERATE_LATEX = @GENERATE_PDF_DOCUMENTATION@
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be # If a relative path is entered the value of OUTPUT_DIRECTORY will be