<HTML><HEAD><TITLE>Mail</TITLE>
<META name=GENERATOR
content="KsDHTMLEDLib.ocx, FreeWare HTML Editor 1.164.2, ?Kurt Senfer">
<META content="text/html; charset=GB2312" http-equiv=Content-Type></HEAD>
<BODY style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体" leftMargin=5 topMargin=5 #ffffff>
<DIV>Hello ,</DIV>
<DIV> I'm trying to implement some element based on opengl
plugin on win32,</DIV>
<DIV>but I found the CMake build script is incomplete, and some headers are not
</DIV>
<DIV>compatible with msvc , so I made some patch to complete the CMake build
script,</DIV>
<DIV>hopes this can help others working with msvc.</DIV>
<DIV> I don't know if it's good to post whole patch
here,anyway I posted it.</DIV>
<DIV>patch also avaiable as attachments.</DIV>
<DIV> </DIV>
<DIV>0001-improve-CMake-build-system.patch :</DIV>
<DIV><BR>From e6ba08a4872907a85f795b0a30e6d9babcd39568 Mon Sep 17 00:00:00
2001<BR>From: comicfans44 <<A
href="mailto:comicfans44@gmail.com">comicfans44@gmail.com</A>><BR>Date: Tue,
22 Oct 2013 10:33:00 +0800<BR>Subject: [PATCH 1/3] improve CMake build
system</DIV>
<DIV>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</DIV>
<DIV>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 <<A
href="mailto:tbscope@gmail.com">tbscope@gmail.com</A>><BR>+# Copyright (c)
2008 Helio Chissini de Castro, <<A
href="mailto:helio@kde.org">helio@kde.org</A>><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 <<A
href="mailto:rakuco@webkit.org">rakuco@webkit.org</A>><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</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>
<DIV><U><STRONG>本邮件附件清单如下:</STRONG></U></DIV>
<DIV> (1) 0001-improve-CMake-build-system.patch (18.7
K)</DIV>
<DIV> (2) 0002-improve-MSVC-vc10-compatibility.patch (7.5
K)</DIV>
<DIV> (3) 0003-improve-cmake-build-script-add-install-target.patch (6.0
K)</DIV><BR></DIV>
<DIV>comicfans44</DIV>
<DIV> </DIV></BODY></HTML>