Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1480c1/3f6cb63c6bb61d2a416f07a24ff9b630 to your computer and use it in GitHub Desktop.
Save 1480c1/3f6cb63c6bb61d2a416f07a24ff9b630 to your computer and use it in GitHub Desktop.
From b6625502d44cd8004966fd8d1b0f4520490b40dc Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Mon, 28 Oct 2019 15:34:53 +0000
Subject: [PATCH] Meson: Add static: true for personal compilation
---
ext/alsa/meson.build | 2 +-
ext/cdparanoia/meson.build | 2 +-
ext/gl/meson.build | 8 ++---
ext/libvisual/meson.build | 2 +-
ext/ogg/meson.build | 2 +-
ext/opus/meson.build | 2 +-
ext/pango/meson.build | 2 +-
ext/theora/meson.build | 4 +--
ext/vorbis/meson.build | 6 ++--
gst-libs/gst/gl/meson.build | 52 +++++++++++++++---------------
gst-libs/gst/tag/meson.build | 4 +--
meson.build | 36 ++++++++++-----------
sys/meson.build | 2 +-
sys/xvimage/meson.build | 2 +-
tests/examples/gl/sdl/meson.build | 2 +-
tests/examples/overlay/meson.build | 2 +-
16 files changed, 65 insertions(+), 65 deletions(-)
diff --git a/ext/alsa/meson.build b/ext/alsa/meson.build
index f8d4f2b45..f06cb7195 100644
--- a/ext/alsa/meson.build
+++ b/ext/alsa/meson.build
@@ -7,7 +7,7 @@ alsa_sources = [
'gstalsasrc.c',
]
-alsa_dep = dependency('alsa', version : '>=0.9.1', required : get_option('alsa'))
+alsa_dep = dependency('alsa', version : '>=0.9.1', required : get_option('alsa'), static: true)
if alsa_dep.found()
gstalsa = library('gstalsa',
diff --git a/ext/cdparanoia/meson.build b/ext/cdparanoia/meson.build
index 89fa6f0b6..3b6b5bfe3 100644
--- a/ext/cdparanoia/meson.build
+++ b/ext/cdparanoia/meson.build
@@ -6,7 +6,7 @@ if cdparanoia_option.disabled()
endif
# cdparanoia upstream has a pkg-config file only in post-10.2 SVN so far, no release yet
-cdparanoia_dep = dependency('cdparanoia-3', version : '>=10.2', required : false)
+cdparanoia_dep = dependency('cdparanoia-3', version : '>=10.2', required : false, static: true)
if cdparanoia_dep.found()
cdparanoia_deps = [cdparanoia_dep]
cdparanoia_found = true
diff --git a/ext/gl/meson.build b/ext/gl/meson.build
index ca15402d5..022bcb664 100644
--- a/ext/gl/meson.build
+++ b/ext/gl/meson.build
@@ -71,8 +71,8 @@ if graphene_dep.found()
]
endif
-png_dep = dependency('libpng', version : '>=1.0', required : get_option('gl-png'))
-jpeg_dep = dependency('libjpeg', required : get_option('gl-jpeg'))
+png_dep = dependency('libpng', version : '>=1.0', required : get_option('gl-png'), static: true)
+jpeg_dep = dependency('libjpeg', required : get_option('gl-jpeg'), static: true)
if png_dep.found()
optional_deps += png_dep
@@ -90,8 +90,8 @@ if png_dep.found()
endif
if glconf.get('GST_GL_HAVE_WINDOW_COCOA', 0) == 1
- foundation_dep = dependency('appleframeworks', modules : ['Foundation'], required : false)
- quartzcore_dep = dependency('appleframeworks', modules : ['QuartzCore'], required : false)
+ foundation_dep = dependency('appleframeworks', modules : ['Foundation'], required : false, static: true)
+ quartzcore_dep = dependency('appleframeworks', modules : ['QuartzCore'], required : false, static: true)
if foundation_dep.found() and quartzcore_dep.found() # have cocoa
opengl_sources += [
'caopengllayersink.m',
diff --git a/ext/libvisual/meson.build b/ext/libvisual/meson.build
index fb921fdc4..512638e3d 100644
--- a/ext/libvisual/meson.build
+++ b/ext/libvisual/meson.build
@@ -4,7 +4,7 @@ libvisual_sources = [
]
libvisual_dep = dependency('libvisual-0.4', version : '>= 0.4.0',
- required : get_option('libvisual'))
+ required : get_option('libvisual'), static: true)
if libvisual_dep.found()
core_conf.set_quoted('LIBVISUAL_PLUGINSBASEDIR',
libvisual_dep.get_pkgconfig_variable('pluginsbasedir'))
diff --git a/ext/ogg/meson.build b/ext/ogg/meson.build
index 2272844df..4a8fd9d5c 100644
--- a/ext/ogg/meson.build
+++ b/ext/ogg/meson.build
@@ -10,7 +10,7 @@ ogg_sources = [
'vorbis_parse.c',
]
-ogg_dep = dependency('ogg', version : '>=1.0', required : get_option('ogg'))
+ogg_dep = dependency('ogg', version : '>=1.0', required : get_option('ogg'), static: true)
core_conf.set('HAVE_OGG', ogg_dep.found())
if ogg_dep.found()
diff --git a/ext/opus/meson.build b/ext/opus/meson.build
index 1dadcbffc..5b15b1b65 100644
--- a/ext/opus/meson.build
+++ b/ext/opus/meson.build
@@ -6,7 +6,7 @@ opus_sources = [
'gstopusheader.c',
]
-opus_dep = dependency('opus', version : '>= 0.9.4', required : get_option('opus'))
+opus_dep = dependency('opus', version : '>= 0.9.4', required : get_option('opus'), static: true)
if opus_dep.found()
gstopus = library('gstopus',
diff --git a/ext/pango/meson.build b/ext/pango/meson.build
index 418d0b91e..bbf7a33b5 100644
--- a/ext/pango/meson.build
+++ b/ext/pango/meson.build
@@ -6,7 +6,7 @@ pango_sources = [
'gsttimeoverlay.c',
]
-pango_dep = dependency('pangocairo', version : '>=1.22.0', required : get_option('pango'))
+pango_dep = dependency('pangocairo', version : '>=1.22.0', required : get_option('pango'), static: true)
if pango_dep.found()
gstpango = library('gstpango',
diff --git a/ext/theora/meson.build b/ext/theora/meson.build
index 0949924a5..1c0f0fd6f 100644
--- a/ext/theora/meson.build
+++ b/ext/theora/meson.build
@@ -3,8 +3,8 @@ theora_sources = [
'gsttheoraparse.c',
]
-theoradec_dep = dependency('theoradec', version : '>=1.1', required : get_option('theora'))
-theoraenc_dep = dependency('theoraenc', version : '>=1.1', required : get_option('theora'))
+theoradec_dep = dependency('theoradec', version : '>=1.1', required : get_option('theora'), static: true)
+theoraenc_dep = dependency('theoraenc', version : '>=1.1', required : get_option('theora'), static: true)
core_conf.set('HAVE_THEORA', theoradec_dep.found() and theoraenc_dep.found())
theora_deps = []
diff --git a/ext/vorbis/meson.build b/ext/vorbis/meson.build
index f008d8480..87615478d 100644
--- a/ext/vorbis/meson.build
+++ b/ext/vorbis/meson.build
@@ -15,9 +15,9 @@ vorbisidec_sources = [
'gstvorbiscommon.c',
]
-vorbis_dep = dependency('vorbis', version : '>=1.0', required : get_option('vorbis'))
-vorbisenc_dep = dependency('vorbisenc', version : '>=1.0', required : get_option('vorbis'))
-vorbisidec_dep = dependency('vorbisidec', required : get_option('tremor'))
+vorbis_dep = dependency('vorbis', version : '>=1.0', required : get_option('vorbis'), static: true)
+vorbisenc_dep = dependency('vorbisenc', version : '>=1.0', required : get_option('vorbis'), static: true)
+vorbisidec_dep = dependency('vorbisidec', required : get_option('tremor'), static: true)
if vorbis_dep.found() or vorbisidec_dep.found()
if cc.has_header_symbol('vorbis/codec.h', 'vorbis_synthesis_restart')
diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build
index 4f692da0e..16304f308 100644
--- a/gst-libs/gst/gl/meson.build
+++ b/gst-libs/gst/gl/meson.build
@@ -1,6 +1,6 @@
if get_option('gl').disabled()
message('GStreamer OpenGL integration disabled via options.')
- gstgl_dep = dependency('', required: false)
+ gstgl_dep = dependency('', required: false, static: true)
build_gstgl = false
subdir_done()
endif
@@ -144,7 +144,7 @@ foreach option : glconf_options
glconf.set10(option, false)
endforeach
-unneeded_dep = dependency('', required : false)
+unneeded_dep = dependency('', required : false, static: true)
if unneeded_dep.found()
error ('Found unfindable dependency')
endif
@@ -291,7 +291,7 @@ gl_include_header = '''
# convoluted way of getting at the subproject taking into account the wrap-mode
# so we don't download a subproject unless allowed
gl_header_dep = dependency('', fallback : ['gl-headers', 'gl_headers_dummy_dep'],
- required : false)
+ required : false, static: true)
if gl_header_dep.type_name() == 'internal'
# this will only contain the includes of headers that are not found
compat_includes = subproject('gl-headers').get_variable('compatibility_includes')
@@ -304,10 +304,10 @@ gl_dep = unneeded_dep
glx_dep = unneeded_dep
if need_api_opengl != 'no' or need_platform_glx != 'no'
if host_system == 'darwin'
- gl_dep = dependency('appleframeworks', modules : ['OpenGL'], required : false)
+ gl_dep = dependency('appleframeworks', modules : ['OpenGL'], required : false, static: true)
else
# override meson's braindead gl detection on osx/windows/etc by forcing pkg-config
- gl_dep = dependency('gl', method: 'pkg-config', required : false)
+ gl_dep = dependency('gl', method: 'pkg-config', required : false, static: true)
endif
if not gl_dep.found()
@@ -372,9 +372,9 @@ gles3_h = false
gles3ext3_h = false
if need_api_gles2 != 'no'
if host_system == 'ios'
- gles2_dep = dependency('appleframeworks', modules : ['OpenGLES'], required : false)
+ gles2_dep = dependency('appleframeworks', modules : ['OpenGLES'], required : false, static: true)
else
- gles2_dep = dependency('glesv2', required : false)
+ gles2_dep = dependency('glesv2', required : false, static: true)
endif
if not gles2_dep.found()
@@ -470,7 +470,7 @@ endif
# EGL checks
egl_dep = unneeded_dep
if need_platform_egl != 'no'
- egl_dep = dependency('egl', required : false)
+ egl_dep = dependency('egl', required : false, static: true)
if not egl_dep.found()
egl_dep = cc.find_library('EGL', required : false)
endif
@@ -537,10 +537,10 @@ if need_win_wayland != 'no'
message ('Could not find EGL libraries for wayland')
endif
else
- wayland_client_dep = dependency('wayland-client', version : '>= 1.0', required : false)
- wayland_cursor_dep = dependency('wayland-cursor', version : '>= 1.0', required : false)
- wayland_egl_dep = dependency('wayland-egl', version : '>= 1.0', required : false)
- wayland_protocols_dep = dependency('wayland-protocols', version : '>= 1.15', required : false)
+ wayland_client_dep = dependency('wayland-client', version : '>= 1.0', required : false, static: true)
+ wayland_cursor_dep = dependency('wayland-cursor', version : '>= 1.0', required : false, static: true)
+ wayland_egl_dep = dependency('wayland-egl', version : '>= 1.0', required : false, static: true)
+ wayland_protocols_dep = dependency('wayland-protocols', version : '>= 1.15', required : false, static: true)
wayland_scanner = find_program('wayland-scanner', required: false)
if wayland_client_dep.found() and wayland_cursor_dep.found() and wayland_egl_dep.found() and wayland_protocols_dep.found() and wayland_scanner.found()
@@ -595,7 +595,7 @@ if need_platform_glx == 'yes'
endif
if need_win_x11 != 'no'
- xcb_dep = dependency('x11-xcb', required : false)
+ xcb_dep = dependency('x11-xcb', required : false, static: true)
if x11_dep.found() and xcb_dep.found()
gl_sources += [
'x11/gstgldisplay_x11.c',
@@ -628,7 +628,7 @@ if need_win_dispmanx != 'no'
# Try pkg-config for bcm_host then fallback to find_library to also
# support older distribution
- bcm_host_dep = dependency('bcm_host', required : false)
+ bcm_host_dep = dependency('bcm_host', required : false, static: true)
if not bcm_host_dep.found()
bcm_host_dep = cc.find_library('bcm_host', required : false)
endif
@@ -732,9 +732,9 @@ elif need_platform_cgl == 'no' and need_win_cocoa == 'yes'
endif
if host_system == 'darwin'
- foundation_dep = dependency('appleframeworks', modules : ['Foundation'], required : false)
- quartzcore_dep = dependency('appleframeworks', modules : ['QuartzCore'], required : false)
- corefoundation_dep = dependency('appleframeworks', modules : ['CoreFoundation'], required : false)
+ foundation_dep = dependency('appleframeworks', modules : ['Foundation'], required : false, static: true)
+ quartzcore_dep = dependency('appleframeworks', modules : ['QuartzCore'], required : false, static: true)
+ corefoundation_dep = dependency('appleframeworks', modules : ['CoreFoundation'], required : false, static: true)
if need_platform_cgl != 'no'
if foundation_dep.found() and quartzcore_dep.found() and corefoundation_dep.found()
@@ -743,7 +743,7 @@ if host_system == 'darwin'
glconf.set10('GST_GL_HAVE_PLATFORM_CGL', 1)
if need_win_cocoa != 'no'
- cocoa_dep = dependency('appleframeworks', modules : ['Cocoa'], required : false)
+ cocoa_dep = dependency('appleframeworks', modules : ['Cocoa'], required : false, static: true)
if cocoa_dep.found()
gl_sources += [
'cocoa/gstglcaopengllayer.m',
@@ -778,10 +778,10 @@ elif need_platform_eagl == 'no' and need_win_eagl == 'yes'
endif
if host_system == 'ios' and need_platform_eagl != 'no' and need_win_eagl != 'no'
- foundation_dep = dependency('appleframeworks', modules : ['Foundation'], required : false)
- corefoundation_dep = dependency('appleframeworks', modules : ['CoreFoundation'], required : false)
- coregraphics_dep = dependency('appleframeworks', modules : ['CoreGraphics'], required : false)
- uikit_dep = dependency('appleframeworks', modules : ['UIkit'], required : false)
+ foundation_dep = dependency('appleframeworks', modules : ['Foundation'], required : false, static: true)
+ corefoundation_dep = dependency('appleframeworks', modules : ['CoreFoundation'], required : false, static: true)
+ coregraphics_dep = dependency('appleframeworks', modules : ['CoreGraphics'], required : false, static: true)
+ uikit_dep = dependency('appleframeworks', modules : ['UIkit'], required : false, static: true)
if foundation_dep.found() and corefoundation_dep.found() and coregraphics_dep.found() and uikit_dep.found()
gl_platform_deps += [
@@ -814,9 +814,9 @@ if need_win_gbm != 'no'
endif
endif
- gbm_gudev_dep = dependency('gudev-1.0', version : '>=147', required : false)
- gbm_libdrm_dep = dependency('libdrm', version : '>= 2.4.55', required : false)
- gbm_dep = dependency('gbm', required : false)
+ gbm_gudev_dep = dependency('gudev-1.0', version : '>=147', required : false, static: true)
+ gbm_libdrm_dep = dependency('libdrm', version : '>= 2.4.55', required : false, static: true)
+ gbm_dep = dependency('gbm', required : false, static: true)
if egl_dep.found() and gbm_gudev_dep.found() and gbm_libdrm_dep.found() and gbm_dep.found()
gl_sources += [
'gbm/gstgldisplay_gbm.c',
@@ -981,5 +981,5 @@ if build_gstgl
elif get_option('gl').enabled()
error('GStreamer OpenGL integration required via options, but needed dependencies not found.')
else
- gstgl_dep = dependency('', required : false)
+ gstgl_dep = dependency('', required : false, static: true)
endif
diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build
index 5ec37392a..39119b11e 100644
--- a/gst-libs/gst/tag/meson.build
+++ b/gst-libs/gst/tag/meson.build
@@ -52,7 +52,7 @@ gst_tag_args = [
# iso-codes (optional, used for language names lookup and translation)
have_iso_codes = false
-iso_codes_dep = dependency('iso-codes', required: get_option('iso-codes'))
+iso_codes_dep = dependency('iso-codes', required: get_option('iso-codes'), static: true)
if iso_codes_dep.found()
if iso_codes_dep.get_pkgconfig_variable('domains').split(' ').contains('iso_639-2')
iso_codes_prefix = iso_codes_dep.get_pkgconfig_variable('prefix')
@@ -70,7 +70,7 @@ endif
core_conf.set('HAVE_ISO_CODES', have_iso_codes)
# could drop optional zlib dep and use g_zlib_decompressor_new()
-zlib_dep = dependency('zlib', required : false)
+zlib_dep = dependency('zlib', required : false, static: true)
if not zlib_dep.found()
zlib_dep = cc.find_library('z', required : false)
if not zlib_dep.found() or not cc.has_header('zlib.h')
diff --git a/meson.build b/meson.build
index c8147c224..9324814fa 100644
--- a/meson.build
+++ b/meson.build
@@ -244,35 +244,35 @@ if get_option('default_library') == 'static'
endif
# X11 checks are for sys/ and tests/
-x11_dep = dependency('x11', required : get_option('x11'))
+x11_dep = dependency('x11', required : get_option('x11'), static: true)
# GLib checks are for the entire project
# Almost everything that uses glib also uses gobject
-glib_deps = [dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep']),
- dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep'])]
+glib_deps = [dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep'], static: true),
+ dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep'], static: true)]
# GIO is used by the GIO plugin, and by the TCP, SDP, and RTSP plugins
-gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
-giounix_dep = dependency('', required: false)
+gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'], static: true)
+giounix_dep = dependency('', required: false, static: true)
if host_system != 'windows'
giounix_dep = dependency('gio-unix-2.0', version : glib_req,
- fallback: ['glib', 'libgiounix_dep'])
+ fallback: ['glib', 'libgiounix_dep'], static: true)
endif
gmodule_dep = dependency('gmodule-no-export-2.0',
- fallback: ['glib', 'libgmodule_dep'])
+ fallback: ['glib', 'libgmodule_dep'], static: true)
# some of the examples can use gdk-pixbuf and GTK+3
-gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', required : get_option('examples'))
-gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : get_option('examples'))
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', required : get_option('examples'), static: true)
+gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : get_option('examples'), static: true)
# TODO: https://github.com/mesonbuild/meson/issues/3941
if not get_option('x11').disabled()
- gtk_x11_dep = dependency('gtk+-x11-3.0', version : '>= 3.10', required : get_option('examples'))
+ gtk_x11_dep = dependency('gtk+-x11-3.0', version : '>= 3.10', required : get_option('examples'), static: true)
else
- gtk_x11_dep = dependency('', required : false)
+ gtk_x11_dep = dependency('', required : false, static: true)
endif
# gtk+ quartz backend is only available on macOS
if host_system == 'darwin'
- gtk_quartz_dep = dependency('gtk+-quartz-3.0', version : '>= 3.10', required : get_option('examples'))
+ gtk_quartz_dep = dependency('gtk+-quartz-3.0', version : '>= 3.10', required : get_option('examples'), static: true)
else
- gtk_quartz_dep = dependency('', required : false)
+ gtk_quartz_dep = dependency('', required : false, static: true)
endif
core_conf.set('HAVE_X', x11_dep.found())
@@ -299,16 +299,16 @@ libsinc = include_directories('gst-libs')
# To use the subproject make subprojects directory
# and put gstreamer meson git there (symlinking is fine)
gst_dep = dependency('gstreamer-1.0', version : gst_req,
- fallback : ['gstreamer', 'gst_dep'])
+ fallback : ['gstreamer', 'gst_dep'], static: true)
gst_base_dep = dependency('gstreamer-base-1.0', version : gst_req,
- fallback : ['gstreamer', 'gst_base_dep'])
+ fallback : ['gstreamer', 'gst_base_dep'], static: true)
gst_net_dep = dependency('gstreamer-net-1.0', version : gst_req,
- fallback : ['gstreamer', 'gst_net_dep'])
+ fallback : ['gstreamer', 'gst_net_dep'], static: true)
gst_check_dep = dependency('gstreamer-check-1.0', version : gst_req,
required : get_option('tests'),
- fallback : ['gstreamer', 'gst_check_dep'])
+ fallback : ['gstreamer', 'gst_check_dep'], static: true)
gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
- fallback : ['gstreamer', 'gst_controller_dep'])
+ fallback : ['gstreamer', 'gst_controller_dep'], static: true)
have_orcc = false
orcc_args = []
diff --git a/sys/meson.build b/sys/meson.build
index 7637c1c8e..9ddf3add9 100644
--- a/sys/meson.build
+++ b/sys/meson.build
@@ -1,7 +1,7 @@
if x11_dep.found()
# XShm is only used by ximage and xvimage
# FIXME: Need to check for XShmAttach inside libXext
- xshm_dep = dependency('xext', required : get_option('xshm'))
+ xshm_dep = dependency('xext', required : get_option('xshm'), static: true)
core_conf.set('HAVE_XSHM', xshm_dep.found())
subdir('ximage')
diff --git a/sys/xvimage/meson.build b/sys/xvimage/meson.build
index 17a736a1d..c6c995546 100644
--- a/sys/xvimage/meson.build
+++ b/sys/xvimage/meson.build
@@ -6,7 +6,7 @@ xvimage_sources = [
'xvimagesink.c',
]
-xvideo_dep = dependency('xv', required : get_option('xvideo'))
+xvideo_dep = dependency('xv', required : get_option('xvideo'), static: true)
core_conf.set('HAVE_XVIDEO', x11_dep.found() and xvideo_dep.found())
if xvideo_dep.found()
diff --git a/tests/examples/gl/sdl/meson.build b/tests/examples/gl/sdl/meson.build
index cb43fcfbe..a20557347 100644
--- a/tests/examples/gl/sdl/meson.build
+++ b/tests/examples/gl/sdl/meson.build
@@ -1,4 +1,4 @@
-sdl_dep = dependency('sdl2', version : '>=2.0', required : get_option('examples'))
+sdl_dep = dependency('sdl2', version : '>=2.0', required : get_option('examples'), static: true)
have_sdl_gl = build_gstgl and (
enabled_gl_apis.contains('gl') and
(enabled_gl_platforms.contains('glx') or enabled_gl_platforms.contains('wgl')) and
diff --git a/tests/examples/overlay/meson.build b/tests/examples/overlay/meson.build
index b343f6598..8fe87f1d6 100644
--- a/tests/examples/overlay/meson.build
+++ b/tests/examples/overlay/meson.build
@@ -10,7 +10,7 @@ if x11_dep.found()
if have_cxx # check for C++ support
qt5_mod = import('qt5')
qt5widgets_dep = dependency('qt5', modules : ['Gui', 'Widgets'],
- required: get_option('examples'))
+ required: get_option('examples'), static: true)
# FIXME Add a way to get that information out of the qt5 module
moc = find_program('moc-qt5', required : get_option('examples'))
--
2.20.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment