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

Last change on this file since 96 was 96, checked in by laleppa, 14 years ago
  • Fixed some wrong defines that prevented successful compilation under *nix.
  • Renamed i18n to l10n to follow common standards.
  • Translation and documentation paths are now synchronized between .pro and source.
  • Moved some versioning information to .pro file.
  • Updated translations.
  • Property svn:keywords set to Id URL
File size: 3.3 KB
RevLine 
[1]1######################################################################
[17]2#
[90]3#  TSPSG: TSP Solver and Generator
4#  Copyright (C) 2007-2010 Lёppa <contacts[at]oleksii[dot]name>
[17]5#
[90]6#  $Id: tspsg.pro 96 2010-03-01 13:13:23Z laleppa $
7#  $URL: https://tspsg.svn.sourceforge.net/svnroot/tspsg/trunk/tspsg.pro $
[17]8#
[90]9#  This file is part of TSPSG.
[17]10#
[1]11######################################################################
12
[71]13QT += svg
14
[36]15TEMPLATE = app
[17]16TARGET = tspsg
17DEPENDPATH += .
[1]18INCLUDEPATH += .
19
[96]20# Versioning
21BUILD_VERSION_MAJOR = 0
22BUILD_VERSION_MINOR = 1
23BUILD_RELEASE = 2
24
25# This one is only defined on releases
26#DEFINES += TSPSG_RELEASE_BUILD
27
28REVISION = $$system(svnversion)
29REVISION = $$replace(REVISION,"M","")
30VERSION = $$sprintf("%1.%2.%3",$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE)
31
32DEFINES += BUILD_VERSION_MAJOR=$$BUILD_VERSION_MAJOR \
33        BUILD_VERSION_MINOR=$$BUILD_VERSION_MINOR \
34        BUILD_RELEASE=$$BUILD_RELEASE \
35        BUILD_NUMBER=$$REVISION
36
[71]37# A hack to determine whether we have static or dynamic Qt build
[96]38unix:!symbian {
39        PRL = $$[QT_INSTALL_LIBS] libQtCore.prl
40} else:unix {
41        PRL = $$[QT_INSTALL_LIBS] QtCore.prl
42}
[71]43include($$join(PRL, "/"))
44contains(QMAKE_PRL_CONFIG, static) {
45# We "embed" SVG and JPEG support on static build
46        QTPLUGIN += qjpeg qsvg
47        DEFINES += STATIC_BUILD
48}
49
[36]50CONFIG(release, debug|release) {
51        OBJECTS_DIR = release
52        DESTDIR = release
53} else {
54        OBJECTS_DIR = debug
55        DESTDIR = debug
[96]56        DEFINES += DEBUG
[36]57}
58
[20]59# Saving all intermediate files to tmp directory.
60MOC_DIR = ./tmp
61RCC_DIR = ./tmp
62UI_DIR = ./tmp
63
[96]64# Include file(s)
[17]65include(tspsg.pri)
66
[96]67# Installation and deployment
68# Common rules
69#share.files =
70l10n.files = l10n/*.qm
71docs.files = COPYING README
72INSTALLS += target l10n share docs
73
[57]74# For *nix:
[96]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
[93]79unix:!symbian {
[96]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/
[61]91        apps.files = resources/tspsg.desktop
[96]92        icon.path = $$PREFIX/share/pixmaps
[61]93        icon.files = resources/tspsg.png
[96]94        INSTALLS += apps icon
[57]95}
[20]96
[96]97# TODO: MacOSX
98
99# For win32: everything goes to "C:\Program Files\tspsg" and subfolders.
[57]100win32 {
[96]101        PREFIX = "C:\Program Files"
[57]102}
103
104# For wince: we are deploying to \Storage Card\Program Files\tspsg.
105wince {
[96]106        PREFIX = "\Storage Card\Program Files"
107        DEPLOYMENT += target share l10n docs
[57]108}
109
[96]110# win32 and wince common
111win* {
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
[93]120# Symbian
121symbian {
[96]122        l10n.path = l10n
123        docs.pkg_prerules = \
[93]124                "\"README\" - \"\", FILETEXT, TEXTCONTINUE" \
125                "\"COPYING\" - \"\", FILETEXT, TEXTEXIT"
[96]126        DEPLOYMENT += share l10n docs
[93]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}
Note: See TracBrowser for help on using the repository browser.