mirror of https://github.com/microsoft/vcpkg.git
[gstreamer] fix clang-cl builds (#26096)
* gstreamer fix clang-cl * v db
This commit is contained in:
parent
ec2ab620f8
commit
02a26abda5
|
|
@ -0,0 +1,111 @@
|
|||
diff --git a/ext/dts/meson.build b/ext/dts/meson.build
|
||||
index 8ab3fc917..c19aa2264 100644
|
||||
--- a/ext/dts/meson.build
|
||||
+++ b/ext/dts/meson.build
|
||||
@@ -15,7 +15,7 @@ if not dca_dep.found()
|
||||
endif
|
||||
|
||||
no_warn_c_args = []
|
||||
-if cc.get_id() != 'msvc'
|
||||
+if cc.get_argument_syntax() != 'msvc'
|
||||
# autotools didn't use the libdca pkg-config cflags, and they
|
||||
# can point to a non-existing location (/usr/include/dca)
|
||||
no_warn_c_args = ['-Wno-missing-include-dirs']
|
||||
diff --git a/gst-libs/gst/d3d11/meson.build b/gst-libs/gst/d3d11/meson.build
|
||||
index 4a844ef75..cd97e8f7a 100644
|
||||
--- a/gst-libs/gst/d3d11/meson.build
|
||||
+++ b/gst-libs/gst/d3d11/meson.build
|
||||
@@ -174,7 +174,7 @@ endif
|
||||
|
||||
# MinGW 32bits compiler seems to be complaining about redundant-decls
|
||||
# when ComPtr is in use. Let's just disable the warning
|
||||
-if cc.get_id() != 'msvc'
|
||||
+if cc.get_argument_syntax() != 'msvc'
|
||||
extra_args = cc.get_supported_arguments([
|
||||
'-Wno-redundant-decls',
|
||||
])
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 7cab556e0..35531110b 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -45,7 +45,7 @@ endif
|
||||
|
||||
cdata = configuration_data()
|
||||
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
msvc_args = [
|
||||
# Ignore several spurious warnings for things gstreamer does very commonly
|
||||
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
|
||||
diff --git a/sys/asio/meson.build b/sys/asio/meson.build
|
||||
index 3006d26ce..1afbd0022 100644
|
||||
--- a/sys/asio/meson.build
|
||||
+++ b/sys/asio/meson.build
|
||||
@@ -15,7 +15,7 @@ endif
|
||||
|
||||
# FIXME: non-msvc is not tested, and unlikely supported yet because of
|
||||
# tool-chain issue
|
||||
-if cxx.get_id() != 'msvc'
|
||||
+if cxx.get_argument_syntax() != 'msvc'
|
||||
if asio_option.enabled()
|
||||
error('asio plugin can only be built with MSVC')
|
||||
else
|
||||
diff --git a/sys/d3d11/meson.build b/sys/d3d11/meson.build
|
||||
index 43f213d9c..9c9e9b535 100644
|
||||
--- a/sys/d3d11/meson.build
|
||||
+++ b/sys/d3d11/meson.build
|
||||
@@ -102,7 +102,7 @@ endif
|
||||
|
||||
# MinGW 32bits compiler seems to be complaining about redundant-decls
|
||||
# when ComPtr is in use. Let's just disable the warning
|
||||
-if cc.get_id() != 'msvc'
|
||||
+if cc.get_argument_syntax() != 'msvc'
|
||||
extra_mingw_args = cc.get_supported_arguments([
|
||||
'-Wno-redundant-decls',
|
||||
])
|
||||
diff --git a/sys/decklink/meson.build b/sys/decklink/meson.build
|
||||
index d869e79a4..c7b37a7c6 100644
|
||||
--- a/sys/decklink/meson.build
|
||||
+++ b/sys/decklink/meson.build
|
||||
@@ -18,7 +18,7 @@ decklink_libs = []
|
||||
|
||||
if host_system == 'windows'
|
||||
decklink_sources += ['win/DeckLinkAPIDispatch.cpp', 'win/DeckLinkAPI_i.c']
|
||||
- if cxx.get_id() == 'msvc'
|
||||
+ if cxx.get_argument_syntax() == 'msvc'
|
||||
# FIXME: Use commsuppwd.lib for debug builds?
|
||||
comutil_dep = cxx.find_library('comsuppw', required : get_option('decklink'))
|
||||
if comutil_dep.found()
|
||||
diff --git a/sys/mediafoundation/meson.build b/sys/mediafoundation/meson.build
|
||||
index 828954909..af570f9ff 100644
|
||||
--- a/sys/mediafoundation/meson.build
|
||||
+++ b/sys/mediafoundation/meson.build
|
||||
@@ -48,7 +48,7 @@ if host_system != 'windows' or mf_option.disabled()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
-if cc.get_id() != 'msvc'
|
||||
+if cc.get_argument_syntax() != 'msvc'
|
||||
if mf_option.enabled()
|
||||
error('mediafoundation plugin can only be built with MSVC')
|
||||
endif
|
||||
diff --git a/sys/msdk/meson.build b/sys/msdk/meson.build
|
||||
index a77160049..7c834d8ed 100644
|
||||
--- a/sys/msdk/meson.build
|
||||
+++ b/sys/msdk/meson.build
|
||||
@@ -139,13 +139,13 @@ if have_mfx_ver134
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
- if cc.get_id() != 'msvc' and msdk_option.enabled()
|
||||
+ if cc.get_argument_syntax() != 'msvc' and msdk_option.enabled()
|
||||
error('msdk plugin can only be built with MSVC')
|
||||
endif
|
||||
legacy_stdio_dep = cc.find_library('legacy_stdio_definitions', required: get_option('msdk'))
|
||||
d3d11_dep = cc.find_library('d3d11', required: get_option('msdk'))
|
||||
msdk_deps = declare_dependency(dependencies: [d3d11_dep, legacy_stdio_dep])
|
||||
- msdk_deps_found = d3d11_dep.found() and legacy_stdio_dep.found() and cc.get_id() == 'msvc'
|
||||
+ msdk_deps_found = d3d11_dep.found() and legacy_stdio_dep.found() and cc.get_argument_syntax() == 'msvc'
|
||||
else
|
||||
libva_dep = dependency('libva', required: get_option('msdk'))
|
||||
libva_drm_dep = dependency('libva-drm', required: get_option('msdk'))
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 495671ebb..fff3ea518 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -43,7 +43,7 @@ plugins = []
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
msvc_args = [
|
||||
# Ignore several spurious warnings for things gstreamer does very commonly
|
||||
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
|
||||
@@ -75,7 +75,7 @@ endif
|
||||
core_conf = configuration_data()
|
||||
|
||||
# Symbol visibility
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
export_define = '__declspec(dllexport) extern'
|
||||
elif cc.has_argument('-fvisibility=hidden')
|
||||
add_project_arguments('-fvisibility=hidden', language: 'c')
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 64705379f..0c55b9732 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -30,7 +30,7 @@ plugins = []
|
||||
cc = meson.get_compiler('c')
|
||||
host_system = host_machine.system()
|
||||
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
msvc_args = [
|
||||
# Ignore several spurious warnings for things gstreamer does very commonly
|
||||
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
|
||||
@@ -183,7 +183,7 @@ cdata.set('SIZEOF_OFF_T', cc.sizeof('off_t'))
|
||||
# Here be fixmes.
|
||||
# FIXME: check if this is correct
|
||||
cdata.set('HAVE_CPU_X86_64', host_machine.cpu() == 'amd64')
|
||||
-cdata.set('HAVE_GCC_ASM', cc.get_id() != 'msvc')
|
||||
+cdata.set('HAVE_GCC_ASM', cc.get_argument_syntax() != 'msvc')
|
||||
cdata.set_quoted('VERSION', gst_version)
|
||||
cdata.set_quoted('PACKAGE_VERSION', gst_version)
|
||||
cdata.set_quoted('GST_LICENSE', 'LGPL')
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
diff --git a/gst/parse/meson.build b/gst/parse/meson.build
|
||||
index 35ed6f2f4..5e38e49ea 100644
|
||||
--- a/gst/parse/meson.build
|
||||
+++ b/gst/parse/meson.build
|
||||
@@ -16,7 +16,7 @@ else
|
||||
endif
|
||||
|
||||
flex_cdata.set('FLEX', flex.path())
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
flex_cdata.set('FLEX_ARGS', '--nounistd')
|
||||
else
|
||||
flex_cdata.set('FLEX_ARGS', '')
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 772809e15..70b1eafc5 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -36,7 +36,7 @@ cc = meson.get_compiler('c')
|
||||
|
||||
cdata = configuration_data()
|
||||
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
msvc_args = [
|
||||
# Ignore several spurious warnings for things gstreamer does very commonly
|
||||
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
|
||||
@@ -61,7 +61,7 @@ endif
|
||||
|
||||
# Symbol visibility
|
||||
have_visibility_hidden = false
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
export_define = '__declspec(dllexport) extern'
|
||||
elif cc.has_argument('-fvisibility=hidden')
|
||||
add_project_arguments('-fvisibility=hidden', language: 'c')
|
||||
@@ -313,8 +313,10 @@ static __uint128_t v2 = 10;
|
||||
static __uint128_t u;
|
||||
u = v1 / v2;
|
||||
}'''
|
||||
-if cc.compiles(uint128_t_src, name : '__uint128_t available')
|
||||
- cdata.set('HAVE_UINT128_T', 1)
|
||||
+if cc.get_argument_syntax() != 'msvc'
|
||||
+ if cc.compiles(uint128_t_src, name : '__uint128_t available')
|
||||
+ cdata.set('HAVE_UINT128_T', 1)
|
||||
+ endif
|
||||
endif
|
||||
|
||||
# All supported platforms have long long now
|
||||
@@ -322,7 +324,7 @@ cdata.set('HAVE_LONG_LONG', 1)
|
||||
|
||||
# We only want to use the __declspec(dllexport/import) dance in GST_EXPORT when
|
||||
# building with MSVC
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
cdata.set('GSTCONFIG_BUILT_WITH_MSVC', 1)
|
||||
else
|
||||
cdata.set('GSTCONFIG_BUILT_WITH_MSVC', 0)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 14be48c4c..83d019874 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -31,7 +31,7 @@ if have_cxx
|
||||
cxx = meson.get_compiler('cpp')
|
||||
endif
|
||||
|
||||
-if cc.get_id() == 'msvc'
|
||||
+if cc.get_argument_syntax() == 'msvc'
|
||||
msvc_args = [
|
||||
# Ignore several spurious warnings for things gstreamer does very commonly
|
||||
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 1316366ed..daeaf3cb1 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -62,7 +62,7 @@ endif
|
||||
# Ensure that MSVC interprets all source code as UTF-8. Only do this when we're
|
||||
# not a subproject, because subprojects are not allowed to call
|
||||
# add_global_arguments().
|
||||
-if not meson.is_subproject() and cc.get_id() == 'msvc'
|
||||
+if not meson.is_subproject() and cc.get_argument_syntax() == 'msvc'
|
||||
add_global_arguments(
|
||||
cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
|
||||
language: ['c', 'cpp'])
|
||||
@@ -316,7 +316,7 @@ if get_option('default_library') == 'static'
|
||||
if cc.has_link_argument(link_arg)
|
||||
gstfull_link_args += link_arg
|
||||
link_deps += symbol_map
|
||||
- elif cc.get_id() == 'msvc'
|
||||
+ elif cc.get_argument_syntax() == 'msvc'
|
||||
warning('FIXME: Provide a def file to publish the public symbols')
|
||||
else
|
||||
error('Failed to link with version script (' + symbol_map + '), check logs for details')
|
||||
|
|
@ -4,7 +4,7 @@ vcpkg_from_github(
|
|||
REF 1.19.2
|
||||
SHA512 d6b8e9fc195a60dfb83fe8a49040c21ca5603e3ada2036d56851e6e61a1cd2653ad45f33e39388bde859dfb4806f4a60d9dbfac5fe41b6d2a8b395c44d4525e3
|
||||
HEAD_REF master
|
||||
PATCHES gstreamer-disable-hot-doc.patch
|
||||
PATCHES gstreamer-disable-hot-doc.patch fix-clang-cl.patch
|
||||
)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH GST_SOURCE_PATH
|
||||
|
|
@ -12,7 +12,7 @@ vcpkg_from_github(
|
|||
REF 1.19.2
|
||||
SHA512 6070f1febf2a1bcc6e68f1e03c1b76891db210773065696e26fac20f0bd3ff47e1634222a49f93a10f6e47717ff21084c9ae0feed6a20facb9650aeb879cc380
|
||||
HEAD_REF master
|
||||
PATCHES gstreamer-disable-no-unused.patch
|
||||
PATCHES gstreamer-disable-no-unused.patch fix-clang-cl-gstreamer.patch
|
||||
)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND PLUGIN_BASE_PATCHES plugins-base-use-zlib.patch plugin-base-disable-no-unused.patch)
|
||||
|
|
@ -25,7 +25,7 @@ vcpkg_from_github(
|
|||
REF 1.19.2
|
||||
SHA512 d2005e6a3bda5f08395b131347e8f4054c2469e04e65d1acc1a1572bf10d81d4dad4e43d6a8600346b6175a2310f81157a0cd27398ef69b5363b16346febfb39
|
||||
HEAD_REF master
|
||||
PATCHES ${PLUGIN_BASE_PATCHES}
|
||||
PATCHES ${PLUGIN_BASE_PATCHES} fix-clang-cl-base.patch
|
||||
)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH GST_PLUGIN_GOOD_SOURCE_PATH
|
||||
|
|
@ -33,7 +33,7 @@ vcpkg_from_github(
|
|||
REF 1.19.2
|
||||
SHA512 71e9f36d407db3b75d9a68f6447093aa011b2b586b06e0a1bb79c7db37c9114de505699e99a4dad06d8d9c742e91f48dd35457283babe440f88a9e40d3da465b
|
||||
HEAD_REF master
|
||||
PATCHES ${PLUGIN_GOOD_PATCHES}
|
||||
PATCHES ${PLUGIN_GOOD_PATCHES} fix-clang-cl-good.patch
|
||||
)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH GST_PLUGIN_BAD_SOURCE_PATH
|
||||
|
|
@ -41,6 +41,7 @@ vcpkg_from_github(
|
|||
REF 1.19.2
|
||||
SHA512 f63ca3abf380bba92dca4ac3a51cba5ea95093693cf64d167a7a9c0bf6341c35a74fd42332673dbd1581ea70da0a35026aa3e2ce99b5e573268ccb55b5491c1d
|
||||
HEAD_REF master
|
||||
PATCHES fix-clang-cl-bad.patch
|
||||
)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH GST_PLUGIN_UGLY_SOURCE_PATH
|
||||
|
|
@ -48,7 +49,7 @@ vcpkg_from_github(
|
|||
REF 1.19.2
|
||||
SHA512 70dcd4a36d3bd35f680eaa3c980842fbb57f55f17d1453c6a95640709b1b33a263689bf54caa367154267d281e5474686fedaa980de24094de91886a57b6547a
|
||||
HEAD_REF master
|
||||
PATCHES ${PLUGIN_UGLY_PATCHES}
|
||||
PATCHES ${PLUGIN_UGLY_PATCHES} fix-clang-cl-ugly.patch
|
||||
)
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.freedesktop.org
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "gstreamer",
|
||||
"version": "1.19.2",
|
||||
"port-version": 5,
|
||||
"port-version": 6,
|
||||
"description": "GStreamer open-source multimedia framework core library",
|
||||
"homepage": "https://gstreamer.freedesktop.org/",
|
||||
"license": "LGPL-2.0",
|
||||
|
|
|
|||
|
|
@ -2726,7 +2726,7 @@
|
|||
},
|
||||
"gstreamer": {
|
||||
"baseline": "1.19.2",
|
||||
"port-version": 5
|
||||
"port-version": 6
|
||||
},
|
||||
"gtest": {
|
||||
"baseline": "1.12.1",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "245207bd8010181848ffaad5822f2492f2cb2b38",
|
||||
"version": "1.19.2",
|
||||
"port-version": 6
|
||||
},
|
||||
{
|
||||
"git-tree": "0524a22dbda0c09201b9c677b6f72dbce870d6df",
|
||||
"version": "1.19.2",
|
||||
|
|
|
|||
Loading…
Reference in New Issue