Updated Rpi4 revision list, improved readability of code (#10)
Co-authored-by: Stefan Sherwood <miraculum1@gmail.com>
This commit is contained in:
parent
c3f9c29ce7
commit
310b346b3c
@ -60,10 +60,11 @@ if(GST_BUILD)
|
||||
add_definitions(-DRPI)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/functions.cmake)
|
||||
findRpiRevision( RPI_REVISION )
|
||||
if(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111")
|
||||
set(RPI_4_REVISIONS a03111 b03111 b03112 c03111 c03112 d03114)
|
||||
if(RPI_REVISION IN_LIST RPI_4_REVISIONS)
|
||||
message("Raspberry Pi 4 Found")
|
||||
add_definitions(-DPI4)
|
||||
endif(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111")
|
||||
endif(RPI_REVISION IN_LIST RPI_4_REVISIONS)
|
||||
endif(RPI_BUILD)
|
||||
message(STATUS "${GST_LIBRARIES}")
|
||||
endif(GST_BUILD)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
function( findRpiRevision OUTPUT )
|
||||
# Find it with an automated script
|
||||
execute_process( COMMAND grep -Po "^Revision\\s*:\\s*\\K[[:xdigit:]]+" /proc/cpuinfo OUTPUT_VARIABLE TMP )
|
||||
execute_process( COMMAND grep -Po "^Revision\\s*:\\s*\\K[[:xdigit:]]+" /proc/cpuinfo OUTPUT_VARIABLE TMP OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||
|
||||
# If have not found the Revision number, use the last version
|
||||
if ( TMP )
|
||||
|
Loading…
x
Reference in New Issue
Block a user