aboutsummaryrefslogtreecommitdiff
path: root/cmake/InstallHelpers.cmake
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2014-11-09 17:48:19 -0500
committerJohn Szakmeister <john@szakmeister.net>2014-11-09 17:48:19 -0500
commit6e87557c0816e1237e0cb0dc6eba96a154bc88cc (patch)
tree3f351477b99df4730dc3d6ee34864432e44b0567 /cmake/InstallHelpers.cmake
parent57140446174a1e547b4799d75d6182a24ad78b44 (diff)
downloadrneovim-6e87557c0816e1237e0cb0dc6eba96a154bc88cc.tar.gz
rneovim-6e87557c0816e1237e0cb0dc6eba96a154bc88cc.tar.bz2
rneovim-6e87557c0816e1237e0cb0dc6eba96a154bc88cc.zip
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.
Diffstat (limited to 'cmake/InstallHelpers.cmake')
-rw-r--r--cmake/InstallHelpers.cmake4
1 files changed, 0 insertions, 4 deletions
diff --git a/cmake/InstallHelpers.cmake b/cmake/InstallHelpers.cmake
index 763b2a092c..bd03ae3875 100644
--- a/cmake/InstallHelpers.cmake
+++ b/cmake/InstallHelpers.cmake
@@ -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}\")