mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Raspberry Pi: fix vendor library names & add override
* Use new libbrcmEGL/libbrcmGLESv2 names * Allow RPI autodetection override via -DMESA=On (for VC4 driver)
This commit is contained in:
parent
c75985b9d8
commit
d8ac5a761c
|
@ -7,6 +7,7 @@ endif()
|
||||||
option(EGL "Set to ON if targeting an EGL device" ${EGL})
|
option(EGL "Set to ON if targeting an EGL device" ${EGL})
|
||||||
option(PANDORA "Set to ON if targeting an OpenPandora" ${PANDORA})
|
option(PANDORA "Set to ON if targeting an OpenPandora" ${PANDORA})
|
||||||
option(MUPENPLUSAPI "Set to ON for Mupen64Plus plugin" ${MUPENPLUSAPI})
|
option(MUPENPLUSAPI "Set to ON for Mupen64Plus plugin" ${MUPENPLUSAPI})
|
||||||
|
option(MESA "Set to ON to disable Raspberry Pi autodetection" ${MESA})
|
||||||
|
|
||||||
project( GLideN64 )
|
project( GLideN64 )
|
||||||
|
|
||||||
|
@ -103,10 +104,11 @@ set(GLideN64_SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
#check if we're running on Raspberry Pi
|
#check if we're running on Raspberry Pi
|
||||||
if(EXISTS "/opt/vc/include/bcm_host.h")
|
if(EXISTS "/opt/vc/include/bcm_host.h" AND NOT MESA)
|
||||||
message("bcm_host.h found")
|
message("bcm_host.h found")
|
||||||
set(BCMHOST ON)
|
set(BCMHOST ON)
|
||||||
set(EGL ON)
|
set(EGL ON)
|
||||||
|
set(EGL_LIB -lbrcmEGL)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DVC
|
-DVC
|
||||||
)
|
)
|
||||||
|
@ -120,7 +122,9 @@ if(EXISTS "/opt/vc/include/bcm_host.h")
|
||||||
"/opt/vc/lib"
|
"/opt/vc/lib"
|
||||||
"/opt/vc/lib/GL"
|
"/opt/vc/lib/GL"
|
||||||
)
|
)
|
||||||
endif(EXISTS "/opt/vc/include/bcm_host.h")
|
else(EXISTS "/opt/vc/include/bcm_host.h" AND NOT MESA)
|
||||||
|
set(EGL_LIB -lEGL)
|
||||||
|
endif(EXISTS "/opt/vc/include/bcm_host.h" AND NOT MESA)
|
||||||
|
|
||||||
if(MUPENPLUSAPI)
|
if(MUPENPLUSAPI)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
|
@ -288,8 +292,8 @@ endif( CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
if(EGL)
|
if(EGL)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DEGL
|
-DEGL
|
||||||
)
|
)
|
||||||
SET(OPENGL_LIBRARIES -lEGL)
|
SET(OPENGL_LIBRARIES ${EGL_LIB})
|
||||||
else(EGL)
|
else(EGL)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
include_directories(${OpenGL_INCLUDE_DIRS})
|
include_directories(${OpenGL_INCLUDE_DIRS})
|
||||||
|
|
|
@ -189,7 +189,7 @@ PFNGLFLUSHMAPPEDBUFFERRANGEPROC g_glFlushMappedBufferRange;
|
||||||
void initGLFunctions()
|
void initGLFunctions()
|
||||||
{
|
{
|
||||||
#ifdef VC
|
#ifdef VC
|
||||||
void *gles2so = dlopen("/opt/vc/lib/libGLESv2.so", RTLD_NOW);
|
void *gles2so = dlopen("/opt/vc/lib/libbrcmGLESv2.so", RTLD_NOW);
|
||||||
#endif
|
#endif
|
||||||
#ifdef OS_WINDOWS
|
#ifdef OS_WINDOWS
|
||||||
GL_GET_PROC_ADR(PFNGLACTIVETEXTUREPROC, glActiveTexture);
|
GL_GET_PROC_ADR(PFNGLACTIVETEXTUREPROC, glActiveTexture);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user