File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ endif()
131131if ("${CMAKE_CXX_COMPILER_ID} " MATCHES "GNU|Clang|AppleClang" )
132132 set (COMMON_FLAGS "-Wall -Wextra -Wno-error \
133133 -Wno-macro-redefined \
134+ -Wno-inconsistent-missing-override \
134135 -Wno-return-type \
135136 -Wno-unused-parameter \
136137 -Wno-unused-function \
@@ -180,6 +181,9 @@ else()
180181 set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${COMMON_CXX_FLAGS} " )
181182endif ()
182183
184+ # Toggle for GLES (Required for many ARM/Mobile platforms)
185+ option (USE_OPENGLES "Use OpenGLES instead of Desktop OpenGL" ON )
186+
183187# Set game compilation version
184188set (VERSION us)
185189set (USE_NETWORKING OFF )
@@ -191,6 +195,7 @@ set(GFX_DEBUG_DISASSEMBLER OFF)
191195# Add compile definitions for the target
192196add_compile_definitions (
193197 VERSION_US=1
198+ $<$<BOOL :${USE_OPENGLES} >:USE_OPENGLES >
194199 ENABLE_RUMBLE=1
195200 F3DEX_GBI=1
196201 _LANGUAGE_C
@@ -204,7 +209,11 @@ add_compile_definitions(
204209
205210# Find necessary libraries
206211if (UNIX AND NOT APPLE )
207- find_package (OpenGL REQUIRED )
212+ if (NOT USE_OPENGLES)
213+ find_package (OpenGL REQUIRED )
214+ else ()
215+ set (ADDITIONAL_LIBRARY_DEPENDENCIES ${ADDITIONAL_LIBRARY_DEPENDENCIES} GLESv2)
216+ endif ()
208217endif ()
209218
210219if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
You can’t perform that action at this time.
0 commit comments