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