This is a bit of a newbie question. I am trying to add the OpenCV libraries to a QT project.
This question says the link flags are given by
pkg-config --libs opencv
If I paste the command line output into the project file like:
LIBS += -L/usr/local/lib -lml -lcvaux -lhighgui -lcv -lcxcore
then everything compiles fine, but now this isn't portable. How can I simply reference the output of the command?
Update: Tried Ken Bloom's suggestion, but it won't compile. The actual generated compiler commands are
# How it should be, at least on my machine
g++ -o QOpenCVTest main.o qopencvtest.o moc_qopencvtest.o -L/usr/lib -L/usr/local/lib -lml -lcvaux -lhighgui -lcv -lcxcore -lQtGui -lQtCore -lpthread
# with CONFIG and PKGCONFIG
g++ -o QOpenCVTest main.o qopencvtest.o moc_qopencvtest.o -L/usr/lib -lQtGui -lQtCore -lpthread