From 11d18bcc8d428b11358b1fc29795c2f9fd89c1dd Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sun, 28 Nov 2021 02:57:35 +1100 Subject: [PATCH] meson: Fix build when /usr/local/include doesn't exist. include_directories() will fail the build if the directory doesn't exist. Only require /usr/local/include if the leap library is found. --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0ba709db3..800e9bf70 100644 --- a/meson.build +++ b/meson.build @@ -85,7 +85,10 @@ percetto = dependency('percetto', required: false) gst_found = gst.found() and gst_app.found() and gst_video.found() leap = cc.find_library('Leap', dirs : ['/usr/local/lib'], required: false) -inc_leap = include_directories('/usr/local/include') +inc_leap = [] +if leap.found() + inc_leap += include_directories('/usr/local/include') +endif opencv = dependency('opencv', required: get_option('tracking')) if not opencv.found()