diff options
author | sfan5 <sfan5@live.de> | 2021-03-06 21:23:00 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-03-06 21:40:05 +0100 |
commit | 6ce98dce7789c96dded00fabfe409356f954edfe (patch) | |
tree | 726349b76c4b6ab1391da76066463c0f4bf94e9c /cmake | |
parent | e3decfa3be6bd5d7d400b63a4baa7e8a735371ff (diff) | |
download | irrlicht-6ce98dce7789c96dded00fabfe409356f954edfe.tar.xz |
Add CMake as new build system
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindOpenGLES2.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cmake/FindOpenGLES2.cmake b/cmake/FindOpenGLES2.cmake new file mode 100644 index 0000000..9be6ce8 --- /dev/null +++ b/cmake/FindOpenGLES2.cmake @@ -0,0 +1,38 @@ +#------------------------------------------------------------------- +# The contents of this file are placed in the public domain. Feel +# free to make use of it in any way you like. +#------------------------------------------------------------------- + +# Try to find OpenGL ES 2 and EGL + +if(WIN32) + find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h) + find_library(OPENGLES2_LIBRARY libGLESv2) +elseif(APPLE) + find_library(OPENGLES2_LIBRARY OpenGLES REQUIRED) # framework +else() + # Unix + find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h + PATHS /usr/X11R6/include /usr/include + ) + find_library(OPENGLES2_LIBRARY + NAMES GLESv2 + PATHS /usr/X11R6/lib /usr/lib + ) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(OpenGLES2 DEFAULT_MSG OPENGLES2_LIBRARY OPENGLES2_INCLUDE_DIR) + + find_path(EGL_INCLUDE_DIR EGL/egl.h + PATHS /usr/X11R6/include /usr/include + ) + find_library(EGL_LIBRARY + NAMES EGL + PATHS /usr/X11R6/lib /usr/lib + ) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(EGL REQUIRED_VARS EGL_LIBRARY EGL_INCLUDE_DIR NAME_MISMATCHED) +endif() + +set(OPENGLES2_LIBRARIES ${OPENGLES2_LIBRARY} ${EGL_LIBRARY}) |