[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3586-g0b1effa
Brad King
brad.king at kitware.com
Thu Jun 5 14:28:48 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 0b1effa25fba792f12813bab6e17936fe656afce (commit)
via b7804cb6ce1d479ae54f742faf359d061c079be4 (commit)
from 60e3d1874267fed7e796e18254e55dc7f0377837 (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=0b1effa25fba792f12813bab6e17936fe656afce
commit 0b1effa25fba792f12813bab6e17936fe656afce
Merge: 60e3d18 b7804cb
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 5 14:28:47 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 5 14:28:47 2014 -0400
Merge topic 'FindOpenGL-target' into next
b7804cb6 FindOpenGL: Provide imported targets for GL and GLU
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7804cb6ce1d479ae54f742faf359d061c079be4
commit b7804cb6ce1d479ae54f742faf359d061c079be4
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 14:29:45 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..85c3b94 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
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list