28 lines
975 B
CMake
28 lines
975 B
CMake
include_guard(GLOBAL)
|
|
|
|
set(MYX_CMAKE_LSB_DISTRIBUTOR_ID "unknown")
|
|
set(MYX_CMAKE_LSB_CODENAME "unknown")
|
|
set(MYX_CMAKE_LSB_RELEASE_VERSION "unknown")
|
|
|
|
if(CMAKE_CROSSCOMPILING)
|
|
return()
|
|
endif()
|
|
|
|
if(EXISTS /etc/mcst_version)
|
|
set(MYX_CMAKE_LSB_DISTRIBUTOR_ID "ElbrusD")
|
|
set(MYX_CMAKE_LSB_CODENAME "Jessie")
|
|
execute_process(
|
|
COMMAND cat /etc/mcst_version
|
|
OUTPUT_VARIABLE MYX_CMAKE_LSB_RELEASE_VERSION
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
else()
|
|
find_program(_lsb_release_exe lsb_release)
|
|
# cmake-format: off
|
|
if(_lsb_release_exe)
|
|
execute_process(COMMAND ${_lsb_release_exe} -si OUTPUT_VARIABLE MYX_CMAKE_LSB_DISTRIBUTOR_ID OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
execute_process(COMMAND ${_lsb_release_exe} -sc OUTPUT_VARIABLE MYX_CMAKE_LSB_CODENAME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
execute_process(COMMAND ${_lsb_release_exe} -sr OUTPUT_VARIABLE MYX_CMAKE_LSB_RELEASE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
endif()
|
|
# cmake-format: on
|
|
endif()
|