diff options
author | Michael Reed <m.reed@mykolab.com> | 2015-05-17 14:45:30 -0400 |
---|---|---|
committer | Michael Reed <m.reed@mykolab.com> | 2015-05-17 14:57:43 -0400 |
commit | aa1d9a1807198bfb17f0da38164aeed260db8713 (patch) | |
tree | bba97b34c46c79d1804b76b6c1017c3a490a530c | |
parent | d9acfbd471403a4f11ad050665633d3311a462d9 (diff) | |
download | rneovim-aa1d9a1807198bfb17f0da38164aeed260db8713.tar.gz rneovim-aa1d9a1807198bfb17f0da38164aeed260db8713.tar.bz2 rneovim-aa1d9a1807198bfb17f0da38164aeed260db8713.zip |
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>
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | cmake/InstallHelpers.cmake | 7 | ||||
-rw-r--r-- | src/nvim/po/CMakeLists.txt | 2 |
3 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 513614b820..aeb7a3f345 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/InstallHelpers.cmake b/cmake/InstallHelpers.cmake index bd03ae3875..ee07ba2c66 100644 --- a/cmake/InstallHelpers.cmake +++ b/cmake/InstallHelpers.cmake @@ -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} diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt index 443f3c6595..243ac19b33 100644 --- a/src/nvim/po/CMakeLists.txt +++ b/src/nvim/po/CMakeLists.txt @@ -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}) |