meson: Make mpegts lib build when using subprojects

The headers passed as parametter are relative to the build dir
basically "../subproject/gst-plugins-bad/gst-libs/gst/mpegts/XXX.h"
but that does not match what is needed at build time when building as
subproject, also we always add current dir as include_dir so we are
safe including directly.

And link mpegtsdemux against the 'math' library as it is needed.
This commit is contained in:
Thibault Saunier 2016-08-24 09:41:08 -03:00
parent 59b3e5944e
commit 50473d77cc
3 changed files with 5 additions and 3 deletions

View file

@ -5,7 +5,7 @@
# make special characters such as \n go through all
# backends is a fool's errand.
import sys, os, shutil, subprocess
import sys, os, subprocess
cmd = []
argn = 1
@ -20,7 +20,7 @@ for arg in sys.argv[1:]:
ofilename = sys.argv[argn]
headers = sys.argv[argn + 1:]
inc = '\n'.join(['#include"%s"' % i for i in headers])
inc = '\n'.join(['#include"%s"' % os.path.basename(i) for i in headers])
h_array = ['--fhead',
"#ifndef __GST_MPEGTS_ENUM_TYPES_H__\n#define __GST_MPEGTS_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n",

View file

@ -12,7 +12,7 @@ gstmpegtsdemux = library('gstmpegtsdemux',
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
include_directories : [configinc, libsinc],
dependencies : [gstcodecparsers_dep, gstmpegts_dep, gsttag_dep,
gstpbutils_dep, gstaudio_dep, gstbase_dep],
gstpbutils_dep, gstaudio_dep, gstbase_dep, mathlib],
install : true,
install_dir : plugins_install_dir,
)

View file

@ -305,6 +305,8 @@ if x11_dep.found()
cdata.set('HAVE_X11', 1)
endif
mathlib = cc.find_library('m', required : false)
if host_machine.system() == 'windows'
winsock2 = [cc.find_library('ws2_32')]
else