options for using OpenGLES (not functional yet)
This commit is contained in:
parent
7bc8df1010
commit
7cf246c97e
|
@ -8,12 +8,23 @@ OPTION(USE_PCH "Use precompiled header" ON)
|
||||||
OPTION(NO_CONSOLE "Disable console window on Windows" OFF)
|
OPTION(NO_CONSOLE "Disable console window on Windows" OFF)
|
||||||
OPTION(HANDLE_EXCEPTIONS "Generate crash reports" OFF)
|
OPTION(HANDLE_EXCEPTIONS "Generate crash reports" OFF)
|
||||||
OPTION(FORBIDDEN_FUNCTIONS "Enable forbidden lua functions" ON)
|
OPTION(FORBIDDEN_FUNCTIONS "Enable forbidden lua functions" ON)
|
||||||
|
OPTION(USE_GLES "Use OpenGLES (for mobiles devices)" OFF)
|
||||||
|
|
||||||
# find needed packages
|
# find needed packages
|
||||||
SET(Boost_USE_STATIC_LIBS ON)
|
SET(Boost_USE_STATIC_LIBS ON)
|
||||||
SET(Boost_USE_MULTITHREADED OFF)
|
SET(Boost_USE_MULTITHREADED OFF)
|
||||||
FIND_PACKAGE(Boost COMPONENTS system REQUIRED)
|
FIND_PACKAGE(Boost COMPONENTS system REQUIRED)
|
||||||
|
|
||||||
|
IF(USE_GLES)
|
||||||
|
FIND_PACKAGE(OpenGLES REQUIRED)
|
||||||
|
FIND_PACKAGE(EGL REQUIRED)
|
||||||
|
SET(OPENGL_INCLUDE_DIR ${OPENGLES_INCLUDE_DIR} ${EGL_INCLUDE_DIR})
|
||||||
|
SET(OPENGL_LIBRARIES ${OPENGLES_LIBRARY} ${EGL_LIBRARY})
|
||||||
|
ADD_DEFINITIONS(-DGLES -DEGL)
|
||||||
|
ELSE(USE_GLES)
|
||||||
FIND_PACKAGE(OpenGL REQUIRED)
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
|
ENDIF(USE_GLES)
|
||||||
|
|
||||||
FIND_PACKAGE(Lua REQUIRED)
|
FIND_PACKAGE(Lua REQUIRED)
|
||||||
FIND_PACKAGE(PhysFS REQUIRED)
|
FIND_PACKAGE(PhysFS REQUIRED)
|
||||||
FIND_PACKAGE(GMP REQUIRED)
|
FIND_PACKAGE(GMP REQUIRED)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Try to find the EGL librairy
|
||||||
|
# EGL_FOUND - system has EGL
|
||||||
|
# EGL_INCLUDE_DIR - the EGL include directory
|
||||||
|
# EGL_LIBRARY - the EGL library
|
||||||
|
|
||||||
|
FIND_PATH(EGL_INCLUDE_DIR egl.h PATH_SUFFIXES EGL)
|
||||||
|
FIND_LIBRARY(EGL_LIBRARY NAMES EGL)
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
|
||||||
|
MARK_AS_ADVANCED(EGL_LIBRARY EGL_INCLUDE_DIR)
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Try to find the OpenGLES librairy
|
||||||
|
# OPENGLES_FOUND - system has OpenGLES
|
||||||
|
# OPENGLES_INCLUDE_DIR - the OpenGLES include directory
|
||||||
|
# OPENGLES_LIBRARY - the OpenGLES library
|
||||||
|
|
||||||
|
FIND_PATH(OPENGLES_INCLUDE_DIR gl2.h PATH_SUFFIXES GLES2)
|
||||||
|
FIND_LIBRARY(OPENGLES_LIBRARY NAMES GLESv2)
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGLES DEFAULT_MSG OPENGLES_LIBRARY OPENGLES_INCLUDE_DIR)
|
||||||
|
MARK_AS_ADVANCED(OPENGLES_LIBRARY OPENGLES_INCLUDE_DIR)
|
Loading…
Reference in New Issue