cmake find_package(..) what is the proper gstreamer package name?
Nicolas Dufresne
nicolas.dufresne at gmail.com
Wed Oct 26 18:32:08 UTC 2016
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.
cheers,
Nicolas
More information about the gstreamer-devel
mailing list