Fix: No build error on input files checked
[apps/app-templates.git] / cmake / cmake.d / 02-variables.cmake
index ec6510f..a4634d4 100644 (file)
 
 # Get colorized message output non Windows OS. You know bash ? :)
 if(NOT WIN32)
-  string(ASCII 27 Esc)
-  set(ColourReset "${Esc}[m")
-  set(ColourBold  "${Esc}[1m")
-  set(Red         "${Esc}[31m")
-  set(Green       "${Esc}[32m")
-  set(Yellow      "${Esc}[33m")
-  set(Blue        "${Esc}[34m")
-  set(Magenta     "${Esc}[35m")
-  set(Cyan        "${Esc}[36m")
-  set(White       "${Esc}[37m")
-  set(BoldRed     "${Esc}[1;31m")
-  set(BoldGreen   "${Esc}[1;32m")
-  set(BoldYellow  "${Esc}[1;33m")
-  set(BoldBlue    "${Esc}[1;34m")
-  set(BoldMagenta "${Esc}[1;35m")
-  set(BoldCyan    "${Esc}[1;36m")
-  set(BoldWhite   "${Esc}[1;37m")
+       string(ASCII 27 Esc)
+       set(ColourReset "${Esc}[m")
+       set(ColourBold  "${Esc}[1m")
+       set(Red         "${Esc}[31m")
+       set(Green       "${Esc}[32m")
+       set(Yellow      "${Esc}[33m")
+       set(Blue        "${Esc}[34m")
+       set(Magenta     "${Esc}[35m")
+       set(Cyan        "${Esc}[36m")
+       set(White       "${Esc}[37m")
+       set(BoldRed     "${Esc}[1;31m")
+       set(BoldGreen   "${Esc}[1;32m")
+       set(BoldYellow  "${Esc}[1;33m")
+       set(BoldBlue    "${Esc}[1;34m")
+       set(BoldMagenta "${Esc}[1;35m")
+       set(BoldCyan    "${Esc}[1;36m")
+       set(BoldWhite   "${Esc}[1;37m")
 endif()
 
 # Native packaging name
 set(NPKG_PROJECT_NAME agl-${PROJECT_NAME})
 
-# Get the os type
-# Used to package .deb
-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 ".*=([0-9a-z._-]*)\n" "\\1" OSRELEASE ${TMP_OSRELEASE})
-       else()
-               set(OSRELEASE "NO COMPATIBLE !")
-       endif()
-       message(STATUS "Distribution used ${OSRELEASE}")
-else()
-       set(OSRELEASE "NO COMPATIBLE !")
-endif()
-
-if(DEFINED ENV{SDKTARGETSYSROOT})
-       file(STRINGS $ENV{SDKTARGETSYSROOT}/usr/include/linux/version.h LINUX_VERSION_CODE_LINE REGEX "LINUX_VERSION_CODE")
-elseif(DEFINED ENV{PKG_CONFIG_SYSROOT_DIR})
-       file(STRINGS $ENV{PKG_CONFIG_SYSROOT_DIR}/usr/include/linux/version.h LINUX_VERSION_CODE_LINE REGEX "LINUX_VERSION_CODE")
-else()
-       file(STRINGS /usr/include/linux/version.h LINUX_VERSION_CODE_LINE REGEX "LINUX_VERSION_CODE")
-endif()
-
 string(REGEX MATCH "[0-9]+" LINUX_VERSION_CODE ${LINUX_VERSION_CODE_LINE})
 math(EXPR a "${LINUX_VERSION_CODE} >> 16")
 math(EXPR b "(${LINUX_VERSION_CODE} >> 8) & 255")
@@ -164,6 +139,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 -o /dev/null" CACHE STRING "LUA compiler")
+set(LUA_CHECKER "luac" "-p" CACHE STRING "LUA compiler")
 set(XML_CHECKER "xmllint" CACHE STRING "XML linter")
-set(JSON_CHECKER "echo" CACHE STRING "JSON linter")
+set(JSON_CHECKER "" CACHE STRING "JSON linter")