mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Add options for GL and GLES selection
Fallback to autodetect or OpenGL Desktop if no option is selected.
This commit is contained in:
parent
471b1e66a6
commit
43c9043856
|
@ -1,5 +1,8 @@
|
||||||
cmake_minimum_required(VERSION 2.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)
|
project(emulationstation-all)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -11,33 +14,30 @@ LIST(APPEND CMAKE_MODULE_PATH
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#set up OpenGL system variable
|
#set up OpenGL system variable
|
||||||
set(GLSystem "Desktop OpenGL" CACHE STRING "The OpenGL system to be used")
|
if(GLES)
|
||||||
set_property(CACHE GLSystem PROPERTY STRINGS "Desktop OpenGL" "OpenGL ES")
|
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
|
#check if we're running on Raspberry Pi
|
||||||
MESSAGE("Looking for bcm_host.h")
|
elseif(EXISTS "/opt/vc/include/bcm_host.h")
|
||||||
if(EXISTS "/opt/vc/include/bcm_host.h")
|
|
||||||
MESSAGE("bcm_host.h found")
|
MESSAGE("bcm_host.h found")
|
||||||
set(BCMHOST found)
|
set(BCMHOST found)
|
||||||
set(GLSystem "OpenGL ES")
|
set(GLSystem "OpenGL ES" CACHE STRING "The OpenGL system to be used")
|
||||||
else()
|
|
||||||
MESSAGE("bcm_host.h not found")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#check if we're running on olinuxino / odroid / etc
|
#check if we're running on olinuxino / odroid / etc
|
||||||
MESSAGE("Looking for libMali.so")
|
elseif(EXISTS "/usr/lib/libMali.so" OR
|
||||||
if(EXISTS "/usr/lib/libMali.so" OR
|
|
||||||
EXISTS "/usr/lib/arm-linux-gnueabihf/libMali.so" OR
|
EXISTS "/usr/lib/arm-linux-gnueabihf/libMali.so" OR
|
||||||
EXISTS "/usr/lib/aarch64-linux-gnu/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/mali-egl/libmali.so" OR
|
||||||
EXISTS "/usr/lib/arm-linux-gnueabihf/libmali.so")
|
EXISTS "/usr/lib/arm-linux-gnueabihf/libmali.so")
|
||||||
MESSAGE("libMali.so found")
|
MESSAGE("libMali.so found")
|
||||||
set(GLSystem "OpenGL ES")
|
set(GLSystem "OpenGL ES" CACHE STRING "The OpenGL system to be used")
|
||||||
else()
|
else()
|
||||||
MESSAGE("libMali.so not found")
|
set(GLSystem "Desktop OpenGL" CACHE STRING "The OpenGL system to be used")
|
||||||
endif()
|
endif(GLES)
|
||||||
|
|
||||||
|
set_property(CACHE GLSystem PROPERTY STRINGS "Desktop OpenGL" "OpenGL ES")
|
||||||
|
|
||||||
#finding necessary packages
|
#finding necessary packages
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue