2012-08-18 11:40:57 +00:00
|
|
|
# DetectDistro.cmake -- Detect Linux distribution
|
|
|
|
|
|
|
|
message(STATUS "System is: ${CMAKE_SYSTEM_NAME}")
|
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
# Detect Linux distribution (if possible)
|
2012-08-26 09:55:45 +00:00
|
|
|
execute_process(COMMAND "/usr/bin/lsb_release" "-is"
|
2012-08-18 11:40:57 +00:00
|
|
|
TIMEOUT 4
|
|
|
|
OUTPUT_VARIABLE LINUX_DISTRO
|
|
|
|
ERROR_QUIET
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
message(STATUS "Linux distro is: ${LINUX_DISTRO}")
|
|
|
|
endif()
|