opencv/cmake/OpenCVFindLibRealsense.cmake
Pavel Rojtberg bfc227b8d4 videoio: update librealsense to API 2.0
this enables the usage of current sensors, while dropping support for
legacy devices, see:
https://github.com/IntelRealSense/librealsense#overview

Given limited resources, and that the legacy sensors where not that
great, I think we should focus on v2.
2018-06-08 18:23:00 +02:00

15 lines
877 B
CMake

# Main variables:
# LIBREALSENSE_LIBRARIES and LIBREALSENSE_INCLUDE to link Intel librealsense modules
# HAVE_LIBREALSENSE for conditional compilation OpenCV with/without librealsense
find_path(LIBREALSENSE_INCLUDE_DIR "librealsense2/rs.hpp" PATHS "$ENV{LIBREALSENSE_INCLUDE}" DOC "Path to librealsense interface headers")
find_library(LIBREALSENSE_LIBRARIES "realsense2" PATHS "$ENV{LIBREALSENSE_LIB}" DOC "Path to librealsense interface libraries")
if(LIBREALSENSE_INCLUDE_DIR AND LIBREALSENSE_LIBRARIES)
set(HAVE_LIBREALSENSE TRUE)
else()
set(HAVE_LIBREALSENSE FALSE)
message( WARNING, " librealsense include directory (set by LIBREALSENSE_INCLUDE_DIR variable) is not found or does not have librealsense include files." )
endif() #if(LIBREALSENSE_INCLUDE_DIR AND LIBREALSENSE_LIBRARIES)
mark_as_advanced(FORCE LIBREALSENSE_LIBRARIES LIBREALSENSE_INCLUDE_DIR)