enable doxygen docstrings
authorxantares 09 <xantares09@hotmail.com>
Fri, 28 Feb 2014 12:41:57 +0000 (12:41 +0000)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 5 Mar 2014 15:56:27 +0000 (16:56 +0100)
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

index 1073ed3..8b52745 100644 (file)
@@ -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