cmake find_package(..) what is the proper gstreamer package name?
Nicolas Dufresne
nicolas.dufresne at gmail.com
Thu Oct 27 13:29:39 UTC 2016
Le jeudi 27 octobre 2016 à 06:06 +0000, Rick Blacker a écrit :
> cmake_minimum_required(VERSION 2.8)
> project(InitGStreamer)
> add_executable(${PROJECT_NAME} main.cpp )
> > set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake/Modules/")
> find_package(gstreamer-app REQUIRED)
Please, read my previous email. GStreamer do not provide cmake specific
package. If one exist, it is most likely out-dated. Use PkgConfig
package finder with the rather complete instruction I have provided.
regards,
Nicolas
In case you missed it:
Le mercredi 26 octobre 2016 à 17:56 +0000, Rick Blacker a écrit :
> 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?
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161027/390fab78/attachment.html>
More information about the gstreamer-devel
mailing list