[CMake] FIND_PACKAGE does not work

Müller Michael michael.mueller at Dkfz-Heidelberg.de
Fri Dec 18 06:57:57 EST 2009


Hi all,

i am trying to include OpenCV 2.0 (which is using CMake now) in our project. Therefore, I call FIND_PACKAGE(OpenCV 2 REQUIRED) in one of our CMake files with the following result:

CMake Error at mitk/CMake/MITK_OpenCV_Config.cmake:2 (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

...

The file OpenCVConfig.cmake exists and I provide an ENV variable OpenCV_DIR pointing to the correct dir which CMake should find. However, even if I set OpenCV_DIR manually in the cache, CMake keeps failing.

Any ideas?

Greets
Michael





More information about the CMake mailing list