diff options
author | Brad King <brad.king@kitware.com> | 2007-05-07 22:17:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-05-07 22:17:32 (GMT) |
commit | 96232d405236231e6f4ba858a70621da9066f26c (patch) | |
tree | c5446f71949f7d5c1d09e0556e236a0ce8ba9fa5 /Modules/Platform | |
parent | 9d6c37eef6fe04f023b94a972d0d824eef7b7ec0 (diff) | |
download | CMake-96232d405236231e6f4ba858a70621da9066f26c.zip CMake-96232d405236231e6f4ba858a70621da9066f26c.tar.gz CMake-96232d405236231e6f4ba858a70621da9066f26c.tar.bz2 |
BUG: Detect debian with existence of /etc/debian_version so things work in a chroot install. This is suggested in bug#4805.
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Linux.cmake | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake index f441f31..5378a9c 100644 --- a/Modules/Platform/Linux.cmake +++ b/Modules/Platform/Linux.cmake @@ -34,27 +34,17 @@ IF(DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL "Install .so files without execute permission.") ELSE(DEFINED CMAKE_INSTALL_SO_NO_EXE) - # Detect the linux distribution. - SET(CMAKE_LINUX_DISTRO) - IF(EXISTS "/proc/version") - FILE(READ "/proc/version" CMAKE_LINUX_DISTRO) - ENDIF(EXISTS "/proc/version") - - # List the distributions that require shared libraries to not have - # execute permission. - SET(CMAKE_INSTALL_SO_NO_EXE_DISTRO "(Debian|Ubuntu)") - # Store the decision variable as an internal cache entry to avoid # checking the platform every time. This option is advanced enough # that only package maintainers should need to adjust it. They are # capable of providing a setting on the command line. - IF("${CMAKE_LINUX_DISTRO}" MATCHES "${CMAKE_INSTALL_SO_NO_EXE_DISTRO}") + IF(EXISTS "/etc/debian_version") SET(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL "Install .so files without execute permission.") - ELSE("${CMAKE_LINUX_DISTRO}" MATCHES "${CMAKE_INSTALL_SO_NO_EXE_DISTRO}") + ELSE(EXISTS "/etc/debian_version") SET(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL "Install .so files without execute permission.") - ENDIF("${CMAKE_LINUX_DISTRO}" MATCHES "${CMAKE_INSTALL_SO_NO_EXE_DISTRO}") + ENDIF(EXISTS "/etc/debian_version") ENDIF(DEFINED CMAKE_INSTALL_SO_NO_EXE) INCLUDE(Platform/UnixPaths) |