Detect OpenCV 4.x
This commit is contained in:
parent
9451fdd90c
commit
3e96e56d8b
|
@ -19,8 +19,10 @@ find_package(OpenCV REQUIRED)
|
||||||
message(STATUS "Found OpenCV: ${OpenCV_VERSION}")
|
message(STATUS "Found OpenCV: ${OpenCV_VERSION}")
|
||||||
if(OpenCV_VERSION VERSION_LESS 3.0)
|
if(OpenCV_VERSION VERSION_LESS 3.0)
|
||||||
add_definitions(-DUSE_OPENCV2)
|
add_definitions(-DUSE_OPENCV2)
|
||||||
else()
|
elseif(OpenCV_VERSION VERSION_LESS 4.0)
|
||||||
add_definitions(-DUSE_OPENCV3)
|
add_definitions(-DUSE_OPENCV3)
|
||||||
|
else()
|
||||||
|
add_definitions(-DUSE_OPENCV4)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC OR MSYS OR MINGW)
|
if(MSVC OR MSYS OR MINGW)
|
||||||
|
|
|
@ -30,8 +30,12 @@ make_executable(camera_a
|
||||||
|
|
||||||
## get_depth_with_region
|
## get_depth_with_region
|
||||||
|
|
||||||
|
if(OpenCV_VERSION VERSION_LESS 4.0)
|
||||||
|
|
||||||
make_executable(get_depth_with_region
|
make_executable(get_depth_with_region
|
||||||
SRCS get_depth_with_region.cc
|
SRCS get_depth_with_region.cc
|
||||||
LINK_LIBS mynteye ${OpenCV_LIBS}
|
LINK_LIBS mynteye ${OpenCV_LIBS}
|
||||||
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
|
DLL_SEARCH_PATHS ${PRO_DIR}/_install/bin ${OpenCV_LIB_SEARCH_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user