mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +00:00
meson: Update option names to omit disable_ and with- prefixes
Also yield common options to the outer project (gst-build in our case) so that they don't have to be set manually and use array types for some options.
This commit is contained in:
parent
5b736d2c7a
commit
1e1a5d658e
5 changed files with 45 additions and 38 deletions
|
@ -153,27 +153,26 @@ enabled_gl_platforms = []
|
||||||
enabled_gl_winsys = []
|
enabled_gl_winsys = []
|
||||||
|
|
||||||
# parse provided options
|
# parse provided options
|
||||||
libegl_module_name = get_option('with_egl_module_name')
|
libegl_module_name = get_option('egl_module_name')
|
||||||
if libegl_module_name != ''
|
if libegl_module_name != ''
|
||||||
gl_cpp_args += ['-DGST_GL_LIBEGL_MODULE_NAME="@0@"'.format(libegl_module_name)]
|
gl_cpp_args += ['-DGST_GL_LIBEGL_MODULE_NAME="@0@"'.format(libegl_module_name)]
|
||||||
endif
|
endif
|
||||||
libgles2_module_name = get_option('with_gles2_module_name')
|
libgles2_module_name = get_option('gles2_module_name')
|
||||||
if libgles2_module_name != ''
|
if libgles2_module_name != ''
|
||||||
gl_cpp_args += ['-DGST_GL_LIBGLESV2_MODULE_NAME="@0@"'.format(libgles2_module_name)]
|
gl_cpp_args += ['-DGST_GL_LIBGLESV2_MODULE_NAME="@0@"'.format(libgles2_module_name)]
|
||||||
endif
|
endif
|
||||||
libgl_module_name = get_option('with_opengl_module_name')
|
libgl_module_name = get_option('opengl_module_name')
|
||||||
if libgl_module_name != ''
|
if libgl_module_name != ''
|
||||||
gl_cpp_args += ['-DGST_GL_LIBGL_MODULE_NAME="@0@"'.format(libgl_module_name)]
|
gl_cpp_args += ['-DGST_GL_LIBGL_MODULE_NAME="@0@"'.format(libgl_module_name)]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gl_apis_s = get_option ('with_gl_api')
|
gl_apis = get_option('gl_api')
|
||||||
if gl_apis_s == 'auto'
|
if gl_apis.contains('auto')
|
||||||
need_api_opengl = 'auto'
|
need_api_opengl = 'auto'
|
||||||
need_api_gles2 = 'auto'
|
need_api_gles2 = 'auto'
|
||||||
else
|
else
|
||||||
need_api_opengl = 'no'
|
need_api_opengl = 'no'
|
||||||
need_api_gles2 = 'no'
|
need_api_gles2 = 'no'
|
||||||
gl_apis = gl_apis_s.split(',')
|
|
||||||
foreach api : gl_apis
|
foreach api : gl_apis
|
||||||
if api == 'opengl'
|
if api == 'opengl'
|
||||||
need_api_opengl = 'yes'
|
need_api_opengl = 'yes'
|
||||||
|
@ -185,8 +184,8 @@ else
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gl_platforms_s = get_option ('with_gl_platform')
|
gl_platforms = get_option('gl_platform')
|
||||||
if gl_platforms_s == 'auto'
|
if gl_platforms.contains('auto')
|
||||||
need_platform_egl = 'auto'
|
need_platform_egl = 'auto'
|
||||||
need_platform_glx = 'auto'
|
need_platform_glx = 'auto'
|
||||||
need_platform_cgl = 'auto'
|
need_platform_cgl = 'auto'
|
||||||
|
@ -198,7 +197,6 @@ else
|
||||||
need_platform_cgl = 'no'
|
need_platform_cgl = 'no'
|
||||||
need_platform_wgl = 'no'
|
need_platform_wgl = 'no'
|
||||||
need_platform_eagl = 'no'
|
need_platform_eagl = 'no'
|
||||||
gl_platforms = gl_platforms_s.split(',')
|
|
||||||
foreach platform : gl_platforms
|
foreach platform : gl_platforms
|
||||||
if platform == 'egl'
|
if platform == 'egl'
|
||||||
need_platform_egl = 'yes'
|
need_platform_egl = 'yes'
|
||||||
|
@ -216,8 +214,8 @@ else
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gl_winsys_s = get_option ('with_gl_winsys')
|
gl_winsys = get_option('gl_winsys')
|
||||||
if gl_winsys_s == 'auto'
|
if gl_winsys.contains('auto')
|
||||||
need_win_x11 = 'auto'
|
need_win_x11 = 'auto'
|
||||||
need_win_wayland = 'auto'
|
need_win_wayland = 'auto'
|
||||||
need_win_win32 = 'auto'
|
need_win_win32 = 'auto'
|
||||||
|
@ -235,7 +233,6 @@ else
|
||||||
need_win_dispmanx = 'no'
|
need_win_dispmanx = 'no'
|
||||||
need_win_viv_fb = 'no'
|
need_win_viv_fb = 'no'
|
||||||
need_win_gbm = 'no'
|
need_win_gbm = 'no'
|
||||||
gl_winsys = gl_winsys_s.split(',')
|
|
||||||
foreach winsys : gl_winsys
|
foreach winsys : gl_winsys
|
||||||
if winsys == 'x11'
|
if winsys == 'x11'
|
||||||
need_win_x11 = 'yes'
|
need_win_x11 = 'yes'
|
||||||
|
|
14
meson.build
14
meson.build
|
@ -171,7 +171,7 @@ foreach extra_arg : warning_c_flags
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# GStreamer package name and origin url
|
# GStreamer package name and origin url
|
||||||
gst_package_name = get_option('with-package-name')
|
gst_package_name = get_option('package-name')
|
||||||
if gst_package_name == ''
|
if gst_package_name == ''
|
||||||
if gst_version_nano == 0
|
if gst_version_nano == 0
|
||||||
gst_package_name = 'GStreamer Base Plug-ins source release'
|
gst_package_name = 'GStreamer Base Plug-ins source release'
|
||||||
|
@ -182,7 +182,7 @@ if gst_package_name == ''
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
core_conf.set_quoted('GST_PACKAGE_NAME', gst_package_name)
|
core_conf.set_quoted('GST_PACKAGE_NAME', gst_package_name)
|
||||||
core_conf.set_quoted('GST_PACKAGE_ORIGIN', get_option('with-package-origin'))
|
core_conf.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))
|
||||||
|
|
||||||
# FIXME: These should be configure options
|
# FIXME: These should be configure options
|
||||||
core_conf.set('DEFAULT_VIDEOSINK', '"autovideosink"')
|
core_conf.set('DEFAULT_VIDEOSINK', '"autovideosink"')
|
||||||
|
@ -251,8 +251,8 @@ gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
|
||||||
|
|
||||||
have_orcc = false
|
have_orcc = false
|
||||||
orcc_args = []
|
orcc_args = []
|
||||||
if get_option('use_orc') != 'no'
|
if get_option('orc') != 'no'
|
||||||
need_orc = get_option('use_orc') == 'yes'
|
need_orc = get_option('orc') == 'yes'
|
||||||
# Used by various libraries/elements that use Orc code
|
# Used by various libraries/elements that use Orc code
|
||||||
orc_dep = dependency('orc-0.4', version : orc_req, required : need_orc)
|
orc_dep = dependency('orc-0.4', version : orc_req, required : need_orc)
|
||||||
orcc = find_program('orcc', required : need_orc)
|
orcc = find_program('orcc', required : need_orc)
|
||||||
|
@ -280,7 +280,7 @@ have_sse41 = cc.has_argument(sse41_args)
|
||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
gst_proj = subproject('gstreamer')
|
gst_proj = subproject('gstreamer')
|
||||||
|
|
||||||
if gst_proj.get_variable('disable_gst_debug')
|
if not gst_proj.get_variable('gst_debug')
|
||||||
message('GStreamer debug system is disabled')
|
message('GStreamer debug system is disabled')
|
||||||
add_project_arguments('-Wno-unused', language: 'c')
|
add_project_arguments('-Wno-unused', language: 'c')
|
||||||
else
|
else
|
||||||
|
@ -303,7 +303,7 @@ endif
|
||||||
|
|
||||||
gir = find_program('g-ir-scanner', required : false)
|
gir = find_program('g-ir-scanner', required : false)
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
|
build_gir = gir.found() and not meson.is_cross_build() and get_option('introspection')
|
||||||
gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
|
gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
|
||||||
'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \
|
'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \
|
||||||
'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
|
'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
|
||||||
|
@ -333,7 +333,7 @@ endif
|
||||||
|
|
||||||
if build_machine.system() == 'windows'
|
if build_machine.system() == 'windows'
|
||||||
message('Disabling gtk-doc while building on Windows')
|
message('Disabling gtk-doc while building on Windows')
|
||||||
elif get_option('disable_gtkdoc')
|
elif not get_option('gtkdoc')
|
||||||
message('gtk-doc is disabled via options')
|
message('gtk-doc is disabled via options')
|
||||||
else
|
else
|
||||||
if find_program('gtkdoc-scan', required : false).found()
|
if find_program('gtkdoc-scan', required : false).found()
|
||||||
|
|
|
@ -1,18 +1,28 @@
|
||||||
option('audioresample_format', type : 'combo', choices : ['int', 'float', 'auto'], value : 'auto')
|
option('audioresample_format', type : 'combo',
|
||||||
option('disable_examples', type : 'boolean', value : false)
|
choices : ['int', 'float', 'auto'], value : 'auto')
|
||||||
option('use_orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
option('gl_api', type : 'array', choices : ['opengl', 'gles2', 'auto'], value : ['auto'],
|
||||||
option('disable_introspection',
|
description : 'A comma separated list of opengl APIs to enable building against')
|
||||||
type : 'boolean', value : false,
|
option('gl_platform', type : 'array',
|
||||||
description : 'Whether to disable the introspection generation')
|
choices : ['glx', 'egl', 'cgl', 'wgl', 'eagl', 'auto'], value : ['auto'],
|
||||||
option('disable_gtkdoc', type : 'boolean', value : false)
|
description : 'A comma separated list of opengl platforms to enable building against')
|
||||||
option('with-package-name', type : 'string',
|
option('gl_winsys', type : 'array',
|
||||||
description : 'package name to use in plugins')
|
choices : ['x11', 'wayland', 'win32', 'cocoa', 'dispmanx', 'auto'], value : ['auto'],
|
||||||
option('with-package-origin', type : 'string', value : 'Unknown package origin',
|
description : 'A comma separated list of opengl windows systems to enable building against. Supported values are x11, wayland, win32, cocoa, and dispmanx')
|
||||||
description : 'package origin URL to use in plugins')
|
option('egl_module_name', type : 'string', value : '',
|
||||||
option('with_gl_api', type : 'string', value : 'auto', description : 'A comma separated list of opengl APIs to enable building against. Supported values are opengl and gles2.')
|
description : 'The file to pass to g_module_open to open the libEGL library (default: libEGL)')
|
||||||
option('with_gl_platform', type : 'string', value : 'auto', description : 'A comma separated list of opengl platforms to enable building against. Supported values are glx, egl, cgl, wgl and eagl')
|
option('opengl_module_name', type : 'string', value : '',
|
||||||
option('with_gl_winsys', type : 'string', value : 'auto', description : 'A comma separated list of opengl windows systems to enable building against. Supported values are x11, wayland, win32, cocoa, and dispmanx')
|
description : 'The file to pass to g_module_open to open the libGL library (default: libGL)')
|
||||||
option('with_egl_module_name', type : 'string', value : '', description : 'The file to pass to g_module_open to open the libEGL.so library (default: libEGL.so)')
|
option('gles2_module_name', type : 'string', value : '',
|
||||||
option('with_opengl_module_name', type : 'string', value : '', description : 'The file to pass to g_module_open to open the libGL.so library (default: libGL.so)')
|
description : 'The file to pass to g_module_open to open the libGLESv2 library (default: libGLESv2)')
|
||||||
option('with_gles2_module_name', type : 'string', value : '', description : 'The file to pass to g_module_open to open the libGLESv2.so library (default: libGLESv2.so)')
|
|
||||||
|
|
||||||
|
# Common options
|
||||||
|
option('orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto', yield : true)
|
||||||
|
option('examples', type : 'boolean', value : true, yield : true)
|
||||||
|
option('gtkdoc', type : 'boolean', value : true, yield : true,
|
||||||
|
description : 'Build API documentation with gtk-doc')
|
||||||
|
option('introspection', type : 'boolean', value : true, yield : true,
|
||||||
|
description : 'Generate gobject-introspection bindings')
|
||||||
|
option('package-name', type : 'string', yield : true,
|
||||||
|
description : 'package name to use in plugins')
|
||||||
|
option('package-origin', type : 'string', value : 'Unknown package origin', yield : true,
|
||||||
|
description : 'package origin URL to use in plugins')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
have_registry = true # FIXME not get_option('disable_registry')
|
have_registry = true # FIXME get_option('registry')
|
||||||
|
|
||||||
# name, condition when to skip the test and extra dependencies
|
# name, condition when to skip the test and extra dependencies
|
||||||
base_tests = [
|
base_tests = [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
subdir('check')
|
subdir('check')
|
||||||
endif
|
endif
|
||||||
if not get_option('disable_examples')
|
if get_option('examples')
|
||||||
subdir('examples')
|
subdir('examples')
|
||||||
endif
|
endif
|
||||||
#subdir('files')
|
#subdir('files')
|
||||||
|
|
Loading…
Reference in a new issue