mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
Build: Use GNUInstallDirs, install man pages #2649
For now, only install man pages matching "nvim*.1": we don't want to install xxd.1 as it might conflict with that of a user's Vim installation. closes #1826 Reviewed-by: Florian Walch <florian@fwalch.com> Helped-by: John Szakmeister <john@szakmeister.net>
This commit is contained in:
parent
d9acfbd471
commit
aa1d9a1807
@ -271,9 +271,17 @@ endif()
|
||||
# If it's preexisting, leave it alone.
|
||||
include(InstallHelpers)
|
||||
|
||||
file(GLOB MANPAGES
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
man/nvim*.1)
|
||||
|
||||
install_helper(
|
||||
FILES ${MANPAGES}
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
|
||||
install_helper(
|
||||
DIRECTORY runtime
|
||||
DESTINATION share/nvim)
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim)
|
||||
|
||||
file(GLOB_RECURSE RUNTIME_PROGRAMS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@ -281,11 +289,12 @@ file(GLOB_RECURSE RUNTIME_PROGRAMS
|
||||
|
||||
foreach(PROG ${RUNTIME_PROGRAMS})
|
||||
get_filename_component(BASEDIR ${PROG} PATH)
|
||||
install_helper(PROGRAMS ${PROG} DESTINATION share/nvim/${BASEDIR})
|
||||
install_helper(PROGRAMS ${PROG} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/${BASEDIR})
|
||||
endforeach()
|
||||
|
||||
install(SCRIPT ${PROJECT_SOURCE_DIR}/cmake/GenerateHelptags.cmake)
|
||||
|
||||
|
||||
# Go down the tree.
|
||||
|
||||
add_subdirectory(src/nvim)
|
||||
|
@ -1,3 +1,6 @@
|
||||
# For $CMAKE_INSTALL_{DATAROOT,MAN, ...}DIR
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# This will create any directories that need to be created in the destination
|
||||
# path with the typical owner, group, and user permissions--independent of the
|
||||
# umask setting.
|
||||
@ -107,11 +110,11 @@ function(install_helper)
|
||||
|
||||
if(_install_helper_TARGETS)
|
||||
# Ensure the bin area exists with the correct permissions.
|
||||
create_install_dir_with_perms(DESTINATION bin)
|
||||
create_install_dir_with_perms(DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
install(
|
||||
TARGETS ${_install_helper_TARGETS}
|
||||
RUNTIME DESTINATION bin)
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
else()
|
||||
create_install_dir_with_perms(
|
||||
DESTINATION ${_install_helper_DESTINATION}
|
||||
|
@ -72,7 +72,7 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
|
||||
|
||||
install_helper(
|
||||
FILES ${moFile}
|
||||
DESTINATION share/locale/${name}/LC_MESSAGES
|
||||
DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${name}/LC_MESSAGES
|
||||
RENAME nvim.mo)
|
||||
|
||||
list(APPEND LANGUAGE_MO_FILES ${moFile})
|
||||
|
Loading…
Reference in New Issue
Block a user