Merge #1106 'CMake: Generate helptags during install step.'

This commit is contained in:
John Szakmeister 2014-08-23 09:32:56 -04:00
commit 866d547cfc
2 changed files with 17 additions and 1 deletions

View File

@ -177,7 +177,8 @@ if(BUSTED_PRG)
DEPENDS nvim-test unittest-headers)
endif()
install(DIRECTORY runtime DESTINATION share/nvim/)
install(DIRECTORY runtime DESTINATION share/nvim)
install(SCRIPT ${CMAKE_MODULE_PATH}/GenerateHelptags.cmake)
# Unfortunately, the below does not work under Ninja. Ninja doesn't use a
# pseudo-tty when launching processes, because it can put many jobs in parallel

View File

@ -0,0 +1,15 @@
message(STATUS "Generating helptags.")
execute_process(
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/bin/nvim"
-u NONE
-esX
-c "helptags ++t ."
-c quit
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/nvim/runtime/doc"
ERROR_VARIABLE err
RESULT_VARIABLE res)
if(NOT res EQUAL 0)
message(FATAL_ERROR "Generating helptags failed: ${err}")
endif()