mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
ca6e5d4a78
When gstreamer-sharp is used as a subproject (e.g. gst-build) and the master project is built with default-library=both, gstreamer-sharp should still only build shared libraries instead of failing to configure. https://bugzilla.gnome.org/show_bug.cgi?id=794656
37 lines
No EOL
1.3 KiB
Meson
37 lines
No EOL
1.3 KiB
Meson
nunit_console = find_program('nunit-console', required: false)
|
|
|
|
if nunit_console.found()
|
|
nunit_version = '3.10.1'
|
|
get_nunit_res = run_command(nuget, 'get',
|
|
'--builddir=NUnit',
|
|
'--nuget-name=NUnit',
|
|
'--nuget-version', nunit_version,
|
|
'--csharp-version=net45',
|
|
'--current-builddir', meson.current_build_dir(),
|
|
'--builddir', meson.build_root(),
|
|
)
|
|
|
|
if get_nunit_res.returncode() != 0
|
|
message('Failed to get NUnit: ' + get_nunit_res.stderr())
|
|
else
|
|
foreach path: get_nunit_res.stdout().split()
|
|
testsenv.prepend('MONO_PATH',
|
|
join_paths(meson.build_root(), path.strip('-r:'), '..'))
|
|
endforeach
|
|
|
|
nunit_dep = declare_dependency(link_args: get_nunit_res.stdout().split(),
|
|
version: nunit_version)
|
|
|
|
foreach test: [
|
|
# 'PipelineTests',
|
|
'SdpTests'
|
|
]
|
|
lib = shared_library(test, test + '.cs', 'TestBase.cs',
|
|
cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114'],
|
|
dependencies: [gst_sharp_dep, nunit_dep])
|
|
test(test, nunit_console, args: [lib.full_path()], env: testsenv)
|
|
endforeach
|
|
endif
|
|
else
|
|
message('Could not find nunit-console, can\'t run unitests')
|
|
endif |