Autodetect Raspberry Pi in CMake file

...instead of expecting the user to manually-define it
This commit is contained in:
Clownacy 2019-04-18 20:04:49 +01:00
parent d38c96622c
commit 2a9e8bd8cc

View file

@ -4,10 +4,12 @@ if ((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.
cmake_policy(SET CMP0069 NEW) cmake_policy(SET CMP0069 NEW)
endif() endif()
include(CheckIncludeFile)
CHECK_INCLUDE_FILE(/opt/vc/include/bcm_host.h RASPBERRY_PI)
option(STATIC "Produce a statically-linked executable (good for Windows builds, so you don't need to bundle DLL files)" OFF) option(STATIC "Produce a statically-linked executable (good for Windows builds, so you don't need to bundle DLL files)" OFF)
option(JAPANESE "Enable the Japanese-language build" OFF) option(JAPANESE "Enable the Japanese-language build" OFF)
option(FIX_BUGS "Fix certain bugs (see src/Bug Fixes.txt)" OFF) option(FIX_BUGS "Fix certain bugs (see src/Bug Fixes.txt)" OFF)
option(RASPBERRY_PI "Enable tweaks to improve performance on Raspberry Pis" OFF)
option(NONPORTABLE "Enable bits of code that aren't portable, but are what the original game used" OFF) option(NONPORTABLE "Enable bits of code that aren't portable, but are what the original game used" OFF)
# Default to Release build # Default to Release build