meson: Only run decklink cpp test when building it
authorNirbheek Chauhan <nirbheek@centricular.com>
Thu, 13 Apr 2017 16:44:12 +0000 (22:14 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Thu, 13 Apr 2017 16:59:15 +0000 (22:29 +0530)
Otherwise it gets run on Windows with MSVC where we don't build
Decklink and then it causes an error.

sys/decklink/meson.build

index 2b795c4c6d9273d1d6aa7eaadcea06946df8042e..2c6a2f1f310e9a6a32a5f2c982ecfcd03cc0868f 100644 (file)
@@ -25,12 +25,12 @@ if libdl.found() and have_pthread_h
   endif
 endif
 
-cxx = meson.get_compiler('cpp')
-if cxx.has_argument('-Wno-non-virtual-dtor')
-  decklink_cppargs += ['-Wno-non-virtual-dtor']
-endif
-
 if build_decklink
+  cxx = meson.get_compiler('cpp')
+  if cxx.has_argument('-Wno-non-virtual-dtor')
+    decklink_cppargs += ['-Wno-non-virtual-dtor']
+  endif
+
   decklink = library('gstdecklink',
     decklink_sources,
     cpp_args : gst_plugins_bad_args + decklink_cppargs,