Changeset View
Changeset View
Standalone View
Standalone View
find-modules/FindEGL.cmake
Context not available. | |||||
61 | #============================================================================= | 61 | #============================================================================= | ||
---|---|---|---|---|---|
62 | 62 | | |||
63 | include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) | 63 | include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) | ||
64 | include(CheckCXXSourceCompiles) | ||||
65 | include(CMakePushCheckState) | ||||
64 | 66 | | |||
65 | ecm_find_package_version_check(EGL) | 67 | ecm_find_package_version_check(EGL) | ||
66 | 68 | | |||
Context not available. | |||||
115 | unset(_EGL_version_lines) | 117 | unset(_EGL_version_lines) | ||
116 | endif() | 118 | endif() | ||
117 | 119 | | |||
120 | cmake_push_check_state(RESET) | ||||
121 | list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}") | ||||
122 | list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}") | ||||
123 | | ||||
124 | check_cxx_source_compiles(" | ||||
125 | #include <EGL/egl.h> | ||||
126 | | ||||
127 | int main(int argc, char *argv[]) { | ||||
128 | EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0; | ||||
129 | eglDestroyContext(dpy, ctx); | ||||
130 | }" HAVE_EGL) | ||||
131 | | ||||
132 | cmake_pop_check_state() | ||||
133 | | ||||
118 | include(FindPackageHandleStandardArgs) | 134 | include(FindPackageHandleStandardArgs) | ||
119 | find_package_handle_standard_args(EGL | 135 | find_package_handle_standard_args(EGL | ||
120 | FOUND_VAR | 136 | FOUND_VAR | ||
Context not available. | |||||
122 | REQUIRED_VARS | 138 | REQUIRED_VARS | ||
123 | EGL_LIBRARY | 139 | EGL_LIBRARY | ||
124 | EGL_INCLUDE_DIR | 140 | EGL_INCLUDE_DIR | ||
141 | HAVE_EGL | ||||
125 | VERSION_VAR | 142 | VERSION_VAR | ||
126 | EGL_VERSION | 143 | EGL_VERSION | ||
127 | ) | 144 | ) | ||
Context not available. | |||||
135 | ) | 152 | ) | ||
136 | endif() | 153 | endif() | ||
137 | 154 | | |||
138 | mark_as_advanced(EGL_LIBRARY EGL_INCLUDE_DIR) | 155 | mark_as_advanced(EGL_LIBRARY EGL_INCLUDE_DIR HAVE_EGL) | ||
139 | 156 | | |||
140 | # compatibility variables | 157 | # compatibility variables | ||
141 | set(EGL_LIBRARIES ${EGL_LIBRARY}) | 158 | set(EGL_LIBRARIES ${EGL_LIBRARY}) | ||
Context not available. |