Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Import OpenCV in Qt Creator project
#-------------------------------------------------
#
# Add OpenCV to QT Creator on Mac OS X
#
# This pro file assumes that opencv was installed
# by homebrew or manually in /usr/local/
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Test
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
INCLUDEPATH += /usr/local/include
LIBS += -L/usr/local/lib \
-lopencv_core \
-lopencv_imgproc \
-lopencv_calib3d \
-lopencv_highgui \
# Add other OpenCV libs here as necessary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment