summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenGL.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-08-10 15:19:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-08-10 15:25:09 (GMT)
commitb8214a87bf3962029a3d35863ec0187f7c1819d7 (patch)
tree2c9e1e696a9333304ea70bf4c7af065abde2cc77 /Modules/FindOpenGL.cmake
parentb6da87c13f89efe461826f0bde28e7731c5f30f4 (diff)
parent98844ec9db5fe4dc4e236f3852d4f3e88a4a9e76 (diff)
downloadCMake-b8214a87bf3962029a3d35863ec0187f7c1819d7.zip
CMake-b8214a87bf3962029a3d35863ec0187f7c1819d7.tar.gz
CMake-b8214a87bf3962029a3d35863ec0187f7c1819d7.tar.bz2
Merge topic 'FPHSA-name-mismatches-chained-via-include' into release-3.18
98844ec9db FPHSA: detect inclusion between find modules Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Logan Barnes <barneslt63@gmail.com> Merge-request: !5107
Diffstat (limited to 'Modules/FindOpenGL.cmake')
-rw-r--r--Modules/FindOpenGL.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 74392da..17ffe85 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -424,8 +424,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