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