<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>I take it back.. There is something wrong with the cmake script. When I print out these values,
<br>
<font size="-1"> message( "found = ${GSTREAMER_FOUND}" )<br>
message( "dirs = ${GSTREAMER_INCLUDE_DIRS}" )<br>
message( "libs = ${GSTREAMER_LIBRARIES}" )<br>
message( "base dir include = ${GSTREAMER_BASE_INCLUDE_DIRS}" )<br>
message( "base dir libraries = ${GSTREAMER_BASE_LIBRARIES}" )<br>
</font><br>
</p>
<p>I get these results<br>
<meta name="qrichtext" content="1">
</p>
<p><style type="text/css">
p, li { white-space: pre-wra</style><font size="-1"> found = TRUE<br>
dirs = </font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> libs = GSTREAMER_LIBRARIES-NOTFOUND</font></p>
<font size="-1"> base dir include = </font>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> base dir libraries = GSTREAMER_BASE_LIBRARIES-NOTFOUND</font><!--EndFragment--></p>
<br>
<p></p>
<br>
<br>
<div class="moz-cite-prefix">On 10/26/2016 11:06 PM, Rick Blacker wrote:<br>
</div>
<blockquote cite="mid:BL2PR02MB275273D929A48E21C5E299BF3AA0@BL2PR02MB275.namprd02.prod.outlook.com" type="cite">
Guys, I'm sorry, I know this may be second hand to some, and I'm trying to read up on this stuff, but for some reason it's not clicking very easily for me. (yes, I came from a Microsoft Visual Studio world)
<br>
<br>
<br>
<br>
Here is the path to my QT project where I'm trying to use CMake. This directory has one source code file. main.cpp<font size="-1"><br>
~/dev/qt_workspace/InitGStreamer$</font><br>
<p>My QT build folder is here<font size="-1"><br>
~/dev/qt_workspace/InitGStreamer/build-InitGStreamer-Desktop_Qt_5_7_0_GCC_64bit-Default$</font><br>
</p>
<p>Then I created a sub directory structure under it. I got this structure from reading the CMake docs.
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://cmake.org/Wiki/CMake:How_To_Find_Libraries">
https://cmake.org/Wiki/CMake:How_To_Find_Libraries</a><br>
<font size="-1"> ~/dev/qt_workspace/InitGStreamer/cmake/Modules$</font><br>
</p>
<p>In in there is a file called FindGStreamer.cmake which I found here<br>
<font size="-1"> <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://raw.githubusercontent.com/WebKit/webkit/master/Source/cmake/FindGStreamer.cmake">
https://raw.githubusercontent.com/WebKit/webkit/master/Source/cmake/FindGStreamer.cmake</a></font></p>
<p>Here is what I have done in my cmake file. </p>
<p><font size="-2"><font size="-1"> cmake_minimum_required(VERSION 2.8)<br>
project(InitGStreamer)<br>
add_executable(${PROJECT_NAME} main.cpp )<br>
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")<br>
find_package(gstreamer-app REQUIRED)</font><br>
</font></p>
<p><br>
</p>
<p>However, I'm getting the following output error from CMake.</p>
<font size="-1"> Running "/usr/bin/cmake /home/rick/dev/qt_workspace/InitGStreamer '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++ -DQT_QMAKE_EXECUTABLE:STRING=/home/rick/DevApps/Qt/5.7/gcc_64/bin/qmake" in /home/rick/dev/qt_workspace
<br>
/InitGStreamer/build-InitGStreamer-Desktop_Qt_5_7_0_GCC_64bit-Default.</font>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> -- Configuring incomplete, errors occurred!</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> See also "/home/rick/dev/qt_workspace/InitGStreamer/build-InitGStreamer-Desktop_Qt_5_7_0_GCC_64bit-Default/CMakeFiles/CMakeOutput.log".</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> CMake Error at CMakeLists.txt:5 (find_package):</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> By not providing "Findgstreamer-app.cmake" in CMAKE_MODULE_PATH this</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> project has asked CMake to find a package configuration file provided by</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> "gstreamer-app", but CMake did not find one.</font></p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;">
<font size="-1"><br>
</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> Could not find a package configuration file provided by "gstreamer-app"</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> with any of the following names:</font></p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;">
<font size="-1"><br>
</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> gstreamer-appConfig.cmake</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> gstreamer-app-config.cmake</font></p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;">
<font size="-1"><br>
</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> Add the installation prefix of "gstreamer-app" to CMAKE_PREFIX_PATH or set</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> "gstreamer-app_DIR" to a directory containing one of the above files. If</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> "gstreamer-app" provides a separate development package or SDK, be sure it</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> has been installed.</font></p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;">
<font size="-1"><br>
</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<font size="-1"> *** cmake process exited with exit code 1.</font><!--EndFragment--></p>
<p>THEN I changed my CMake to this.<br>
<font size="-1"> cmake_minimum_required(VERSION 2.8)<br>
project(InitGStreamer)<br>
add_executable(${PROJECT_NAME} main.cpp )<br>
include("${CMAKE_SOURCE_DIR}/cmake/Modules/FindGStreamer.cmake")<br>
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")<br>
#find_package(gstreamer-app REQUIRED)<br>
find_package(PkgConfig)<br>
#aux_source_directory(. SRC_LIST)<br>
#add_executable(${PROJECT_NAME} ${SRC_LIST})<br>
<br>
include_directories( ${GSTREAMER_INCLUDE_DIR})<br>
add_definitions(${GSTREAMER_DEFINITIONS})<br>
#target_link_libraries(MPEG4GStreamer ${GSTREAMER_LIBRARIES})</font><br>
</p>
<p>This seemed to do something... I didn't get any errors, but when I went back to my source code file in QT Creator, it still could not find #include <gst/gst.h>.<br>
Am I wrong to assume that QT Creator will resolve the where this header is automatically based on the cmake setup I have?</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 10/26/2016 11:32 AM, Nicolas Dufresne wrote:<br>
</div>
<blockquote cite="mid:1477506728.22468.15.camel@gmail.com" type="cite">
<pre wrap="">Le mercredi 26 octobre 2016 à 17:56 +0000, Rick Blacker a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">I’m new to both GStreamer and CMake. I’m trying to create a cmake
file for an app that I want to use gstreamer in. When I use the
command
find_package( …. ) I’ve tried several different gstreamer package
names. Things like find_package( gstreamer-1.0 ) and others. None
of them worked.
Does anyone know the proper value to use here?
</pre>
</blockquote>
<pre wrap="">GStreamer implement standard pkg-config metadata. CMake provides the
PkgConfig package to let you interface with that. Here's an exemple:
find_package(PkgConfig)
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4
gstreamer-sdp-1.0>=1.4
gstreamer-video-1.0>=1.4
gstreamer-app-1.0>=1.4)
Notice that GStreamer is a collection of libraries. The list will
depend on your application needs. From there you'll have to update few
things. Globally, link_directories with ${GST_LIBRARY_DIRS} (only
needed if you use GStreamer from non-system installation). And per
target:
- target_include_directories with ${GST_INCLUDE_DIRS}
- target_compile_options with ${GST_CFLAGS}
- target_link_libraries with ${GST_LIBRARIES}
You'll also have to choose between private and public exposure
depending if you create an app or library and if you expose GStreamer
through your library or not.
cheers,
Nicolas
_______________________________________________
gstreamer-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>