Include JSDoc Web pages in the install

This commit is contained in:
David Rowe 2018-04-16 16:08:26 +12:00
parent 7c65c9c444
commit 06bb873e8d
2 changed files with 17 additions and 2 deletions

View file

@ -180,8 +180,9 @@ else ()
add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM})
endif ()
if (BUILD_TOOLS AND NPM_EXECUTABLE)
# require JSDoc to be build before interface is deployed (Console Auto-complete)
# require JSDoc to be build before interface is deployed
add_dependencies(resources jsdoc)
endif()
@ -322,6 +323,13 @@ if (APPLE)
"${RESOURCES_DEV_DIR}/scripts"
)
# copy JSDoc files beside the executable
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${CMAKE_SOURCE_DIR}/tools/jsdoc/out"
"${RESOURCES_DEV_DIR}/jsdoc"
)
# call the fixup_interface macro to add required bundling commands for installation
fixup_interface()
@ -350,6 +358,13 @@ else()
"${RESOURCES_DEV_DIR}/serverless/tutorial.json"
)
# copy JSDoc files beside the executable
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${CMAKE_SOURCE_DIR}/tools/jsdoc/out"
"${INTERFACE_EXEC_DIR}/jsdoc"
)
# link target to external libraries
if (WIN32)
target_link_libraries(${TARGET_NAME} wsock32.lib Winmm.lib)

View file

@ -13,5 +13,5 @@ file(TO_NATIVE_PATH ${JSDOC_WORKING_DIR} NATIVE_JSDOC_WORKING_DIR)
add_custom_command(TARGET ${TARGET_NAME}
COMMAND ${NPM_EXECUTABLE} --no-progress install && ${JSDOC_PATH} ${NATIVE_JSDOC_WORKING_DIR} -c ${JSDOC_CONFIG_PATH} -d ${OUTPUT_DIR}
WORKING_DIRECTORY ${JSDOC_WORKING_DIR}
COMMENT "generate the JSDoc JSON for the JSConsole auto-completer"
COMMENT "generate the JSDoc JSON"
)