mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
gstreamer-full: add GST_STATIC_COMPILATION for Windows
In the case of a gstreamer-full target type to static, the GST_STATIC_COMPILATION is necessary on Windows to avoid a different mangling from the external project using the gstreamer-full libraries (ie dllimport). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128>
This commit is contained in:
parent
3973b56e26
commit
9b277d68c5
2 changed files with 14 additions and 5 deletions
|
@ -87,7 +87,6 @@ endif
|
|||
building_full = get_option('default_library') == 'static'
|
||||
building_full_static = get_option('gst-full-target-type') == 'static_library'
|
||||
buildind_full_options = []
|
||||
|
||||
if building_full
|
||||
buildind_full_options = ['gstreamer-full=enabled']
|
||||
endif
|
||||
|
@ -438,7 +437,13 @@ if building_full
|
|||
link_depends : link_deps,
|
||||
install : true,
|
||||
)
|
||||
gst_full_c_flags = []
|
||||
if building_full_static
|
||||
gst_full_c_flags += ['-DGST_STATIC_COMPILATION']
|
||||
endif
|
||||
|
||||
gst_full_dep = declare_dependency(link_with: gstfull,
|
||||
compile_args: gst_full_c_flags,
|
||||
dependencies : incdir_deps + glib_deps,
|
||||
include_directories: include_directories('.')
|
||||
)
|
||||
|
@ -473,6 +478,7 @@ if building_full
|
|||
pkgconfig.generate(gstfull,
|
||||
requires: glib_deps,
|
||||
libraries_private: gst_full_libs_private,
|
||||
extra_cflags: gst_full_c_flags,
|
||||
subdirs : 'gstreamer-1.0')
|
||||
meson.override_dependency('gstreamer-full-1.0', gst_full_dep)
|
||||
|
||||
|
|
|
@ -274,6 +274,11 @@ libgst = library('gstreamer-1.0', gst_sources,
|
|||
backtrace_deps, platform_deps, extra_deps],
|
||||
)
|
||||
|
||||
gst_compile_args = []
|
||||
if static_build
|
||||
gst_compile_args += ['-DGST_STATIC_COMPILATION']
|
||||
endif
|
||||
|
||||
pkg_name = 'gstreamer-1.0'
|
||||
library_def = {'lib': libgst}
|
||||
pkgconfig.generate(libgst,
|
||||
|
@ -283,6 +288,7 @@ pkgconfig.generate(libgst,
|
|||
subdirs : pkgconfig_subdirs,
|
||||
name : pkg_name,
|
||||
description : 'Streaming media framework',
|
||||
extra_cflags: gst_compile_args,
|
||||
)
|
||||
|
||||
if build_gir
|
||||
|
@ -323,10 +329,7 @@ if build_gir
|
|||
endif
|
||||
gst_libraries += [[pkg_name, library_def]]
|
||||
|
||||
gst_compile_args = []
|
||||
if get_option('default_library') == 'static'
|
||||
gst_compile_args += ['-DGST_STATIC_COMPILATION']
|
||||
endif
|
||||
|
||||
|
||||
gst_dep = declare_dependency(link_with : libgst,
|
||||
compile_args : gst_compile_args,
|
||||
|
|
Loading…
Reference in a new issue