mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
build: Adjust OpenCV components add JPEG and use libusb cmake file
This commit is contained in:
parent
7a36e9eaf3
commit
1f0b43632c
|
@ -25,10 +25,9 @@ find_package(Vulkan REQUIRED)
|
|||
find_package(OpenGL REQUIRED COMPONENTS GLX)
|
||||
find_package(HIDAPI)
|
||||
find_package(OpenHMD)
|
||||
find_package(OpenCV)
|
||||
|
||||
# @TODO Turn into a find_package LIBUSB-1.0 file.
|
||||
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
||||
find_package(OpenCV COMPONENTS core calib3d highgui imgproc imgcodecs features2d video)
|
||||
find_package(Libusb1)
|
||||
find_package(JPEG)
|
||||
|
||||
# @TODO Turn into a find_package LIBUVC file.
|
||||
pkg_check_modules(LIBUVC libuvc)
|
||||
|
@ -52,6 +51,7 @@ cmake_dependent_option(BUILD_WITH_XLIB "Enable xlib support" ON "X11_FOUND" OFF)
|
|||
cmake_dependent_option(BUILD_WITH_OPENGL "Enable OpenGL Graphics API support" ON "OPENGL_FOUND" OFF)
|
||||
|
||||
set(BUILD_WITH_LIBUSB TRUE)
|
||||
cmake_dependent_option(BUILD_WITH_JPEG "Enable jpeg code (used for some video drivers)" ON "JPEG_FOUND" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_OPENCV "Enable OpenCV backend" ON "OpenCV_FOUND" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_LIBUVC "Enable libuvc video driver" ON "LIBUVC_FOUND" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_FFMPEG "Enable ffmpeg testing video driver" ON "FFMPEG_FOUND" OFF)
|
||||
|
@ -84,6 +84,10 @@ if(BUILD_WITH_OPENCV)
|
|||
add_definitions(-DXRT_HAVE_OPENCV)
|
||||
endif()
|
||||
|
||||
if(BUILD_WITH_JPEG)
|
||||
add_definitions(-DXRT_HAVE_JPEG)
|
||||
endif()
|
||||
|
||||
if(BUILD_WITH_LIBUVC)
|
||||
add_definitions(-DXRT_HAVE_LIBUVC)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue