22 lines
605 B
CMake
22 lines
605 B
CMake
if(LSB_RELEASE)
|
|
return()
|
|
endif()
|
|
|
|
find_program(_lsb_release_executable lsb_release)
|
|
|
|
if(_lsb_release_executable)
|
|
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)
|
|
|
|
execute_process(COMMAND ${_lsb_release_executable} -si
|
|
OUTPUT_VARIABLE LSB_DISTRIBUTOR_ID OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
else()
|
|
set(LSB_DISTRIBUTOR_ID "unknown")
|
|
set(LSB_RELEASE "unknown")
|
|
set(LSB_CODENAME "unknown")
|
|
endif()
|
|
|