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 | } |
---|
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 | CONFIG(release, debug|release) { |
---|
51 | OBJECTS_DIR = release |
---|
52 | DESTDIR = release |
---|
53 | } else { |
---|
54 | OBJECTS_DIR = debug |
---|
55 | DESTDIR = debug |
---|
56 | DEFINES += DEBUG |
---|
57 | } |
---|
58 | |
---|
59 | # Saving all intermediate files to tmp directory. |
---|
60 | MOC_DIR = ./tmp |
---|
61 | RCC_DIR = ./tmp |
---|
62 | UI_DIR = ./tmp |
---|
63 | |
---|
64 | # Include file(s) |
---|
65 | include(tspsg.pri) |
---|
66 | |
---|
67 | # Installation and deployment |
---|
68 | # Common rules |
---|
69 | #share.files = |
---|
70 | l10n.files = l10n/*.qm |
---|
71 | docs.files = COPYING README |
---|
72 | INSTALLS += target l10n share docs |
---|
73 | |
---|
74 | # For *nix: |
---|
75 | # - executable goes to /usr/bin |
---|
76 | # - COPYING and README go to /usr/share/tspsg |
---|
77 | # - translations go to /usr/share/tspsg/l10n |
---|
78 | # - docs (none, yet) go to /usr/share/doc/tspsg |
---|
79 | unix:!symbian { |
---|
80 | PREFIX = /usr |
---|
81 | CONFIG(release, debug|release) { |
---|
82 | DEFINES += PATH_L10N=\\\"$$PREFIX/share/tspsg/l10n\\\" |
---|
83 | DEFINES += PATH_DOCS=\\\"$$PREFIX/share/tspsg/docs\\\" |
---|
84 | } |
---|
85 | |
---|
86 | target.path = $$PREFIX/bin |
---|
87 | share.path = $$PREFIX/share/tspsg |
---|
88 | l10n.path = $$PREFIX/share/tspsg/l10n |
---|
89 | docs.path = $$PREFIX/share/doc/tspsg-$$VERSION |
---|
90 | apps.path = $$PREFIX/share/applications/ |
---|
91 | apps.files = resources/tspsg.desktop |
---|
92 | icon.path = $$PREFIX/share/pixmaps |
---|
93 | icon.files = resources/tspsg.png |
---|
94 | INSTALLS += apps icon |
---|
95 | } |
---|
96 | |
---|
97 | # TODO: MacOSX |
---|
98 | |
---|
99 | # For win32: everything goes to "C:\Program Files\tspsg" and subfolders. |
---|
100 | win32 { |
---|
101 | PREFIX = "C:\Program Files" |
---|
102 | } |
---|
103 | |
---|
104 | # For wince: we are deploying to \Storage Card\Program Files\tspsg. |
---|
105 | wince { |
---|
106 | PREFIX = "\Storage Card\Program Files" |
---|
107 | DEPLOYMENT += target share l10n docs |
---|
108 | } |
---|
109 | |
---|
110 | # win32 and wince common |
---|
111 | win* { |
---|
112 | target.path = "$$PREFIX\tspsg" |
---|
113 | share.path = "$$PREFIX\tspsg" |
---|
114 | l10n.path = "$$PREFIX\tspsg\l10n" |
---|
115 | docs.path = "$$PREFIX\tspsg" |
---|
116 | |
---|
117 | RC_FILE = resources/tspsg.rc |
---|
118 | } |
---|
119 | |
---|
120 | # Symbian |
---|
121 | symbian { |
---|
122 | l10n.path = l10n |
---|
123 | docs.pkg_prerules = \ |
---|
124 | "\"README\" - \"\", FILETEXT, TEXTCONTINUE" \ |
---|
125 | "\"COPYING\" - \"\", FILETEXT, TEXTEXIT" |
---|
126 | DEPLOYMENT += share l10n docs |
---|
127 | |
---|
128 | ICON = resources/tspsg.svg |
---|
129 | |
---|
130 | appinfo = \ |
---|
131 | "$$LITERAL_HASH{\"TSPSG\"},(0xEb9dce0e),0,1,2" |
---|
132 | vendorinfo = \ |
---|
133 | "%{\"l-homes.org\"}" \ |
---|
134 | ":\"l-homes.org\"" |
---|
135 | default_deployment.pkg_prerules = appinfo vendorinfo |
---|
136 | DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"TSPSG Installer\"},(0xA000D7CE),1,0,0" |
---|
137 | } |
---|