Skip to content

Commit

Permalink
Added untar of ogre tagfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoenig committed Mar 22, 2018
1 parent 70c9e7c commit 0077395
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
find_package(Doxygen)

set(IGNITION_DOXYGEN_TAGFILES
"\"${CMAKE_SOURCE_DIR}/doc/ogre_1-9.tag.xml.tgz=https://www.ogre3d.org/docs/api/1.9/\"")
"\"${CMAKE_BINARY_DIR}/doc/ogre_1-9.tag.xml=https://www.ogre3d.org/docs/api/1.9/\"")

if (DOXYGEN_FOUND)
configure_file(${IGNITION_CMAKE_DOXYGEN_DIR}/api.in
Expand All @@ -10,13 +10,24 @@ if (DOXYGEN_FOUND)
configure_file(${IGNITION_CMAKE_DOXYGEN_DIR}/tutorials.in
${CMAKE_BINARY_DIR}/tutorials.dox @ONLY)

add_custom_target(doc ALL
# Generate the API documentation
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/api.dox
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
# Find tar
find_program(TAR_PATH tar)
set (DOC_DEPEND "")

COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/tutorials.dox
# If tar exists, then untar the ogre xml tag file
if (TAR_PATH)
add_custom_target(doc_xml ALL
${TAR_PATH} xvf ${CMAKE_SOURCE_DIR}/doc/ogre_1-9.tag.xml.tgz -C ${CMAKE_BINARY_DIR}/doc
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set (DOC_DEPEND doc_xml)
endif()

# Generate the API and tutorial documentation
add_custom_target(doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/tutorials.dox
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/api.dox
DEPENDS ${DOC_DEPEND}
COMMENT "Generating API documentation with Doxygen" VERBATIM)

install(FILES ${CMAKE_BINARY_DIR}/doc/${PROJECT_NAME_LOWER}.tag.xml
Expand Down

0 comments on commit 0077395

Please sign in to comment.