Browse Source

modules: fixed Find*GL*.cmake, updated coding style.

It's meaningless to have *_INCLUDE_DIR point to the dir where
{egl.h,gl2.h,gl3.h} exists, because we're always including the files
using full path (e.g. <EGL/egl.h>). It then fails miserably at compile
time on platforms which don't have the parent directory in include path.
pull/94/head
Vladimír Vondruš 11 years ago
parent
commit
7398b6ef8c
  1. 7
      modules/FindEGL.cmake
  2. 7
      modules/FindOpenGLES2.cmake
  3. 7
      modules/FindOpenGLES3.cmake

7
modules/FindEGL.cmake

@ -37,12 +37,9 @@ find_library(EGL_LIBRARY EGL)
# Include dir
find_path(EGL_INCLUDE_DIR
NAMES egl.h
PATH_SUFFIXES EGL
)
NAMES EGL/egl.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args("EGL" DEFAULT_MSG
EGL_LIBRARY
EGL_INCLUDE_DIR
)
EGL_INCLUDE_DIR)

7
modules/FindOpenGLES2.cmake

@ -43,12 +43,9 @@ endif()
# Include dir
find_path(OPENGLES2_INCLUDE_DIR
NAMES gl2.h
PATH_SUFFIXES GLES2
)
NAMES GLES2/gl2.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args("OpenGLES2" DEFAULT_MSG
${OPENGLES2_LIBRARY_NEEDED}
OPENGLES2_INCLUDE_DIR
)
OPENGLES2_INCLUDE_DIR)

7
modules/FindOpenGLES3.cmake

@ -42,12 +42,9 @@ find_library(OPENGLES3_LIBRARY NAMES
# Include dir
find_path(OPENGLES3_INCLUDE_DIR
NAMES gl3.h
PATH_SUFFIXES GLES3
)
NAMES GLES3/gl3.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args("OpenGLES3" DEFAULT_MSG
OPENGLES3_LIBRARY
OPENGLES3_INCLUDE_DIR
)
OPENGLES3_INCLUDE_DIR)

Loading…
Cancel
Save