Permalink
Browse files

Added a qmake CONFIG feature file (#101)

  • Loading branch information...
jankusanagi authored and jlaine committed Oct 29, 2016
1 parent 83516e3 commit 15293eba662b1dbed02ea9dd658e48e3c6d984bd
Showing with 46 additions and 0 deletions.
  1. +46 −0 qxmpp.prf
View
@@ -0,0 +1,46 @@
QXMPP_INCDIR = $$[QT_INSTALL_HEADERS]
QXMPP_LIBDIR = $$[QT_INSTALL_LIBS]
## Distributions can adjust this for Qt 4
QXMPP_INCDIR ~= s!/qt5*!!
QXMPP_LIBDIR ~= s!/qt5*!!
CONFIG *= qt
# if we are including qxmpp.prf from the qxmpp tree (and not utilizing it as
# an installed qmake CONFIG feature), then point to the tree. this allows our
# qxmpp tree apps to build before qxmpp itself is installed.
exists($$PWD/qxmpp.pro) {
## Jan // I doubt this is needed for QXMPP
QXMPP_INCDIR = $$PWD/include
QXMPP_LIBDIR = $$PWD/lib
}
LINKAGE =
# on mac, if qxmpp was built as a framework, link against it
mac: {
## Jan // No idea about any of this Mac stuff
framework_dir = $${QXMPP_LIBDIR}
exists($$framework_dir/qxmpp.framework) {
LIBS += -F$$framework_dir
exists($$PWD/qxmpp.pro): INCLUDEPATH += $$QXMPP_INCDIR
else: INCLUDEPATH += $$framework_dir/qxmpp.framework/Headers
LINKAGE = -framework qxmpp
}
}
# else, link normally
isEmpty(LINKAGE) {
exists($$PWD/qxmpp.pro): INCLUDEPATH += $$QXMPP_INCDIR
else: INCLUDEPATH += $$QXMPP_INCDIR/qxmpp ## Jan // This is probably the usual case
LIBS += -L$$QXMPP_LIBDIR
LINKAGE = -lqxmpp ## Jan // Distributions might tune this with -lqxmpp_qt5, etc.
CONFIG(debug, debug|release) {
windows:LINKAGE = -lqxmppd
mac:LINKAGE = -lqxmpp_debug
}
}
LIBS += $$LINKAGE

0 comments on commit 15293eb

Please sign in to comment.