[1] | 1 | ###################################################################### |
---|
[17] | 2 | # |
---|
[90] | 3 | # TSPSG: TSP Solver and Generator |
---|
| 4 | # Copyright (C) 2007-2010 Lёppa <contacts[at]oleksii[dot]name> |
---|
[17] | 5 | # |
---|
[90] | 6 | # $Id: tspsg.pro 98 2010-03-12 19:28:42Z laleppa $ |
---|
| 7 | # $URL: https://tspsg.svn.sourceforge.net/svnroot/tspsg/trunk/tspsg.pro $ |
---|
[17] | 8 | # |
---|
[90] | 9 | # This file is part of TSPSG. |
---|
[17] | 10 | # |
---|
[1] | 11 | ###################################################################### |
---|
| 12 | |
---|
[98] | 13 | #QT += svg |
---|
[71] | 14 | |
---|
[36] | 15 | TEMPLATE = app |
---|
[17] | 16 | TARGET = tspsg |
---|
| 17 | DEPENDPATH += . |
---|
[1] | 18 | INCLUDEPATH += . |
---|
| 19 | |
---|
[96] | 20 | # Versioning |
---|
| 21 | BUILD_VERSION_MAJOR = 0 |
---|
| 22 | BUILD_VERSION_MINOR = 1 |
---|
| 23 | BUILD_RELEASE = 2 |
---|
| 24 | |
---|
[98] | 25 | # These are only defined on releases |
---|
[96] | 26 | #DEFINES += TSPSG_RELEASE_BUILD |
---|
[98] | 27 | #DEFINES += BUILD_STATUS="\"(alpha 2)\"" |
---|
[96] | 28 | |
---|
| 29 | REVISION = $$system(svnversion) |
---|
| 30 | REVISION = $$replace(REVISION,"M","") |
---|
| 31 | VERSION = $$sprintf("%1.%2.%3",$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE) |
---|
| 32 | |
---|
| 33 | DEFINES += BUILD_VERSION_MAJOR=$$BUILD_VERSION_MAJOR \ |
---|
| 34 | BUILD_VERSION_MINOR=$$BUILD_VERSION_MINOR \ |
---|
| 35 | BUILD_RELEASE=$$BUILD_RELEASE \ |
---|
| 36 | BUILD_NUMBER=$$REVISION |
---|
| 37 | |
---|
[71] | 38 | # A hack to determine whether we have static or dynamic Qt build |
---|
[96] | 39 | unix:!symbian { |
---|
| 40 | PRL = $$[QT_INSTALL_LIBS] libQtCore.prl |
---|
| 41 | } else:unix { |
---|
| 42 | PRL = $$[QT_INSTALL_LIBS] QtCore.prl |
---|
[97] | 43 | } else { |
---|
| 44 | PRL = $$[QT_INSTALL_LIBS] QtCore.prl |
---|
[96] | 45 | } |
---|
[71] | 46 | include($$join(PRL, "/")) |
---|
| 47 | contains(QMAKE_PRL_CONFIG, static) { |
---|
| 48 | # We "embed" SVG and JPEG support on static build |
---|
[98] | 49 | # QTPLUGIN += qjpeg qsvg |
---|
[71] | 50 | DEFINES += STATIC_BUILD |
---|
| 51 | } |
---|
| 52 | |
---|
[36] | 53 | CONFIG(release, debug|release) { |
---|
| 54 | OBJECTS_DIR = release |
---|
| 55 | DESTDIR = release |
---|
[98] | 56 | D = d |
---|
[36] | 57 | } else { |
---|
| 58 | OBJECTS_DIR = debug |
---|
| 59 | DESTDIR = debug |
---|
[96] | 60 | DEFINES += DEBUG |
---|
[98] | 61 | D = |
---|
[36] | 62 | } |
---|
| 63 | |
---|
[20] | 64 | # Saving all intermediate files to tmp directory. |
---|
| 65 | MOC_DIR = ./tmp |
---|
| 66 | RCC_DIR = ./tmp |
---|
| 67 | UI_DIR = ./tmp |
---|
| 68 | |
---|
[96] | 69 | # Include file(s) |
---|
[17] | 70 | include(tspsg.pri) |
---|
| 71 | |
---|
[96] | 72 | # Installation and deployment |
---|
| 73 | # Common rules |
---|
[97] | 74 | l10n.files = l10n/*.qm |
---|
[96] | 75 | #share.files = |
---|
| 76 | docs.files = COPYING README |
---|
| 77 | INSTALLS += target l10n share docs |
---|
| 78 | |
---|
[57] | 79 | # For *nix: |
---|
[96] | 80 | # - executable goes to /usr/bin |
---|
[97] | 81 | # - COPYING and README go to /usr/share/TSPSG |
---|
| 82 | # - translations go to /usr/share/TSPSG/l10n |
---|
| 83 | # - docs go to /usr/share/doc/TSPSG-x.x.x |
---|
[93] | 84 | unix:!symbian { |
---|
[96] | 85 | PREFIX = /usr |
---|
| 86 | CONFIG(release, debug|release) { |
---|
[97] | 87 | DEFINES += PATH_L10N=\\\"$$PREFIX/share/TSPSG/l10n\\\" |
---|
| 88 | DEFINES += PATH_DOCS=\\\"$$PREFIX/share/TSPSG/docs\\\" |
---|
[96] | 89 | } |
---|
| 90 | |
---|
| 91 | target.path = $$PREFIX/bin |
---|
[97] | 92 | share.path = $$PREFIX/share/TSPSG |
---|
| 93 | l10n.path = $$PREFIX/share/TSPSG/l10n |
---|
| 94 | docs.path = $$PREFIX/share/doc/TSPSG-$$VERSION |
---|
[98] | 95 | apps.files = resources/tspsg.desktop |
---|
[96] | 96 | apps.path = $$PREFIX/share/applications/ |
---|
[98] | 97 | icon.files = resources/tspsg.png |
---|
[96] | 98 | icon.path = $$PREFIX/share/pixmaps |
---|
| 99 | INSTALLS += apps icon |
---|
[57] | 100 | } |
---|
[20] | 101 | |
---|
[96] | 102 | # TODO: MacOSX |
---|
| 103 | |
---|
[98] | 104 | # For win32: everything goes to "%PROGRAMFILES%\TSPSG" and subfolders. |
---|
[57] | 105 | win32 { |
---|
[98] | 106 | PREFIX = "$$(PROGRAMFILES)" |
---|
[97] | 107 | |
---|
[98] | 108 | share.files = $$[QT_INSTALL_LIBS]/QtCore$${D}4.dll \ |
---|
| 109 | $$[QT_INSTALL_LIBS]/QtGui$${D}4.dll \ |
---|
| 110 | $$[QT_INSTALL_LIBS]/QtSvg$${D}4.dll |
---|
| 111 | imageformats.files = $$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${D}4.dll \ |
---|
| 112 | $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${D}4.dll |
---|
[97] | 113 | imageformats.path = $$PREFIX/TSPSG/imageformats |
---|
| 114 | INSTALLS += imageformats |
---|
[57] | 115 | } |
---|
| 116 | |
---|
[97] | 117 | # For wince: we are deploying to \Program Files\TSPSG. |
---|
[57] | 118 | wince { |
---|
[97] | 119 | PREFIX = "\Program Files" |
---|
[98] | 120 | share.sources = $$share.files |
---|
| 121 | l10n.sources = $$l10n.files |
---|
| 122 | docs.sources = $$docs.files |
---|
| 123 | |
---|
[96] | 124 | DEPLOYMENT += target share l10n docs |
---|
[98] | 125 | # DEPLOYMENT_PLUGIN += qjpeg qsvg |
---|
[57] | 126 | } |
---|
| 127 | |
---|
[96] | 128 | # win32 and wince common |
---|
| 129 | win* { |
---|
[97] | 130 | target.path = $$PREFIX/TSPSG |
---|
| 131 | share.path = $$PREFIX/TSPSG |
---|
| 132 | l10n.path = $$PREFIX/TSPSG/l10n |
---|
| 133 | docs.path = $$PREFIX/TSPSG |
---|
[96] | 134 | |
---|
| 135 | RC_FILE = resources/tspsg.rc |
---|
| 136 | } |
---|
| 137 | |
---|
[93] | 138 | # Symbian |
---|
| 139 | symbian { |
---|
[98] | 140 | # qmake for Symbian (as of Qt 4.6.2) has a bug: file masks doesn't work, so we need to specify all files manually |
---|
| 141 | share.sources = $$share.files |
---|
| 142 | l10n.sources = l10n/qt_ru.qm l10n/qt_uk.qm l10n/tspsg_en.qm l10n/tspsg_ru.qm l10n/tspsg_uk.qm |
---|
[96] | 143 | l10n.path = l10n |
---|
[98] | 144 | docs.sources = $$docs.files |
---|
[96] | 145 | docs.pkg_prerules = \ |
---|
[93] | 146 | "\"README\" - \"\", FILETEXT, TEXTCONTINUE" \ |
---|
| 147 | "\"COPYING\" - \"\", FILETEXT, TEXTEXIT" |
---|
[96] | 148 | DEPLOYMENT += share l10n docs |
---|
[98] | 149 | # DEPLOYMENT_PLUGIN += qjpeg qsvg |
---|
[93] | 150 | |
---|
| 151 | ICON = resources/tspsg.svg |
---|
| 152 | |
---|
| 153 | appinfo = \ |
---|
[98] | 154 | "$$LITERAL_HASH{\"TSPSG\"},(0xEb9dce0e),$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE" |
---|
[93] | 155 | vendorinfo = \ |
---|
| 156 | "%{\"l-homes.org\"}" \ |
---|
| 157 | ":\"l-homes.org\"" |
---|
| 158 | default_deployment.pkg_prerules = appinfo vendorinfo |
---|
| 159 | DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"TSPSG Installer\"},(0xA000D7CE),1,0,0" |
---|
| 160 | } |
---|