diff --git a/modules/Findscript.cmake.in b/modules/Findscript.cmake.in index 01eed82..f597851 100644 --- a/modules/Findscript.cmake.in +++ b/modules/Findscript.cmake.in @@ -101,6 +101,21 @@ else() message(STATUS "@CMAKE_PROJECT_NAME@: ${findFile}.") message(AUTHOR_WARNING "Find scripts don't match. You may want to update the local with the @CMAKE_PROJECT_NAME@ version.") endif() + execute_process(COMMAND lsb_release --description + OUTPUT_VARIABLE lsbDesc # LSB (Linux Standard Base) + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE lsbErr + ) + if(NOT lsbErr) + set(infoFile ${@CMAKE_PROJECT_NAME@_DIR}/@CMAKE_PROJECT_NAME@_${@CMAKE_PROJECT_NAME@_SIG}.txt) + set(lsbString "^lsb_release Description:[ \t]+(.*)") + file(STRINGS ${infoFile} LSB REGEX "${lsbString}") + string(REGEX REPLACE "${lsbString}" "\\1" xpLSB ${LSB}) + string(REGEX REPLACE "Description:[ \t]+(.*)" "\\1" thisLSB ${lsbDesc}) + if(NOT xpLSB STREQUAL thisLSB) + message(AUTHOR_WARNING "@CMAKE_PROJECT_NAME@ ${xpLSB} build\n${PROJECT_NAME} ${thisLSB} build") + endif() + endif() message(STATUS "Found @CMAKE_PROJECT_NAME@: ${@CMAKE_PROJECT_NAME@_DIR}") list(APPEND XP_MODULE_PATH ${moduleDir}) link_directories(${@CMAKE_PROJECT_NAME@_DIR}/lib)