Home | History | Annotate | Download | only in cmake
      1 # - Try to find GStreamer-App
      2 # Once done, this will define
      3 #
      4 #  GStreamer-App_FOUND - system has GStreamer
      5 #  GStreamer-App_INCLUDE_DIRS - the GStreamer include directories
      6 #  GStreamer-App_LIBRARIES - link these to use GStreamer
      7 
      8 include(LibFindMacros)
      9 
     10 # Dependencies
     11 libfind_package(GStreamer-App GStreamer)
     12 libfind_package(GStreamer-App GStreamer-Base)
     13 
     14 # Use pkg-config to get hints about paths
     15 libfind_pkg_check_modules(GStreamer-App_PKGCONF gstreamer-app-0.10)
     16 
     17 # Include dir
     18 find_path(GStreamer-App_INCLUDE_DIR
     19   NAMES gst/gst.h
     20   PATHS ${GStreamer-App_PKGCONF_INCLUDE_DIRS}
     21   PATH_SUFFIXES gstreamer-0.10
     22 )
     23 
     24 # Finally the library itself
     25 find_library(GStreamer-App_LIBRARY
     26   NAMES gstapp-0.10
     27   PATHS ${GStreamer-App_PKGCONF_LIBRARY_DIRS}
     28 )
     29 
     30 # Set the include dir variables and the libraries and let libfind_process do the rest.
     31 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
     32 set(GStreamer-App_PROCESS_INCLUDES GStreamer-App_INCLUDE_DIR GStreamer_INCLUDE_DIR GStreamer-Base_INCLUDE_DIR)
     33 set(GStreamer-App_PROCESS_LIBS GStreamer-App_LIBRARY GStreamer_LIBRARIES GStreamer-Base_LIBRARIES)
     34 libfind_process(GStreamer-App)
     35