mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-17 21:35:17 +00:00
meson: Fix build on Windows with MSVC
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/480 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1431>
This commit is contained in:
parent
fcd57e9ac5
commit
8b5a398135
1 changed files with 15 additions and 5 deletions
20
meson.build
20
meson.build
|
@ -388,8 +388,11 @@ foreach plugin_name, details: plugins
|
||||||
features += extra_features.split(',')
|
features += extra_features.split(',')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
examples += details.get('examples', [])
|
|
||||||
lib = details.get('library')
|
lib = details.get('library')
|
||||||
|
# No 'lib' suffix with MSVC
|
||||||
|
if cc.get_argument_syntax() == 'msvc'
|
||||||
|
lib = lib.substring(3)
|
||||||
|
endif
|
||||||
if default_library in ['shared', 'both']
|
if default_library in ['shared', 'both']
|
||||||
output += [lib + '.' + ext_dynamic]
|
output += [lib + '.' + ext_dynamic]
|
||||||
endif
|
endif
|
||||||
|
@ -462,8 +465,11 @@ gst_plugins = []
|
||||||
pc_files = []
|
pc_files = []
|
||||||
plugin_names = []
|
plugin_names = []
|
||||||
foreach plugin : plugins
|
foreach plugin : plugins
|
||||||
# skip the 'lib' prefix and extension from plugin path
|
plugin_name = fs.stem(plugin.full_path())
|
||||||
plugin_name = fs.stem(plugin.full_path()).substring(3)
|
# skip the 'lib' prefix from plugin path when not building with MSVC
|
||||||
|
if cc.get_argument_syntax() != 'msvc'
|
||||||
|
plugin_name = plugin_name.substring(3)
|
||||||
|
endif
|
||||||
|
|
||||||
option_name = plugin_name.substring(3)
|
option_name = plugin_name.substring(3)
|
||||||
if option_name.startswith('rs')
|
if option_name.startswith('rs')
|
||||||
|
@ -538,7 +544,7 @@ endif
|
||||||
if get_option('webrtc').allowed()
|
if get_option('webrtc').allowed()
|
||||||
custom_target('gst-webrtc-signalling-server',
|
custom_target('gst-webrtc-signalling-server',
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
output: 'gst-webrtc-signalling-server',
|
output: 'gst-webrtc-signalling-server' + exe_suffix,
|
||||||
console: true,
|
console: true,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('bindir'),
|
install_dir: get_option('bindir'),
|
||||||
|
@ -559,9 +565,13 @@ if get_option('webrtc').allowed()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('examples').allowed() and examples.length() > 0
|
if get_option('examples').allowed() and examples.length() > 0
|
||||||
|
outputs = []
|
||||||
|
foreach example: examples
|
||||||
|
outputs += [example + exe_suffix]
|
||||||
|
endforeach
|
||||||
custom_target('gst-plugins-rs-examples',
|
custom_target('gst-plugins-rs-examples',
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
output: examples,
|
output: outputs,
|
||||||
console: true,
|
console: true,
|
||||||
install: false,
|
install: false,
|
||||||
depfile: 'gst-plugins-rs-examples.dep',
|
depfile: 'gst-plugins-rs-examples.dep',
|
||||||
|
|
Loading…
Reference in a new issue