Search code examples
c++cgstreamermeson-buildgstreamer-1.0

Gstreamer meson build from source as a subproject of another big project


I am trying to build Gstreamer from source using Meson as a subproject of another big project. (Building from source using Meson)

The big Project`s meson contains: gst_dep = subproject('gstreamer')

because the code of the original gstreamer project contains another subprojects folder that includes another gstreamer directory I am getting the next error:

subprojects/gstreamer/meson.build:155:4: ERROR: Recursive include of subprojects: gstreamer => gstreamer.

The directories structure:

-BigProject
    -meson.build
    -subprojects
        -gstreamer #The original gstreamer code folder
            -meson.build
            -subprojects
                -gstreamer 
                -gst-plugins-good
                -gst-plugins-bad
                etc.

What can I do to fix that?


Solution

  • Renaming GStreamer source repo will work.

    Meson Subproject won't accept a recursive include of GStreamer repo as a subproject to add its GStreamer subproject.

    That said, renaming your GStreamer repo to gstreamer-something and making your top meson.build's Subproject call to:

    gst_dep = subproject('gstreamer-something')
    

    Will work.

    Moreover, for this renaming, you can specify the GStreamer repo name when cloning, this way:

    git clone -b <branch> <src uri> gstreamer-something
    

    Nonetheless, in case you are using a Meson Wrap , you can have the Wrap file with that name and should be enough.

    You can follow this issue about this issue of GStreamer that doesn't considers itself to be added as a Subproject. Hopefully they come with a rename solution or similar, soon.