Merge pull request #254 from psyke83/stretch

CMake: use correct Raspberry Pi library names & fix generic GLES support
This commit is contained in:
Jools Wills 2017-10-06 05:59:27 +01:00 committed by GitHub
commit eedd649ff0
2 changed files with 27 additions and 15 deletions

View file

@ -42,21 +42,33 @@ ELSE (WIN32)
ELSE(APPLE)
FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
/opt/vc/include
)
IF (DEFINED BCMHOST)
FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h
/opt/vc/include
NO_DEFAULT_PATH
)
FIND_LIBRARY(OPENGLES_gl_LIBRARY
NAMES GLES_CM GLESv1_CM
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
/usr/lib
/opt/vc/lib
)
FIND_LIBRARY(OPENGLES_gl_LIBRARY
NAMES brcmGLESv2
PATHS /opt/vc/lib
)
ELSE (DEFINED BCMHOST)
FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
)
FIND_LIBRARY(OPENGLES_gl_LIBRARY
NAMES GLES_CM GLESv1_CM
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
/usr/lib
)
ENDIF (DEFINED BCMHOST)
# On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't

View file

@ -178,7 +178,7 @@ endif()
if(DEFINED BCMHOST)
LIST(APPEND COMMON_LIBRARIES
bcm_host
EGL
brcmEGL
${OPENGLES_LIBRARIES}
)
else()