mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
cmake,bsd: Fix mandir to saner defaults. (#7417)
closes #7239 The old behaviour was to set CMAKE_INSTALL_MANDIR to /usr/local/man when MANPREFIX wasn't defined. This caused mismatching installation paths when the installation prefix wasn't /usr/local. This fix explicitely checks that the prefix is /usr/local to change the value of CMAKE_INSTALL_MANDIR, and uses the default behaviour otherwise, as /usr/local is the exception rather than the norm (as per man hier(7)).
This commit is contained in:
parent
7068370560
commit
3ce97879d0
@ -2,8 +2,8 @@
|
|||||||
if(CMAKE_SYSTEM_NAME MATCHES "BSD" AND NOT DEFINED CMAKE_INSTALL_MANDIR)
|
if(CMAKE_SYSTEM_NAME MATCHES "BSD" AND NOT DEFINED CMAKE_INSTALL_MANDIR)
|
||||||
if(DEFINED ENV{MANPREFIX})
|
if(DEFINED ENV{MANPREFIX})
|
||||||
set(CMAKE_INSTALL_MANDIR "$ENV{MANPREFIX}/man")
|
set(CMAKE_INSTALL_MANDIR "$ENV{MANPREFIX}/man")
|
||||||
else()
|
elseif(CMAKE_INSTALL_PREFIX MATCHES "^/usr/local$")
|
||||||
set(CMAKE_INSTALL_MANDIR "/usr/local/man")
|
set(CMAKE_INSTALL_MANDIR "man")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user