mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
Only pass -DZ_SOLO on MSVC if using MSYS2 zlib
This fixes the build when we're building our own zlib as a subproject.
This commit is contained in:
parent
8f5533c1e1
commit
40f97fe186
1 changed files with 15 additions and 4 deletions
17
meson.build
17
meson.build
|
@ -15,12 +15,23 @@ subprojects = [
|
||||||
]
|
]
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
# Make it possible to use msys2 built zlib which fails
|
||||||
|
# when not using the mingw toolchain as it uses unistd.h
|
||||||
if not meson.is_subproject() and cc.get_id() == 'msvc'
|
if not meson.is_subproject() and cc.get_id() == 'msvc'
|
||||||
# Make it possible to use msys2 built zlib
|
uname = find_program('uname')
|
||||||
# which fails when not using the mingw toolchain as
|
ret = run_command(uname, '-o')
|
||||||
# it uses unistd.h
|
if ret.returncode() == 0 and ret.stdout().lower() == 'msys'
|
||||||
|
ret = run_command(uname, '-r')
|
||||||
|
# The kernel version returned by uname is actually the msys version
|
||||||
|
if ret.returncode() == 0 and ret.stdout().startswith('2')
|
||||||
|
# If a system zlib is found, disable UNIX features in zlib.h and zconf.h
|
||||||
|
if cc.find_library('z').found()
|
||||||
add_global_arguments('-DZ_SOLO', language: 'c')
|
add_global_arguments('-DZ_SOLO', language: 'c')
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# FIXME Remove that check once we have ffmpeg as a gst-libav subproject
|
# FIXME Remove that check once we have ffmpeg as a gst-libav subproject
|
||||||
libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: false)
|
libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: false)
|
||||||
|
|
Loading…
Reference in a new issue