Skip to content

Commit

Permalink
Use DOI as link
Browse files Browse the repository at this point in the history
The bibliographic styles available to Doxygen do not process the
DOI field of BibTeX files. The DOI field is now used to create the
URL field programmatically.
  • Loading branch information
jngrad committed Nov 13, 2019
1 parent 3e1a13e commit ba181e4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions doc/doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ if(DOXYGEN_FOUND)
DEPENDS EspressoConfig
)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bibliography.bib
COMMAND sed -r
"'s/^ *doi *= *([^0-9]+)(10\\.[0-9]+)/url=\\1https:\\/\\/dx.doi.org\\/\\2/'"
${CMAKE_CURRENT_SOURCE_DIR}/bibliography.bib >
${CMAKE_CURRENT_BINARY_DIR}/bibliography.bib
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bibliography.bib
)

set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bibliography.bib
${CMAKE_CURRENT_BINARY_DIR}/bibliography.bib
COPYONLY)

add_custom_target(doxygen
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
Expand Down

0 comments on commit ba181e4

Please sign in to comment.