mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Merge pull request #213 from gizmo98/gles
Add options for GL and GLES selection
This commit is contained in:
commit
a685f09368
|
@ -1,5 +1,8 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
option(GLES "Set to ON if targeting OpenGL ES" ${GLES})
|
||||
option(GL "Set to ON if targeting Desktop OpenGL" ${GL})
|
||||
|
||||
project(emulationstation-all)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -11,33 +14,30 @@ LIST(APPEND CMAKE_MODULE_PATH
|
|||
|
||||
#-------------------------------------------------------------------------------
|
||||
#set up OpenGL system variable
|
||||
set(GLSystem "Desktop OpenGL" CACHE STRING "The OpenGL system to be used")
|
||||
set_property(CACHE GLSystem PROPERTY STRINGS "Desktop OpenGL" "OpenGL ES")
|
||||
|
||||
if(GLES)
|
||||
set(GLSystem "OpenGL ES" CACHE STRING "The OpenGL system to be used")
|
||||
elseif(GL)
|
||||
set(GLSystem "Desktop OpenGL" CACHE STRING "The OpenGL system to be used")
|
||||
#-------------------------------------------------------------------------------
|
||||
#check if we're running on Raspberry Pi
|
||||
MESSAGE("Looking for bcm_host.h")
|
||||
if(EXISTS "/opt/vc/include/bcm_host.h")
|
||||
elseif(EXISTS "/opt/vc/include/bcm_host.h")
|
||||
MESSAGE("bcm_host.h found")
|
||||
set(BCMHOST found)
|
||||
set(GLSystem "OpenGL ES")
|
||||
else()
|
||||
MESSAGE("bcm_host.h not found")
|
||||
endif()
|
||||
|
||||
set(GLSystem "OpenGL ES" CACHE STRING "The OpenGL system to be used")
|
||||
#-------------------------------------------------------------------------------
|
||||
#check if we're running on olinuxino / odroid / etc
|
||||
MESSAGE("Looking for libMali.so")
|
||||
if(EXISTS "/usr/lib/libMali.so" OR
|
||||
EXISTS "/usr/lib/arm-linux-gnueabihf/libMali.so" OR
|
||||
EXISTS "/usr/lib/aarch64-linux-gnu/libMali.so" OR
|
||||
EXISTS "/usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so" OR
|
||||
EXISTS "/usr/lib/arm-linux-gnueabihf/libmali.so")
|
||||
elseif(EXISTS "/usr/lib/libMali.so" OR
|
||||
EXISTS "/usr/lib/arm-linux-gnueabihf/libMali.so" OR
|
||||
EXISTS "/usr/lib/aarch64-linux-gnu/libMali.so" OR
|
||||
EXISTS "/usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so" OR
|
||||
EXISTS "/usr/lib/arm-linux-gnueabihf/libmali.so")
|
||||
MESSAGE("libMali.so found")
|
||||
set(GLSystem "OpenGL ES")
|
||||
set(GLSystem "OpenGL ES" CACHE STRING "The OpenGL system to be used")
|
||||
else()
|
||||
MESSAGE("libMali.so not found")
|
||||
endif()
|
||||
set(GLSystem "Desktop OpenGL" CACHE STRING "The OpenGL system to be used")
|
||||
endif(GLES)
|
||||
|
||||
set_property(CACHE GLSystem PROPERTY STRINGS "Desktop OpenGL" "OpenGL ES")
|
||||
|
||||
#finding necessary packages
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue