aboutsummaryrefslogtreecommitdiff
path: root/cmake/InstallHelpers.cmake
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-05-21 14:05:38 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-05-27 21:42:10 +0200
commita84926763f153ee2a97c1882223ecf925c05ba78 (patch)
tree7abe02b5b06d478887436e8750d456b8457b98c4 /cmake/InstallHelpers.cmake
parent17a46dc5e0c814e8c5581fc3b62d67f7e5961670 (diff)
downloadrneovim-a84926763f153ee2a97c1882223ecf925c05ba78.tar.gz
rneovim-a84926763f153ee2a97c1882223ecf925c05ba78.tar.bz2
rneovim-a84926763f153ee2a97c1882223ecf925c05ba78.zip
install: bsd: install manpages to /usr/local/man
https://svnweb.freebsd.org/ports/head/editors/neovim/Makefile?revision=428479&view=markup#l28 Closes #6771
Diffstat (limited to 'cmake/InstallHelpers.cmake')
-rw-r--r--cmake/InstallHelpers.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/InstallHelpers.cmake b/cmake/InstallHelpers.cmake
index ee07ba2c66..ca20ddf354 100644
--- a/cmake/InstallHelpers.cmake
+++ b/cmake/InstallHelpers.cmake
@@ -1,3 +1,12 @@
+# Fix CMAKE_INSTALL_MANDIR on BSD before including GNUInstallDirs. #6771
+if(CMAKE_SYSTEM_NAME MATCHES "BSD" AND NOT DEFINED CMAKE_INSTALL_MANDIR)
+ if(DEFINED ENV{MANPREFIX})
+ set(CMAKE_INSTALL_MANDIR "$ENV{MANPREFIX}/man")
+ else()
+ set(CMAKE_INSTALL_MANDIR "/usr/local/man")
+ endif()
+endif()
+
# For $CMAKE_INSTALL_{DATAROOT,MAN, ...}DIR
include(GNUInstallDirs)