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

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

+ Added precompiled header (PCH) file: should decrease project build time.

  • Improved installation and deployment rules in .pro file.
  • Improved translucency effect under Windows Vista/7.
  • Slightly modified qtwin.h to be included into the source documentation.
  • Regenerated source documentation.
  • Property svn:keywords set to Id URL
File size: 3.8 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 97 2010-03-02 23:55: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
[97]42} else {
43        PRL = $$[QT_INSTALL_LIBS] QtCore.prl
[96]44}
[71]45include($$join(PRL, "/"))
46contains(QMAKE_PRL_CONFIG, static) {
47# We "embed" SVG and JPEG support on static build
48        QTPLUGIN += qjpeg qsvg
49        DEFINES += STATIC_BUILD
50}
51
[36]52CONFIG(release, debug|release) {
53        OBJECTS_DIR = release
54        DESTDIR = release
55} else {
56        OBJECTS_DIR = debug
57        DESTDIR = debug
[96]58        DEFINES += DEBUG
[36]59}
60
[20]61# Saving all intermediate files to tmp directory.
62MOC_DIR = ./tmp
63RCC_DIR = ./tmp
64UI_DIR = ./tmp
65
[96]66# Include file(s)
[17]67include(tspsg.pri)
68
[96]69# Installation and deployment
70# Common rules
[97]71l10n.files = l10n/*.qm
[96]72#share.files =
73docs.files = COPYING README
74INSTALLS += target l10n share docs
75
[57]76# For *nix:
[96]77#   - executable goes to /usr/bin
[97]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
[93]81unix:!symbian {
[96]82        PREFIX = /usr
83        CONFIG(release, debug|release) {
[97]84                DEFINES += PATH_L10N=\\\"$$PREFIX/share/TSPSG/l10n\\\"
85                DEFINES += PATH_DOCS=\\\"$$PREFIX/share/TSPSG/docs\\\"
[96]86        }
87
88        target.path = $$PREFIX/bin
[97]89        share.path = $$PREFIX/share/TSPSG
90        l10n.path = $$PREFIX/share/TSPSG/l10n
91        docs.path = $$PREFIX/share/doc/TSPSG-$$VERSION
[96]92        apps.path = $$PREFIX/share/applications/
[61]93        apps.files = resources/tspsg.desktop
[96]94        icon.path = $$PREFIX/share/pixmaps
[61]95        icon.files = resources/tspsg.png
[96]96        INSTALLS += apps icon
[57]97}
[20]98
[96]99# TODO: MacOSX
100
[97]101# For win32: everything goes to "C:\Program Files\TSPSG" and subfolders.
[57]102win32 {
[96]103        PREFIX = "C:\Program Files"
[97]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
[57]114}
115
[97]116# For wince: we are deploying to \Program Files\TSPSG.
[57]117wince {
[97]118        PREFIX = "\Program Files"
[96]119        DEPLOYMENT += target share l10n docs
[97]120        DEPLOYMENT_PLUGIN += qjpeg qsvg
[57]121}
122
[96]123# win32 and wince common
124win* {
[97]125        target.path = $$PREFIX/TSPSG
126        share.path = $$PREFIX/TSPSG
127        l10n.path = $$PREFIX/TSPSG/l10n
128        docs.path = $$PREFIX/TSPSG
[96]129
130        RC_FILE = resources/tspsg.rc
131}
132
[93]133# Symbian
134symbian {
[96]135        l10n.path = l10n
136        docs.pkg_prerules = \
[93]137                "\"README\" - \"\", FILETEXT, TEXTCONTINUE" \
138                "\"COPYING\" - \"\", FILETEXT, TEXTEXIT"
[96]139        DEPLOYMENT += share l10n docs
[97]140        DEPLOYMENT_PLUGIN += qjpeg qsvg
[93]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}
Note: See TracBrowser for help on using the repository browser.