ldac: Use pkg-config instead of raw lib/header search
authorArun Raghavan <arun@asymptotic.io>
Wed, 27 Jan 2021 22:09:07 +0000 (17:09 -0500)
committerArun Raghavan <arun@asymptotic.io>
Wed, 27 Jan 2021 22:16:57 +0000 (17:16 -0500)
The ldacBT library includes pkg-config files for the standard and ABR
libraries, so let's just use that instead of doing a header/library
search.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1990>

ext/ldac/gstldacenc.h
ext/ldac/meson.build

index 2eafb7b..5fe80e5 100644 (file)
@@ -19,7 +19,7 @@
 #include <gst/gst.h>
 #include <gst/audio/audio.h>
 
-#include <ldac/ldacBT.h>
+#include <ldacBT.h>
 
 G_BEGIN_DECLS
 
index 1f29d88..47f028b 100644 (file)
@@ -3,10 +3,9 @@ ldac_sources = [
   'gstldacenc.c',
 ]
 
-ldac_dep = cc.find_library('ldacBT_enc', required : get_option('ldac'))
-ldac_hdr = cc.has_header('ldac/ldacBT.h', required: get_option('ldac'))
+ldac_dep = dependency('ldacBT-enc', required : get_option('ldac'))
 
-if ldac_dep.found() and ldac_hdr
+if ldac_dep.found()
   gstldac = library('gstldac',
     ldac_sources,
     c_args : gst_plugins_bad_args,