aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d/02-variables.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/cmake.d/02-variables.cmake')
-rw-r--r--cmake/cmake.d/02-variables.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmake/cmake.d/02-variables.cmake b/cmake/cmake.d/02-variables.cmake
index dd86d2b..ec6510f 100644
--- a/cmake/cmake.d/02-variables.cmake
+++ b/cmake/cmake.d/02-variables.cmake
@@ -54,14 +54,15 @@ if(EXISTS "/etc/os-release")
execute_process(COMMAND grep -E "^ID(=|_LIKE=)" /etc/os-release
OUTPUT_VARIABLE TMP_OSRELEASE
)
+
if (NOT TMP_OSRELEASE STREQUAL "")
- string(REGEX REPLACE ".*=" "" OSRELEASE ${TMP_OSRELEASE})
+ string(REGEX REPLACE ".*=([0-9a-z._-]*)\n" "\\1" OSRELEASE ${TMP_OSRELEASE})
else()
- set(OSRELEASE "NOT DEBIAN OS")
+ set(OSRELEASE "NO COMPATIBLE !")
endif()
- message(STATUS "OSRELEASE = ${OSRELEASE}")
+ message(STATUS "Distribution used ${OSRELEASE}")
else()
- set(OSRELEASE "NOT DEBIAN OS")
+ set(OSRELEASE "NO COMPATIBLE !")
endif()
if(DEFINED ENV{SDKTARGETSYSROOT})