2016-08-04 21:33:55 +00:00
|
|
|
project('gst-editing-services', 'c',
|
2017-01-13 12:39:42 +00:00
|
|
|
version : '1.11.1.1',
|
2016-11-17 18:31:50 +00:00
|
|
|
meson_version : '>= 0.36.0',
|
2016-08-04 21:33:55 +00:00
|
|
|
default_options : [ 'warning_level=1',
|
|
|
|
'buildtype=debugoptimized' ])
|
|
|
|
|
|
|
|
gst_version = meson.project_version()
|
|
|
|
version_arr = gst_version.split('.')
|
|
|
|
gst_version_major = version_arr[0]
|
|
|
|
gst_version_minor = version_arr[1]
|
|
|
|
gst_version_micro = version_arr[2]
|
|
|
|
if version_arr.length() == 4
|
|
|
|
gst_version_nano = version_arr[3]
|
|
|
|
else
|
|
|
|
gst_version_nano = 0
|
|
|
|
endif
|
|
|
|
|
|
|
|
apiversion = '1.0'
|
|
|
|
soversion = 0
|
|
|
|
# maintaining compatibility with the previous libtool versioning
|
|
|
|
# current = minor * 100 + micro
|
|
|
|
libversion = '@0@.@1@.0'.format(soversion, gst_version_minor.to_int() * 100 + gst_version_micro.to_int())
|
|
|
|
|
|
|
|
glib_req = '>= 2.40.0'
|
|
|
|
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
# Ignore several spurious warnings for things gstreamer does very commonly
|
|
|
|
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
|
|
|
|
# If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
|
|
|
|
# NOTE: Only add warnings here if you are sure they're spurious
|
|
|
|
if cc.get_id() == 'msvc'
|
2016-11-17 18:31:50 +00:00
|
|
|
add_project_arguments(
|
|
|
|
'/wd4018', # implicit signed/unsigned conversion
|
|
|
|
'/wd4146', # unary minus on unsigned (beware INT_MIN)
|
|
|
|
'/wd4244', # lossy type conversion (e.g. double -> int)
|
|
|
|
'/wd4305', # truncating type conversion (e.g. double -> float)
|
|
|
|
language : 'c')
|
2016-08-04 21:33:55 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
cdata = configuration_data()
|
|
|
|
cdata.set('VERSION', '"@0@"'.format(gst_version))
|
|
|
|
cdata.set('PACKAGE', '"gst-editing-services"')
|
|
|
|
cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
|
|
|
|
cdata.set('PACKAGE_BUGREPORT', '"http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer"')
|
|
|
|
cdata.set('PACKAGE_NAME', '"GStreamer Editing Services"')
|
|
|
|
cdata.set('GST_PACKAGE_NAME', '"GStreamer Editing Services"')
|
|
|
|
cdata.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"')
|
|
|
|
cdata.set('GST_LICENSE', '"LGPL"')
|
|
|
|
cdata.set('LIBDIR', '"@0@"'.format(get_option('libdir')))
|
|
|
|
|
|
|
|
# Mandatory GST deps
|
|
|
|
gst_dep = dependency('gstreamer-' + apiversion, version : gst_req,
|
|
|
|
fallback : ['gstreamer', 'gst_dep'])
|
|
|
|
gstpbutils_dep = dependency('gstreamer-pbutils-' + apiversion, version : gst_req,
|
|
|
|
fallback : ['gst-plugins-base', 'pbutils_dep'])
|
|
|
|
gstvideo_dep = dependency('gstreamer-video-' + apiversion, version : gst_req,
|
|
|
|
fallback : ['gst-plugins-base', 'video_dep'])
|
|
|
|
gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req,
|
|
|
|
fallback : ['gstreamer', 'gst_base_dep'])
|
2016-10-25 15:54:11 +00:00
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
|
|
|
|
fallback : ['gstreamer', 'gst_check_dep'], required: false)
|
|
|
|
endif
|
2016-08-04 21:33:55 +00:00
|
|
|
gstcontroller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
|
|
|
|
fallback : ['gstreamer', 'gst_controller_dep'])
|
2017-01-13 12:41:51 +00:00
|
|
|
gstvalidate_dep = dependency('gst-validate-1.0', version : gst_req, required : false,
|
|
|
|
fallback : ['gst-devtools', 'validate_dep'])
|
2016-08-04 21:33:55 +00:00
|
|
|
|
|
|
|
gio_dep = dependency('gio-2.0', version : glib_req)
|
|
|
|
libxml_dep = dependency('libxml-2.0')
|
|
|
|
|
|
|
|
# TODO Properly port to Gtk 3
|
|
|
|
# gtk_dep = dependency('gtk+-3.0', required : false)
|
|
|
|
|
|
|
|
libges_deps = [gst_dep, gstbase_dep, gstvideo_dep, gstpbutils_dep,
|
2016-09-07 19:53:06 +00:00
|
|
|
gstcontroller_dep, gio_dep, libxml_dep]
|
2016-08-04 21:33:55 +00:00
|
|
|
|
|
|
|
if gstvalidate_dep.found()
|
|
|
|
libges_deps = libges_deps + [gstvalidate_dep]
|
|
|
|
cdata.set('HAVE_GST_VALIDATE', 1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
configure_file(input : 'config.h.meson',
|
|
|
|
output : 'config.h',
|
|
|
|
configuration : cdata)
|
|
|
|
|
|
|
|
|
|
|
|
gir = find_program('g-ir-scanner', required : false)
|
|
|
|
gnome = import('gnome')
|
2016-08-25 18:04:54 +00:00
|
|
|
gtkdoc = find_program('gtkdoc-scan', required : false)
|
2016-08-04 21:33:55 +00:00
|
|
|
|
|
|
|
# Fixme, not very elegant.
|
2016-08-26 22:55:33 +00:00
|
|
|
build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
|
2016-11-04 17:41:13 +00:00
|
|
|
gir_init_section = [ '--add-init-section=' + \
|
|
|
|
'extern void gst_init(gint*,gchar**);' + \
|
|
|
|
'extern void ges_init(void);' + \
|
|
|
|
'g_setenv("GST_REGISTRY_1.0", "/no/way/this/exists.reg", TRUE);' + \
|
|
|
|
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
|
|
|
|
'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
|
2016-11-29 13:37:11 +00:00
|
|
|
'g_setenv("GST_DEBUG", "0", TRUE);' + \
|
2016-11-04 17:41:13 +00:00
|
|
|
'gst_init(NULL,NULL);' + \
|
|
|
|
'ges_init();' ]
|
2016-08-04 21:33:55 +00:00
|
|
|
|
|
|
|
ges_c_args = ['-DHAVE_CONFIG_H']
|
|
|
|
plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
|
|
|
|
|
2016-11-17 18:31:50 +00:00
|
|
|
vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
|
|
|
|
|
2016-12-09 20:50:28 +00:00
|
|
|
if gst_dep.type_name() == 'internal'
|
|
|
|
gst_proj = subproject('gstreamer')
|
|
|
|
|
|
|
|
if gst_proj.get_variable('disable_gst_debug')
|
|
|
|
message('GStreamer debug system is disabled')
|
|
|
|
add_project_arguments('-Wno-unused', language: 'c')
|
|
|
|
else
|
|
|
|
message('GStreamer debug system is enabled')
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
# We can't check that in the case of subprojects as we won't
|
|
|
|
# be able to build against an internal dependency (which is not built yet)
|
|
|
|
if not cc.compiles('''
|
|
|
|
#include <gst/gstconfig.h>
|
|
|
|
#ifdef GST_DISABLE_GST_DEBUG
|
|
|
|
#error "debugging disabled, make compiler fail"
|
|
|
|
#endif''' , dependencies: gst_dep)
|
|
|
|
message('GStreamer debug system is disabled')
|
|
|
|
add_global_arguments('-Wno-unused', language: 'c')
|
|
|
|
else
|
|
|
|
message('GStreamer debug system is enabled')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-08-04 21:33:55 +00:00
|
|
|
configinc = include_directories('.')
|
|
|
|
subdir('ges')
|
|
|
|
subdir('plugins')
|
|
|
|
subdir('tools')
|
|
|
|
subdir('pkgconfig')
|
|
|
|
subdir('tests')
|
|
|
|
subdir('examples')
|
2016-08-25 18:04:54 +00:00
|
|
|
|
|
|
|
if build_machine.system() != 'windows'
|
|
|
|
if gtkdoc.found()
|
|
|
|
subdir('docs')
|
|
|
|
else
|
|
|
|
message('Not building documentation as gtk-doc was not found')
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
message('Disabling gtk-doc while building on Windows')
|
|
|
|
endif
|
2016-09-30 14:35:42 +00:00
|
|
|
|
|
|
|
python3 = find_program('python3')
|
|
|
|
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
|