mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
jsdoc: added target for node.js documentation and minor fixes to modules
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
d6f756a174
commit
3772c807b4
@ -21,6 +21,7 @@ message (INFO " found libmraa version: ${MRAA_VERSION}")
|
|||||||
# Appends the cmake/modules path to MAKE_MODULE_PATH variable.
|
# Appends the cmake/modules path to MAKE_MODULE_PATH variable.
|
||||||
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
||||||
set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries")
|
set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries")
|
||||||
|
set (NODE_PATH "/usr/local/lib/node_modules" CACHE PATH "Path to node modules")
|
||||||
|
|
||||||
# Set CMAKE_LIB_INSTALL_DIR if not defined
|
# Set CMAKE_LIB_INSTALL_DIR if not defined
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
@ -104,17 +105,17 @@ if (BUILDDOC)
|
|||||||
find_package(Yuidoc)
|
find_package(Yuidoc)
|
||||||
if(YUIDOC_FOUND)
|
if(YUIDOC_FOUND)
|
||||||
# node required for Yuidoc documentation
|
# node required for Yuidoc documentation
|
||||||
find_package(node)
|
find_package(Node)
|
||||||
set(NODE_PATH "/usr/local/lib/node_modules" CACHE PATH "Path to node modules")
|
file(GLOB JSDOC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/doxy/node/*)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxy/node ${CMAKE_CURRENT_BINARY_DIR})
|
file(COPY ${JSDOC_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
add_custom_target(jsdoc
|
add_custom_target(jsdoc
|
||||||
${NODE_EXECUTABLE} docgen -m upm -i xml
|
NODE_PATH=${NODE_PATH} ${NODE_EXECUTABLE} docgen -m upm -i xml
|
||||||
COMMAND ${YUIDOC_EXECUTABLE} -C --no-sort --config generators/yuidoc/conf.json -o html/node jsdoc/yuidoc/upm
|
COMMAND ${YUIDOC_EXECUTABLE} -C --no-sort --config generators/yuidoc/conf.json -o html/node jsdoc/yuidoc/upm
|
||||||
COMMAND ${NODE_EXECUTABLE} tolower -i html/node
|
COMMAND NODE_PATH=${NODE_PATH} ${NODE_EXECUTABLE} tolower -i html/node
|
||||||
|
DEPENDS doc
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Generating API documentation with Yuidoc" VERBATIM
|
COMMENT "Generating API documentation with Yuidoc" VERBATIM
|
||||||
)
|
)
|
||||||
add_dependencies(jsdoc doc)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
find_program (YUIDOC_EXECUTABLE NAMES yuidoc
|
find_program (YUIDOC_EXECUTABLE NAMES yuidoc
|
||||||
HINTS $ENV{YUIDOC_DIR}
|
HINTS $ENV{YUIDOC_DIR}
|
||||||
|
PATHS usr usr/local
|
||||||
PATH_SUFFIXES bin
|
PATH_SUFFIXES bin
|
||||||
DOC "Yuidoc documentation generator"
|
DOC "Yuidoc documentation generator"
|
||||||
)
|
)
|
||||||
@ -13,9 +14,8 @@ find_package_handle_standard_args (Yuidoc DEFAULT_MSG
|
|||||||
# Get Yuidoc version
|
# Get Yuidoc version
|
||||||
if (YUIDOC_EXECUTABLE)
|
if (YUIDOC_EXECUTABLE)
|
||||||
execute_process(COMMAND ${YUIDOC_EXECUTABLE} --version
|
execute_process(COMMAND ${YUIDOC_EXECUTABLE} --version
|
||||||
OUTPUT_VARIABLE YUIDOC_VERSION)
|
ERROR_VARIABLE YUIDOC_VERSION)
|
||||||
string(REGEX MATCH "([0-9]\\.[0-9]\\.[0-9])" YUIDOC_VERSION_STR ${YUIDOC_VERSION})
|
message ("INFO - Yuidoc version is " ${YUIDOC_VERSION})
|
||||||
message ("INFO - Yuidoc version is " ${YUIDOC_VERSION_STR})
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
mark_as_advanced (YUIDOC_EXECUTABLE)
|
mark_as_advanced (YUIDOC_EXECUTABLE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user