From 8be24c183b50ed7545cbe04e288543ea8e56aa3b Mon Sep 17 00:00:00 2001 From: Vesa Halttunen Date: Mon, 13 May 2013 18:06:00 +0200 Subject: [PATCH] Install the .prf to the correct location on Qt5 --- lib/lib.pro | 6 ++++-- lib/nemotransferengine-plugin-qt5.prf | 26 ++++++++++++++++++++++++++ rpm/transfer-engine-qt5.spec | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 lib/nemotransferengine-plugin-qt5.prf diff --git a/lib/lib.pro b/lib/lib.pro index dff6c53..7fb5ce2 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -38,7 +38,8 @@ HEADERS += \ SOURCES += \ transferengineinterface.cpp -OTHER_FILES += nemotransfernegine.pc nemotransferengine-plugin.prf +equals(QT_MAJOR_VERSION, 4): OTHER_FILES += nemotransfernegine.pc nemotransferengine-plugin.prf +equals(QT_MAJOR_VERSION, 5): OTHER_FILES += nemotransfernegine-qt5.pc nemotransferengine-plugin-qt5.prf headers.files = $$HEADERS equals(QT_MAJOR_VERSION, 4): headers.path = /usr/include/TransferEngine @@ -51,7 +52,8 @@ equals(QT_MAJOR_VERSION, 4): pkgconfigpc.files = nemotransferengine.pc equals(QT_MAJOR_VERSION, 5): pkgconfigpc.files = nemotransferengine-qt5.pc prf.path = $$[QT_INSTALL_DATA]/mkspecs/features -prf.files = nemotransferengine-plugin.prf +equals(QT_MAJOR_VERSION, 4): prf.files = nemotransferengine-plugin.prf +equals(QT_MAJOR_VERSION, 5): prf.files = nemotransferengine-plugin-qt5.prf INSTALLS += target headers prf pkgconfigpc diff --git a/lib/nemotransferengine-plugin-qt5.prf b/lib/nemotransferengine-plugin-qt5.prf new file mode 100644 index 0000000..2eae4a0 --- /dev/null +++ b/lib/nemotransferengine-plugin-qt5.prf @@ -0,0 +1,26 @@ +################################################################### +# transferengine plugin feature +################################################################### + +!contains(DEFINES, BUILD_LIBTRANSFERENGINE) { + + CONFIG += qt plugin + QT += network + + LIBTRANSFERENGINE_INC_DIR = /usr/include/TransferEngine-qt5 + + INCLUDEPATH += $${LIBTRANSFERENGINE_INC_DIR} + DEPENDPATH += $${LIBTRANSFERENGINE_INC_DIR} + + # We need to include these for MOC. + HEADERS += $${INCLUDEPATH}/transferplugininterface.h + HEADERS += $${INCLUDEPATH}/mediatransferinterface.h + + LIBTRANSFERENGINE_LIB_DIR = /usr/lib + unix: QMAKE_FLAGS += $${QMAKE_LFLAGS_RPATH}$${LIBTRANSFERENGINE_LIB_DIR} + LIBS += -L$${LIBTRANSFERENGINE_LIB_DIR} + qtAddLibrary(nemotransferengine-qt5) +} + + + diff --git a/rpm/transfer-engine-qt5.spec b/rpm/transfer-engine-qt5.spec index f1fbe59..cc83fcb 100644 --- a/rpm/transfer-engine-qt5.spec +++ b/rpm/transfer-engine-qt5.spec @@ -43,7 +43,7 @@ Requires: nemo-transferengine = %{version} %files devel %defattr(-,root,root,-) %{_includedir}/TransferEngine-qt5/*.h -%{_datadir}/qt5/mkspecs/features/nemotransferengine-plugin.prf +%{_datadir}/qt5/mkspecs/features/nemotransferengine-plugin-qt5.prf %{_libdir}/pkgconfig/nemotransferengine-qt5.pc %package ts-devel