summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-28 20:25:19 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-12-28 20:25:19 (GMT)
commit8b73f54bc63f50c48d9356c108eec44bb5e0dbc3 (patch)
treec6bdabf290660b3ea8cd4bb8801975a7f7d7e5d7
parent75191fa31281732ddbfd621af80bc188de9cd097 (diff)
parent937e3693d7cb71a83851ac7c74dd45028363aad0 (diff)
downloadCMake-8b73f54bc63f50c48d9356c108eec44bb5e0dbc3.zip
CMake-8b73f54bc63f50c48d9356c108eec44bb5e0dbc3.tar.gz
CMake-8b73f54bc63f50c48d9356c108eec44bb5e0dbc3.tar.bz2
Merge topic 'dev/use-fphsa-in-find-opengl'
937e369 Use FPHSA in FindOpenGL
-rw-r--r--Modules/FindOpenGL.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 21aafa9..3618963 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -123,7 +123,6 @@ ELSE (WIN32)
ENDIF(APPLE)
ENDIF (WIN32)
-SET( OPENGL_FOUND "NO" )
IF(OPENGL_gl_LIBRARY)
IF(OPENGL_xmesa_INCLUDE_DIR)
@@ -140,10 +139,7 @@ IF(OPENGL_gl_LIBRARY)
SET( OPENGL_GLU_FOUND "NO" )
ENDIF(OPENGL_glu_LIBRARY)
- SET( OPENGL_FOUND "YES" )
-
# This deprecated setting is for backward compatibility with CMake1.4
-
SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
ENDIF(OPENGL_gl_LIBRARY)
@@ -151,6 +147,11 @@ ENDIF(OPENGL_gl_LIBRARY)
# This deprecated setting is for backward compatibility with CMake1.4
SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
+# handle the QUIETLY and REQUIRED arguments and set OPENGL_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL DEFAULT_MSG OPENGL_gl_LIBRARY)
+
MARK_AS_ADVANCED(
OPENGL_INCLUDE_DIR
OPENGL_xmesa_INCLUDE_DIR