Skip to content

Commit

Permalink
fix rpi build and detection
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tw1r3 committed Jul 31, 2016
1 parent a274d68 commit 02d872d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions src/swf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <GLES/gl.h>
#include <GLES/glext.h>
Expand Down

0 comments on commit 02d872d

Please sign in to comment.