From c1c52e844a7b93fadf35ab27f12b97765309e42d Mon Sep 17 00:00:00 2001 From: Bim Overbohm Date: Fri, 24 May 2013 11:36:29 +0200 Subject: [PATCH] Check for g++, not gcc and fix linking on Raspberry Pi We actually need g++, not gcc. Also on the Pi the OpenGLES libs where missing. --- CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be6c2f3bf..ba96dd160 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,10 +57,10 @@ if(MSVC) endif() if(CMAKE_COMPILER_IS_GNUCXX) - #check for GCC 4.7+ - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if (GCC_VERSION VERSION_LESS 4.7) - message(SEND_ERROR "You need at least GCC 4.7 to compile EmulationStation!") + #check for G++ 4.7+ + execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE G++_VERSION) + if (G++_VERSION VERSION_LESS 4.7) + message(SEND_ERROR "You need at least G++ 4.7 to compile EmulationStation!") endif() #set up compiler flags for GCC set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2") #support C++11 for std::, optimize @@ -230,6 +230,7 @@ if(DEFINED BCMHOST) LIST(APPEND ES_LIBRARIES bcm_host EGL + ${OPENGLES_LIBRARIES} ) else() if(MSVC) @@ -270,4 +271,4 @@ if(MSVC) set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") set_target_properties(emulationstation PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") -endif() \ No newline at end of file +endif()