if(NOT GLES2_PACKAGE_DIR)
	message("ERROR: GLES2_PACKAGE_DIR requires to be set")
endif(NOT GLES2_PACKAGE_DIR)

if(MSVC AND NOT CMAKE_CL_64)
	set(BINARY_DIRECTORY "win32")
endif(MSVC AND NOT CMAKE_CL_64)

if(MSVC AND CMAKE_CL_64)
	set(BINARY_DIRECTORY "win64")
endif(MSVC AND CMAKE_CL_64)

set(GLES2_INCLUDE_DIR ${GLES2_PACKAGE_DIR}/gles2)

set(GLES2_LIBRARY_DIR ${GLES2_PACKAGE_DIR}/lib/${BINARY_DIRECTORY})
set(GLES2_FOUND "YES")

set(GLES2_LIBRARY libGLESv2)

include_directories(${GLES2_INCLUDE_DIR})
link_directories(${GLES2_LIBRARY_DIR})
