mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-01 04:23:14 +01:00
Add detection of used Linux distribution.
This information is then used to put the bash completion files into the right directory.
This commit is contained in:
20
cmake/Modules/GetLinuxDistribution.cmake
Normal file
20
cmake/Modules/GetLinuxDistribution.cmake
Normal file
@@ -0,0 +1,20 @@
|
||||
# Gets the linux distribution
|
||||
#
|
||||
# This module defines:
|
||||
# LINUX_DISTRIBUTION_IS_REDHAT
|
||||
# LINUX_DISTRIBUTION_IS_GENTOO
|
||||
|
||||
# Check: Can /usr/bin/lsb_release -a be used?
|
||||
|
||||
set(LINUX_DISTRIBUTION_IS_REDHAT FALSE)
|
||||
set(LINUX_DISTRIBUTION_IS_GENTOO FALSE)
|
||||
|
||||
if (UNIX)
|
||||
if (EXISTS "/etc/redhat-release")
|
||||
set(LINUX_DISTRIBUTION_IS_REDHAT TRUE)
|
||||
endif()
|
||||
|
||||
if (EXISTS "/etc/gentoo-release")
|
||||
set(LINUX_DISTRIBUTION_IS_GENTOO TRUE)
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user