[Intel-gfx] [PATCH i-g-t 2/2] meson: intel_dp_compliance depends on libudev

Jani Nikula jani.nikula at intel.com
Tue Oct 24 08:14:15 UTC 2017


Only build intel_dp_compliance when libudev is available, also include
libudev in the list of dependencies.

Fixes error when libudev isn't there:

../tools/intel_dp_compliance_hotplug.c:33:21: fatal error: libudev.h: No such file or directory
 #include <libudev.h>

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 tools/meson.build | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/meson.build b/tools/meson.build
index 1bacac58647a..7fc5390a6f63 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -57,10 +57,15 @@ endforeach
 
 pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
 
-intel_dp_compliance_src = [ 'intel_dp_compliance.c', 'intel_dp_compliance_hotplug.c' ]
-executable('intel_dp_compliance', sources : intel_dp_compliance_src,
-	   dependencies : tool_deps,
-	   install : true)
+if libudev.found()
+	intel_dp_compliance_src = [
+		'intel_dp_compliance.c',
+		'intel_dp_compliance_hotplug.c'
+	]
+	executable('intel_dp_compliance', sources : intel_dp_compliance_src,
+		   dependencies : [tool_deps, libudev],
+		   install : true)
+endif
 
 intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
 executable('intel_l3_parity', sources : intel_l3_parity_src,
-- 
2.11.0



More information about the Intel-gfx mailing list