cmake: added doxygen doc content to python sensor modules

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Noel Eck 2015-12-16 13:58:11 -08:00 committed by Mihai Tudor Panu
parent d0504bb65b
commit e003a11723
123 changed files with 263 additions and 10 deletions

View File

@ -30,7 +30,7 @@ Multi-sensor samples for the starter and specialized kits can be found in the
Supported [sensor list](http://iotdk.intel.com/docs/master/upm/modules.html) from API documentation.
You can also refer to the [Intel® IoT Developer Zone](https://software.intel.com/iot/sensors).
You can also refer to the [Intel IoT Developer Zone](https://software.intel.com/iot/sensors).
### IDE Compatibility

View File

@ -18,6 +18,7 @@ endmacro (upm_CREATE_INSTALL_PKGCONFIG)
macro(upm_SWIG_PYTHON)
if (BUILDSWIGPYTHON AND BUILDSWIG)
set_source_files_properties (pyupm_${libname}.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties (pyupm_${libname}.i PROPERTIES SWIG_FLAGS "-I${CMAKE_CURRENT_BINARY_DIR}/..")
swig_add_module (pyupm_${libname} python pyupm_${libname}.i ${module_src})
swig_link_libraries (pyupm_${libname} ${PYTHON_LIBRARIES} ${MRAA_LIBRARIES})
target_include_directories ( ${SWIG_MODULE_pyupm_${libname}_REAL_NAME}
@ -120,16 +121,8 @@ macro(upm_doxygen)
set (classname ${libname})
endif()
set (CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND})
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${libname}_doc.i
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../doxy2swig.py -n
${CMAKE_BINARY_DIR}/xml/${classname}_8h.xml
${CMAKE_CURRENT_BINARY_DIR}/${libname}_doc.i
DEPENDS ${CMAKE_BINARY_DIR}/xml/${classname}_8h.xml
)
add_custom_target (${libname}doc_i DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${libname}_doc.i)
add_dependencies (${libname}doc_i doc)
if (BUILDSWIG)
add_dependencies (_pyupm_${libname} ${libname}doc_i)
add_dependencies (_pyupm_${libname} pyupm_doxy2swig)
add_dependencies (pydoc _pyupm_${libname})
else ()
add_dependencies (${libname} doc)
@ -203,6 +196,24 @@ macro(upm_module_init)
endif()
endmacro(upm_module_init)
# Generate python module documentation from doxygen collateral
if (BUILDDOC AND BUILDSWIGPYTHON AND SWIG_FOUND)
# doxy2swig the doxygen output
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxy2swig.py
${CMAKE_BINARY_DIR}/xml/index.xml
${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i
DEPENDS ${CMAKE_BINARY_DIR}/xml/index.xml
)
add_custom_target (pyupm_doxy2swig DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i)
add_dependencies (pyupm_doxy2swig doc)
# BUILDDOC not set but still building python modules, generate an empty
# pyupm_doxy2swig.i file (overwriting if necessary)
elseif (BUILDSWIGPYTHON AND SWIG_FOUND)
message (INFO " Generating empty ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i")
file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i "// Empty doxy2swig stub")
endif (BUILDDOC AND BUILDSWIGPYTHON AND SWIG_FOUND)
if (MODULE_LIST)
set(SUBDIRS ${MODULE_LIST})
set(SUBDIRS ${SUBDIRS} upm)

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_a110x
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ad8232
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_adafruitms1438
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_adafruitss
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_adc121c021
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_adis16448
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_adxl335
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_adxl345
%include "../upm.i"
%include "../carrays_int16_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_adxrs610
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_am2315
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_apds9002
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_at42qt1070
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_biss0001
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_bma220
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_bmpx8x
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_buzzer
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_cjq4435
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_dfrph
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ds1307
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ecs1030
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_enc03r
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_flex
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_gas
%include "../upm.i"
%include "../carrays_uint16_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_gp2y0a
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grove
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovecircularled
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovecollision
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_groveehr
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_groveeldriver
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_groveelectromagnet
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_groveemg
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovegprs
%include "../upm.i"
%include "carrays.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovegsr
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovelinefinder
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovemd
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovemoisture
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_groveo2
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovescam
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovespeaker
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_groveultrasonic
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovevdiv
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovewater
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_grovewfs
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_guvas12d
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_h3lis331dl
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_hcsr04
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_hm11
%include "../upm.i"
%include "carrays.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_hmc5883l
%include "../upm.i"
%include "../carrays_int16_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_hmtrp
%include "../upm.i"
%include "../carrays_uint8_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_hp20x
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ht9170
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_htu21d
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_hx711
%include "../upm.i"
%include "stdint.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ina132
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_isd1820
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_itg3200
%include "../upm.i"
%include "../carrays_int16_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_joystick12
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_l298
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_i2clcd
%include "../upm.i"
%include "../carrays_uint8_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ldt0028
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_lm35
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_lol
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_loudness
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_lpd8806
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_lsm303
%include "../upm.i"
%include "../carrays_int16_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_lsm9ds0
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_m24lr64e
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_max31723
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_max31855
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_max44000
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_max5487
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_maxds3231m
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_maxsonarez
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mcp9808
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mg811
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mhz16
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mic
%include "../upm.i"
%include "../carrays_uint16_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_micsv89
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mlx90614
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mma7455
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mma7660
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mpl3115a2
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mpr121
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mpu9150
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_mq303a
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_my9221
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_nrf24l01
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_nrf8001
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_nunchuck
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_otp538u
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ozw
%include "../upm.i"
%include "cpointer.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_pca9685
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_pn532
%include "../upm.i"
%include "../carrays_uint8_t.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_ppd42ns
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_pulsensor
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_rfr359f
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_rgbringcoder
%include "../upm.i"

View File

@ -1,3 +1,5 @@
// Include doxygen-generated documentation
%include "pyupm_doxy2swig.i"
%module pyupm_rotaryencoder
%include "../upm.i"

Some files were not shown because too many files have changed in this diff Show More