From 02d872d6fd51880c015f84915754afee953dd03a Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Sat, 14 May 2016 13:07:04 -0500 Subject: [PATCH] fix rpi build and detection --- CMakeLists.txt | 12 +++++++++--- src/swf.cpp | 8 -------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 917a280a9..1202c6855 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,10 +109,16 @@ endif() #### BEGIN: Misc #### # If ARM, assume GLES -if(NOT FE_RPI AND "${CMAKE_TARGET_ARCHITECTURES}" MATCHES "arm") +if("${CMAKE_TARGET_ARCHITECTURES}" MATCHES "arm") set(USE_GLES ON) - set(FE_RPI ON) - message(STATUS "ARM detected: FE_RPI and USE_GLES set") + set(VIDEOCORE_PATH /opt/vc) + find_file(HAVE_VIDEOCORE bcm_host.h PATHS ${VIDEOCORE_PATH}/include NO_DEFAULT_PATH) + if(HAVE_VIDEOCORE) + set(FE_RPI ON) + include_directories(${VIDEOCORE_PATH}/include) + link_directories(${VIDEOCORE_PATH}/lib) + endif() + message(STATUS "ARM detected: USE_GLES:${USE_GLES} FE_RPI:${FE_RPI}") endif() if(NOT WIN32) diff --git a/src/swf.cpp b/src/swf.cpp index 63b0ec4b7..d61f3432a 100644 --- a/src/swf.cpp +++ b/src/swf.cpp @@ -34,14 +34,6 @@ #include "gameswf/gameswf_freetype.h" #endif -#ifdef FE_RPI -#define USE_GLES 1 -#endif - -#ifdef SFML_SYSTEM_ANDROID -#define USE_GLES 1 -#endif - #ifdef USE_GLES #include #include