Параметры целевой системы в cmlib_config.hpp
This commit is contained in:
parent
f4ea735208
commit
52975c9a35
@ -1,24 +1,33 @@
|
|||||||
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(LSB_RELEASE)
|
if(LSB_RELEASE)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_program(_lsb_release_executable lsb_release)
|
set(LSB_DISTRIBUTOR_ID "unknown")
|
||||||
|
set(LSB_CODENAME "unknown")
|
||||||
|
set(LSB_RELEASE "unknown")
|
||||||
|
|
||||||
if(_lsb_release_executable)
|
if (EXISTS /etc/mcst_version)
|
||||||
execute_process(COMMAND ${_lsb_release_executable} -sc
|
set(LSB_DISTRIBUTOR_ID "ElbrusD")
|
||||||
OUTPUT_VARIABLE LSB_CODENAME
|
set(LSB_CODENAME "Jessie")
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
excecute_process(cat /etc/mcst_version OUTPUT_VARIABLE LSB_RELEASE)
|
||||||
|
|
||||||
execute_process(COMMAND ${_lsb_release_executable} -sr
|
|
||||||
OUTPUT_VARIABLE LSB_RELEASE
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
execute_process(COMMAND ${_lsb_release_executable} -si
|
|
||||||
OUTPUT_VARIABLE LSB_DISTRIBUTOR_ID
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
else()
|
else()
|
||||||
set(LSB_DISTRIBUTOR_ID "unknown")
|
find_program(_lsb_release_executable lsb_release)
|
||||||
set(LSB_RELEASE "unknown")
|
if(_lsb_release_executable)
|
||||||
set(LSB_CODENAME "unknown")
|
execute_process(COMMAND ${_lsb_release_executable} -si
|
||||||
|
OUTPUT_VARIABLE LSB_DISTRIBUTOR_ID
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
execute_process(COMMAND ${_lsb_release_executable} -sc
|
||||||
|
OUTPUT_VARIABLE LSB_CODENAME
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
execute_process(COMMAND ${_lsb_release_executable} -sr
|
||||||
|
OUTPUT_VARIABLE LSB_RELEASE
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -19,5 +19,9 @@
|
|||||||
#cmakedefine HAVE__FSEEKI64
|
#cmakedefine HAVE__FSEEKI64
|
||||||
#cmakedefine HAVE_LARGEFILES @HAVE_LARGEFILES@
|
#cmakedefine HAVE_LARGEFILES @HAVE_LARGEFILES@
|
||||||
|
|
||||||
|
#define @CMLIB_PROJECT_NAME_CANONICAL@_LSB_ID "@LSB_DISTRIBUTOR_ID@"
|
||||||
|
#define @CMLIB_PROJECT_NAME_CANONICAL@_LSB_CODENAME "@LSB_CODENAME@"
|
||||||
|
#define @CMLIB_PROJECT_NAME_CANONICAL@_LSB_RELEASE "@LSB_RELEASE@"
|
||||||
|
|
||||||
#endif /* @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_ */
|
#endif /* @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_ */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user