plstcharles / litiv

C++ implementation pool for computer vision R&D projects.
http://www.polymtl.ca/litiv/en/
Other
101 stars 30 forks source link

CMake Error on Ubuntu 14.04 LTS using CLion 2016.2.3 #10

Closed ln1equals0 closed 7 years ago

ln1equals0 commented 7 years ago

Hi, I'm using Ubuntu 14.04 LTS and I direct import the codebase into Clion 2016.2.3, and then the following errors showed up.

1

2

but I think I've properly installed the opencv, Because I can run some opencv example program successfully.

And when I cmake in terminal, it seems opencv was found.

3

plstcharles commented 7 years ago

Hello!

That seems to be an issue with the CMake version and the FindOpenCV.cmake module you're using; if you already have a FindOpenCV.cmake module on your system (typically in /usr/share/cmake/Modules/), you can simply delete the one in the project tree (at litiv/cmake/Modules/), and CMake will fallback to its own. Otherwise, you can still delete the one in the project tree, but you will have to manually specify the path to your OpenCV installation (the true 'manual' mode).

I think I will myself get rid of the FindOpenCV.cmake module I added to the project a couple weeks back --- it's causing more headaches than anything else because it's super old.

plstcharles commented 7 years ago

To be more specific: to manually set the path to your OpenCV installation in CMake, set the 'OpenCV_DIR' variable to the OpenCV build output directory, or to the directory where the 'OpenCVConfig.cmake' file resulting from installing the library can be found.