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 May 14, 2016
1 parent ca56335 commit 109e6d5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,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

0 comments on commit 109e6d5

Please sign in to comment.