mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
build: Add missing common options that are yielding in subprojects
- Align `glib_debug`, `glib_assert` and `glib_checks` options with GLib, otherwise glib subproject won't inherit their value. Previous names and values are preserved using Meson's deprecation mechanism. - Add `extra-checks` and `benchmarks` options in the main project so it can be inherited in GStreamer subprojects. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1165>
This commit is contained in:
parent
77f779e86a
commit
84b3a0950d
14 changed files with 181 additions and 92 deletions
|
@ -46,31 +46,44 @@ option('virtme_kernel_image', type: 'string', value: '', description: 'Path to a
|
|||
# License-related feature options
|
||||
option('gpl', type: 'feature', value: 'disabled',
|
||||
description: 'Allow build of plugins that have (A)GPL-licensed dependencies')
|
||||
option('gstreamer-full-license', type : 'string', value : 'unknown',
|
||||
description : 'gstreamer-full license (default unknown)')
|
||||
|
||||
# Common options, automatically inherited by subprojects
|
||||
option('tests', type : 'feature', value : 'auto', description : 'Build tests')
|
||||
# Common options specific to GStreamer, automatically inherited by subprojects.
|
||||
option('package-origin', type : 'string', value : 'Unknown package origin', yield : true,
|
||||
description : 'package origin URL to use in plugins')
|
||||
option('package-name', type : 'string', yield : true,
|
||||
description : 'package name to use in plugins')
|
||||
option('extra-checks', type : 'feature', value : 'enabled', description : 'Enable extra runtime checks')
|
||||
option('benchmarks', type : 'feature', value : 'auto')
|
||||
option('tools', type : 'feature', value : 'auto', yield : true, description : 'Build command line tools')
|
||||
option('examples', type : 'feature', value : 'auto', description : 'Build examples')
|
||||
option('introspection', type : 'feature', value : 'auto', description : 'Generate introspection data')
|
||||
option('nls', type : 'feature', value : 'auto', description : 'Native language support (translations)')
|
||||
option('orc', type : 'feature', value : 'auto', description : 'Optimized Inner Loop Runtime Compiler (SIMD)')
|
||||
option('doc', type : 'feature', value : 'disabled', description : 'Generate API documentation with hotdoc')
|
||||
option('gtk_doc', type : 'feature', value : 'disabled', description : 'Generate API documentation with gtk-doc')
|
||||
option('qt5', type : 'feature', value : 'auto', description : 'Qt5 toolkit support')
|
||||
option('qt6', type : 'feature', value : 'auto', description : 'Qt6 toolkit support')
|
||||
option('webrtc', type : 'feature', value : 'auto', description : 'WebRTC support')
|
||||
|
||||
option('package-origin', type : 'string', value : 'Unknown package origin', yield : true,
|
||||
description : 'package origin URL to use in plugins')
|
||||
# Common options shared by other projects, automatically inherited by subprojects.
|
||||
option('glib_debug', type : 'feature', value : 'auto', yield : true, description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||
option('glib_assert', type : 'boolean', value : true, yield : true, description : 'Enable GLib assertion (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('glib_checks', type : 'boolean', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('tests', type : 'feature', value : 'auto', description : 'Build tests')
|
||||
option('examples', type : 'feature', value : 'auto', description : 'Build examples')
|
||||
option('introspection', type : 'feature', value : 'auto', description : 'Generate introspection data')
|
||||
option('nls', type : 'feature', value : 'auto', description : 'Native language support (translations)')
|
||||
option('doc', type : 'feature', value : 'disabled', description : 'Generate API documentation with hotdoc')
|
||||
option('gtk_doc', type : 'feature', value : 'disabled', description : 'Generate API documentation with gtk-doc')
|
||||
|
||||
# Deprecated, kept for backward compat
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_debug')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_assert')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
|
||||
|
||||
option('package-name', type : 'string', yield : true,
|
||||
description : 'package name to use in plugins')
|
||||
option('gstreamer-full-license', type : 'string', value : 'unknown',
|
||||
description : 'gstreamer-full license (default unknown)')
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_checks')
|
||||
|
|
|
@ -133,20 +133,20 @@ if gst_version_is_dev
|
|||
add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
|
||||
endif
|
||||
|
||||
cast_checks = get_option('gobject-cast-checks')
|
||||
if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
|
||||
# Same logic as in GLib.
|
||||
glib_debug = get_option('glib_debug')
|
||||
if glib_debug.disabled() or (
|
||||
glib_debug.auto() and (not get_option('debug') or get_option('optimization') not in [ '0', 'g' ]))
|
||||
message('Disabling GLib cast checks')
|
||||
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
|
||||
endif
|
||||
|
||||
glib_asserts = get_option('glib-asserts')
|
||||
if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_assert')
|
||||
message('Disabling GLib asserts')
|
||||
add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
|
||||
endif
|
||||
|
||||
glib_checks = get_option('glib-checks')
|
||||
if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_checks')
|
||||
message('Disabling GLib checks')
|
||||
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
|
||||
endif
|
||||
|
|
|
@ -265,12 +265,6 @@ option('tests', type : 'feature', value : 'auto', yield : true)
|
|||
option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
|
||||
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
|
||||
option('orc', type : 'feature', value : 'auto', yield : true)
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
|
||||
option('extra-checks', type : 'feature', value : 'enabled', yield : true, description : 'Enable extra runtime checks')
|
||||
|
||||
# Common options
|
||||
|
@ -280,3 +274,21 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel
|
|||
description : 'package origin URL to use in plugins')
|
||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||
description: 'Enable documentation.')
|
||||
option('glib_debug', type : 'feature', value : 'auto', yield : true, description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||
option('glib_assert', type : 'boolean', value : true, yield : true, description : 'Enable GLib assertion (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('glib_checks', type : 'boolean', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
|
||||
# Deprecated, kept for backward compat
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_debug')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_assert')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_checks')
|
||||
|
|
|
@ -121,20 +121,20 @@ if gst_version_is_dev
|
|||
add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
|
||||
endif
|
||||
|
||||
cast_checks = get_option('gobject-cast-checks')
|
||||
if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
|
||||
# Same logic as in GLib.
|
||||
glib_debug = get_option('glib_debug')
|
||||
if glib_debug.disabled() or (
|
||||
glib_debug.auto() and (not get_option('debug') or get_option('optimization') not in [ '0', 'g' ]))
|
||||
message('Disabling GLib cast checks')
|
||||
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
|
||||
endif
|
||||
|
||||
glib_asserts = get_option('glib-asserts')
|
||||
if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_assert')
|
||||
message('Disabling GLib asserts')
|
||||
add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
|
||||
endif
|
||||
|
||||
glib_checks = get_option('glib-checks')
|
||||
if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_checks')
|
||||
message('Disabling GLib checks')
|
||||
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
|
||||
endif
|
||||
|
|
|
@ -76,12 +76,6 @@ option('tools', type : 'feature', value : 'auto', yield : true)
|
|||
option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
|
||||
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
|
||||
option('orc', type : 'feature', value : 'auto', yield : true)
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
|
||||
option('qt5', type : 'feature', value : 'auto', yield : true, description : 'Qt5 QML examples')
|
||||
|
||||
# Common options
|
||||
|
@ -91,3 +85,21 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel
|
|||
description : 'package origin URL to use in plugins')
|
||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||
description: 'Enable documentation.')
|
||||
option('glib_debug', type : 'feature', value : 'auto', yield : true, description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||
option('glib_assert', type : 'boolean', value : true, yield : true, description : 'Enable GLib assertion (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('glib_checks', type : 'boolean', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
|
||||
# Deprecated, kept for backward compat
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_debug')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_assert')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_checks')
|
||||
|
|
|
@ -114,20 +114,20 @@ if gst_version_is_dev
|
|||
add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
|
||||
endif
|
||||
|
||||
cast_checks = get_option('gobject-cast-checks')
|
||||
if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
|
||||
# Same logic as in GLib.
|
||||
glib_debug = get_option('glib_debug')
|
||||
if glib_debug.disabled() or (
|
||||
glib_debug.auto() and (not get_option('debug') or get_option('optimization') not in [ '0', 'g' ]))
|
||||
message('Disabling GLib cast checks')
|
||||
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
|
||||
endif
|
||||
|
||||
glib_asserts = get_option('glib-asserts')
|
||||
if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_assert')
|
||||
message('Disabling GLib asserts')
|
||||
add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
|
||||
endif
|
||||
|
||||
glib_checks = get_option('glib-checks')
|
||||
if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_checks')
|
||||
message('Disabling GLib checks')
|
||||
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
|
||||
endif
|
||||
|
|
|
@ -119,12 +119,6 @@ option('examples', type : 'feature', value : 'auto', yield : true)
|
|||
option('tests', type : 'feature', value : 'auto', yield : true)
|
||||
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
|
||||
option('orc', type : 'feature', value : 'auto', yield : true)
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
|
||||
option('asm', type : 'feature', value : 'auto', yield : true)
|
||||
|
||||
# Common options
|
||||
|
@ -134,3 +128,21 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel
|
|||
description : 'package origin URL to use in plugins')
|
||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||
description: 'Enable documentation.')
|
||||
option('glib_debug', type : 'feature', value : 'auto', yield : true, description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||
option('glib_assert', type : 'boolean', value : true, yield : true, description : 'Enable GLib assertion (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('glib_checks', type : 'boolean', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
|
||||
# Deprecated, kept for backward compat
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_debug')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_assert')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_checks')
|
||||
|
|
|
@ -289,20 +289,20 @@ if gst_version_is_dev
|
|||
add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
|
||||
endif
|
||||
|
||||
cast_checks = get_option('gobject-cast-checks')
|
||||
if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
|
||||
# Same logic as in GLib.
|
||||
glib_debug = get_option('glib_debug')
|
||||
if glib_debug.disabled() or (
|
||||
glib_debug.auto() and (not get_option('debug') or get_option('optimization') not in [ '0', 'g' ]))
|
||||
message('Disabling GLib cast checks')
|
||||
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
|
||||
endif
|
||||
|
||||
glib_asserts = get_option('glib-asserts')
|
||||
if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_assert')
|
||||
message('Disabling GLib asserts')
|
||||
add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
|
||||
endif
|
||||
|
||||
glib_checks = get_option('glib-checks')
|
||||
if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_checks')
|
||||
message('Disabling GLib checks')
|
||||
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
|
||||
endif
|
||||
|
|
|
@ -24,12 +24,6 @@ option('nls', type : 'feature', value : 'auto', yield: true,
|
|||
description : 'Enable native language support (translations)')
|
||||
option('orc', type : 'feature', value : 'auto', yield : true)
|
||||
option('tests', type : 'feature', value : 'auto', yield : true)
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
|
||||
|
||||
# Common options
|
||||
option('package-name', type : 'string', yield : true,
|
||||
|
@ -38,3 +32,21 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel
|
|||
description : 'package origin URL to use in plugins')
|
||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||
description: 'Enable documentation.')
|
||||
option('glib_debug', type : 'feature', value : 'auto', yield : true, description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||
option('glib_assert', type : 'boolean', value : true, yield : true, description : 'Enable GLib assertion (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('glib_checks', type : 'boolean', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
|
||||
# Deprecated, kept for backward compat
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_debug')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_assert')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_checks')
|
||||
|
|
|
@ -64,20 +64,20 @@ if gst_version_is_dev
|
|||
add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
|
||||
endif
|
||||
|
||||
cast_checks = get_option('gobject-cast-checks')
|
||||
if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
|
||||
# Same logic as in GLib.
|
||||
glib_debug = get_option('glib_debug')
|
||||
if glib_debug.disabled() or (
|
||||
glib_debug.auto() and (not get_option('debug') or get_option('optimization') not in [ '0', 'g' ]))
|
||||
message('Disabling GLib cast checks')
|
||||
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
|
||||
endif
|
||||
|
||||
glib_asserts = get_option('glib-asserts')
|
||||
if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_assert')
|
||||
message('Disabling GLib asserts')
|
||||
add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
|
||||
endif
|
||||
|
||||
glib_checks = get_option('glib-checks')
|
||||
if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
|
||||
if not get_option('glib_checks')
|
||||
message('Disabling GLib checks')
|
||||
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
|
||||
endif
|
||||
|
|
|
@ -8,12 +8,6 @@ option('tests', type : 'feature', value : 'auto', yield : true,
|
|||
description : 'Build and enable unit tests')
|
||||
option('introspection', type : 'feature', value : 'auto', yield : true,
|
||||
description : 'Generate gobject-introspection bindings')
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
|
||||
|
||||
# Common options
|
||||
option('package-name', type : 'string', yield : true,
|
||||
|
@ -23,3 +17,21 @@ option('package-origin', type : 'string',
|
|||
description : 'package origin URL to use in plugins')
|
||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||
description: 'Enable documentation.')
|
||||
option('glib_debug', type : 'feature', value : 'auto', yield : true, description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||
option('glib_assert', type : 'boolean', value : true, yield : true, description : 'Enable GLib assertion (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('glib_checks', type : 'boolean', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
|
||||
# Deprecated, kept for backward compat
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_debug')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_assert')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_checks')
|
||||
|
|
|
@ -203,9 +203,9 @@ else
|
|||
gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#define GST_DISABLE_PARSE 1')
|
||||
endif
|
||||
|
||||
gst_cdata.set10('GST_DISABLE_CAST_CHECKS_DEFINE', cast_checks.disabled())
|
||||
gst_cdata.set10('GST_DISABLE_GLIB_ASSERTS_DEFINE', glib_asserts.disabled())
|
||||
gst_cdata.set10('GST_DISABLE_GLIB_CHECKS_DEFINE', glib_checks.disabled())
|
||||
gst_cdata.set10('GST_DISABLE_CAST_CHECKS_DEFINE', disable_cast_checks)
|
||||
gst_cdata.set10('GST_DISABLE_GLIB_ASSERTS_DEFINE', disable_glib_asserts)
|
||||
gst_cdata.set10('GST_DISABLE_GLIB_CHECKS_DEFINE', disable_glib_checks)
|
||||
|
||||
# FIXME: add --disable-plugin option?
|
||||
gst_cdata.set('GST_DISABLE_PLUGIN_DEFINE', '#undef GST_DISABLE_PLUGIN')
|
||||
|
|
|
@ -108,20 +108,24 @@ if gst_version_is_dev
|
|||
add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
|
||||
endif
|
||||
|
||||
cast_checks = get_option('gobject-cast-checks')
|
||||
if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
|
||||
# Same logic as in GLib.
|
||||
glib_debug = get_option('glib_debug')
|
||||
disable_cast_checks = glib_debug.disabled() or (
|
||||
glib_debug.auto() and (not get_option('debug') or get_option('optimization') not in [ '0', 'g' ]))
|
||||
if disable_cast_checks
|
||||
message('Disabling GLib cast checks')
|
||||
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
|
||||
disable_cast_checks = true
|
||||
endif
|
||||
|
||||
glib_asserts = get_option('glib-asserts')
|
||||
if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
|
||||
disable_glib_asserts = not get_option('glib_assert')
|
||||
if disable_glib_asserts
|
||||
message('Disabling GLib asserts')
|
||||
add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
|
||||
endif
|
||||
|
||||
glib_checks = get_option('glib-checks')
|
||||
if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
|
||||
disable_glib_checks = not get_option('glib_checks')
|
||||
if disable_glib_checks
|
||||
message('Disabling GLib checks')
|
||||
add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
|
||||
endif
|
||||
|
|
|
@ -33,12 +33,6 @@ option('benchmarks', type : 'feature', value : 'auto', yield : true)
|
|||
option('tools', type : 'feature', value : 'auto', yield : true)
|
||||
option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
|
||||
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)')
|
||||
option('extra-checks', type : 'feature', value : 'enabled', yield : true, description : 'Enable extra runtime checks')
|
||||
|
||||
# Common options
|
||||
|
@ -48,3 +42,21 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel
|
|||
description : 'package origin URL to use in plugins')
|
||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||
description: 'Enable documentation.')
|
||||
option('glib_debug', type : 'feature', value : 'auto', yield : true, description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||
option('glib_assert', type : 'boolean', value : true, yield : true, description : 'Enable GLib assertion (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
option('glib_checks', type : 'boolean', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)',
|
||||
deprecated: {'enabled' : 'true', 'disabled' : 'false', 'auto' : 'false'},
|
||||
)
|
||||
|
||||
# Deprecated, kept for backward compat
|
||||
option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true,
|
||||
description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_debug')
|
||||
option('glib-asserts', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_assert')
|
||||
option('glib-checks', type : 'feature', value : 'enabled', yield : true,
|
||||
description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)',
|
||||
deprecated: 'glib_checks')
|
||||
|
|
Loading…
Reference in a new issue