diff options
Diffstat (limited to 'Modules/FindOpenGL.cmake')
-rw-r--r-- | Modules/FindOpenGL.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index e1271d4..110e7f9 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -412,8 +412,15 @@ if(OPENGL_EGL_INCLUDE_DIR) endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "GLU") + # FindGLU include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive to + # the contents, detect the case in this module and suppress it explicitly. + set(FPHSA_NAME_MISMATCHED 1) +endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS} HANDLE_COMPONENTS) +unset(FPHSA_NAME_MISMATCHED) unset(_OpenGL_REQUIRED_VARS) # OpenGL:: targets |