From 658d168b83d30928f7d29e6c7cb370ffdd2a347a Mon Sep 17 00:00:00 2001 From: dpuzyrkov <dpuzyrkov@termt.com> Date: Thu, 16 Jun 2022 15:19:26 +0300 Subject: [PATCH] [*] CMakeOSDetection: added distro name lookup. --- cmake/OS_Detection.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/OS_Detection.cmake b/cmake/OS_Detection.cmake index 7933170566..8271975aac 100644 --- a/cmake/OS_Detection.cmake +++ b/cmake/OS_Detection.cmake @@ -11,6 +11,12 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") message("[ ] Debian OS ${DEBIAN_OS_VERSION} (${DEBIAN_OS_NAME})") # check if we're building natively on Android (TERMUX) EXECUTE_PROCESS( COMMAND uname -o COMMAND tr -d '\n' OUTPUT_VARIABLE OPERATING_SYSTEM) + + execute_process ( + COMMAND bash -c "awk -F= '/^ID=/{print $2}' /etc/os-release |tr -d '\n' | tr -d '\"'" + OUTPUT_VARIABLE DEBIAN_OS_RELEASE_NAME + ) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android") set(ANDROID ON) set(UNIX ON) -- GitLab