Kompilieren mit cmake mit Abhängigkeiten installiert mit macport

Ich versuche, bauen, Projekt, das in Abhängigkeit von OpenCV. Ich habe Opencv installiert mit macports und wenn ich versuche, bauen, Projekt, cmake gibt die folgende Ausgabe:

CMake Error at CMakeLists.txt:47 (FIND_PACKAGE):
  By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCV", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.

Suchte ich ein wenig über dieses problem und fügte hinzu, die folgende env. Variablen zu meinem $HOME/.profile Datei

export DYLD_LIBRARY_PATH=/opt/local/lib:$DYLD_LIBRARY_PATH
export CMAKE_PREFIX_PATH=/opt/local

ohne Erfolg. Ich überprüfte, und ich habe alle opencv-Dateien installiert in /opt/local/lib und /opt/local/include/opencv-Verzeichnisse. Es ist auch OpenCVConfig.cmake im folgenden Pfad:

/opt/local/lib/cmake/OpenCVConfig.cmake

How to make cmake den Pfad kennen, wo opencv installiert ist? Früher hab ich bauen OpenCV auf meiner eigenen mit cmake und installiert in /usr/local und dann lief es ohne weitere Korrektur. Jedoch hatte ich einige Probleme mit ffmpeg und jetzt ich wechselte mit macports.

InformationsquelleAutor pzo | 2012-10-17

Schreibe einen Kommentar