Skip to content
Snippets Groups Projects
Commit d74a7e54 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[Doc][Python] Fix compilation when doxygen is not found.

parent f66e1c31
No related branches found
No related tags found
No related merge requests found
......@@ -43,21 +43,25 @@ INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" ${PYTHON_INCLUDE_DIRS})
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
ADD_CUSTOM_TARGET(generate_doxygen_cpp_doc
COMMAND ${CMAKE_SOURCE_DIR}/doc/python/doxygen_xml_parser.py
${CMAKE_BINARY_DIR}/doc/doxygen-xml/index.xml
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc > ${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc.log
BYPRODUCTS
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc/doxygen_xml_parser_for_cmake.hh
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc.log
COMMENT "Generating Doxygen C++ documentation"
)
ADD_DEPENDENCIES(generate_doxygen_cpp_doc doc)
SET(${LIBRARY_NAME}_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc/doxygen_xml_parser_for_cmake.hh
fcl.hh
)
IF(DOXYGEN_FOUND)
ADD_CUSTOM_TARGET(generate_doxygen_cpp_doc
COMMAND ${CMAKE_SOURCE_DIR}/doc/python/doxygen_xml_parser.py
${CMAKE_BINARY_DIR}/doc/doxygen-xml/index.xml
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc > ${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc.log
BYPRODUCTS
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc/doxygen_xml_parser_for_cmake.hh
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc.log
COMMENT "Generating Doxygen C++ documentation"
)
ADD_DEPENDENCIES(generate_doxygen_cpp_doc doc)
LIST(APPEND ${LIBRARY_NAME}_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/doxygen_autodoc/doxygen_xml_parser_for_cmake.hh
)
ENDIF()
SET(${LIBRARY_NAME}_SOURCES
version.cc
......@@ -72,7 +76,10 @@ ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_
ADD_DEPENDENCIES(python ${LIBRARY_NAME})
ADD_HEADER_GROUP(${LIBRARY_NAME}_HEADER)
ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES)
ADD_DEPENDENCIES(${LIBRARY_NAME} generate_doxygen_cpp_doc)
IF(DOXYGEN_FOUND)
ADD_DEPENDENCIES(${LIBRARY_NAME} generate_doxygen_cpp_doc)
TARGET_COMPILE_DEFINITIONS(${LIBRARY_NAME} PRIVATE -DHAS_DOXYGEN_AUTODOC)
ENDIF()
TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME} PUBLIC)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} PUBLIC ${PROJECT_NAME} ${BOOST_system_LIBRARY})
......
......@@ -43,8 +43,12 @@
#include <hpp/fcl/shape/convex.h>
#include <hpp/fcl/BVH/BVH_model.h>
#ifdef HAS_DOXYGEN_AUTODOC
#include "doxygen_autodoc/hpp/fcl/BVH/BVH_model.h"
#include "doxygen_autodoc/hpp/fcl/shape/geometric_shapes.h"
#endif
#include "../doc/python/doxygen.hh"
using namespace boost::python;
......
......@@ -42,8 +42,11 @@
#include "fcl.hh"
#ifdef HAS_DOXYGEN_AUTODOC
#include "doxygen_autodoc/hpp/fcl/math/transform.h"
#endif
#include "../doc/python/doxygen.hh"
#include "../doc/python/doxygen-boost.hh"
using namespace boost::python;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment