Skip to content

Commit

Permalink
Fix Fast CDR API reference PDF generation (backport #161) (#163)
Browse files Browse the repository at this point in the history
* Fix Fast CDR API reference PDF generation (#161)

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
(cherry picked from commit 8c78438)

# Conflicts:
#	CMakeLists.txt

* Refs #19461: fix conflicts

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

---------

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
Co-authored-by: José Luis Bueno López <[email protected]>
Co-authored-by: JLBuenoLopez-eProsima <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2023
1 parent 7ebc45e commit b68e8a6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
27 changes: 21 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ endif()
# Add an option to toggle the generation of the API documentation.
option(BUILD_DOCUMENTATION "Use doxygen to create product documentation" OFF)
option(CHECK_DOCUMENTATION "Use doxygen to check code documentation" OFF)
option(GENERATE_PDF_DOC "Use doxygen to generate API Reference PDF" OFF)

if(EPROSIMA_INSTALLER)
set(BUILD_DOCUMENTATION ON)
Expand Down Expand Up @@ -267,6 +268,11 @@ if(BUILD_DOCUMENTATION)
else()
set(USE_DOT YES)
endif()
if(GENERATE_PDF_DOC)
set(GENERATE_LATEX YES)
else()
set(GENERATE_LATEX NO)
endif()
# Configure the template doxyfile for or specific project
configure_file(doxyfile.in ${PROJECT_BINARY_DIR}/doxyfile @ONLY IMMEDIATE)
# Add custom target to run doxygen when ever the project is build
Expand All @@ -277,6 +283,15 @@ if(BUILD_DOCUMENTATION)

add_dependencies(doxygen docdirs)

if(GENERATE_PDF_DOC)
add_custom_target(make_pdf ALL
COMMAND "make" "pdf"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doxygen/latex
COMMENT "Generating API reference PDF" VERBATIM)

add_dependencies(make_pdf doxygen)
endif()

### README html ########################

if(WIN32)
Expand Down Expand Up @@ -338,12 +353,12 @@ if(BUILD_DOCUMENTATION)
COMPONENT documentation
)

# if(NOT CHECK_DOCUMENTATION)
# install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/manual
# DESTINATION ${DOC_INSTALL_DIR}
# COMPONENT documentation
# )
# endif()
if(GENERATE_PDF_DOC)
install(FILES "${PROJECT_BINARY_DIR}/doxygen/latex/refman.pdf"
DESTINATION ${DOC_INSTALL_DIR}
RENAME fastcdr-${PROJECT_VERSION}-api-reference.pdf
COMPONENT documentation)
endif()

### Documentation component
set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
Expand Down
5 changes: 2 additions & 3 deletions doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*

EXCLUDE_PATTERNS = */fastdds/* \
*/dds/*
EXCLUDE_PATTERNS =

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down Expand Up @@ -1782,7 +1781,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.

GENERATE_LATEX = NO
GENERATE_LATEX = @GENERATE_LATEX@

# 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 put in front of
Expand Down

0 comments on commit b68e8a6

Please sign in to comment.