touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #118118
[Bug 1289094] Re: Could not find module FindOpenCV.cmake when compiling
** Changed in: opencv (Ubuntu)
Assignee: (unassigned) => Anushree (anushrivb)
** Changed in: opencv (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to opencv in Ubuntu.
https://bugs.launchpad.net/bugs/1289094
Title:
Could not find module FindOpenCV.cmake when compiling
Status in opencv package in Ubuntu:
Confirmed
Bug description:
Quoted from here: http://stackoverflow.com/questions/8711109/could-
not-find-module-findopencv-cmake-error-in-configuration-
process/22239942
I had installed opencv from ubuntu 12.10 repository (libopencv-)* and
had this problem:
I wrote a CMakeLists.txt for a project in C++ (using ROS), which uses OpenCV libraries. When I try to create the project using cmake, I get the next configuration problem:
"
CMake Error at CMakeLists.txt:15 (find_package):
Could not find module FindOpenCV.cmake or a configuration file for package
OpenCV.
Adjust CMAKE_MODULE_PATH to find FindOpenCV.cmake or set OpenCV_DIR to the
directory containing a CMake configuration file for OpenCV. The file will
have one of the following names:
OpenCVConfig.cmake
opencv-config.cmake
"
Couldn't solve it with export OpenCV_DIR=/usr/share/OpenCV/ (since my
OpenCVConfig.cmake whas there). It was solved when I also changed some
lines on the OpenCVConfig.cmake file:
# ======================================================
# Include directories to add to the user project:
# ======================================================
# Provide the include directories to the caller
#SET(OpenCV_INCLUDE_DIRS
"${OpenCV_INSTALL_PATH}/include/opencv;${OpenCV_INSTALL_PATH}/include")
SET(OpenCV_INCLUDE_DIRS "/usr/include/opencv;/usr/include/opencv2")
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
# ======================================================
# Link directories to add to the user project:
# ======================================================
# Provide the libs directory anyway, it may be needed in some cases.
#SET(OpenCV_LIB_DIR "${OpenCV_INSTALL_PATH}/lib")
SET(OpenCV_LIB_DIR "/usr/lib")
LINK_DIRECTORIES(${OpenCV_LIB_DIR})
And that worked on my Ubuntu 12.10. Remember to add the
target_link_libraries(yourprojectname ${OpenCV_LIBS}) in your
CMakeLists.txt.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/1289094/+subscriptions