Meson: Use shared_library() because static build of C# is not supported
authorXavier Claessens <xavier.claessens@collabora.com>
Sat, 24 Mar 2018 14:30:40 +0000 (10:30 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Sat, 24 Mar 2018 14:37:22 +0000 (11:37 -0300)
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

Tests/meson.build
ges/meson.build
sources/meson.build

index 5bf0361..70e59e3 100644 (file)
@@ -26,7 +26,7 @@ if nunit_console.found()
                 # 'PipelineTests',
                 'SdpTests'
                 ]
-            lib = library(test, test + '.cs', 'TestBase.cs',
+            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)
index b7a70ac..092b72d 100644 (file)
@@ -4,7 +4,7 @@ metadata  = files(pkg + '.metadata')
 
 subdir('generated')
 
-ges_sharp = library(pkg + '-sharp', ges_generate_files,
+ges_sharp = shared_library(pkg + '-sharp', ges_generate_files,
         cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-unsafe'],
         link_with: gst_sharp,
         dependencies: [glib_sharp_dep, gio_sharp_dep])
index 43149d4..2eea172 100644 (file)
@@ -34,7 +34,7 @@ sources = [
 
 subdir('generated')
 
-gst_sharp = library('gstreamer-sharp', gst_generate_files, sources,
+gst_sharp = shared_library('gstreamer-sharp', gst_generate_files, sources,
         cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-unsafe'],
         dependencies: [glib_sharp_dep, gio_sharp_dep])