Bug #498
Incorrect check for OpenCV in CMakeLists
| Status: | Closed | Start date: | 2017-02-20 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | - | |||
| Target version: | - |
Description
Implement correct check for OpenCV root path.
For me, setting the variable has no effect.
After this fix, it works (it's also more correct for checking if it is a path/file):
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 4625)
+++ CMakeLists.txt (working copy)
@@ -381,7 +381,7 @@
ENDIF()
IF(BUILD_WITH_OPENCV)
- IF(${OPENCV_ROOT})
+ IF(EXISTS ${OPENCV_ROOT})
SET(OpenCV_DIR ${OPENCV_ROOT})
ENDIF()
SET(OpenCV_OLD_LIBS_NOT_FOUND "TRUE")
History
#1
Updated by Alexander Neumann about 8 years ago
- Status changed from New to Closed
Structure of FindCMake changed. Passing `OPENCV_ROOT` has no effect. Has been changed to
IF(OPENCV_ROOT)
SET(OpenCV_DIR ${OPENCV_ROOT})
MESSAGE(STATUS "opencv root: ${OPENCV_ROOT}")
ENDIF()
...
FIND_PACKAGE(OpenCV REQUIRED)
in ICL 10.0.0