From 8a24d172da06b562da2e80d0d776e787066d38ad Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 19 Jun 2017 08:37:10 +0200 Subject: [PATCH] cmake: added a flag to indicate if we are compiling on a Raspberry Pi host --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b54b279b..8adc599a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ option(V4L-RTL "Use Linux Kernel RTL-SDR Source." OFF) option(V4L-MSI "Use Linux Kernel MSI2500 Source." OFF) option(BUILD_TYPE "Build type (RELEASE, RELEASEWITHDBGINFO, DEBUG" RELEASE) option(DEBUG_OUTPUT "Print debug messages" OFF) +option(HOST_RPI3 "Compiling on RPi3" OFF) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) @@ -445,6 +446,10 @@ include_directories( ############################################################################## +if (HOST_RPI3) + message( STATUS "Compiling on RPi3" ) +endif() + EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE ) message( STATUS "Architecture: ${ARCHITECTURE}" )