mirror of
https://github.com/opencv/opencv.git
synced 2024-11-30 14:29:49 +08:00
bfc227b8d4
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.
15 lines
877 B
CMake
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) |