mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 02:26:16 +00:00
meson: Fix build with new opencv and -Dtracking=enabled
This commit is contained in:
parent
7c55c51408
commit
174c6f8bd5
17
meson.build
17
meson.build
|
@ -95,9 +95,17 @@ if leap.found()
|
|||
inc_leap += include_directories('/usr/local/include')
|
||||
endif
|
||||
|
||||
opencv = dependency('opencv', required: get_option('tracking'))
|
||||
opencv = dependency('opencv', required: false)
|
||||
if not opencv.found()
|
||||
opencv = dependency('opencv4', required: get_option('tracking'))
|
||||
opencv = dependency('opencv4', required: false)
|
||||
endif
|
||||
|
||||
if get_option('tracking').enabled() and not opencv.found()
|
||||
error('tracking enabled but opencv not found')
|
||||
endif
|
||||
|
||||
if get_option('tracking').auto()
|
||||
build_tracking = opencv.found()
|
||||
endif
|
||||
|
||||
# Find an external SLAM implementation
|
||||
|
@ -109,16 +117,11 @@ foreach slam_system : external_slam_systems
|
|||
endif
|
||||
endforeach
|
||||
|
||||
if get_option('tracking').enabled() or get_option('tracking').auto()
|
||||
build_tracking = opencv.found()
|
||||
endif
|
||||
|
||||
if get_option('tracing')
|
||||
build_tracing = percetto.found()
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# TODO: make these behave well when not present
|
||||
x11 = dependency('x11', required: get_option('xlib'))
|
||||
x11_xcb = dependency('x11-xcb', required: get_option('xlib'))
|
||||
|
|
Loading…
Reference in a new issue