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 | TARGET = tspsg |
---|
17 | DEPENDPATH += . |
---|
18 | INCLUDEPATH += . |
---|
19 | |
---|
20 | # Versioning |
---|
21 | BUILD_VERSION_MAJOR = 0 |
---|
22 | BUILD_VERSION_MINOR = 1 |
---|
23 | BUILD_RELEASE = 2 |
---|
24 | |
---|
25 | # This one is only defined on releases |
---|
26 | #DEFINES += TSPSG_RELEASE_BUILD |
---|
27 | |
---|
28 | REVISION = $$system(svnversion) |
---|
29 | REVISION = $$replace(REVISION,"M","") |
---|
30 | VERSION = $$sprintf("%1.%2.%3",$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE) |
---|
31 | |
---|
32 | DEFINES += BUILD_VERSION_MAJOR=$$BUILD_VERSION_MAJOR \ |
---|
33 | BUILD_VERSION_MINOR=$$BUILD_VERSION_MINOR \ |
---|
34 | BUILD_RELEASE=$$BUILD_RELEASE \ |
---|
35 | BUILD_NUMBER=$$REVISION |
---|
36 | |
---|
37 | # A hack to determine whether we have static or dynamic Qt build |
---|
38 | unix:!symbian { |
---|
39 | PRL = $$[QT_INSTALL_LIBS] libQtCore.prl |
---|
40 | } else:unix { |
---|
41 | PRL = $$[QT_INSTALL_LIBS] QtCore.prl |
---|
42 | } else { |
---|
43 | PRL = $$[QT_INSTALL_LIBS] QtCore.prl |
---|
44 | } |
---|
45 | include($$join(PRL, "/")) |
---|
46 | contains(QMAKE_PRL_CONFIG, static) { |
---|
47 | # We "embed" SVG and JPEG support on static build |
---|
48 | QTPLUGIN += qjpeg qsvg |
---|
49 | DEFINES += STATIC_BUILD |
---|
50 | } |
---|
51 | |
---|
52 | CONFIG(release, debug|release) { |
---|
53 | OBJECTS_DIR = release |
---|
54 | DESTDIR = release |
---|
55 | } else { |
---|
56 | OBJECTS_DIR = debug |
---|
57 | DESTDIR = debug |
---|
58 | DEFINES += DEBUG |
---|
59 | } |
---|
60 | |
---|
61 | # Saving all intermediate files to tmp directory. |
---|
62 | MOC_DIR = ./tmp |
---|
63 | RCC_DIR = ./tmp |
---|
64 | UI_DIR = ./tmp |
---|
65 | |
---|
66 | # Include file(s) |
---|
67 | include(tspsg.pri) |
---|
68 | |
---|
69 | # Installation and deployment |
---|
70 | # Common rules |
---|
71 | l10n.files = l10n/*.qm |
---|
72 | #share.files = |
---|
73 | docs.files = COPYING README |
---|
74 | INSTALLS += target l10n share docs |
---|
75 | |
---|
76 | # For *nix: |
---|
77 | # - executable goes to /usr/bin |
---|
78 | # - COPYING and README go to /usr/share/TSPSG |
---|
79 | # - translations go to /usr/share/TSPSG/l10n |
---|
80 | # - docs go to /usr/share/doc/TSPSG-x.x.x |
---|
81 | unix:!symbian { |
---|
82 | PREFIX = /usr |
---|
83 | CONFIG(release, debug|release) { |
---|
84 | DEFINES += PATH_L10N=\\\"$$PREFIX/share/TSPSG/l10n\\\" |
---|
85 | DEFINES += PATH_DOCS=\\\"$$PREFIX/share/TSPSG/docs\\\" |
---|
86 | } |
---|
87 | |
---|
88 | target.path = $$PREFIX/bin |
---|
89 | share.path = $$PREFIX/share/TSPSG |
---|
90 | l10n.path = $$PREFIX/share/TSPSG/l10n |
---|
91 | docs.path = $$PREFIX/share/doc/TSPSG-$$VERSION |
---|
92 | apps.path = $$PREFIX/share/applications/ |
---|
93 | apps.files = resources/tspsg.desktop |
---|
94 | icon.path = $$PREFIX/share/pixmaps |
---|
95 | icon.files = resources/tspsg.png |
---|
96 | INSTALLS += apps icon |
---|
97 | } |
---|
98 | |
---|
99 | # TODO: MacOSX |
---|
100 | |
---|
101 | # For win32: everything goes to "C:\Program Files\TSPSG" and subfolders. |
---|
102 | win32 { |
---|
103 | PREFIX = "C:\Program Files" |
---|
104 | |
---|
105 | CONFIG(release, debug|release) { |
---|
106 | imageformats.files = $$[QT_INSTALL_PLUGINS]/imageformats/qsvg4.dll \ |
---|
107 | $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg4.dll |
---|
108 | } else { |
---|
109 | imageformats.files = $$[QT_INSTALL_PLUGINS]/imageformats/qsvgd4.dll \ |
---|
110 | $$[QT_INSTALL_PLUGINS]/imageformats/qjpegd4.dll |
---|
111 | } |
---|
112 | imageformats.path = $$PREFIX/TSPSG/imageformats |
---|
113 | INSTALLS += imageformats |
---|
114 | } |
---|
115 | |
---|
116 | # For wince: we are deploying to \Program Files\TSPSG. |
---|
117 | wince { |
---|
118 | PREFIX = "\Program Files" |
---|
119 | DEPLOYMENT += target share l10n docs |
---|
120 | DEPLOYMENT_PLUGIN += qjpeg qsvg |
---|
121 | } |
---|
122 | |
---|
123 | # win32 and wince common |
---|
124 | win* { |
---|
125 | target.path = $$PREFIX/TSPSG |
---|
126 | share.path = $$PREFIX/TSPSG |
---|
127 | l10n.path = $$PREFIX/TSPSG/l10n |
---|
128 | docs.path = $$PREFIX/TSPSG |
---|
129 | |
---|
130 | RC_FILE = resources/tspsg.rc |
---|
131 | } |
---|
132 | |
---|
133 | # Symbian |
---|
134 | symbian { |
---|
135 | l10n.path = l10n |
---|
136 | docs.pkg_prerules = \ |
---|
137 | "\"README\" - \"\", FILETEXT, TEXTCONTINUE" \ |
---|
138 | "\"COPYING\" - \"\", FILETEXT, TEXTEXIT" |
---|
139 | DEPLOYMENT += share l10n docs |
---|
140 | DEPLOYMENT_PLUGIN += qjpeg qsvg |
---|
141 | |
---|
142 | ICON = resources/tspsg.svg |
---|
143 | |
---|
144 | appinfo = \ |
---|
145 | "$$LITERAL_HASH{\"TSPSG\"},(0xEb9dce0e),0,1,2" |
---|
146 | vendorinfo = \ |
---|
147 | "%{\"l-homes.org\"}" \ |
---|
148 | ":\"l-homes.org\"" |
---|
149 | default_deployment.pkg_prerules = appinfo vendorinfo |
---|
150 | DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"TSPSG Installer\"},(0xA000D7CE),1,0,0" |
---|
151 | } |
---|