I have a .cpp file with opencv code . Things compile when I do: g++ my_file.cpp
.
My ~/.zshrc
: alias g++='g++ $(pkg-config --cflags --libs /usr/local/opt/opencv@2/lib/pkgconfig/opencv.pc)'
I want to harness Clion's autocomplete features; as such I need to tell it where my opencv libs are located through the CMakelist.
Currently, it looks like this:
cmake_minimum_required(VERSION 3.14)
project(my_project)
set(CMAKE_CXX_STANDARD 14)
add_executable(my_project main.cpp)
How do I add opencv as a dependency in my CMakelist in the simplest way possible?