mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
build: allow installing into the root directory (/)
It turns out that CMake always canonicalizes `CMAKE_INSTALL_PREFIX` to an absolute path--if it's a relative path, it canonicalizes it relative to the build directory. As a result, the only thing the DESTDIR and relative directory check prevents is an installation into the root directory since CMake strips the trailing slash, turning "/" into an empty string. Let's just remove the check all together, since it cannot accomplish what we intended.
This commit is contained in:
parent
5714044617
commit
6e87557c08
@ -22,10 +22,6 @@ function(create_install_dir_with_perms)
|
||||
|
||||
install(CODE
|
||||
"
|
||||
if(DEFINED ENV{DESTDIR} AND NOT IS_ABSOLUTE \${CMAKE_INSTALL_PREFIX})
|
||||
message(FATAL_ERROR \"Install prefix must be absolute when using DESTDIR\")
|
||||
endif()
|
||||
|
||||
set(_current_dir \"\${CMAKE_INSTALL_PREFIX}/${_install_dir_DESTINATION}\")
|
||||
set(_dir_permissions \"${_install_dir_DIRECTORY_PERMISSIONS}\")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user