source: tspsg-svn/trunk/tspsg.pro @ 98

Last change on this file since 98 was 98, checked in by laleppa, 15 years ago

+ Translatable About dialog.

  • Improved installation rules in .pro file.
  • Disabled SVG and JPEG support. They aren't needed at this point.
  • Fixed a bug when labels were hardly visible under Windows Vista/7 whith translucency on and a dark background behind the application.
  • Fixed a bug when Main Window area was blank if the application was compiled using Qt < 4.6.0.
  • Property svn:keywords set to Id URL
File size: 4.2 KB
Line 
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
15TEMPLATE = app
16TARGET = tspsg
17DEPENDPATH += .
18INCLUDEPATH += .
19
20# Versioning
21BUILD_VERSION_MAJOR = 0
22BUILD_VERSION_MINOR = 1
23BUILD_RELEASE = 2
24
25# These are only defined on releases
26#DEFINES += TSPSG_RELEASE_BUILD
27#DEFINES += BUILD_STATUS="\"(alpha 2)\""
28
29REVISION = $$system(svnversion)
30REVISION = $$replace(REVISION,"M","")
31VERSION = $$sprintf("%1.%2.%3",$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE)
32
33DEFINES += 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
39unix:!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}
46include($$join(PRL, "/"))
47contains(QMAKE_PRL_CONFIG, static) {
48# We "embed" SVG and JPEG support on static build
49#       QTPLUGIN += qjpeg qsvg
50        DEFINES += STATIC_BUILD
51}
52
53CONFIG(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.
65MOC_DIR = ./tmp
66RCC_DIR = ./tmp
67UI_DIR = ./tmp
68
69# Include file(s)
70include(tspsg.pri)
71
72# Installation and deployment
73# Common rules
74l10n.files = l10n/*.qm
75#share.files =
76docs.files = COPYING README
77INSTALLS += 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
84unix:!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.
105win32 {
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.
118wince {
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
129win* {
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
139symbian {
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}
Note: See TracBrowser for help on using the repository browser.