--- qsampler/trunk/src/src.pro 2011/06/18 21:26:55 2184 +++ qsampler/trunk/src/src.pro 2017/08/25 10:39:58 3347 @@ -1,10 +1,9 @@ # qsampler.pro # -TARGET = qsampler +NAME = qsampler +TARGET = $${NAME} TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . include(src.pri) @@ -65,13 +64,15 @@ RESOURCES += \ qsampler.qrc + TRANSLATIONS += \ - translations/qsampler_cs.ts \ - translations/qsampler_ru.ts + translations/qsampler_cs.ts \ + translations/qsampler_ru.ts + unix { - #VARIABLES + # variables OBJECTS_DIR = .obj MOC_DIR = .moc UI_DIR = .ui @@ -80,28 +81,49 @@ PREFIX = /usr/local } - BINDIR = $$PREFIX/bin - DATADIR = $$PREFIX/share + isEmpty(BINDIR) { + BINDIR = $${PREFIX}/bin + } + + isEmpty(DATADIR) { + DATADIR = $${PREFIX}/share + } + + #DEFINES += DATADIR=\"$${DATADIR}\" + + # make install + INSTALLS += target desktop icon appdata \ + icon_scalable mimeinfo mimetypes mimetypes_scalable - DEFINES += DATADIR=\"$$DATADIR\" PKGDATADIR=\"$$PKGDATADIR\" + target.path = $${BINDIR} - #MAKE INSTALL - INSTALLS += target desktop icon + desktop.path = $${DATADIR}/applications + desktop.files += $${NAME}.desktop - target.path = $$BINDIR + icon.path = $${DATADIR}/icons/hicolor/32x32/apps + icon.files += images/$${NAME}.png - desktop.path = $$DATADIR/applications - desktop.files += $${TARGET}.desktop + icon_scalable.path = $${DATADIR}/icons/hicolor/scalable/apps + icon_scalable.files += images/$${NAME}.svg - icon.path = $$DATADIR/icons/hicolor/32x32/apps - icon.files += images/$${TARGET}.png + appdata.path = $${DATADIR}/metainfo + appdata.files += appdata/$${NAME}.appdata.xml + + mimeinfo.path = $${DATADIR}/mime/packages + mimeinfo.files += mimetypes/$${NAME}.xml + + mimetypes.path = $${DATADIR}/icons/hicolor/32x32/mimetypes + mimetypes.files += mimetypes/application-x-$${NAME}-session.png + + mimetypes_scalable.path = $${DATADIR}/icons/hicolor/scalable/mimetypes + mimetypes_scalable.files += mimetypes/application-x-$${NAME}-session.svg } win32 { CONFIG(debug, debug|release): CONFIG += console INSTALLS += target - target.path = $$PREFIX/bin + target.path = $${PREFIX}/bin } macx { @@ -109,3 +131,9 @@ QMAKE_MAC_SDK = $$(SDKROOT) CONFIG += $$(QMAKE_ARCHS) } + + +# QT5 support +!lessThan(QT_MAJOR_VERSION, 5) { + QT += widgets +}