--- qsampler/trunk/src/src.pro 2011/06/18 21:26:55 2184 +++ qsampler/trunk/src/src.pro 2013/07/01 10:16:35 2457 @@ -1,10 +1,9 @@ # qsampler.pro # -TARGET = qsampler +NAME = qsampler +TARGET = $${NAME} TEMPLATE = app -DEPENDPATH += . -INCLUDEPATH += . include(src.pri) @@ -69,9 +68,10 @@ translations/qsampler_cs.ts \ translations/qsampler_ru.ts + unix { - #VARIABLES + # variables OBJECTS_DIR = .obj MOC_DIR = .moc UI_DIR = .ui @@ -80,28 +80,46 @@ PREFIX = /usr/local } - BINDIR = $$PREFIX/bin - DATADIR = $$PREFIX/share + BINDIR = $${PREFIX}/bin + DATADIR = $${PREFIX}/share + LOCALEDIR = $(localedir) + + DEFINES += DATADIR=\"$${DATADIR}\" + + !isEmpty(LOCALEDIR) { + DEFINES += LOCALEDIR=\"$${LOCALEDIR}\" + } + + # make install + INSTALLS += target desktop icon \ + 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}.svgz - icon.path = $$DATADIR/icons/hicolor/32x32/apps - icon.files += images/$${TARGET}.png + 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.svgz } win32 { CONFIG(debug, debug|release): CONFIG += console INSTALLS += target - target.path = $$PREFIX/bin + target.path = $${PREFIX}/bin } macx { @@ -109,3 +127,9 @@ QMAKE_MAC_SDK = $$(SDKROOT) CONFIG += $$(QMAKE_ARCHS) } + + +# QT5 support +!lessThan(QT_MAJOR_VERSION, 5) { + QT += widgets +}