meson: Add option for winks plugin
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 31 Jul 2018 22:13:31 +0000 (03:43 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 31 Jul 2018 22:14:07 +0000 (03:44 +0530)
This was accidentally missed.

meson_options.txt
sys/winks/meson.build

index c535574..a81c3d3 100644 (file)
@@ -128,6 +128,7 @@ option('wasapi', type : 'feature', value : 'auto', description : 'Windows Audio
 option('webp', type : 'feature', value : 'auto', description : 'WebP image codec plugin')
 option('webrtc', type : 'feature', value : 'auto', description : 'WebRTC audio/video network bin plugin')
 option('webrtcdsp', type : 'feature', value : 'auto', description : 'Plugin with various audio filters provided by the WebRTC audio processing library')
+option('winks', type : 'feature', value : 'auto', description : 'Windows Kernel Streaming video source plugin')
 option('winscreencap', type : 'feature', value : 'auto', description : 'Windows Screen Capture video source plugin')
 option('x265', type : 'feature', value : 'auto', description : 'HEVC/H.265 video encoder plugin')
 option('zbar', type : 'feature', value : 'auto', description : 'Barcode image scanner plugin')
index eea1a31..6c07a89 100644 (file)
@@ -7,13 +7,16 @@ winks_sources = [
   'ksvideohelpers.c',
 ]
 
-if host_system == 'windows'
-  winks_dep = [cc.find_library('ksuser', required : get_option('winks')),
-               cc.find_library('uuid', required : get_option('winks')),
-               cc.find_library('strmiids', required : get_option('winks')),
-               cc.find_library('dxguid', required : get_option('winks')),
-               cc.find_library('setupapi', required : get_option('winks')),
-               cc.find_library('ole32', required : get_option('winks'))]
+winks_option = get_option('winks')
+if host_system == 'windows' and not winks_option.disabled()
+  # FIXME: Add a way to skip this library when these deps are not found. Not
+  # urgent because these are always available when building for Windows.
+  winks_dep = [cc.find_library('ksuser', required : winks_option),
+               cc.find_library('uuid', required : winks_option),
+               cc.find_library('strmiids', required : winks_option),
+               cc.find_library('dxguid', required : winks_option),
+               cc.find_library('setupapi', required : winks_option),
+               cc.find_library('ole32', required : winks_option)]
 
   gstwinks = library('gstwinks',
     winks_sources,