Add macros to make a 2nd pass on required module
[staging/xdg-launcher.git] / cmake / cmake.d / 02-variables.cmake
index e580263..ec6510f 100644 (file)
@@ -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})
@@ -163,6 +164,6 @@ set(GDB_INITIAL_BREAK "personality" CACHE STRING "Initial Break Point for GDB re
 # Define some checker binaries to verify input DATA files
 # to be included in package. Schema aren't checked for now.
 # Dummy checker about JSON.
-set(LUA_CHECKER "luac" CACHE STRING "LUA compiler")
+set(LUA_CHECKER "luac -o /dev/null" CACHE STRING "LUA compiler")
 set(XML_CHECKER "xmllint" CACHE STRING "XML linter")
 set(JSON_CHECKER "echo" CACHE STRING "JSON linter")