<div dir="ltr">of course , I will put it<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 5:45 PM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk" target="_blank">t.i.m@zen.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 2013-10-25 at 07:49 +0800, comicfans44 wrote:<br>
<br>
Hi,<br>
<div class="im"><br>
> and this is the last patch<br>
<br>
</div>could you put patches in bugzilla please, so we don't forget about them?<br>
Thanks!<br>
<br>
Cheers<br>
-Tim<br>
<div><div class="h5"><br>
> From 793fb96c58d694a8d743035b9a7450771a3ad029 Mon Sep 17 00:00:00 2001<br>
> From: comicfans44<br>
> Date: Thu, 24 Oct 2013 16:44:29 +0800<br>
> Subject: [PATCH] fix MSVC can not link to gstgl bug<br>
><br>
> ---<br>
> gst-libs/gst/gl/CMakeLists.txt | 3 +--<br>
> 1 file changed, 1 insertion(+), 2 deletions(-)<br>
><br>
> diff --git a/gst-libs/gst/gl/CMakeLists.txt b/gst-libs/gst/gl/CMakeLists.txt<br>
> index 6ac3013..7a98bae 100644<br>
> --- a/gst-libs/gst/gl/CMakeLists.txt<br>
> +++ b/gst-libs/gst/gl/CMakeLists.txt<br>
> @@ -34,7 +34,7 @@ add_custom_command(OUTPUT ${glconfigpath}<br>
> )<br>
><br>
><br>
> -add_library(gstgl SHARED<br>
> +add_library(gstgl<br>
> ${PROJECT_BINARY_DIR}/config.h<br>
> ${glconfigpath}<br>
> ${srcs} )<br>
> @@ -53,7 +53,6 @@ set_target_properties(gstgl PROPERTIES<br>
> add_dependencies(gstgl ${glconfigpath} ${PROJECT_BINARY_DIR}/config.h)<br>
><br>
> install(TARGETS gstgl<br>
> - LIBRARY DESTINATION bin<br>
> ARCHIVE DESTINATION lib)<br>
><br>
> file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")<br>
> --<br>
> 1.7.9.5<br>
><br>
> ----- Original Message -----<br>
> From: comicfans44<br>
> To: gstreamer-devel<br>
> Date: 2013-10-24, 16:23:37<br>
> Subject: misc patch to help opengl plugin build on win32 with msvc<br>
><br>
><br>
><br>
> 原邮件附件清单如下:<br>
> 0001-improve-CMake-build-system.patch<br>
> 0002-improve-MSVC-vc10-compatibility.patch<br>
> 0003-improve-cmake-build-script-add-install-target.patch<br>
><br>
> >Hello ,<br>
> > I'm trying to implement some element based on opengl plugin on win32,<br>
> >but I found the CMake build script is incomplete, and some headers are not<br>
> >compatible with msvc , so I made some patch to complete the CMake build script,<br>
> >hopes this can help others working with msvc.<br>
> > I don't know if it's good to post whole patch here,anyway I posted it.<br>
> >patch also avaiable as attachments.<br>
> ><br>
> >0001-improve-CMake-build-system.patch :<br>
> ><br>
> >From e6ba08a4872907a85f795b0a30e6d9babcd39568 Mon Sep 17 00:00:00 2001<br>
> >From: comicfans44<br>
> >Date: Tue, 22 Oct 2013 10:33:00 +0800<br>
> >Subject: [PATCH 1/3] improve CMake build system<br>
> >gstreamer main modules came with VS project for msvc build,<br>
> >but gl plugin's VS project is out of date. I made some<br>
> >improve to current (not-complete) CMake build script,makes<br>
> >building msvc version easier. this script can also build in Linux ,but<br>
> >not behave exactly the same as autoconf.<br>
> >---<br>
> > CMakeLists.txt | 61 +++++++----------<br>
> > cmake/modules/FindGLIB2.cmake | 46 +++++++++++++<br>
> > cmake/modules/FindGObject.cmake | 78 +++++++++++++++++++++<br>
> > cmake/modules/FindGStreamer.cmake | 135 +++++++++++++++++++++++++++++++++++++<br>
> > gst-libs/CMakeLists.txt | 1 +<br>
> > gst-libs/gst/CMakeLists.txt | 1 +<br>
> > gst-libs/gst/gl/CMakeLists.txt | 21 ++++++<br>
> > gst/CMakeLists.txt | 1 +<br>
> > gst/gl/CMakeLists.txt | 25 +++++++<br>
> > 9 files changed, 332 insertions(+), 37 deletions(-)<br>
> > create mode 100644 cmake/modules/FindGLIB2.cmake<br>
> > create mode 100644 cmake/modules/FindGObject.cmake<br>
> > create mode 100644 cmake/modules/FindGStreamer.cmake<br>
> > create mode 100644 gst-libs/CMakeLists.txt<br>
> > create mode 100644 gst-libs/gst/CMakeLists.txt<br>
> > create mode 100644 gst-libs/gst/gl/CMakeLists.txt<br>
> > create mode 100644 gst/CMakeLists.txt<br>
> > create mode 100644 gst/gl/CMakeLists.txt<br>
> >diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
> >index e633e59..10f14a6 100644<br>
> >--- a/CMakeLists.txt<br>
> >+++ b/CMakeLists.txt<br>
> >@@ -7,46 +7,28 @@ cmake_minimum_required(VERSION "2.8.0")<br>
> > # pkg_check_modules(GSTREAMER gstreamer-0.10)<br>
> > # ---<br>
> ><br>
> >-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)<br>
> >+list(APPEND CMAKE_MODULE_PATH<br>
> >+${CMAKE_SOURCE_DIR}/cmake/modules)<br>
> ><br>
> > project (GST-PLUGINS-GL)<br>
> ><br>
> >-if (WIN32)<br>
> >- set(OSSBUILD_SDK_DIR $ENV{OSSBUILD_GSTREAMER_SDK_DIR})<br>
> >- if (OSSBUILD_SDK_DIR)<br>
> >- set(OSSBUILD_SDK_INCLUDE_DIR ${OSSBUILD_SDK_DIR}/include)<br>
> >- #set(CMAKE_PREFIX_PATH ${OSSBUILD_SDK_DIR})<br>
> >- set(CMAKE_INCLUDE_PATH ${OSSBUILD_SDK_INCLUDE_DIR})<br>
> >- set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${OSSBUILD_SDK_INCLUDE_DIR}/glib-2.0)<br>
> >- set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${OSSBUILD_SDK_INCLUDE_DIR}/gstreamer-0.10)<br>
> >- set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${OSSBUILD_SDK_INCLUDE_DIR}/libxml2)<br>
> >- endif (OSSBUILD_SDK_DIR)<br>
> >- set(OSSBUILD_DIR $ENV{OSSBUILD_GSTREAMER_DIR})<br>
> >- if (OSSBUILD_DIR)<br>
> >- #set(ENV{GSTREAMER_DIR} ${OSSBUILD_DIR})<br>
> >- set(CMAKE_LIBRARY_PATH ${OSSBUILD_DIR}/bin)<br>
> >- set(JPEG_NAMES jpeg-8)<br>
> >- #set(FREETYPE_NAMES freetype-6)<br>
> >- message(STATUS ${CMAKE_LIBRARY_PATH})<br>
> >- endif (OSSBUILD_DIR)<br>
> >-endif (WIN32)<br>
> >+<br>
> ><br>
> > # built-in<br>
> > find_package(OpenGL REQUIRED)<br>
> >-find_package(GTK2 REQUIRED)<br>
> >-find_package(Glib2 REQUIRED)<br>
> >+#find_package(GTK2 REQUIRED)<br>
> >+find_package(GLIB2 REQUIRED)<br>
> > find_package(LibXml2 REQUIRED)<br>
> > find_package(JPEG REQUIRED)<br>
> >-find_package(PNG REQUIRED)<br>
> >+#find_package(PNG REQUIRED)<br>
> > find_package(ZLIB REQUIRED)<br>
> ><br>
> >-# home made<br>
> >-find_package(Glib2 REQUIRED)<br>
> >-find_package(Gstreamer REQUIRED)<br>
> >-find_package(Glew REQUIRED)<br>
> >-find_package(LibIconv REQUIRED)<br>
> >-find_package(ATK REQUIRED)<br>
> >-find_package(Cairo REQUIRED)<br>
> >+<br>
> >+find_package(GStreamer REQUIRED)<br>
> >+find_package(GLEW REQUIRED)<br>
> >+#find_package(LibIconv REQUIRED)<br>
> >+#find_package(ATK REQUIRED)<br>
> >+#find_package(Cairo REQUIRED)<br>
> ><br>
> > function(check_package name LEVEL)<br>
> > if (${name}_FOUND)<br>
> >@@ -67,8 +49,6 @@ endfunction(check_package)<br>
> > check_package(GLIB2 1)<br>
> > check_package(GSTREAMER 1)<br>
> > check_package(OPENGL 1)<br>
> >-check_package(GLEW 1)<br>
> >-check_package(PNG 1)<br>
> > if (WIN32)<br>
> > check_package(ZLIB 1)<br>
> > endif (WIN32)<br>
> >@@ -78,13 +58,11 @@ INCLUDE (CheckIncludeFiles)<br>
> > CHECK_INCLUDE_FILES (${GSTREAMER_DIR}/include/gst/gstconfig.h GST_USING_BINARY_REGISTRY)<br>
> > if (NOT GST_USING_BINARY_REGISTRY)<br>
> > check_package(LIBXML2 1)<br>
> >-check_package(LIBICONV 1)<br>
> >+#check_package(LIBICONV 1)<br>
> > endif (NOT GST_USING_BINARY_REGISTRY)<br>
> ><br>
> > # optionnal packages<br>
> >-check_package(GTK2 0)<br>
> >-check_package(ATK 0)<br>
> >-check_package(CAIRO 0)<br>
> >+<br>
> ><br>
> > # debug<br>
> > #message("****" ${GLIB2_INCLUDE_DIR})<br>
> >@@ -104,10 +82,19 @@ check_package(CAIRO 0)<br>
> > #message("****" ${ATK_INCLUDE_DIR})<br>
> > #message("****" ${CAIRO_INCLUDE_DIR})<br>
> ><br>
> >+<br>
> >+include_directories(<br>
> >+ ${GSTREAMER_INCLUDE_DIRS}<br>
> >+ ${GLIB2_INCLUDE_DIR}<br>
> >+ gst-libs)<br>
> >+<br>
> >+add_definitions(-DHAVE_CONFIG_H)<br>
> >+<br>
> > add_subdirectory (gst-libs)<br>
> >+<br>
> >+<br>
> > add_subdirectory (gst)<br>
> ><br>
> > #add_dependencies(gstgl)<br>
> ><br>
> > #FIXME: generate config.h<br>
> >-add_definitions(-DHAVE_CONFIG_H)<br>
> >diff --git a/cmake/modules/FindGLIB2.cmake b/cmake/modules/FindGLIB2.cmake<br>
> >new file mode 100644<br>
> >index 0000000..d747ed5<br>
> >--- /dev/null<br>
> >+++ b/cmake/modules/FindGLIB2.cmake<br>
> >@@ -0,0 +1,46 @@<br>
> >+FILE(TO_CMAKE_PATH "$ENV{GLIB2_DIR}" TRY1_DIR)<br>
> >+FILE(TO_CMAKE_PATH "${GLIB2_DIR}" TRY2_DIR)<br>
> >+FILE(GLOB GLIB2_DIR ${TRY1_DIR} ${TRY2_DIR})<br>
> >+<br>
> >+FIND_PATH(GLIB_glib_2_INCLUDE_DIR glib.h<br>
> >+ PATHS ${GLIB2_DIR}/include ${GLIB2_DIR}/include/glib-2.0 /usr/local/include/glib-2.0 /usr/include/glib-2.0 /opt/local/include/glib-2.0<br>
> >+ ENV INCLUDE DOC "Directory containing glib.h include file")<br>
> >+<br>
> >+FIND_PATH(GLIB_glibconfig_2_INCLUDE_DIR glibconfig.h<br>
> >+ PATHS ${GLIB2_DIR}/include<br>
> >+${GLIB2_DIR}/include/glib-2.0 ${GLIB2_DIR}/lib/include ${GLIB2_DIR}/lib/glib-2.0/include /usr/local/include/glib-2.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/local/lib/glib-2.0/include /opt/local/lib/glib-2.0/include<br>
> >+<br>
> >+ /usr/lib/i386-linux-gnu/glib-2.0/include/<br>
> >+ ENV INCLUDE DOC "Directory containing glibconfig.h include file")<br>
> >+<br>
> >+FIND_LIBRARY(GLIB_glib_2_LIBRARY NAMES glib-2.0<br>
> >+ PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib /opt/local/lib<br>
> >+ ENV LIB<br>
> >+ DOC "glib library to link with"<br>
> >+ NO_SYSTEM_ENVIRONMENT_PATH)<br>
> >+<br>
> >+FIND_LIBRARY(GLIB_gmodule_2_LIBRARY NAMES gmodule-2.0<br>
> >+ PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib /opt/local/lib<br>
> >+ ENV LIB<br>
> >+ DOC "gmodule library to link with"<br>
> >+ NO_SYSTEM_ENVIRONMENT_PATH)<br>
> >+<br>
> >+FIND_LIBRARY(GLIB_gobject_2_LIBRARY NAMES gobject-2.0<br>
> >+ PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib /opt/local/lib<br>
> >+ ENV LIB<br>
> >+ DOC "gobject library to link with"<br>
> >+ NO_SYSTEM_ENVIRONMENT_PATH)<br>
> >+<br>
> >+FIND_LIBRARY(GLIB_gthread_2_LIBRARY NAMES gthread-2.0<br>
> >+ PATHS ${GLIB2_DIR}/bin ${GLIB2_DIR}/win32/bin ${GLIB2_DIR}/lib ${GLIB2_DIR}/win32/lib /usr/local/lib /usr/lib /opt/local/lib<br>
> >+ ENV LIB<br>
> >+ DOC "gthread library to link with"<br>
> >+ NO_SYSTEM_ENVIRONMENT_PATH)<br>
> >+<br>
> >+IF (GLIB_glib_2_INCLUDE_DIR AND GLIB_glibconfig_2_INCLUDE_DIR AND GLIB_glib_2_LIBRARY AND GLIB_gmodule_2_LIBRARY AND GLIB_gobject_2_LIBRARY AND GLIB_gthread_2_LIBRARY)<br>
> >+ SET(GLIB2_INCLUDE_DIR ${GLIB_glib_2_INCLUDE_DIR} ${GLIB_glibconfig_2_INCLUDE_DIR})<br>
> >+ list(REMOVE_DUPLICATES GLIB2_INCLUDE_DIR)<br>
> >+ SET(GLIB2_LIBRARIES ${GLIB_glib_2_LIBRARY} ${GLIB_gmodule_2_LIBRARY} ${GLIB_gobject_2_LIBRARY} ${GLIB_gthread_2_LIBRARY})<br>
> >+ list(REMOVE_DUPLICATES GLIB2_LIBRARIES)<br>
> >+ SET(GLIB2_FOUND TRUE)<br>
> >+ENDIF (GLIB_glib_2_INCLUDE_DIR AND GLIB_glibconfig_2_INCLUDE_DIR AND GLIB_glib_2_LIBRARY AND GLIB_gmodule_2_LIBRARY AND GLIB_gobject_2_LIBRARY AND GLIB_gthread_2_LIBRARY)<br>
> >diff --git a/cmake/modules/FindGObject.cmake b/cmake/modules/FindGObject.cmake<br>
> >new file mode 100644<br>
> >index 0000000..51c63f0<br>
> >--- /dev/null<br>
> >+++ b/cmake/modules/FindGObject.cmake<br>
> >@@ -0,0 +1,78 @@<br>
> >+# - Try to find GObject<br>
> >+# Once done this will define<br>
> >+#<br>
> >+# GOBJECT_FOUND - system has GObject<br>
> >+# GOBJECT_INCLUDE_DIR - the GObject include directory<br>
> >+# GOBJECT_LIBRARIES - the libraries needed to use GObject<br>
> >+# GOBJECT_DEFINITIONS - Compiler switches required for using GObject<br>
> >+<br>
> >+# Copyright (c) 2006, Tim Beaulen<br>
> >+# Copyright (c) 2008 Helio Chissini de Castro,<br>
> >+#<br>
> >+# Redistribution and use is allowed according to the terms of the BSD license.<br>
> >+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.<br>
> >+<br>
> >+<br>
> >+IF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)<br>
> >+# in cache already<br>
> >+SET(GObject_FIND_QUIETLY TRUE)<br>
> >+ELSE (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)<br>
> >+SET(GObject_FIND_QUIETLY FALSE)<br>
> >+ENDIF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)<br>
> >+<br>
> >+IF (NOT WIN32)<br>
> >+FIND_PACKAGE(PkgConfig REQUIRED)<br>
> >+# use pkg-config to get the directories and then use these values<br>
> >+# in the FIND_PATH() and FIND_LIBRARY() calls<br>
> >+PKG_CHECK_MODULES(PKG_GOBJECT2 REQUIRED gobject-2.0)<br>
> >+SET(GOBJECT_DEFINITIONS ${PKG_GOBJECT2_CFLAGS})<br>
> >+ENDIF (NOT WIN32)<br>
> >+<br>
> >+FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h<br>
> >+PATHS<br>
> >+${PKG_GOBJECT2_INCLUDE_DIRS}<br>
> >+/usr/include/glib-2.0/<br>
> >+PATH_SUFFIXES glib-2.0<br>
> >+)<br>
> >+<br>
> >+FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0<br>
> >+PATHS<br>
> >+${PKG_GOBJECT2_LIBRARY_DIRS}<br>
> >+)<br>
> >+FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0<br>
> >+PATHS<br>
> >+${PKG_GOBJECT2_LIBRARY_DIRS}<br>
> >+)<br>
> >+FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0<br>
> >+PATHS<br>
> >+${PKG_GOBJECT2_LIBRARY_DIRS}<br>
> >+)<br>
> >+FIND_LIBRARY(_GLibs NAMES glib-2.0<br>
> >+PATHS<br>
> >+${PKG_GOBJECT2_LIBRARY_DIRS}<br>
> >+)<br>
> >+<br>
> >+IF (WIN32)<br>
> >+SET (GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs})<br>
> >+ELSE (WIN32)<br>
> >+SET (GOBJECT_LIBRARIES ${PKG_GOBJECT2_LIBRARIES})<br>
> >+ENDIF (WIN32)<br>
> >+<br>
> >+IF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)<br>
> >+SET(GOBJECT_FOUND TRUE)<br>
> >+ELSE (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)<br>
> >+SET(GOBJECT_FOUND FALSE)<br>
> >+ENDIF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)<br>
> >+<br>
> >+IF (GOBJECT_FOUND)<br>
> >+IF (NOT GObject_FIND_QUIETLY)<br>
> >+MESSAGE(STATUS "Found GObject libraries: ${GOBJECT_LIBRARIES}")<br>
> >+MESSAGE(STATUS "Found GObject includes : ${GOBJECT_INCLUDE_DIR}")<br>
> >+ENDIF (NOT GObject_FIND_QUIETLY)<br>
> >+ELSE (GOBJECT_FOUND)<br>
> >+IF (GObject_FIND_REQUIRED)<br>
> >+MESSAGE(STATUS "Could NOT find GObject")<br>
> >+ENDIF(GObject_FIND_REQUIRED)<br>
> >+ENDIF (GOBJECT_FOUND)<br>
> >+<br>
> >+MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR GOBJECT_LIBRARIES)<br>
> >\ No newline at end of file<br>
> >diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake<br>
> >new file mode 100644<br>
> >index 0000000..4414e62<br>
> >--- /dev/null<br>
> >+++ b/cmake/modules/FindGStreamer.cmake<br>
> >@@ -0,0 +1,135 @@<br>
> >+# - Try to find GStreamer and its plugins<br>
> >+# Once done, this will define<br>
> >+#<br>
> >+# GSTREAMER_FOUND - system has GStreamer<br>
> >+# GSTREAMER_INCLUDE_DIRS - the GStreamer include directories<br>
> >+# GSTREAMER_LIBRARIES - link these to use GStreamer<br>
> >+#<br>
> >+# Additionally, gstreamer-base is always looked for and required, and<br>
> >+# the following related variables are defined:<br>
> >+#<br>
> >+# GSTREAMER_BASE_INCLUDE_DIRS - gstreamer-base's include directory<br>
> >+# GSTREAMER_BASE_LIBRARIES - link to these to use gstreamer-base<br>
> >+#<br>
> >+# Optionally, the COMPONENTS keyword can be passed to find_package()<br>
> >+# and GStreamer plugins can be looked for. Currently, the following<br>
> >+# plugins can be searched, and they define the following variables if<br>
> >+# found:<br>
> >+#<br>
> >+# gstreamer-app: GSTREAMER_APP_INCLUDE_DIRS and GSTREAMER_APP_LIBRARIES<br>
> >+# gstreamer-audio: GSTREAMER_AUDIO_INCLUDE_DIRS and GSTREAMER_AUDIO_LIBRARIES<br>
> >+# gstreamer-fft: GSTREAMER_FFT_INCLUDE_DIRS and GSTREAMER_FFT_LIBRARIES<br>
> >+# gstreamer-pbutils: GSTREAMER_PBUTILS_INCLUDE_DIRS and GSTREAMER_PBUTILS_LIBRARIES<br>
> >+# gstreamer-video: GSTREAMER_VIDEO_INCLUDE_DIRS and GSTREAMER_VIDEO_LIBRARIES<br>
> >+# gstreamer-gl: GSTREAMER_GL_INCLUDE_DIRS and GSTREAMER_GL_LIBRARIES<br>
> >+#<br>
> >+# Copyright (C) 2012 Raphael Kubo da Costa<br>
> >+#<br>
> >+# Redistribution and use in source and binary forms, with or without<br>
> >+# modification, are permitted provided that the following conditions<br>
> >+# are met:<br>
> >+# 1. Redistributions of source code must retain the above copyright<br>
> >+# notice, this list of conditions and the following disclaimer.<br>
> >+# 2. Redistributions in binary form must reproduce the above copyright<br>
> >+# notice, this list of conditions and the following disclaimer in the<br>
> >+# documentation and/or other materials provided with the distribution.<br>
> >+#<br>
> >+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS<br>
> >+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,<br>
> >+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<br>
> >+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS<br>
> >+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,<br>
> >+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,<br>
> >+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;<br>
> >+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,<br>
> >+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR<br>
> >+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF<br>
> >+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br>
> >+<br>
> >+find_package(PkgConfig)<br>
> >+<br>
> >+# Helper macro to find a GStreamer plugin (or GStreamer itself)<br>
> >+# _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")<br>
> >+# _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").<br>
> >+# _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").<br>
> >+# _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")<br>
> >+macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)<br>
> >+ # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.<br>
> >+ pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})<br>
> >+<br>
> >+ find_path(${_component_prefix}_INCLUDE_DIRS<br>
> >+ NAMES ${_header}<br>
> >+ HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}<br>
> >+ PATH_SUFFIXES gstreamer-1.0<br>
> >+ )<br>
> >+<br>
> >+ find_library(${_component_prefix}_LIBRARIES<br>
> >+ NAMES ${_library}<br>
> >+ HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}<br>
> >+ )<br>
> >+endmacro()<br>
> >+<br>
> >+# ------------------------<br>
> >+# 1. Find GStreamer itself<br>
> >+# ------------------------<br>
> >+<br>
> >+# 1.1. Find headers and libraries<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gst/gst.h gstreamer-1.0)<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)<br>
> >+<br>
> >+# 1.2. Check GStreamer version<br>
> >+if (GSTREAMER_INCLUDE_DIRS)<br>
> >+ if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")<br>
> >+ file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)<br>
> >+<br>
> >+ string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")<br>
> >+ set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")<br>
> >+<br>
> >+ string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")<br>
> >+ set(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")<br>
> >+<br>
> >+ string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")<br>
> >+ set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")<br>
> >+<br>
> >+ set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")<br>
> >+ endif ()<br>
> >+endif ()<br>
> >+<br>
> >+# FIXME: With CMake 2.8.3 we can just pass GSTREAMER_VERSION to FIND_PACKAGE_HANDLE_STANDARD_ARGS as VERSION_VAR<br>
> >+# and remove the version check here (GSTREAMER_FIND_VERSION would be passed to FIND_PACKAGE).<br>
> >+set(VERSION_OK TRUE)<br>
> >+if (GSTREAMER_FIND_VERSION_EXACT)<br>
> >+ if (NOT(("${GSTREAMER_FIND_VERSION}" VERSION_EQUAL "${GSTREAMER_VERSION}")))<br>
> >+ set(VERSION_OK FALSE)<br>
> >+ endif ()<br>
> >+else ()<br>
> >+ if ("${GSTREAMER_VERSION}" VERSION_LESS "${GSTREAMER_FIND_VERSION}")<br>
> >+ set(VERSION_OK FALSE)<br>
> >+ endif ()<br>
> >+endif ()<br>
> >+<br>
> >+# -------------------------<br>
> >+# 2. Find GStreamer plugins<br>
> >+# -------------------------<br>
> >+<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)<br>
> >+FIND_GSTREAMER_COMPONENT(GSTREAMER_GL gstreamer-gl-1.0 gst/gl/gl.h gstgl-1.0)<br>
> >+<br>
> >+# ------------------------------------------------<br>
> >+# 3. Process the COMPONENTS passed to FIND_PACKAGE<br>
> >+# ------------------------------------------------<br>
> >+set(_GSTREAMER_REQUIRED_VARS GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES VERSION_OK GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)<br>
> >+<br>
> >+foreach (_component ${GStreamer_FIND_COMPONENTS})<br>
> >+ set(_gst_component "GSTREAMER_${_component}")<br>
> >+ string(TOUPPER ${_gst_component} _UPPER_NAME)<br>
> >+<br>
> >+ list(APPEND _GSTREAMER_REQUIRED_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)<br>
> >+endforeach ()<br>
> >+<br>
> >+include(FindPackageHandleStandardArgs)<br>
> >+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG ${_GSTREAMER_REQUIRED_VARS})<br>
> >diff --git a/gst-libs/CMakeLists.txt b/gst-libs/CMakeLists.txt<br>
> >new file mode 100644<br>
> >index 0000000..02b235e<br>
> >--- /dev/null<br>
> >+++ b/gst-libs/CMakeLists.txt<br>
> >@@ -0,0 +1 @@<br>
> >+add_subdirectory(gst)<br>
> >diff --git a/gst-libs/gst/CMakeLists.txt b/gst-libs/gst/CMakeLists.txt<br>
> >new file mode 100644<br>
> >index 0000000..ef32dd6<br>
> >--- /dev/null<br>
> >+++ b/gst-libs/gst/CMakeLists.txt<br>
> >@@ -0,0 +1 @@<br>
> >+add_subdirectory(gl)<br>
> >diff --git a/gst-libs/gst/gl/CMakeLists.txt b/gst-libs/gst/gl/CMakeLists.txt<br>
> >new file mode 100644<br>
> >index 0000000..9b441bd<br>
> >--- /dev/null<br>
> >+++ b/gst-libs/gst/gl/CMakeLists.txt<br>
> >@@ -0,0 +1,21 @@<br>
> >+set(srcs<br>
> >+ gstglapi.c<br>
> >+gstglbufferpool.c<br>
> >+gstglcontext.c<br>
> >+gstgldisplay.c<br>
> >+gstgldownload.c<br>
> >+gstglfeature.c<br>
> >+gstglfilter.c<br>
> >+gstglframebuffer.c<br>
> >+gstglmemory.c<br>
> >+gstglmixer.c<br>
> >+gstglshader.c<br>
> >+gstglshadervariables.c<br>
> >+gstglupload.c<br>
> >+gstglutils.c<br>
> >+gstglwindow.c)<br>
> >+<br>
> >+include_directories(${CMAKE_CURRENT_SOURCE_DIR})<br>
> >+<br>
> >+add_library(gstgl<br>
> >+ ${srcs} )<br>
> >diff --git a/gst/CMakeLists.txt b/gst/CMakeLists.txt<br>
> >new file mode 100644<br>
> >index 0000000..ef32dd6<br>
> >--- /dev/null<br>
> >+++ b/gst/CMakeLists.txt<br>
> >@@ -0,0 +1 @@<br>
> >+add_subdirectory(gl)<br>
> >diff --git a/gst/gl/CMakeLists.txt b/gst/gl/CMakeLists.txt<br>
> >new file mode 100644<br>
> >index 0000000..b613ed3<br>
> >--- /dev/null<br>
> >+++ b/gst/gl/CMakeLists.txt<br>
> >@@ -0,0 +1,25 @@<br>
> >+set (plugin_srcs<br>
> >+ gltestsrc.c<br>
> >+gstglbumper.c<br>
> >+gstglcolorscale.c<br>
> >+gstgldeinterlace.c<br>
> >+gstgldifferencematte.c<br>
> >+gstgleffects.c<br>
> >+gstglfilterapp.c<br>
> >+gstglfilterblur.c<br>
> >+gstglfiltercube.c<br>
> >+gstglfilterglass.c<br>
> >+gstglfilterlaplacian.c<br>
> >+gstglfilterreflectedscreen.c<br>
> >+gstglfiltershader.c<br>
> >+gstglfiltersobel.c<br>
> >+gstglimagesink.c<br>
> >+gstglmosaic.c<br>
> >+gstgloverlay.c<br>
> >+gstgltestsrc.c<br>
> >+gstopengl.c)<br>
> >+<br>
> >+<br>
> >+add_library(gstglplugin MODULE ${plugin_srcs})<br>
> >+<br>
> >+target_link_libraries(gstglplugin gstgl)<br>
> >--<br>
> >1.7.9.5<br>
> ><br>
> ><br>
> ><br>
> >本邮件附件清单如下:<br>
> > (1) 0001-improve-CMake-build-system.patch (18.7 K)<br>
> > (2) 0002-improve-MSVC-vc10-compatibility.patch (7.5 K)<br>
> > (3) 0003-improve-cmake-build-script-add-install-target.patch (6.0 K)<br>
> ><br>
> ><br>
> >comicfans44<br>
</div></div>> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>