Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pi makefiles for local compilation. #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions cmake/pi-opengl.cmake
Original file line number Diff line number Diff line change
@@ -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

)
26 changes: 26 additions & 0 deletions cmake/pi-opengles.cmake
Original file line number Diff line number Diff line change
@@ -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

)