2019-07-20 09:10:31 +00:00
|
|
|
if(CMAKE_CROSSCOMPILING)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2019-02-12 16:31:17 +00:00
|
|
|
if(LSB_RELEASE)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2019-07-20 09:10:31 +00:00
|
|
|
set(LSB_DISTRIBUTOR_ID "unknown")
|
|
|
|
set(LSB_CODENAME "unknown")
|
|
|
|
set(LSB_RELEASE "unknown")
|
2019-02-12 16:31:17 +00:00
|
|
|
|
2019-10-07 10:52:50 +00:00
|
|
|
if(EXISTS /etc/mcst_version)
|
2019-07-20 09:10:31 +00:00
|
|
|
set(LSB_DISTRIBUTOR_ID "ElbrusD")
|
|
|
|
set(LSB_CODENAME "Jessie")
|
2019-12-03 16:23:14 +00:00
|
|
|
execute_process(
|
|
|
|
COMMAND cat /etc/mcst_version
|
|
|
|
OUTPUT_VARIABLE LSB_RELEASE
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
2019-07-20 09:10:31 +00:00
|
|
|
else()
|
|
|
|
find_program(_lsb_release_executable lsb_release)
|
|
|
|
if(_lsb_release_executable)
|
2019-12-03 16:23:14 +00:00
|
|
|
execute_process(
|
|
|
|
COMMAND ${_lsb_release_executable} -si
|
|
|
|
OUTPUT_VARIABLE LSB_DISTRIBUTOR_ID
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
2019-02-12 16:31:17 +00:00
|
|
|
|
2019-12-03 16:23:14 +00:00
|
|
|
execute_process(
|
|
|
|
COMMAND ${_lsb_release_executable} -sc
|
|
|
|
OUTPUT_VARIABLE LSB_CODENAME
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
2019-02-12 16:31:17 +00:00
|
|
|
|
2019-12-03 16:23:14 +00:00
|
|
|
execute_process(
|
|
|
|
COMMAND ${_lsb_release_executable} -sr
|
|
|
|
OUTPUT_VARIABLE LSB_RELEASE
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
2019-07-20 09:10:31 +00:00
|
|
|
endif()
|
2019-02-12 16:31:17 +00:00
|
|
|
endif()
|