diff options
| author | JanKusanagi <jankusanagi@users.noreply.github.com> | 2016-10-29 16:33:51 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2016-10-29 16:33:51 +0200 |
| commit | 15293eba662b1dbed02ea9dd658e48e3c6d984bd (patch) | |
| tree | fd341f4934a033c1c0ace21a60292b3acc2cd2d0 | |
| parent | 83516e36711eb9035aebccdffded3432f06b0222 (diff) | |
| download | qxmpp-15293eba662b1dbed02ea9dd658e48e3c6d984bd.tar.gz | |
Added a qmake CONFIG feature file (#101)
| -rw-r--r-- | qxmpp.prf | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/qxmpp.prf b/qxmpp.prf new file mode 100644 index 00000000..1d5c45f6 --- /dev/null +++ b/qxmpp.prf @@ -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 |
