Hello there,

I have an external project that has been set up to use CMake for compilation. I was just using a text editor and compiling at the command line but have decided to use Qt creator for the benefits an IDE bring.

I followed the instructions for setting up a CMake project by opening the CMakeLists.txt file in my top directory. CMake runs but it cannot find some packages using pkgconfig, specifically OpenCV. Qt cannot build the project now because there is a lot of code dependant on OpenCV.

If I run CMake at the command line it finds the OpenCV package. I'm at a loss as to why running CMake through Qt creator would cause a problem. The CMakeLists.txt files are all the same!!

I've run

Qt Code:
  1. daniel@daniel-linux:~$ pkg-config --cflags --libs opencv
  2. -I/opt/opencv-2.0.0/include/opencv -I/opt/opencv-2.0.0/include -L/opt/opencv-2.0.0/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
To copy to clipboard, switch view to plain text mode 

at the command line and opencv can be found.

I'm using ubuntu 10.10, Qt creator 2.0.1 (based on Qt 4.7.0), CMake 2.8-patch 3 and trying to find OpenCV 2.0.0 which is installed in as above

Am I missing a config param somewhere? Do I need to modify the PATH? Thought this is all handled in the CMakeLists.txt files.

Any ideas?