Private
Public Access
2
0

docs: add additional validation for doc tools version

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Nicolas Oliver
2017-10-02 15:39:12 -07:00
committed by Brendan Le Foll
parent c6d49f6255
commit e9d1b1ef28
4 changed files with 23 additions and 9 deletions

View File

@@ -109,8 +109,8 @@ add_custom_command (TARGET npmpkg POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy
add_dependencies (npmpkg mraajs)
if (BUILDDOC)
find_package (Yuidoc 0.10.2 REQUIRED)
if (YUIDOC_FOUND)
find_package (Yuidoc 0.10 REQUIRED)
if (YUIDOC_FOUND AND YUIDOC_VERSION VERSION_GREATER "0.10")
add_custom_target (jsdoc ALL
COMMAND ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/docgen.js -m mraa -i xml/ -o jsdoc -c ${CMAKE_CURRENT_SOURCE_DIR}/doxygen2jsdoc_custom.json --strict
COMMAND ${YUIDOC_EXECUTABLE} -C --no-sort --helpers ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/generators/yuidoc/tmpl/mraa/helper.js --themedir ${CMAKE_SOURCE_DIR}/doxygen2jsdoc/generators/yuidoc/tmpl/mraa -o html/node jsdoc/yuidoc/mraa
@@ -120,7 +120,7 @@ if (BUILDDOC)
COMMENT "Generating API documentation with Yuidoc" VERBATIM
)
else ()
message (STATUS "INFO - Failed to find Yuidoc. node.js API doc will not be generated")
message (SEND_ERROR "ERROR - Failed to find a compatible version of Yuidoc. Node.js API doc will not be generated")
endif ()
endif ()

View File

@@ -1,6 +1,6 @@
if (DOXYGEN_FOUND)
find_package (Sphinx 1.3.6 REQUIRED)
if (SPHINX_FOUND)
find_package (Sphinx 1.3 REQUIRED)
if (SPHINX_FOUND AND SPHINX_VERSION VERSION_GREATER "1.3")
if (NOT DEFINED SPHINX_THEME)
set (SPHINX_THEME default)
endif ()
@@ -37,5 +37,7 @@ if (DOXYGEN_FOUND)
)
add_dependencies (sphinx ${SWIG_MODULE_python2-mraa_REAL_NAME})
endif ()
else ()
message (SEND_ERROR "ERROR - Failed to find a compatible version of Sphinx. Python API doc will not be generated")
endif (SPHINX_FOUND AND SPHINX_VERSION VERSION_GREATER "1.3")
endif ()