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.
This commit is contained in:
Jan Schmidt 2021-11-28 02:57:35 +11:00
parent bdf96d6810
commit 11d18bcc8d

View file

@ -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()