Adapted the examples for iOS (WIP)

This commit is contained in:
Laurent Gomila 2013-08-26 09:17:53 +02:00 committed by Jonathan De Wachter
parent cefb4fcee0
commit 4e8e1629d1
6 changed files with 49 additions and 11 deletions

View file

@ -5,10 +5,15 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/opengl)
set(SRC ${SRCROOT}/OpenGL.cpp)
# find OpenGL and GLU
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
if(NOT IOS)
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES})
else()
set(ADDITIONAL_LIBRARIES -framework OpenGLES)
endif()
# define the opengl target
sfml_add_example(opengl GUI_APP
SOURCES ${SRC}
DEPENDS sfml-graphics sfml-window sfml-system ${OPENGL_LIBRARIES})
DEPENDS sfml-graphics sfml-window sfml-system ${ADDITIONAL_LIBRARIES})