X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=cmake%2Fcmake.d%2F02-variables.cmake;h=0532c33a40b5009596f9e5e5b76c18a29308b21a;hb=e9a682f1c694eec242c3cebccc09380f621ade0b;hp=285648f6758dc67fd06e0e61047c88be3fb09ab6;hpb=2e8abc421151b81272f7ab988e494fd29eb431ff;p=staging%2Fxdg-launcher.git diff --git a/cmake/cmake.d/02-variables.cmake b/cmake/cmake.d/02-variables.cmake index 285648f..0532c33 100644 --- a/cmake/cmake.d/02-variables.cmake +++ b/cmake/cmake.d/02-variables.cmake @@ -26,54 +26,28 @@ # 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 bash "-c" "grep -E '^ID(_LIKE)?=' /etc/os-release | tail -n 1" - OUTPUT_VARIABLE TMP_OSRELEASE - ) - - if (NOT TMP_OSRELEASE STREQUAL "") - string(REGEX REPLACE ".*=\"?([0-9a-z\._-]*)\"?\n" "\\1" OSRELEASE ${TMP_OSRELEASE}) - else() - set(OSRELEASE "NOT COMPATIBLE !") - endif() - -else() - set(OSRELEASE "NOT COMPATIBLE ! Missing /etc/os-release file.") -endif() -message(STATUS "Distribution used ${OSRELEASE}") - -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") @@ -165,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")