[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3558-g5652a4d

Brad King brad.king at kitware.com
Thu Jun 5 10:05:14 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  5652a4d581de0ff680af32cec0706ea38dbf581e (commit)
       via  9c2463173ca1ac48a5d468fbfd4df8b3e11db5be (commit)
       via  0496c4302e43f8b4297a905e9083db08786c4e7b (commit)
      from  e68bde6755ace31d53acca30bbd71a45deba7115 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5652a4d581de0ff680af32cec0706ea38dbf581e
commit 5652a4d581de0ff680af32cec0706ea38dbf581e
Merge: e68bde6 9c24631
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 5 10:05:13 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 5 10:05:13 2014 -0400

    Merge topic 'FindOpenGL-target' into next
    
    9c246317 FindOpenGL: Provide imported targets for GL and GLU
    0496c430 FindOpenGL: Organize and format module documentation


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c2463173ca1ac48a5d468fbfd4df8b3e11db5be
commit 9c2463173ca1ac48a5d468fbfd4df8b3e11db5be
Author:     Philipp Möller <bootsarehax at googlemail.com>
AuthorDate: Sat May 31 01:27:20 2014 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 5 10:01:50 2014 -0400

    FindOpenGL: Provide imported targets for GL and GLU
    
    Create OpenGL::GL and OpenGL::GLU imported targets using the locations
    found.

diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index a83a6c3..54a1e11 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -4,6 +4,16 @@
 #
 # FindModule for OpenGL and GLU.
 #
+# IMPORTED Targets
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines the :prop_tgt:`IMPORTED` targets:
+#
+# ``OpenGL::OpenGL``
+#  Defined if the system has OpenGL.
+# ``OpenGL::GLU``
+#  Defined if the system has GLU.
+#
 # Result Variables
 # ^^^^^^^^^^^^^^^^
 #
@@ -181,6 +191,36 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS})
 unset(_OpenGL_REQUIRED_VARS)
 
+# OpenGL:: targets
+if(OPENGL_FOUND)
+  if(NOT TARGET OpenGL::GL)
+    add_library(OpenGL::GL UNKNOWN IMPORTED)
+    set_target_properties(OpenGL::GL PROPERTIES
+      INTERFACE_INCLUDE_DIRECTORIES ${OPENGL_INCLUDE_DIR})
+    if(OPENGL_gl_LIBRARY MATCHES "/([^/]+)\\.framework$")
+      set_target_properties(OpenGL::GL PROPERTIES
+        IMPORTED_LOCATION "${OPENGL_gl_LIBRARY}/${CMAKE_MATCH_1}")
+    else()
+      set_target_properties(OpenGL::GL PROPERTIES
+        IMPORTED_LOCATION "${OPENGL_gl_LIBRARY}")
+    endif()
+  endif()
+
+  if(OPENGL_GLU_FOUND AND NOT TARGET OpenGL::GLU)
+    add_library(OpenGL::GLU UNKNOWN IMPORTED)
+    set_target_properties(OpenGL::GLU PROPERTIES
+      INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
+      INTERFACE_LINK_LIBRARIES OpenGL::GL)
+    if(OPENGL_glu_LIBRARY MATCHES "/([^/]+)\\.framework$")
+      set_target_properties(OpenGL::GLU PROPERTIES
+        IMPORTED_LOCATION "${OPENGL_glu_LIBRARY}/${CMAKE_MATCH_1}")
+    else()
+      set_target_properties(OpenGL::GLU PROPERTIES
+        IMPORTED_LOCATION "${OPENGL_glu_LIBRARY}")
+    endif()
+  endif()
+endif()
+
 mark_as_advanced(
   OPENGL_INCLUDE_DIR
   OPENGL_xmesa_INCLUDE_DIR

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0496c4302e43f8b4297a905e9083db08786c4e7b
commit 0496c4302e43f8b4297a905e9083db08786c4e7b
Author:     Philipp Möller <bootsarehax at googlemail.com>
AuthorDate: Sat May 31 01:24:11 2014 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 5 09:58:40 2014 -0400

    FindOpenGL: Organize and format module documentation

diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 21c2198..a83a6c3 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -2,32 +2,38 @@
 # FindOpenGL
 # ----------
 #
-# Try to find OpenGL
+# FindModule for OpenGL and GLU.
 #
-# Once done this will define
+# Result Variables
+# ^^^^^^^^^^^^^^^^
 #
-# ::
+# This module sets the following variables:
 #
-#   OPENGL_FOUND        - system has OpenGL
-#   OPENGL_XMESA_FOUND  - system has XMESA
-#   OPENGL_GLU_FOUND    - system has GLU
-#   OPENGL_INCLUDE_DIR  - the GL include directory
-#   OPENGL_LIBRARIES    - Link these to use OpenGL and GLU
+# ``OPENGL_FOUND``
+#  True, if the system has OpenGL.
+# ``OPENGL_XMESA_FOUND``
+#  True, if the system has XMESA.
+# ``OPENGL_GLU_FOUND``
+#  True, if the system has GLU.
+# ``OPENGL_INCLUDE_DIR``
+#  Path to the OpenGL include directory.
+# ``OPENGL_LIBRARIES``
+#  Paths to the OpenGL and GLU libraries.
 #
+# If you want to use just GL you can use these values:
 #
+# ``OPENGL_gl_LIBRARY``
+#  Path to the OpenGL library.
+# ``OPENGL_glu_LIBRARY``
+#  Path to the GLU library.
 #
-# If you want to use just GL you can use these values
+# OSX Specific
+# ^^^^^^^^^^^^
 #
-# ::
-#
-#   OPENGL_gl_LIBRARY   - Path to OpenGL Library
-#   OPENGL_glu_LIBRARY  - Path to GLU Library
-#
-#
-#
-# On OSX default to using the framework version of opengl People will
+# On OSX default to using the framework version of OpenGL. People will
 # have to change the cache values of OPENGL_glu_LIBRARY and
-# OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX
+# OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX.
+
 
 #=============================================================================
 # Copyright 2001-2009 Kitware, Inc.

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindOpenGL.cmake |   76 +++++++++++++++++++++++++++++++++++++---------
 1 file changed, 61 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list