From 16257d60fb84f09b0d66ad881fe47e7b6faa84ef Mon Sep 17 00:00:00 2001 From: xantares 09 Date: Fri, 28 Feb 2014 12:41:57 +0000 Subject: [PATCH] enable doxygen docstrings Hi, I noticed doxygen docstrings were generated but not included anymore in the swig bindings since CMAKE_SWIG_FLAGS should be defined before the call to swig_add_module. Here's a patch. --- python/CMakeLists.txt | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 1073ed3..8b52745 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -22,6 +22,9 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND ) include_directories ( ${PYTHON_INCLUDE_DIRS} ) link_directories ( ${CMAKE_CURRENT_BINARY_DIR}/../src ) + if ( DOCUMENTATION AND DOXYGEN_FOUND ) + set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) + endif() swig_add_module ( ftdi1 python ftdi1.i ) swig_link_libraries ( ftdi1 ftdi1 ) @@ -46,9 +49,6 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND ) install ( TARGETS ${SWIG_MODULE_ftdi1_REAL_NAME} LIBRARY DESTINATION ${PYTHON_MODULE_PATH} ) if ( DOCUMENTATION AND DOXYGEN_FOUND ) - - set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) - # Run doxygen to only generate the xml add_custom_command ( OUTPUT ${CMAKE_BINARY_DIR}/doc/xml/ftdi_8c.xml COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/doc -- 1.7.1