From 234c1bfc3cc68cbe64d3858c3b70e7cd995db7ee Mon Sep 17 00:00:00 2001 From: Vanfanel Date: Mon, 31 Jan 2022 20:53:44 +0100 Subject: [PATCH] Add Pi makefiles for local compilation. --- cmake/pi-opengl.cmake | 25 +++++++++++++++++++++++++ cmake/pi-opengles.cmake | 26 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 cmake/pi-opengl.cmake create mode 100644 cmake/pi-opengles.cmake diff --git a/cmake/pi-opengl.cmake b/cmake/pi-opengl.cmake new file mode 100644 index 00000000..994c9383 --- /dev/null +++ b/cmake/pi-opengl.cmake @@ -0,0 +1,25 @@ +# ----------------------------------------------------------------------------- +# CannonBall Raspberry Pi +# (For local compilation) +# Raspberry Pi has full OpenGL support (with and w/o X11) via MESA and GLVND. +# ----------------------------------------------------------------------------- + +# Library Locations +set(boost_dir ${lib_base}/boost_1_74_0) +set(sdl2_dir ${lib_base}/SDL2-2.0.12) + +# GCC Specific flags (optimize for Pi CPU with CFLAGS based on current Pi model, +# useful when building on the Pi itself instead of cross-compiling). +set(CMAKE_CXX_FLAGS "-O3 -march=native -mcpu=native -ftree-vectorize -pipe -fomit-frame-pointer") + +# Platform Specific Libraries. + +set(platform_link_libs + SDL2 + OpenGL +) + +# Platform Specific Link Directories +set(platform_link_dirs + +) diff --git a/cmake/pi-opengles.cmake b/cmake/pi-opengles.cmake new file mode 100644 index 00000000..0876a96a --- /dev/null +++ b/cmake/pi-opengles.cmake @@ -0,0 +1,26 @@ +# ----------------------------------------------------------------------------- +# CannonBall Raspberry Pi4 (Smarty Hardware) +# (For local compilation) +# ----------------------------------------------------------------------------- + +# Library Locations +set(boost_dir ${lib_base}/boost_1_74_0) +set(sdl2_dir ${lib_base}/SDL2-2.0.12) + +# Use OpenGLES for rendering. +set(OPENGLES 1) + +# GCC Specific flags (optimize for Pi CPU with CFLAGS based on current Pi model, +# useful when building on the Pi itself instead of cross-compiling). +set(CMAKE_CXX_FLAGS "-O3 -march=native -mcpu=native -ftree-vectorize -pipe -fomit-frame-pointer") + +# Platform Specific Libraries +set(platform_link_libs + SDL2 + GLESv2 +) + +# Platform Specific Link Directories +set(platform_link_dirs + +)