CMake: Fix helptags generation when prefix is not /usr. #2741

This commit is contained in:
Thomas Anderson 2015-05-25 04:04:10 -07:00 committed by Justin M. Keyes
parent 6609a545ad
commit 9995f15a98
3 changed files with 6 additions and 4 deletions

View File

@ -284,7 +284,9 @@ foreach(PROG ${RUNTIME_PROGRAMS})
install_helper(PROGRAMS ${PROG} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/${BASEDIR})
endforeach()
install(SCRIPT ${PROJECT_SOURCE_DIR}/cmake/GenerateHelptags.cmake)
configure_file(${PROJECT_SOURCE_DIR}/cmake/GenerateHelptags.cmake.in
${PROJECT_BINARY_DIR}/cmake/GenerateHelptags.cmake @ONLY)
install(SCRIPT ${PROJECT_BINARY_DIR}/cmake/GenerateHelptags.cmake)
# Go down the tree.

View File

@ -1,10 +1,10 @@
if(DEFINED ENV{DESTDIR})
file(TO_CMAKE_PATH
$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/nvim/runtime/doc
$ENV{DESTDIR}/@CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc
HELPTAGS_WORKING_DIRECTORY)
else()
file(TO_CMAKE_PATH
${CMAKE_INSTALL_PREFIX}/share/nvim/runtime/doc
@CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc
HELPTAGS_WORKING_DIRECTORY)
endif()

View File

@ -1,5 +1,5 @@
#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h"
char *default_vim_dir = "${CMAKE_INSTALL_PREFIX}/share/nvim";
char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim";
char *default_vimruntime_dir = "";
char_u *compiled_user = (char_u *)"${USERNAME}";
char_u *compiled_sys = (char_u *)"${HOSTNAME}";