QCA_INCDIR = /usr/pkg/qt4/include
QCA_LIBDIR = /usr/pkg/qt4/lib

CONFIG *= qt

LINKAGE =

exists($$QCA_LIBDIR/qca.framework) {
	QMAKE_CXXFLAGS += -F$$QCA_LIBDIR
	LIBS *= -F$$QCA_LIBDIR
	INCLUDEPATH += $$QCA_LIBDIR/qca.framework/Headers
	LINKAGE = -framework qca
}

# else, link normally
isEmpty(LINKAGE) {
	INCLUDEPATH += $$QCA_INCDIR/QtCrypto
	LIBS += -L$$QCA_LIBDIR
	LINKAGE = -lqca
	CONFIG(debug, debug|release) {
		windows:LINKAGE = -lqcad
		mac:LINKAGE = -lqca_debug
	}
}

LIBS += $$LINKAGE
