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